Custom fields
Custom fields
Custom field updated
custom_field.updatedFires when a field is edited in the catalog: its label, hint, options, settings or the "readable by AI" flag. `changes` lists what changed. An edit that changes nothing and a reorder send no event. The field catalog is shared by the whole company, so the integration channel filter (`channelFilter`) does not apply to these events: they reach an integration pinned to specific channels too.
HTTP request
AISAR sends a signed POST request to your webhook_url:
http
POST {webhook_url}
Content-Type: application/json
X-AISAR-Signature: sha256=...
{
"event": "custom_field.updated",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-11-13T10:05:00.000000Z",
"company_id": 1,
"data": {
"custom_field": {
"id": 12,
"entity_type": "contact",
"key": "istochnik",
"label": "Откуда узнали",
"description": null,
"type": "select",
"options": [
{ "key": "sait", "label": "Сайт", "position": 0, "archived": false },
{ "key": "reklama", "label": "Реклама", "position": 1, "archived": false }
],
"settings": {},
"is_ai_readable": false,
"position": 1,
"archived_at": null,
"created_at": "2026-11-12T09:30:00.000000Z",
"updated_at": "2026-11-13T10:05:00.000000Z"
},
"changes": ["label"]
}
}The X-AISAR-Signature header carries an HMAC-SHA256 signature of the request body — use it to verify the request came from AISAR.
Example payload
json
{
"event": "custom_field.updated",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-11-13T10:05:00.000000Z",
"company_id": 1,
"data": {
"custom_field": {
"id": 12,
"entity_type": "contact",
"key": "istochnik",
"label": "Откуда узнали",
"description": null,
"type": "select",
"options": [
{ "key": "sait", "label": "Сайт", "position": 0, "archived": false },
{ "key": "reklama", "label": "Реклама", "position": 1, "archived": false }
],
"settings": {},
"is_ai_readable": false,
"position": 1,
"archived_at": null,
"created_at": "2026-11-12T09:30:00.000000Z",
"updated_at": "2026-11-13T10:05:00.000000Z"
},
"changes": ["label"]
}
}Payload fields
| Field | Type | Description |
|---|---|---|
custom_field.id | integer | Field ID |
custom_field.entity_type | string | What the field belongs to: `contact`, `conversation` or `organization` |
custom_field.key | string | The machine name of the field. The value sits under this key in the contact, conversation or organization `custom_fields` and in `changes` names of the form `custom_fields.<key>` |
custom_field.label | string | The field label on the card |
custom_field.description | string|null | The field hint |
custom_field.type | string | The field type: `string`, `textarea`, `number`, `date`, `select`, `multiselect`, `checkbox`, `url`, `phone`, `email` |
custom_field.options | array|null | Choice options `[{key, label, position, archived}]` of `select` and `multiselect` fields; `null` for other types |
custom_field.settings | object | Display settings, for example `decimals` of a number field; always an object, may be empty |
custom_field.is_ai_readable | boolean | Whether AI employees can read the field value |
custom_field.position | integer | The field place in the list. Reordering (`PUT /v1/custom-fields/order`) sends no event |
custom_field.archived_at | string|null | When the field was archived (ISO 8601); `null` for an active field |
custom_field.created_at | string | Creation time (ISO 8601) |
custom_field.updated_at | string | Last change time (ISO 8601) |
changes | array | Names of the changed field properties, without values. A closed set: `label`, `description`, `options`, `settings`, `is_ai_readable`. The event goes out only with a non-empty list |