Custom fields
Lists the account custom field definitions. Use the **names** (`name`) returned here as keys of the `custom_fields` object when creating/updating leads.
Base URL
https://app.syncro.chat/api/v1AuthX-API-Key: crm_SUA_CHAVE_AQUIList custom fields
GET
Permission: /custom-fieldscustom_fields:readQuery parameters
active_onlybooleanoptionalIf
true, returns only active fieldsi
Field types (field_type): text, number, currency, date, select, multiselect, checkbox.
Request
curl "https://app.syncro.chat/api/v1/custom-fields?active_only=true" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
Response
{
"success": true,
"data": [
{
"id": 1,
"name": "tamanho_empresa",
"label": "Tamanho da empresa",
"field_type": "select",
"options": [
"1-10",
"11-50",
"51-200",
"200+"
],
"is_required": false,
"is_active": true,
"show_on_card": true,
"sort_order": 1
},
{
"id": 2,
"name": "setor",
"label": "Setor",
"field_type": "text",
"options": [],
"is_required": true,
"is_active": true,
"show_on_card": false,
"sort_order": 2
}
]
}Sending values when creating/updating a lead
In POST /leads (and upsert), send the custom_fields object with the key equal to the field's name:
{
"name": "João Silva",
"pipeline_id": 1,
"stage_id": 5,
"custom_fields": {
"tamanho_empresa": "200+",
"setor": "Tecnologia"
}
}
Values are converted according to the field_type (numbers, YYYY-MM-DD dates, booleans for checkbox, array for multiselect). Keys that do not exist as a field are ignored.
See Leads.