Organizations
Organization updated
organization.updatedFires when the fields of an organization change (`PATCH /v1/organizations/{organization}`) or its custom fields change (`PUT /v1/organizations/{organization}/custom-fields`). Adding, editing or deleting a bank account of the organization is reported by this event too, with `changed_fields: ["bank_accounts"]`; the accounts (numbers) are never in the body, read them from the card `GET /v1/organizations/{organization}` with `organization_bank_account.view`. Editing the relation type catalog sends no events. A request that changes nothing sends no event. Linking or unlinking a contact or a deal is reported by `contact.updated` and `deal.updated`, not by this event. The realtime copy carries only `{"organization_id": 12}`.
HTTP request
AISAR sends a signed POST request to your webhook_url:
POST {webhook_url}
Content-Type: application/json
X-AISAR-Signature: sha256=...
{
"event": "organization.updated",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-11-17T10:05:00.000000Z",
"company_id": 1,
"data": {
"organization": {
"id": 12,
"name": "Альфа Трейд",
"legal_name": "ТОО «Альфа Трейд»",
"tax_id": "120340567891",
"country_code": "KZ",
"relation_type": { "id": 31, "name": "Клиент", "system_key": "customer" },
"legal_form": "ТОО",
"registration_code": null,
"extra_codes": null,
"signatory_name": "Иван Петров",
"signatory_position": "Директор",
"signatory_basis": "Устава",
"phone": "+12025550142",
"email": "office@example.com",
"website": "https://example.com",
"address": null,
"comments": null,
"responsible_user": { "id": 7, "name": "Anna Smith" },
"source": "api",
"custom_fields": { "segment": "wholesale" },
"created_at": "2026-11-17T09:30:00.000000Z",
"updated_at": "2026-11-17T10:05:00.000000Z"
},
"changed_fields": ["phone", "responsible_user_id"]
}
}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
{
"event": "organization.updated",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-11-17T10:05:00.000000Z",
"company_id": 1,
"data": {
"organization": {
"id": 12,
"name": "Альфа Трейд",
"legal_name": "ТОО «Альфа Трейд»",
"tax_id": "120340567891",
"country_code": "KZ",
"relation_type": { "id": 31, "name": "Клиент", "system_key": "customer" },
"legal_form": "ТОО",
"registration_code": null,
"extra_codes": null,
"signatory_name": "Иван Петров",
"signatory_position": "Директор",
"signatory_basis": "Устава",
"phone": "+12025550142",
"email": "office@example.com",
"website": "https://example.com",
"address": null,
"comments": null,
"responsible_user": { "id": 7, "name": "Anna Smith" },
"source": "api",
"custom_fields": { "segment": "wholesale" },
"created_at": "2026-11-17T09:30:00.000000Z",
"updated_at": "2026-11-17T10:05:00.000000Z"
},
"changed_fields": ["phone", "responsible_user_id"]
}
}Payload fields
| Field | Type | Description |
|---|---|---|
organization.id | integer | Organization ID |
organization.name | string | Name |
organization.legal_name | string|null | Legal name |
organization.tax_id | string|null | BIN/IIN or INN, normalized (no spaces or dashes). For a sole proprietor it is the IIN of a person, i.e. personal data: the value travels in the webhook body and is kept in the webhook delivery log for its retention period, the same way as contact phone numbers |
organization.country_code | string|null | Two-letter ISO country code |
organization.relation_type | object|null | Relation type `{id, name, system_key}` or null; `system_key` is the permanent key of a starter type (`customer`, `prospect`, `partner`, `supplier`, `competitor`, `other`), null for the company custom types |
organization.legal_form | string|null | Legal form (a free string) |
organization.registration_code | string|null | Registration code (OKPO and the like) |
organization.extra_codes | string|null | Other codes as one string |
organization.signatory_name | string|null | Full name of the head or signatory. Personal data: the value travels in the webhook body and is kept in the webhook delivery log for its retention period |
organization.signatory_position | string|null | Position of the signatory. Together with the full name it is personal data |
organization.signatory_basis | string|null | What the signatory acts on |
organization.phone | string|null | Phone in E.164 format |
organization.email | string|null | E-mail, lower-case |
organization.website | string|null | Website |
organization.address | string|null | Address |
organization.comments | string|null | Comment (in full, not cut) |
organization.responsible_user | object|null | Responsible user `{id, name}` or null |
organization.source | string|null | Where the organization came from: `manual`, `api`, `backfill` (`import`, `bitrix24`, `amocrm` are reserved) |
organization.custom_fields | object | Organization custom field values `{key: value}`; always an object, even an empty one |
organization.created_at | string | Creation time (ISO-8601) |
organization.updated_at | string | Last update time (ISO-8601) |
changed_fields | array | Names of the changed fields (`name`, `tax_id`, `relation_type_id`, `legal_form`, `signatory_name`, `responsible_user_id` and so on); custom fields come as `custom.<key>`; a bank account change comes as `bank_accounts` |