Set a contact's custom field values
Merge custom field values into a contact. Keys you don't send are left unchanged; null clears a value.
PUT
https://api.centerfy.ai/webhooks/inbound/contacts/:id/custom-fields Headers
| Header | Required | Value | Description |
|---|---|---|---|
x-api-key | Yes | your sub-account API key (cfy_…) | Authenticates the request; or use Authorization: Bearer <key>. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | The contact id. |
Body parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
values | object | Yes | — | Object keyed by field_key (1–200 keys). Each key must be an active Centerfy field in this sub-account. Values must match the field type: number → number, checkbox → boolean, date → “YYYY-MM-DD” string, select → one of its options, multiselect → array of its options, text / textarea → string. null clears a value. |
Request body
{
"values": {
"plan_tier": "Pro"
}
}Example
curl -X PUT "https://api.centerfy.ai/webhooks/inbound/contacts/{id}/custom-fields" \
-H "x-api-key: $CENTERFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"values": {
"plan_tier": "Pro"
}
}' import { CenterfyClient } from "@centerfy/sdk";
const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });
const result = await centerfy.contacts.setCustomFields("<contactId>", {
"values": {
"plan_tier": "Pro"
}
});
console.log(result); centerfy contacts set-custom-fields <contactId> '{"values":{"plan_tier":"Pro"}}' MCP tool: centerfy_contacts_set_custom_fields (see MCP server)
Response
{
"status": "success",
"contact_id": "3f1c2a9e-7b4d-4c8a-9e2f-1a2b3c4d5e6f",
"updated": [
"plan_tier"
],
"custom_field_values": {
"plan_tier": "Pro"
}
}Errors
404— if the contact is not in this sub-account.
Notes
updated lists the keys written; custom_field_values is the contact’s full set after the merge. The request is all-or-nothing: 400 (and nothing is written) if values is empty, has more than 200 keys, names an unknown or archived field, names a field managed in GoHighLevel (read-only here), or a value has the wrong type or option.