Skip to content
AISARAISAR
Deals

Deals

Deal created

deal.created

Fires 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:

http
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

json
{
  "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

FieldTypeDescription
deal.idintegerDeal ID
deal.titlestringDeal title
deal.statusstringDeal status: `open`, `won`, or `lost`
deal.amountstring|nullDeal amount as a decimal string
deal.currencystring|nullCurrency code (e.g. `USD`)
deal.contact_idinteger|nullAssociated contact ID
deal.funnel_idinteger|nullFunnel ID
deal.funnel_stage_idinteger|nullCurrent funnel stage ID
deal.responsible_user_idinteger|nullAssigned (responsible) user ID
deal.created_atstringISO 8601 creation timestamp