Organizations
Organizations
Organization deleted
organization.deletedFires when an organization is deleted (`DELETE /v1/organizations/{organization}`). Deletion is soft: links of contacts and deals are kept, but while the organization is deleted they read with `organization: null`. No separate `contact.updated` or `deal.updated` is sent for those contacts and deals. The realtime copy 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.deleted",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-11-17T11:00:00.000000Z",
"company_id": 1,
"data": {
"organization": {
"id": 12,
"name": "Альфа Трейд",
"deleted_at": "2026-11-17T11:00: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.deleted",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-11-17T11:00:00.000000Z",
"company_id": 1,
"data": {
"organization": {
"id": 12,
"name": "Альфа Трейд",
"deleted_at": "2026-11-17T11:00:00.000000Z"
}
}
}Payload fields
| Field | Type | Description |
|---|---|---|
organization.id | integer | ID of the deleted organization |
organization.name | string | Name |
organization.deleted_at | string|null | Deletion time (ISO-8601) |