AISARAISAR
All webhooks

System

Export completed

export.completed

Fires when a data export job (`POST /v1/exports`) finishes successfully and the result file is ready for download. The file is available at `download_url` until `expires_at`, after which it is purged.

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": "export.completed",
  "event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
  "timestamp": "2026-03-26T12:00:00.000000Z",
  "company_id": 1,
  "data": {
    "id": 421,
    "uuid": "01JXXXXXXXXXXXXXXXXXXXXX",
    "type": "contacts",
    "name": "Контакты — март 2026",
    "format": "xlsx",
    "status": "completed",
    "filters": { "tag_ids": [12, 17] },
    "row_count": 5821,
    "file_size": 482733,
    "error_message": null,
    "download_url": "https://api.aisar.app/v1/exports/421/download",
    "expires_at": "2026-04-02T12:00:00.000000Z",
    "created_at": "2026-03-26T11:58:41.000000Z",
    "updated_at": "2026-03-26T12: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": "export.completed",
  "event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
  "timestamp": "2026-03-26T12:00:00.000000Z",
  "company_id": 1,
  "data": {
    "id": 421,
    "uuid": "01JXXXXXXXXXXXXXXXXXXXXX",
    "type": "contacts",
    "name": "Контакты — март 2026",
    "format": "xlsx",
    "status": "completed",
    "filters": { "tag_ids": [12, 17] },
    "row_count": 5821,
    "file_size": 482733,
    "error_message": null,
    "download_url": "https://api.aisar.app/v1/exports/421/download",
    "expires_at": "2026-04-02T12:00:00.000000Z",
    "created_at": "2026-03-26T11:58:41.000000Z",
    "updated_at": "2026-03-26T12:00:00.000000Z"
  }
}

Payload fields

FieldTypeDescription
idintegerExport ID
uuidstringPublic identifier
typestring`contacts`, `conversations`, `messages`, `deals`, etc.
formatstring`xlsx`, `csv`
statusstringAlways `completed`
filtersobject|nullFilters that were applied to the export
row_countintegerNumber of rows in the result file
file_sizeintegerFile size in bytes
download_urlstringSigned URL — requires authenticated request
expires_atstringISO 8601 — file is purged after this timestamp