Set custom-field values on contacts
POST /v2/custom-fields/contacts/values
Parameters
Header parameters
apps/rest-api/src/shared/idempotency.ts for the full contract. Missing → 400 BadRequest; same key + different body → 409 Conflict.Request body
Content-Type: application/json
"replace", "prepend", "append"Example
{
"custom_fields": [
{
"contact_id": "00000000-0000-0000-0000-000000000000",
"custom_field_id": "00000000-0000-0000-0000-000000000000"
}
]
}
Responses
200 — Successful response
Content-Type: application/json
Example
{
"data": {
"affected": 0
}
}
400 — Request body failed validation.
Content-Type: application/json
401 — Missing or invalid API key.
Content-Type: application/json
403 — Valid key, insufficient permission.
Content-Type: application/json
404 — Resource does not exist.
Content-Type: application/json
409 — Request conflicts with the current state of the resource.
Content-Type: application/json
429 — Rate limit exceeded.
Content-Type: application/json
500 — Unexpected server error.
Content-Type: application/json
Code samples
curl https://api.prod.getdex.com/v2/custom-fields/contacts/values \
--request POST \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"custom_fields": [
{
"contact_id": "00000000-0000-0000-0000-000000000000",
"custom_field_id": "00000000-0000-0000-0000-000000000000"
}
]
}'
fetch('https://api.prod.getdex.com/v2/custom-fields/contacts/values', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
custom_fields: [
{
contact_id: '00000000-0000-0000-0000-000000000000',
custom_field_id: '00000000-0000-0000-0000-000000000000'
}
]
})
})
requests.post(
"https://api.prod.getdex.com/v2/custom-fields/contacts/values",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"custom_fields": [
{
"contact_id": "00000000-0000-0000-0000-000000000000",
"custom_field_id": "00000000-0000-0000-0000-000000000000"
}
]
}
)
Reorder custom fields
Batch ranking update (`{ updates: [{ customFieldId, ranking }], entity_type? }`, max 100). `entity_type` (default `contact`) names whose fields are re-ranked; stale IDs and IDs of the other entity typ
Set custom-field values on companies
Batch-set custom-field VALUES on workspace companies (the `companies_custom_fields` rows and company links), 1 to 500 rows. Workspace only (`X-Dex-Workspace`); a Personal request is 404. Body: `{ cust

