Deals
Deal created
deal.createdFires when a new deal is created. Use this event to mirror deals into an external CRM or to trigger your own lead-processing workflows. An auto-lead created in "Unsorted" mode (`auto_lead_mode: unsorted`) is not sent out until it is accepted: the event goes out at `POST /v1/deals/{deal}/accept`, which is when the deal is born for your system (its `created_at` is still the moment the lead appeared, not when it was accepted). A lead that is declined or linked to another deal never produces `deal.created`. In "Straight to the pipeline" mode (`direct`) an auto-lead sends `deal.created` right away, like any other deal.
HTTP request
AISAR sends a signed POST request to your webhook_url:
POST {webhook_url}
Content-Type: application/json
X-AISAR-Signature: sha256=...
{
"event": "deal.created",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-03-26T12:00:00.000000Z",
"company_id": 1,
"data": {
"deal": {
"id": 30,
"title": "New Deal",
"status": "open",
"amount": "5000.00",
"currency": "USD",
"contact_id": 10,
"funnel_id": 1,
"funnel_stage_id": 3,
"responsible_user_id": 5,
"created_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
{
"event": "deal.created",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-03-26T12:00:00.000000Z",
"company_id": 1,
"data": {
"deal": {
"id": 30,
"title": "New Deal",
"status": "open",
"amount": "5000.00",
"currency": "USD",
"contact_id": 10,
"funnel_id": 1,
"funnel_stage_id": 3,
"responsible_user_id": 5,
"created_at": "2026-03-26T12:00:00.000000Z"
}
}
}Payload fields
| Field | Type | Description |
|---|---|---|
deal.id | integer | Deal ID |
deal.title | string | Deal title |
deal.status | string | Deal status: `open`, `won`, or `lost` |
deal.amount | string|null | Deal amount as a decimal string |
deal.currency | string|null | Currency code (e.g. `USD`) |
deal.contact_id | integer|null | Associated contact ID |
deal.funnel_id | integer|null | Funnel ID |
deal.funnel_stage_id | integer|null | Current funnel stage ID |
deal.responsible_user_id | integer|null | Assigned (responsible) user ID |
deal.created_at | string | ISO 8601 creation timestamp |