Create a custom field
POST /accounts/custom_fields
curl -X POST "https://app.bualpro.com/api/accounts/custom_fields" \
-H "Content-Type: application/json" \
-H "X-ACCESS-TOKEN: YOUR_API_KEY" \
-d '{
"name": "lead_score",
"type": 1
}'
import requests
import json
url = "https://app.bualpro.com/api/accounts/custom_fields"
headers = {
"Content-Type": "application/json",
"X-ACCESS-TOKEN": "YOUR_API_KEY"
}
data = {
"name": "lead_score",
"type": 1
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app.bualpro.com/api/accounts/custom_fields", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-ACCESS-TOKEN": "YOUR_API_KEY"
},
body: JSON.stringify({
"name": "lead_score",
"type": 1
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "lead_score",
"type": 1
}`)
req, err := http.NewRequest("POST", "https://app.bualpro.com/api/accounts/custom_fields", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-ACCESS-TOKEN", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app.bualpro.com/api/accounts/custom_fields')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-ACCESS-TOKEN'] = 'YOUR_API_KEY'
request.body = '{
"name": "lead_score",
"type": 1
}'
response = http.request(request)
puts response.body
{
"id": 1995,
"name": "lead_score"
}
/accounts/custom_fields
Target server for requests. Edit to use your own host.
API key (sent in header)
The media type of the request body
0 - text | 1 - number | 2 - date | 3 - datetime | 4 - true/false
The value of the bot field. It is ignored for the contact custom field.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Body
Johan Ahmad0 - text | 1 - number | 2 - date | 3 - datetime | 4 - true/false
01234The value of the bot field. It is ignored for the contact custom field.
Responses
The ID of the new custom field
Create a custom field