Organizations
Organizations
Organization created
organization.createdFires when a CRM organization (a client company) is created in the cabinet or via `POST /v1/organizations`. The body carries the whole organization except the contact and deal counters and the bank accounts, `tax_id`, the relation type and the requisites included (the signatory name and position are personal data). The realtime copy of the event on the company channel carries only `{"organization_id": 12}`.
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": "organization.created",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-11-17T09:30: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"
}
}
}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": "organization.created",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-11-17T09:30: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"
}
}
}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) |