Set a contact custom field
POST /contacts/{contact_id}/custom_fields/{custom_field_id}
curl -X POST "https://app.bualpro.com/api/contacts/123/custom_fields/example_string" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "X-ACCESS-TOKEN: YOUR_API_KEY" \
--data-urlencode value=example_string
import requests
import json
url = "https://app.bualpro.com/api/contacts/123/custom_fields/example_string"
headers = {
"Content-Type": "application/x-www-form-urlencoded",
"X-ACCESS-TOKEN": "YOUR_API_KEY"
}
data = {
"value": "example_string"
}
response = requests.post(url, headers=headers, data=data)
print(response.json())
const params = new URLSearchParams();
params.append("value", "example_string");
const response = await fetch("https://app.bualpro.com/api/contacts/123/custom_fields/example_string", {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
"X-ACCESS-TOKEN": "YOUR_API_KEY"
},
body: params
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"net/url"
"strings"
)
func main() {
data := url.Values{}
data.Set("value", "example_string")
req, err := http.NewRequest("POST", "https://app.bualpro.com/api/contacts/123/custom_fields/example_string", strings.NewReader(data.Encode()))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
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/contacts/123/custom_fields/example_string')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/x-www-form-urlencoded'
request['X-ACCESS-TOKEN'] = 'YOUR_API_KEY'
request.set_form([
["value", "example_string"]
], 'application/x-www-form-urlencoded')
response = http.request(request)
puts response.body
{
"success": true
}
POST
/contacts/{contact_id}/custom_fields/{custom_field_id}POST
Base URLstring
Target server for requests. Edit to use your own host.
API Key (header: X-ACCESS-TOKEN)
X-ACCESS-TOKENstring
RequiredAPI key (sent in header)
Content-Typestring
RequiredThe media type of the request body
Options: application/x-www-form-urlencoded
Request Preview
Response
Response will appear here after sending the request
Authentication
header
X-ACCESS-TOKENstring
RequiredAPI Key for authentication. Provide your API key in the header.
Path Parameters
Body
application/x-www-form-urlencoded
Responses
successboolean
Set a contact custom field
Was this page helpful?