Skip to content
Developers / API
Home

Developers / API

The AllChat API

Another system (a website, Make, Zapier or your own server) works with your workspace through the API: it adds and updates leads, sends WhatsApp messages, launches broadcasts and keeps customers in sync.

The routes are the same ones the app's own screens use, so every check, automation and history entry applies exactly as when a member acts.

This page is built from the API's code: the parameters, fields and errors here are what the server accepts and returns.

Base address
https://app.allchatai.io/api
Download OpenAPI

An OpenAPI 3.1 document (JSON) with every route, field and error.

Import into Postman, Make and Zapier

OpenAPI
http://127.0.0.1:44011/api/v1/public/openapi.json
  • Postman: Import → Link, and paste the document's address. You get a collection with every request; set the key once under Authorization → Bearer Token.
  • Make: the HTTP module → Make a request, with the address and fields from this page, and an Authorization: Bearer header with the key.
  • Zapier: Webhooks by Zapier → Custom Request, with the address, the fields and the Authorization header.
  • Any tool that reads OpenAPI (code generators, API clients) can read the document straight from its address.

Authentication

Making a key

  1. In Settings → API, an owner or admin makes a key and picks its scopes.
  2. The key is shown once: keep it somewhere safe (an environment variable on your server, a secret in Make). We store only its fingerprint.
  3. Revoke a key that leaked or isn't needed on the same screen: it stops working at once.

On every request

Send the key in the Authorization header. No cookie and no Origin are needed.

HTTP
Authorization: Bearer ak_<id>_<secret>

What a key can do

  • A key acts as the member who made it: their permissions and the data they see, always as they are now. A member who leaves or loses a permission takes it from the key too.
  • A key reaches only the routes its scopes open (below, by scope). Everything else answers 403 core.auth.scope_denied. A key never reaches members, roles, settings or other keys.
  • Phone numbers come back masked unless the member may see full numbers.
  • Every change is in the audit log under the member, marked "via API key" with the key's name.

Limits

Up to 300 requests a minute per key. Past that: 429 core.rate_limited with a Retry-After header (seconds to wait).

Quick check

This request returns the key's workspace, member and scopes.

curl
curl "https://app.allchatai.io/api/v1/api/me" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Errors

Every error has the same shape, with a stable code (never display text). Act on the code.

The error's shape
{
  "error": {
    "code": "core.validation",
    "issues": [
      {
        "path": "phone",
        "code": "crm.lead.phone_invalid"
      }
    ]
  }
}
StatusCodeWhen
400core.validationA missing or invalid value. issues says which field and why.
401core.auth.bad_api_keyA wrong or revoked key, or its member or workspace is no longer active.
403core.auth.scope_deniedThe route isn't open to the key's scopes.
403core.auth.forbiddenThe key's member lacks the permission.
403core.module.disabledThe module (CRM, inbox, broadcasts) is off in the workspace.
404crm.lead.not_foundNot found (each module has its own code).
409 / 422inbox.send.window_closedRefused by the rules, e.g. free text outside the 24-hour window, or a blocked lead (crm.lead.blocked).
429core.rate_limitedToo many requests a minute. Wait as Retry-After says.

Each route lists its possible errors next to it.

The key

Any key, whatever its scopes.

GET/v1/api/me

The key itself

The workspace, the member the key acts as, and the key's scopes. Any key may call it: a quick way to check a key works.

Parameters

No parameters.

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/api/me" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "workspace": {
    "name": "My business",
    "slug": "my-business"
  },
  "key": {
    "name": "Website",
    "scopes": [
      "leads.read",
      "leads.write"
    ]
  },
  "member": {
    "name": "Dana",
    "role": "owner"
  }
}

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_denied
  • 429core.rate_limited

Reading leadsleads.read

Scope leads.read: leads, their notes, the catalog (statuses, sources, fields) and customers.

GET/v1/crm/leads

Search leads

Leads the key's member may see, newest first unless sorted otherwise. q searches name, phone digits and email.

Member permissionscrm.leads.read

Parameters

NameInTypeRequiredNotes
viewqueryall | mine | callbacks | new | unassigned | deleted= "all"Noall, mine, callbacks, new, unassigned (deleted: the recycle bin, for members who may delete).
qquerystring≤ 100NoSearch: name, phone digits, email.
statusquerystringNoStatus keys, comma-separated.
sourcequerystringNoUTM sources, comma-separated.
ownerquerystringNoMember ids, comma-separated; "none" for unassigned.
duplicatequeryany | org | today | noneNo
organizationquerystringNo
campaignquerystringNo
channelquerystringNo
createdquerystringNoA preset (today, 7d, month...) or from..to (YYYY-MM-DD..YYYY-MM-DD; either end may be empty).
advquerystring≤ 8000NoAdvanced rules as JSON: [{"f":"<field>","o":"<operator>","v":"<value>"}].
responsibilityqueryall | org | senderNo
sortquerylastActivity | createdAt | value | name | status= "createdAt"No
dirqueryasc | desc= "desc"No
limitqueryinteger1–500 · = 200NoPage size (up to 500).
offsetqueryinteger= 0NoHow many to skip.

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/crm/leads" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "ref": "1042",
      "name": "Dana Levi",
      "company": "Acme",
      "phone": "+972541234567",
      "email": "dana@example.com",
      "status": "new",
      "source": "facebook",
      "ownerId": "00000000-0000-4000-8000-000000000000",
      "valueMinor": 0,
      "currency": "ILS",
      "customFields": {},
      "organizationId": "00000000-0000-4000-8000-000000000000",
      "campaignId": "00000000-0000-4000-8000-000000000000",
      "channelId": "00000000-0000-4000-8000-000000000000",
      "attribution": {},
      "landingPageName": "string",
      "duplicate": {
        "system": false,
        "org": false,
        "today": false,
        "of": "string"
      },
      "contactBlocked": false,
      "callback": {
        "at": "2026-11-01T09:00:00Z",
        "by": "string"
      },
      "createdAt": "2026-11-01T09:00:00Z",
      "lastActivityAt": "2026-11-01T09:00:00Z",
      "deletedAt": "2026-11-01T09:00:00Z",
      "deletedBy": "string",
      "synced": {
        "connectionId": "string",
        "source": "facebook",
        "agent": "string"
      }
    }
  ],
  "total": 0
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabledcrm.filter.phone_hidden
  • 429core.rate_limited

GET/v1/crm/leads/{ref}

A lead

One lead by its number.

Member permissionscrm.leads.read

Parameters

NameInTypeRequiredNotes
refpathstringYesThe lead number (digits, "1042"; "#1042" and "L-1042" work too).

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/crm/leads/1042" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "id": "00000000-0000-4000-8000-000000000000",
  "ref": "1042",
  "name": "Dana Levi",
  "company": "Acme",
  "phone": "+972541234567",
  "email": "dana@example.com",
  "status": "new",
  "source": "facebook",
  "ownerId": "00000000-0000-4000-8000-000000000000",
  "valueMinor": 0,
  "currency": "ILS",
  "customFields": {},
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "campaignId": "00000000-0000-4000-8000-000000000000",
  "channelId": "00000000-0000-4000-8000-000000000000",
  "attribution": {},
  "landingPageName": "string",
  "duplicate": {
    "system": false,
    "org": false,
    "today": false,
    "of": "string"
  },
  "contactBlocked": false,
  "callback": {
    "at": "2026-11-01T09:00:00Z",
    "by": "string"
  },
  "createdAt": "2026-11-01T09:00:00Z",
  "lastActivityAt": "2026-11-01T09:00:00Z",
  "deletedAt": "2026-11-01T09:00:00Z",
  "deletedBy": "string",
  "synced": {
    "connectionId": "string",
    "source": "facebook",
    "agent": "string"
  }
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404crm.lead.not_found
  • 429core.rate_limited

GET/v1/crm/leads/{ref}/notes

A lead's notes

The lead's notes the key's member may read (by the workspace's note settings), newest first.

Member permissionscrm.leads.read

Parameters

NameInTypeRequiredNotes
refpathstringYesThe lead number (digits, "1042"; "#1042" and "L-1042" work too).

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/crm/leads/1042/notes" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "body": "Called back, sending a quote.",
      "authorId": "string",
      "authorName": "string",
      "category": "agents",
      "mine": false,
      "createdAt": "2026-11-01T09:00:00Z"
    }
  ]
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404crm.lead.not_found
  • 429core.rate_limited

GET/v1/crm/catalog

Statuses, sources, fields and more

The workspace's lists: statuses, sources, custom fields, organizations, campaigns and channels. The keys and ids to send when creating or changing a lead.

Member permissionscrm.leads.read

Parameters

No parameters.

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/crm/catalog" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "groups": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "Dana Levi",
      "kind": "untreated",
      "sort": 0
    }
  ],
  "statuses": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "key": "541234567",
      "label": "Main line",
      "groupId": "string",
      "tone": "gray",
      "sort": 0,
      "isDefault": false,
      "isFinal": false,
      "needsFollowup": false,
      "agentVisible": false,
      "archived": false
    }
  ],
  "areaStatuses": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "entity": "customer",
      "key": "541234567",
      "label": "Main line",
      "tone": "gray",
      "sort": 0,
      "isDefault": false,
      "isFinal": false,
      "archived": false
    }
  ],
  "sources": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "key": "541234567",
      "label": "Main line",
      "sort": 0,
      "archived": false
    }
  ],
  "fields": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "key": "541234567",
      "label": "Main line",
      "type": "text",
      "options": [
        {
          "value": "string",
          "label": "Main line"
        }
      ],
      "required": false,
      "sort": 0,
      "showInTable": false,
      "showInPanel": false,
      "showInCreate": false,
      "showInExport": false,
      "visibleRoles": [
        "string"
      ],
      "editableRoles": [
        "string"
      ],
      "areas": [
        "lead"
      ],
      "columns": [
        {
          "key": "541234567",
          "label": "Main line",
          "required": false,
          "maxLength": 0,
          "choices": [
            "string"
          ],
          "multiple": false,
          "detailFor": [
            "string"
          ]
        }
      ],
      "syncConnectionId": "string",
      "syncRefused": false,
      "syncEditable": false,
      "editable": false,
      "archived": false
    }
  ],
  "allFields": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "key": "541234567",
      "label": "Main line",
      "type": "text",
      "options": [
        {
          "value": "string",
          "label": "Main line"
        }
      ],
      "required": false,
      "sort": 0,
      "showInTable": false,
      "showInPanel": false,
      "showInCreate": false,
      "showInExport": false,
      "visibleRoles": [
        "string"
      ],
      "editableRoles": [
        "string"
      ],
      "areas": [
        "lead"
      ],
      "columns": [
        {
          "key": "541234567",
          "label": "Main line",
          "required": false,
          "maxLength": 0,
          "choices": [
            "string"
          ],
          "multiple": false,
          "detailFor": [
            "string"
          ]
        }
      ],
      "syncConnectionId": "string",
      "syncRefused": false,
      "syncEditable": false,
      "editable": false,
      "archived": false
    }
  ],
  "organizations": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "Dana Levi",
      "nameEn": "string",
      "aliases": [
        "string"
      ],
      "email": "dana@example.com",
      "phone": "+972541234567",
      "notes": "string",
      "archived": false
    }
  ],
  "campaigns": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "organizationId": "string",
      "name": "Dana Levi",
      "description": "string",
      "status": "planned",
      "kind": "string",
      "brand": "string"
    }
  ],
  "channels": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "campaignId": "string",
      "name": "Dana Levi",
      "type": "webhook",
      "description": "string",
      "fields": [
        {
          "name": "Dana Levi",
          "target": "string",
          "required": false
        }
      ],
      "statusKey": "string",
      "key": {
        "state": "none",
        "connectionId": "string",
        "lastEventAt": "string",
        "signed": false
      },
      "facebookForms": 0
    }
  ],
  "tableColumns": [
    "string"
  ],
  "customerLink": "phone",
  "vocabulary": "customer",
  "campaignTags": false,
  "splitName": false
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 429core.rate_limited

GET/v1/fields

The workspace's fields

Every field the workspace defined, across the system: which records carry it (areas: lead, customer, contact, product, deal, task, project, candidate, job, of the modules that are on), its type and options. A record's customFields use these keys. Only fields the key's member may see.

Parameters

NameInTypeRequiredNotes
areaquerylead | customer | contact | product | deal | task | project | candidate …NoOnly the fields of one area.

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/fields" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "items": [
    {
      "key": "541234567",
      "label": "Main line",
      "type": "text",
      "options": [
        {
          "value": "string",
          "label": "Main line"
        }
      ],
      "columns": [
        {
          "key": "541234567",
          "label": "Main line"
        }
      ],
      "required": false,
      "areas": [
        "lead"
      ],
      "editable": false
    }
  ]
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_denied
  • 429core.rate_limited

GET/v1/crm/customers

Search customers

Customers: one per phone number, over all of that person's leads (and customers known only from an upload). Needs a member who may see full phone numbers.

Member permissionscrm.leads.readcore.phones.view

Parameters

NameInTypeRequiredNotes
qquerystring≤ 100NoSearch: name, phone digits, email.
advquerystring≤ 8000NoAdvanced rules as JSON, as on the customers screen.
hasquerywith_leads | no_leads | left_syncNowith_leads: people with a lead; no_leads: customers known only from an upload.
viewqueryactive | archivedNoactive: only active customers, as the workspace defines them (Settings → Customers). archived: the customers in the archive (needs crm.customers.archive); every other view leaves them out.
dealquerystringNoBy deal state, comma-separated (active, error, frozen, ended, cancelled, one_time, unknown, none).
statusquerystringNo
responsibilityqueryall | org | senderNo
colquerystring≤ 2000No
sortquerylast | name | city | since | leads | email= "last"No
dirqueryasc | descNo
limitqueryinteger1–200 · = 100NoPage size (up to 200).
offsetqueryinteger= 0NoHow many to skip.

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/crm/customers" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "items": [
    {
      "key": "541234567",
      "name": "Dana Levi",
      "phone": "+972541234567",
      "leads": 0,
      "lastActivityAt": "2026-11-01T09:00:00Z",
      "email": "dana@example.com",
      "company": "Acme",
      "city": "string",
      "customerSince": "string",
      "profile": false,
      "status": "new",
      "leftSync": false,
      "archived": {
        "at": "2026-11-01T09:00:00Z",
        "byId": "string",
        "byName": "string",
        "reason": "string"
      }
    }
  ],
  "total": 0
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 429core.rate_limited

GET/v1/crm/customers/{key}

A customer

One customer by phone: their details and all their leads.

Member permissionscrm.leads.readcore.phones.view

Parameters

NameInTypeRequiredNotes
keypathstringYesThe customer's phone: its last 9 digits, or the whole number (0541234567, +972541234567).

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/crm/customers/0541234567" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "key": "541234567",
  "name": "Dana Levi",
  "phone": "+972541234567",
  "leads": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "ref": "1042",
      "name": "Dana Levi",
      "company": "Acme",
      "phone": "+972541234567",
      "email": "dana@example.com",
      "status": "new",
      "source": "facebook",
      "ownerId": "00000000-0000-4000-8000-000000000000",
      "valueMinor": 0,
      "currency": "ILS",
      "customFields": {},
      "organizationId": "00000000-0000-4000-8000-000000000000",
      "campaignId": "00000000-0000-4000-8000-000000000000",
      "channelId": "00000000-0000-4000-8000-000000000000",
      "attribution": {},
      "landingPageName": "string",
      "duplicate": {
        "system": false,
        "org": false,
        "today": false,
        "of": "string"
      },
      "contactBlocked": false,
      "callback": {
        "at": "2026-11-01T09:00:00Z",
        "by": "string"
      },
      "createdAt": "2026-11-01T09:00:00Z",
      "lastActivityAt": "2026-11-01T09:00:00Z",
      "deletedAt": "2026-11-01T09:00:00Z",
      "deletedBy": "string",
      "synced": {
        "connectionId": "string",
        "source": "facebook",
        "agent": "string"
      }
    }
  ],
  "profile": {
    "name": "Dana Levi",
    "email": "dana@example.com",
    "company": "Acme",
    "externalId": "string",
    "city": "string",
    "notes": "string",
    "customerSince": "string",
    "importJob": "string",
    "importedAt": "2026-11-01T09:00:00Z",
    "updatedAt": "2026-11-01T09:00:00Z",
    "address": {
      "street": "string",
      "houseNumber": "string",
      "entrance": "string",
      "apartment": "string",
      "zip": "string"
    },
    "taxId": "string",
    "floor": "string",
    "addressNotes": "string",
    "customFields": {},
    "status": "new",
    "synced": {
      "connectionId": "string",
      "source": "facebook",
      "at": "string",
      "fields": [
        {
          "key": "541234567",
          "label": "Main line",
          "type": "text",
          "value": "string",
          "columns": [
            {
              "key": null,
              "label": null,
              "required": null,
              "maxLength": null,
              "choices": null,
              "multiple": null,
              "detailFor": null
            }
          ],
          "editable": false
        }
      ]
    },
    "statusSynced": false,
    "syncLeftAt": "2026-11-01T09:00:00Z"
  },
  "archived": {
    "at": "2026-11-01T09:00:00Z",
    "byId": "string",
    "byName": "string",
    "reason": "string"
  }
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404crm.customer.not_found
  • 429core.rate_limited

Writing leadsleads.write

Scope leads.write: create and change leads, add notes, save customers' details.

POST/v1/crm/leads

Create a lead

A new lead, through the CRM's usual creation: the block list, duplicate flags, routing and the "lead created" automations. phone in international form (E.164). status is a status key from the catalog (left out: the workspace's starting status). customFields by field key.

Member permissionscrm.leads.write

Parameters

NameInTypeRequiredNotes
namebodystring1–200Yes
firstNamebodystring | null1–100No
lastNamebodystring | null1–100No
companybodystring | null≤ 200No
phonebodystringYesInternational form (E.164), e.g. +972541234567.
emailbodyemail | nullNo
statusbodystring1–80NoA status key from GET /v1/crm/catalog; left out: the workspace's starting status.
ownerIdbodyuuid | nullNoThe member (membership id) to assign it to.
customFieldsbodyobjectNoValues by custom field key (GET /v1/crm/catalog: fields).
organizationIdbodyuuid | nullNoFrom GET /v1/crm/catalog: organizations.
campaignIdbodyuuid | nullNoFrom GET /v1/crm/catalog: campaigns.
channelIdbodyuuid | nullNoFrom GET /v1/crm/catalog: channels.
cardbody"new_lead"No

Request

curl
curl -X POST "https://app.allchatai.io/api/v1/crm/leads" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Levi","phone":"+972541234567","email":"dana@example.com","company":null,"status":"new","customFields":{"budget":"5000"}}'
JSON
{
  "name": "Dana Levi",
  "phone": "+972541234567",
  "email": "dana@example.com",
  "company": null,
  "status": "new",
  "customFields": {
    "budget": "5000"
  }
}

Answer 201

JSON
{
  "id": "00000000-0000-4000-8000-000000000000",
  "ref": "1042",
  "name": "Dana Levi",
  "company": "Acme",
  "phone": "+972541234567",
  "email": "dana@example.com",
  "status": "new",
  "source": "facebook",
  "ownerId": "00000000-0000-4000-8000-000000000000",
  "valueMinor": 0,
  "currency": "ILS",
  "customFields": {},
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "campaignId": "00000000-0000-4000-8000-000000000000",
  "channelId": "00000000-0000-4000-8000-000000000000",
  "attribution": {},
  "landingPageName": "string",
  "duplicate": {
    "system": false,
    "org": false,
    "today": false,
    "of": "string"
  },
  "contactBlocked": false,
  "callback": {
    "at": "2026-11-01T09:00:00Z",
    "by": "string"
  },
  "createdAt": "2026-11-01T09:00:00Z",
  "lastActivityAt": "2026-11-01T09:00:00Z",
  "deletedAt": "2026-11-01T09:00:00Z",
  "deletedBy": "string",
  "synced": {
    "connectionId": "string",
    "source": "facebook",
    "agent": "string"
  }
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabledcrm.lead.status_not_allowed
  • 422crm.lead.blockedcrm.lead.status_unknowncrm.lead.owner_unknowncrm.field.unknowncrm.field.invalid
  • 429core.rate_limited

PATCH/v1/crm/leads/{ref}

Change a lead

Change the fields sent (status, agent, name, company, organization, campaign, channel, custom fields; at least one). customFields are merged; null clears a field. Changing phone or email needs the crm.leads.contact.edit permission. A lead another system syncs is read-only.

Member permissionscrm.leads.write

Parameters

NameInTypeRequiredNotes
refpathstringYesThe lead number (digits, "1042"; "#1042" and "L-1042" work too).
statusbodystring1–80No
ownerIdbodyuuid | nullNo
namebodystring1–200No
firstNamebodystring | null1–100No
lastNamebodystring | null1–100No
companybodystring | null≤ 200No
phonebodystringNo
emailbodyemail | nullNo
customFieldsbodyobjectNo
organizationIdbodyuuid | nullNo
campaignIdbodyuuid | nullNo
channelIdbodyuuid | nullNo
forceOwnerbodybooleanNo

Request

curl
curl -X PATCH "https://app.allchatai.io/api/v1/crm/leads/1042" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"contacted","customFields":{"budget":"7000"}}'
JSON
{
  "status": "contacted",
  "customFields": {
    "budget": "7000"
  }
}

Answer 200

JSON
{
  "id": "00000000-0000-4000-8000-000000000000",
  "ref": "1042",
  "name": "Dana Levi",
  "company": "Acme",
  "phone": "+972541234567",
  "email": "dana@example.com",
  "status": "new",
  "source": "facebook",
  "ownerId": "00000000-0000-4000-8000-000000000000",
  "valueMinor": 0,
  "currency": "ILS",
  "customFields": {},
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "campaignId": "00000000-0000-4000-8000-000000000000",
  "channelId": "00000000-0000-4000-8000-000000000000",
  "attribution": {},
  "landingPageName": "string",
  "duplicate": {
    "system": false,
    "org": false,
    "today": false,
    "of": "string"
  },
  "contactBlocked": false,
  "callback": {
    "at": "2026-11-01T09:00:00Z",
    "by": "string"
  },
  "createdAt": "2026-11-01T09:00:00Z",
  "lastActivityAt": "2026-11-01T09:00:00Z",
  "deletedAt": "2026-11-01T09:00:00Z",
  "deletedBy": "string",
  "synced": {
    "connectionId": "string",
    "source": "facebook",
    "agent": "string"
  }
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404crm.lead.not_found
  • 409crm.lead.synced_readonlycrm.sync.sender_ownscrm.lead.owner_locked
  • 422crm.lead.status_unknowncrm.field.invalid
  • 429core.rate_limited

POST/v1/crm/leads/{ref}/notes

Add a note to a lead

A note on the lead, in the key's member's note category.

Member permissionscrm.leads.write

Parameters

NameInTypeRequiredNotes
refpathstringYesThe lead number (digits, "1042"; "#1042" and "L-1042" work too).
bodybodystring1–5000Yes

Request

curl
curl -X POST "https://app.allchatai.io/api/v1/crm/leads/1042/notes" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"Called back, sending a quote."}'
JSON
{
  "body": "Called back, sending a quote."
}

Answer 201

JSON
{
  "id": "00000000-0000-4000-8000-000000000000",
  "body": "Called back, sending a quote.",
  "authorId": "string",
  "authorName": "string",
  "category": "agents",
  "mine": false,
  "createdAt": "2026-11-01T09:00:00Z"
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404crm.lead.not_found
  • 429core.rate_limited

PUT/v1/crm/customers/{key}/profile

Save a customer's details

Create or update the customer's own details. A property left out stays as it is; null clears it. The customer must exist (a lead or earlier details with that phone).

Member permissionscrm.customers.editcore.phones.view

Parameters

NameInTypeRequiredNotes
keypathstringYesThe customer's phone: its last 9 digits, or the whole number (0541234567, +972541234567).
namebodystring | null≤ 200No
emailbodyemail | null≤ 320No
companybodystring | null≤ 200No
externalIdbodystring | null≤ 120No
citybodystring | null≤ 120No
notesbodystring | null≤ 5000No
customerSincebodydate | nullNo
streetbodystring | null≤ 120No
houseNumberbodystring | null≤ 20No
entrancebodystring | null≤ 20No
apartmentbodystring | null≤ 20No
zipbodystring | null≤ 20No
taxIdbodystring | null≤ 40No
floorbodystring | null≤ 20No
addressNotesbodystring | null≤ 200No
statusbodystring | null1–80No
customFieldsbodyobjectNo

Request

curl
curl -X PUT "https://app.allchatai.io/api/v1/crm/customers/0541234567/profile" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Levi","city":"Tel Aviv","externalId":"C-1042","customerSince":"2025-03-01"}'
JSON
{
  "name": "Dana Levi",
  "city": "Tel Aviv",
  "externalId": "C-1042",
  "customerSince": "2025-03-01"
}

Answer 200

JSON
{
  "name": "Dana Levi",
  "email": "dana@example.com",
  "company": "Acme",
  "externalId": "string",
  "city": "string",
  "notes": "string",
  "customerSince": "string",
  "importJob": "string",
  "importedAt": "2026-11-01T09:00:00Z",
  "updatedAt": "2026-11-01T09:00:00Z",
  "address": {
    "street": "string",
    "houseNumber": "string",
    "entrance": "string",
    "apartment": "string",
    "zip": "string"
  },
  "taxId": "string",
  "floor": "string",
  "addressNotes": "string",
  "customFields": {},
  "status": "new",
  "synced": {
    "connectionId": "string",
    "source": "facebook",
    "at": "string",
    "fields": [
      {
        "key": "541234567",
        "label": "Main line",
        "type": "text",
        "value": "string",
        "columns": [
          {
            "key": "541234567",
            "label": "Main line",
            "required": false,
            "maxLength": 1,
            "choices": [
              null
            ],
            "multiple": false,
            "detailFor": [
              null
            ]
          }
        ],
        "editable": false
      }
    ]
  },
  "statusSynced": false,
  "syncLeftAt": "2026-11-01T09:00:00Z"
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404crm.customer.not_found
  • 429core.rate_limited

POST/v1/crm/customers/{key}/notes

Add a note to a customer

A note on the person (not one lead): the customer card's notes.

Member permissionscrm.customers.notescore.phones.view

Parameters

NameInTypeRequiredNotes
keypathstringYesThe customer's phone: its last 9 digits, or the whole number (0541234567, +972541234567).
bodybodystring1–2000Yes

Request

curl
curl -X POST "https://app.allchatai.io/api/v1/crm/customers/0541234567/notes" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"Prefers WhatsApp over calls."}'
JSON
{
  "body": "Prefers WhatsApp over calls."
}

Answer 201

JSON
{
  "id": "string",
  "kind": "string",
  "at": "2026-11-01T09:00:00Z",
  "leadId": "string",
  "actorId": "string",
  "actorName": "string",
  "data": {}
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404crm.customer.not_found
  • 429core.rate_limited

Sending messagesmessages.send

Scope messages.send: send WhatsApp messages and follow their state.

GET/v1/inbox/send/options

Lines and templates

The workspace's WhatsApp lines and its approved templates (ids, languages, how many variables each takes): what to send with.

Member permissionsinbox.conversations.reply

Parameters

NameInTypeRequiredNotes
richquery1No1: also the templates with an image header or dynamic link buttons (send them with templateHeaderLink / templateButtons).

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/inbox/send/options" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "lines": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "label": "Main line",
      "status": "new",
      "connectionId": "string",
      "kind": "official"
    }
  ],
  "templates": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "Dana Levi",
      "language": "he",
      "connectionId": "string",
      "params": 0,
      "headerFormat": "IMAGE",
      "urlButtons": [
        {
          "index": 0,
          "prefix": "string"
        }
      ],
      "body": "Called back, sending a quote.",
      "buttonText": "string",
      "status": "new",
      "rejectedReason": "string"
    }
  ],
  "pending": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "Dana Levi",
      "language": "he",
      "connectionId": "string",
      "params": 0,
      "headerFormat": "IMAGE",
      "urlButtons": [
        {
          "index": 0,
          "prefix": "string"
        }
      ],
      "body": "Called back, sending a quote.",
      "buttonText": "string",
      "status": "new",
      "rejectedReason": "string"
    }
  ]
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 429core.rate_limited

POST/v1/inbox/send

Send a WhatsApp message

A message to a number. WhatsApp's rule: free text only within 24 hours of the customer's last message; outside it, an approved template (templateId + templateParams). text with templateId sends the text when it can, the template otherwise. The do-not-contact list, the customer's opt-out and the line's state are checked like any send. Send an Idempotency-Key so a retry never sends twice.

Member permissionsinbox.conversations.reply

Parameters

NameInTypeRequiredNotes
Idempotency-Keyheaderstring≤ 200NoYour own id for this request (up to 200 visible ASCII characters). The same key again sends nothing and answers 200 with duplicate: true.
phonebodystring6–30YesInternational, or local in the workspace's country.
textbodystring1–4096NoFree text: only inside the 24-hour window.
templateIdbodyuuidNoAn approved template (GET /v1/inbox/send/options).
templateParamsbodystring[]≤ 20NoThe template's variables, in order.
templateHeaderbodystring[]≤ 1NoOptional: a text header's variable (templates whose header is text with {{1}}).
templateHeaderLinkbodystring≤ 2000NoAn image / video / document header: the media's public https link (required for such a template).
templateButtonsbodystring[]≤ 10NoThe end of each dynamic link button's link (what replaces {{1}}), in the buttons' order (required when the template has them).
lineIdbodyuuidNoOptional: by default the line the customer last talked to, else the first active line.
leadRefbodystring≤ 40NoOptional: links the conversation to that lead.

Request

curl
curl -X POST "https://app.allchatai.io/api/v1/inbox/send" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY" \
  -H "Idempotency-Key: order-1042" \
  -H "Content-Type: application/json" \
  -d '{"phone":"0541234567","templateId":"00000000-0000-4000-8000-000000000001","templateParams":["Dana","1042"],"leadRef":"1042"}'
JSON
{
  "phone": "0541234567",
  "templateId": "00000000-0000-4000-8000-000000000001",
  "templateParams": [
    "Dana",
    "1042"
  ],
  "leadRef": "1042"
}

Answer 202

JSON
{
  "id": "00000000-0000-4000-8000-000000000002",
  "conversationId": "00000000-0000-4000-8000-000000000003",
  "kind": "template",
  "lineId": "00000000-0000-4000-8000-000000000004",
  "duplicate": false
}

Possible errors

  • 400core.validationinbox.send.bad_idempotency_key
  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404crm.lead.not_found
  • 409inbox.send.window_closedinbox.send.opted_outinbox.send.do_not_contactinbox.no_lineinbox.account.unavailable
  • 422inbox.contact.invalid_number
  • 429core.rate_limited

GET/v1/inbox/send/{id}

A sent message's state

What became of a message sent with POST /v1/inbox/send: queued, sent, delivered, read or failed (with the reason).

Member permissionsinbox.conversations.reply

Parameters

NameInTypeRequiredNotes
idpathuuidYesThe message id POST /v1/inbox/send answered.

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/inbox/send/<id>" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "id": "00000000-0000-4000-8000-000000000002",
  "status": "delivered",
  "errorCode": null,
  "providerCode": null
}

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404inbox.message.not_found
  • 429core.rate_limited

PUT/v1/bots/contacts

Stamp customers for the bot

Stamps customers by phone the way a bot's "set field" and "add tag" do: their bot fields (a flow reads them as {{field.<key>}}), first / last name and tags. For a system that sends through POST /v1/inbox/send and wants the flow that answers the customer's reply to know what was sent (a lead number, a broadcast number, a personal link). A field key not yet defined is created as a text field named after it; fields alone only makes sure the keys exist. Nothing is sent.

Member permissionsbots.use

Parameters

NameInTypeRequiredNotes
fieldsbodystring[]≤ 50NoField keys to make sure exist (a-z, 0-9, _): the missing ones are created as text fields.
contactsbodyobject[]≤ 100NoUp to 100 customers: { phone, firstName?, lastName?, fields?: { key: value or null to clear }, addTags? }.

Request

curl
curl -X PUT "https://app.allchatai.io/api/v1/bots/contacts" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fields":[],"contacts":[{"phone":"0541234567","firstName":"Dana","fields":{"lm_lead_id":"1042","lm_broadcast_id":"77"},"addTags":["broadcast 77"]}]}'
JSON
{
  "fields": [],
  "contacts": [
    {
      "phone": "0541234567",
      "firstName": "Dana",
      "fields": {
        "lm_lead_id": "1042",
        "lm_broadcast_id": "77"
      },
      "addTags": [
        "broadcast 77"
      ]
    }
  ]
}

Answer 200

JSON
{
  "updated": 1,
  "fields": [
    "lm_lead_id",
    "lm_broadcast_id"
  ],
  "createdFields": []
}

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 409bots.field.unavailable
  • 422bots.contact.invalid_number
  • 429core.rate_limited

Reading conversationsmessages.read

Scope messages.read: read a customer's WhatsApp conversation by phone number.

GET/v1/inbox/thread

A customer's WhatsApp conversation

The most recent WhatsApp conversation with a number and its latest messages, oldest first: its state, line, who handles it, and whether the 24-hour window is open (free text may be sent). Only a conversation the key's member may see in the inbox; none (or one they may not see) answers conversation: null with no messages. No phone numbers and no media links in the answer. Every line the number talked with is in lines (most recent first); lineId reads that line's conversation.

Member permissionsinbox.conversations.read

Parameters

NameInTypeRequiredNotes
phonequerystring6–30YesThe customer's number: international, or local in the workspace's country.
limitqueryinteger1–200 · = 60NoHow many of the latest messages (1-200, default 60).
lineIdqueryuuidNoOne of the answer's lines: that line's conversation instead of the most recent one.

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/inbox/thread" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "conversation": {
    "id": "00000000-0000-4000-8000-000000000003",
    "status": "open",
    "lineId": "00000000-0000-4000-8000-000000000004",
    "lineLabel": "Sales line",
    "assignee": {
      "id": "00000000-0000-4000-8000-000000000005",
      "name": "Dana"
    },
    "windowOpen": true,
    "lastInboundAt": "2026-11-10T09:12:00.000Z",
    "lastMessageAt": "2026-11-10T09:14:00.000Z"
  },
  "messages": [
    {
      "id": "00000000-0000-4000-8000-000000000006",
      "direction": "in",
      "kind": "text",
      "text": "Hi, is my order on its way?",
      "at": "2026-11-10T09:12:00.000Z",
      "status": "received",
      "sender": "customer",
      "senderName": null,
      "template": null
    },
    {
      "id": "00000000-0000-4000-8000-000000000007",
      "direction": "out",
      "kind": "text",
      "text": "Yes, it ships today.",
      "at": "2026-11-10T09:14:00.000Z",
      "status": "read",
      "sender": "agent",
      "senderName": "Dana",
      "template": null
    }
  ],
  "lines": [
    {
      "lineId": "00000000-0000-4000-8000-000000000004",
      "lineLabel": "Sales line",
      "conversationId": "00000000-0000-4000-8000-000000000003",
      "status": "open",
      "lastMessageAt": "2026-11-10T09:14:00.000Z"
    },
    {
      "lineId": "00000000-0000-4000-8000-000000000008",
      "lineLabel": "Support line",
      "conversationId": "00000000-0000-4000-8000-000000000009",
      "status": "resolved",
      "lastMessageAt": "2026-11-02T16:40:00.000Z"
    }
  ]
}

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 422inbox.contact.invalid_number
  • 429core.rate_limited

GET/v1/inbox/opt-outs

Opt-outs

Who asked not to be messaged here (wrote stop, tapped a button, or a member or an import added them), oldest first. For a system that sends through this API and keeps its own do-not-message list: read the new ones every few minutes (since, then each page's next as cursor). Our own sends already honour them.

Member permissionsinbox.conversations.read

Parameters

NameInTypeRequiredNotes
sincequerydate-timeNoOnly opt-outs after this time (ISO). Ignored with cursor.
cursorquerystring≤ 200NoThe previous page's next.
limitqueryinteger1–1000 · = 500NoPage size (1-1000, default 500).

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/inbox/opt-outs" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "optOuts": [
    {
      "phoneKey": "541234567",
      "channel": "whatsapp",
      "reason": "text",
      "at": "2026-11-10T09:12:00.000Z"
    }
  ],
  "next": "eyJhdCI6IjIwMjYtMTEtMTBUMDk6MTI6MDAuMDAwWiJ9",
  "more": false
}

Possible errors

  • 400core.validationinbox.opt_outs.bad_cursor
  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 429core.rate_limited

Broadcastscampaigns.run

Scope campaigns.run: list broadcasts built in the app, launch, pause, resume and cancel them.

GET/v1/campaigns/campaigns

Broadcasts

The workspace's broadcasts (WhatsApp, email, SMS) and their counts.

Member permissionscampaigns.read

Parameters

No parameters.

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/campaigns/campaigns" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "Dana Levi",
      "channel": "whatsapp",
      "email": {
        "sender": {
          "kind": "connection",
          "connectionId": "00000000-0000-4000-8000-000000000000"
        },
        "fromName": "string",
        "fromAddress": "string",
        "replyTo": "string",
        "subject": "string",
        "preheader": "string",
        "dir": "rtl",
        "brandColor": "string",
        "footer": "string",
        "blocks": [
          {
            "id": "string",
            "type": "heading",
            "text": "string",
            "size": "xl",
            "align": "start"
          }
        ]
      },
      "sms": {
        "connectionId": "00000000-0000-4000-8000-000000000000",
        "text": "string",
        "footer": "string"
      },
      "status": "draft",
      "pauseReason": "template_not_approved",
      "accountId": "string",
      "templateId": "string",
      "templateName": "string",
      "audience": {
        "source": "leads",
        "query": "string",
        "viewId": "00000000-0000-4000-8000-000000000000",
        "campaignId": "00000000-0000-4000-8000-000000000000",
        "segment": "not_read"
      },
      "audienceFile": {
        "fileName": "string",
        "columns": [
          "string"
        ],
        "phoneColumn": 0,
        "nameColumn": 0,
        "rows": 0,
        "numbers": 0,
        "invalid": 0,
        "duplicates": 0
      },
      "variables": {
        "body": [
          {
            "kind": "lead",
            "path": "string",
            "fallback": "string"
          }
        ],
        "header": [
          {
            "kind": "lead",
            "path": "string",
            "fallback": "string"
          }
        ]
      },
      "headerLink": "string",
      "aiFollowupBriefId": "string",
      "recentDays": 0,
      "scheduledAt": "2026-11-01T09:00:00Z",
      "startedAt": "2026-11-01T09:00:00Z",
      "completedAt": "2026-11-01T09:00:00Z",
      "testedAt": "2026-11-01T09:00:00Z",
      "waitingUntil": "2026-11-01T09:00:00Z",
      "createdAt": "2026-11-01T09:00:00Z",
      "updatedAt": "2026-11-01T09:00:00Z",
      "counts": {
        "total": 0,
        "skipped": 0,
        "pending": 0,
        "queued": 0,
        "sent": 0,
        "delivered": 0,
        "read": 0,
        "failed": 0,
        "replied": 0,
        "clicked": 0,
        "opened": 0,
        "bounced": 0,
        "complained": 0,
        "unsubscribed": 0,
        "parts": 0
      },
      "multiId": "string",
      "multiStep": 0,
      "parentId": "string",
      "followSegment": "not_read"
    }
  ]
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 429core.rate_limited

GET/v1/campaigns/campaigns/{id}

A broadcast

One broadcast with its counts.

Member permissionscampaigns.read

Parameters

NameInTypeRequiredNotes
idpathuuidYesThe broadcast's id.

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/campaigns/campaigns/<id>" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "id": "00000000-0000-4000-8000-000000000000",
  "name": "Dana Levi",
  "channel": "whatsapp",
  "email": {
    "sender": {
      "kind": "connection",
      "connectionId": "00000000-0000-4000-8000-000000000000"
    },
    "fromName": "string",
    "fromAddress": "string",
    "replyTo": "string",
    "subject": "string",
    "preheader": "string",
    "dir": "rtl",
    "brandColor": "string",
    "footer": "string",
    "blocks": [
      {
        "id": "string",
        "type": "heading",
        "text": "string",
        "size": "xl",
        "align": "start"
      }
    ]
  },
  "sms": {
    "connectionId": "00000000-0000-4000-8000-000000000000",
    "text": "string",
    "footer": "string"
  },
  "status": "draft",
  "pauseReason": "template_not_approved",
  "accountId": "string",
  "templateId": "string",
  "templateName": "string",
  "audience": {
    "source": "leads",
    "query": "string",
    "viewId": "00000000-0000-4000-8000-000000000000",
    "campaignId": "00000000-0000-4000-8000-000000000000",
    "segment": "not_read"
  },
  "audienceFile": {
    "fileName": "string",
    "columns": [
      "string"
    ],
    "phoneColumn": 0,
    "nameColumn": 0,
    "rows": 0,
    "numbers": 0,
    "invalid": 0,
    "duplicates": 0
  },
  "variables": {
    "body": [
      {
        "kind": "lead",
        "path": "string",
        "fallback": "string"
      }
    ],
    "header": [
      {
        "kind": "lead",
        "path": "string",
        "fallback": "string"
      }
    ]
  },
  "headerLink": "string",
  "aiFollowupBriefId": "string",
  "recentDays": 0,
  "scheduledAt": "2026-11-01T09:00:00Z",
  "startedAt": "2026-11-01T09:00:00Z",
  "completedAt": "2026-11-01T09:00:00Z",
  "testedAt": "2026-11-01T09:00:00Z",
  "waitingUntil": "2026-11-01T09:00:00Z",
  "createdAt": "2026-11-01T09:00:00Z",
  "updatedAt": "2026-11-01T09:00:00Z",
  "counts": {
    "total": 0,
    "skipped": 0,
    "pending": 0,
    "queued": 0,
    "sent": 0,
    "delivered": 0,
    "read": 0,
    "failed": 0,
    "replied": 0,
    "clicked": 0,
    "opened": 0,
    "bounced": 0,
    "complained": 0,
    "unsubscribed": 0,
    "parts": 0
  },
  "multiId": "string",
  "multiStep": 0,
  "parentId": "string",
  "followSegment": "not_read"
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404campaigns.campaign.not_found
  • 429core.rate_limited

GET/v1/campaigns/campaigns/{id}/recipients

A broadcast's recipients

Who it went to and what happened with each (sent, delivered, read, failed, skipped and why).

Member permissionscampaigns.readcrm.leads.read

Parameters

NameInTypeRequiredNotes
idpathuuidYesThe broadcast's id.
statusquerypending | skipped | queued | sent | delivered | read | opened | clicked …NoOnly recipients in this state.
reasonqueryno_phone | no_email | blocked | opted_out | unsubscribed | bounced | recent | missing_value …NoOnly those skipped for this reason.
onlyqueryclicked | replied | not_read | opted_outNoclicked, replied, not_read or opted_out.
limitqueryinteger1–500 · = 100NoPage size (up to 500).
offsetqueryinteger= 0NoHow many to skip.

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/campaigns/campaigns/<id>/recipients" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "leadId": "string",
      "customerKey": "string",
      "name": "Dana Levi",
      "phone": "+972541234567",
      "email": "dana@example.com",
      "status": "pending",
      "reason": "no_phone",
      "errorCode": "string",
      "replied": false,
      "clicks": 0,
      "opens": 0,
      "queuedAt": "2026-11-01T09:00:00Z",
      "readAt": "2026-11-01T09:00:00Z",
      "openedAt": "2026-11-01T09:00:00Z",
      "updatedAt": "2026-11-01T09:00:00Z",
      "parts": 0
    }
  ],
  "total": 0
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404campaigns.campaign.not_found
  • 429core.rate_limited

POST/v1/campaigns/campaigns/{id}/launch

Launch a broadcast

Launch a broadcast built in the app (its audience, template and variables are set there, with the checks before launch). Now, or at a time (up to 90 days ahead) to schedule it.

Member permissionscampaigns.managecrm.leads.read

Parameters

NameInTypeRequiredNotes
idpathuuidYesThe broadcast's id.
atbodydate-time | null= nullNoWhen to send: an ISO time in UTC (ending in Z); null or left out: now.
afterApprovalbodyboolean= falseNo

Request

curl
curl -X POST "https://app.allchatai.io/api/v1/campaigns/campaigns/<id>/launch" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"at":"2026-12-01T07:00:00Z"}'
JSON
{
  "at": "2026-12-01T07:00:00Z"
}

Answer 200

JSON
{
  "id": "00000000-0000-4000-8000-000000000000",
  "name": "Dana Levi",
  "channel": "whatsapp",
  "email": {
    "sender": {
      "kind": "connection",
      "connectionId": "00000000-0000-4000-8000-000000000000"
    },
    "fromName": "string",
    "fromAddress": "string",
    "replyTo": "string",
    "subject": "string",
    "preheader": "string",
    "dir": "rtl",
    "brandColor": "string",
    "footer": "string",
    "blocks": [
      {
        "id": "string",
        "type": "heading",
        "text": "string",
        "size": "xl",
        "align": "start"
      }
    ]
  },
  "sms": {
    "connectionId": "00000000-0000-4000-8000-000000000000",
    "text": "string",
    "footer": "string"
  },
  "status": "draft",
  "pauseReason": "template_not_approved",
  "accountId": "string",
  "templateId": "string",
  "templateName": "string",
  "audience": {
    "source": "leads",
    "query": "string",
    "viewId": "00000000-0000-4000-8000-000000000000",
    "campaignId": "00000000-0000-4000-8000-000000000000",
    "segment": "not_read"
  },
  "audienceFile": {
    "fileName": "string",
    "columns": [
      "string"
    ],
    "phoneColumn": 0,
    "nameColumn": 0,
    "rows": 0,
    "numbers": 0,
    "invalid": 0,
    "duplicates": 0
  },
  "variables": {
    "body": [
      {
        "kind": "lead",
        "path": "string",
        "fallback": "string"
      }
    ],
    "header": [
      {
        "kind": "lead",
        "path": "string",
        "fallback": "string"
      }
    ]
  },
  "headerLink": "string",
  "aiFollowupBriefId": "string",
  "recentDays": 0,
  "scheduledAt": "2026-11-01T09:00:00Z",
  "startedAt": "2026-11-01T09:00:00Z",
  "completedAt": "2026-11-01T09:00:00Z",
  "testedAt": "2026-11-01T09:00:00Z",
  "waitingUntil": "2026-11-01T09:00:00Z",
  "createdAt": "2026-11-01T09:00:00Z",
  "updatedAt": "2026-11-01T09:00:00Z",
  "counts": {
    "total": 0,
    "skipped": 0,
    "pending": 0,
    "queued": 0,
    "sent": 0,
    "delivered": 0,
    "read": 0,
    "failed": 0,
    "replied": 0,
    "clicked": 0,
    "opened": 0,
    "bounced": 0,
    "complained": 0,
    "unsubscribed": 0,
    "parts": 0
  },
  "multiId": "string",
  "multiStep": 0,
  "parentId": "string",
  "followSegment": "not_read"
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 402core.plan.limit_reached
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404campaigns.campaign.not_found
  • 409campaigns.campaign.not_draftcampaigns.campaign.blockedcampaigns.campaign.in_multi
  • 422campaigns.validation.too_far
  • 429core.rate_limited

POST/v1/campaigns/campaigns/{id}/pause

Pause a broadcast

Pause a broadcast that is sending (a scheduled one goes back to a draft).

Member permissionscampaigns.manage

Parameters

NameInTypeRequiredNotes
idpathuuidYesThe broadcast's id.

Request

curl
curl -X POST "https://app.allchatai.io/api/v1/campaigns/campaigns/<id>/pause" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "id": "00000000-0000-4000-8000-000000000000",
  "name": "Dana Levi",
  "channel": "whatsapp",
  "email": {
    "sender": {
      "kind": "connection",
      "connectionId": "00000000-0000-4000-8000-000000000000"
    },
    "fromName": "string",
    "fromAddress": "string",
    "replyTo": "string",
    "subject": "string",
    "preheader": "string",
    "dir": "rtl",
    "brandColor": "string",
    "footer": "string",
    "blocks": [
      {
        "id": "string",
        "type": "heading",
        "text": "string",
        "size": "xl",
        "align": "start"
      }
    ]
  },
  "sms": {
    "connectionId": "00000000-0000-4000-8000-000000000000",
    "text": "string",
    "footer": "string"
  },
  "status": "draft",
  "pauseReason": "template_not_approved",
  "accountId": "string",
  "templateId": "string",
  "templateName": "string",
  "audience": {
    "source": "leads",
    "query": "string",
    "viewId": "00000000-0000-4000-8000-000000000000",
    "campaignId": "00000000-0000-4000-8000-000000000000",
    "segment": "not_read"
  },
  "audienceFile": {
    "fileName": "string",
    "columns": [
      "string"
    ],
    "phoneColumn": 0,
    "nameColumn": 0,
    "rows": 0,
    "numbers": 0,
    "invalid": 0,
    "duplicates": 0
  },
  "variables": {
    "body": [
      {
        "kind": "lead",
        "path": "string",
        "fallback": "string"
      }
    ],
    "header": [
      {
        "kind": "lead",
        "path": "string",
        "fallback": "string"
      }
    ]
  },
  "headerLink": "string",
  "aiFollowupBriefId": "string",
  "recentDays": 0,
  "scheduledAt": "2026-11-01T09:00:00Z",
  "startedAt": "2026-11-01T09:00:00Z",
  "completedAt": "2026-11-01T09:00:00Z",
  "testedAt": "2026-11-01T09:00:00Z",
  "waitingUntil": "2026-11-01T09:00:00Z",
  "createdAt": "2026-11-01T09:00:00Z",
  "updatedAt": "2026-11-01T09:00:00Z",
  "counts": {
    "total": 0,
    "skipped": 0,
    "pending": 0,
    "queued": 0,
    "sent": 0,
    "delivered": 0,
    "read": 0,
    "failed": 0,
    "replied": 0,
    "clicked": 0,
    "opened": 0,
    "bounced": 0,
    "complained": 0,
    "unsubscribed": 0,
    "parts": 0
  },
  "multiId": "string",
  "multiStep": 0,
  "parentId": "string",
  "followSegment": "not_read"
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404campaigns.campaign.not_found
  • 409campaigns.campaign.not_running
  • 429core.rate_limited

POST/v1/campaigns/campaigns/{id}/resume

Resume a broadcast

Resume a paused broadcast.

Member permissionscampaigns.manage

Parameters

NameInTypeRequiredNotes
idpathuuidYesThe broadcast's id.

Request

curl
curl -X POST "https://app.allchatai.io/api/v1/campaigns/campaigns/<id>/resume" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "id": "00000000-0000-4000-8000-000000000000",
  "name": "Dana Levi",
  "channel": "whatsapp",
  "email": {
    "sender": {
      "kind": "connection",
      "connectionId": "00000000-0000-4000-8000-000000000000"
    },
    "fromName": "string",
    "fromAddress": "string",
    "replyTo": "string",
    "subject": "string",
    "preheader": "string",
    "dir": "rtl",
    "brandColor": "string",
    "footer": "string",
    "blocks": [
      {
        "id": "string",
        "type": "heading",
        "text": "string",
        "size": "xl",
        "align": "start"
      }
    ]
  },
  "sms": {
    "connectionId": "00000000-0000-4000-8000-000000000000",
    "text": "string",
    "footer": "string"
  },
  "status": "draft",
  "pauseReason": "template_not_approved",
  "accountId": "string",
  "templateId": "string",
  "templateName": "string",
  "audience": {
    "source": "leads",
    "query": "string",
    "viewId": "00000000-0000-4000-8000-000000000000",
    "campaignId": "00000000-0000-4000-8000-000000000000",
    "segment": "not_read"
  },
  "audienceFile": {
    "fileName": "string",
    "columns": [
      "string"
    ],
    "phoneColumn": 0,
    "nameColumn": 0,
    "rows": 0,
    "numbers": 0,
    "invalid": 0,
    "duplicates": 0
  },
  "variables": {
    "body": [
      {
        "kind": "lead",
        "path": "string",
        "fallback": "string"
      }
    ],
    "header": [
      {
        "kind": "lead",
        "path": "string",
        "fallback": "string"
      }
    ]
  },
  "headerLink": "string",
  "aiFollowupBriefId": "string",
  "recentDays": 0,
  "scheduledAt": "2026-11-01T09:00:00Z",
  "startedAt": "2026-11-01T09:00:00Z",
  "completedAt": "2026-11-01T09:00:00Z",
  "testedAt": "2026-11-01T09:00:00Z",
  "waitingUntil": "2026-11-01T09:00:00Z",
  "createdAt": "2026-11-01T09:00:00Z",
  "updatedAt": "2026-11-01T09:00:00Z",
  "counts": {
    "total": 0,
    "skipped": 0,
    "pending": 0,
    "queued": 0,
    "sent": 0,
    "delivered": 0,
    "read": 0,
    "failed": 0,
    "replied": 0,
    "clicked": 0,
    "opened": 0,
    "bounced": 0,
    "complained": 0,
    "unsubscribed": 0,
    "parts": 0
  },
  "multiId": "string",
  "multiStep": 0,
  "parentId": "string",
  "followSegment": "not_read"
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404campaigns.campaign.not_found
  • 409campaigns.campaign.not_pausedcampaigns.settings.stopped
  • 429core.rate_limited

POST/v1/campaigns/campaigns/{id}/cancel

Cancel a broadcast

Cancel a broadcast that hasn't finished; nothing more is sent.

Member permissionscampaigns.manage

Parameters

NameInTypeRequiredNotes
idpathuuidYesThe broadcast's id.

Request

curl
curl -X POST "https://app.allchatai.io/api/v1/campaigns/campaigns/<id>/cancel" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Answer 200

JSON
{
  "id": "00000000-0000-4000-8000-000000000000",
  "name": "Dana Levi",
  "channel": "whatsapp",
  "email": {
    "sender": {
      "kind": "connection",
      "connectionId": "00000000-0000-4000-8000-000000000000"
    },
    "fromName": "string",
    "fromAddress": "string",
    "replyTo": "string",
    "subject": "string",
    "preheader": "string",
    "dir": "rtl",
    "brandColor": "string",
    "footer": "string",
    "blocks": [
      {
        "id": "string",
        "type": "heading",
        "text": "string",
        "size": "xl",
        "align": "start"
      }
    ]
  },
  "sms": {
    "connectionId": "00000000-0000-4000-8000-000000000000",
    "text": "string",
    "footer": "string"
  },
  "status": "draft",
  "pauseReason": "template_not_approved",
  "accountId": "string",
  "templateId": "string",
  "templateName": "string",
  "audience": {
    "source": "leads",
    "query": "string",
    "viewId": "00000000-0000-4000-8000-000000000000",
    "campaignId": "00000000-0000-4000-8000-000000000000",
    "segment": "not_read"
  },
  "audienceFile": {
    "fileName": "string",
    "columns": [
      "string"
    ],
    "phoneColumn": 0,
    "nameColumn": 0,
    "rows": 0,
    "numbers": 0,
    "invalid": 0,
    "duplicates": 0
  },
  "variables": {
    "body": [
      {
        "kind": "lead",
        "path": "string",
        "fallback": "string"
      }
    ],
    "header": [
      {
        "kind": "lead",
        "path": "string",
        "fallback": "string"
      }
    ]
  },
  "headerLink": "string",
  "aiFollowupBriefId": "string",
  "recentDays": 0,
  "scheduledAt": "2026-11-01T09:00:00Z",
  "startedAt": "2026-11-01T09:00:00Z",
  "completedAt": "2026-11-01T09:00:00Z",
  "testedAt": "2026-11-01T09:00:00Z",
  "waitingUntil": "2026-11-01T09:00:00Z",
  "createdAt": "2026-11-01T09:00:00Z",
  "updatedAt": "2026-11-01T09:00:00Z",
  "counts": {
    "total": 0,
    "skipped": 0,
    "pending": 0,
    "queued": 0,
    "sent": 0,
    "delivered": 0,
    "read": 0,
    "failed": 0,
    "replied": 0,
    "clicked": 0,
    "opened": 0,
    "bounced": 0,
    "complained": 0,
    "unsubscribed": 0,
    "parts": 0
  },
  "multiId": "string",
  "multiStep": 0,
  "parentId": "string",
  "followSegment": "not_read"
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_deniedcore.auth.forbiddencore.module.disabled
  • 404campaigns.campaign.not_found
  • 409campaigns.campaign.finished
  • 429core.rate_limited

MCP for AI clientsmcp

Scope mcp: an MCP server through which Claude, ChatGPT or Cursor work with the member's assistant tools.

POST/v1/mcp

MCP server (for AI clients)

The Model Context Protocol server: AI clients (Claude, ChatGPT, Cursor...) use the member's assistant tools. Streamable HTTP, JSON-RPC 2.0, JSON responses only: initialize, ping, tools/list, tools/call. A tool that changes something returns a preview first and runs only when called again with confirmed: true.

Parameters

No parameters.

Request

curl
curl -X POST "https://app.allchatai.io/api/v1/mcp" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

Answer 200

JSON
{
  "jsonrpc": "2.0",
  "id": "string",
  "method": "string"
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_denied
  • 429core.rate_limited

GET/v1/mcp

MCP: no server stream

Answers 405: this server sends no server-initiated stream. Use POST.

Parameters

No parameters.

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/mcp" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_denied
  • 429core.rate_limited

DELETE/v1/mcp

MCP: no sessions

Answers 405: this server keeps no sessions to end. Use POST.

Parameters

No parameters.

Request

curl
curl -X DELETE "https://app.allchatai.io/api/v1/mcp" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_denied
  • 429core.rate_limited

POST/v1/mcp/{workspace}

MCP server at a workspace's own address

The same MCP server at the workspace's own address (its slug), so an AI client can hold one connector per workspace. Only that workspace's API key or OAuth token is accepted here; another workspace's answers 401.

Parameters

NameInTypeRequiredNotes
workspacepathstringYesThe workspace's address name (its slug), as Settings → Claude & ChatGPT shows it.

Request

curl
curl -X POST "https://app.allchatai.io/api/v1/mcp/<workspace>" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

Answer 200

JSON
{
  "jsonrpc": "2.0",
  "id": "string",
  "method": "string"
}

An example built from the answer's shape; the values are illustrative.

Possible errors

  • 400core.validation
  • 401core.auth.bad_api_key
  • 403core.auth.scope_denied
  • 429core.rate_limited

GET/v1/mcp/{workspace}

MCP (workspace address): no server stream

Answers 405: this server sends no server-initiated stream. Use POST.

Parameters

NameInTypeRequiredNotes
workspacepathstringYesThe workspace's address name (its slug), as Settings → Claude & ChatGPT shows it.

Request

curl
curl -X GET "https://app.allchatai.io/api/v1/mcp/<workspace>" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_denied
  • 429core.rate_limited

DELETE/v1/mcp/{workspace}

MCP (workspace address): no sessions

Answers 405: this server keeps no sessions to end. Use POST.

Parameters

NameInTypeRequiredNotes
workspacepathstringYesThe workspace's address name (its slug), as Settings → Claude & ChatGPT shows it.

Request

curl
curl -X DELETE "https://app.allchatai.io/api/v1/mcp/<workspace>" \
  -H "Authorization: Bearer $ALLCHAT_API_KEY"

Possible errors

  • 401core.auth.bad_api_key
  • 403core.auth.scope_denied
  • 429core.rate_limited

Webhooks

Addresses another system sends to without an API key. The address itself (with its token) is the credential: keep it like a password.

Lead webhook

Settings → Connections → Webhook (or each channel's own address in Settings → Leads) gives an address. Send each lead to it from a form, a landing page, Make or Zapier.

JSON or form fields. The fields below are recognized by name (other spellings too). Map any other field to a custom field in the connection's settings; the rest stays in the connection's log.

external_id with the same phone updates that lead instead of making a new one. With a signing secret on the connection, every request must be signed.

Signature: optional (required once the connection has a signing secret)

Address
POST https://app.allchatai.io/api/v1/hooks/webhook/{token}

Fields it recognizes

FieldWhatAlso read from
nameThe person's name.full_name, fullname, שם, שם מלא, your-name
first_nameFirst name (with last_name, when no name is sent).firstname, fname, שם פרטי
last_nameLast name.lastname, lname, surname, שם משפחה
phonePhone: international, or local in the workspace's country.mobile, telephone, tel, phone_number, cell, cellphone, טלפון, נייד, your-phone
emailEmail.e-mail, mail, אימייל, דוא"ל, your-email
companyCompany.company_name, חברה
notesA note on the lead.note, comment, comments, message, הערות, הודעה, your-message
statusA status key or name.סטטוס
lead_sourceThe lead's source.מקור
organizationAn organization, by name.org, publisher, client, ארגון
crm_campaignA campaign, by name.campaign_name, קמפיין
channelA channel, by name.arutz, ערוץ
external_idYour id for the lead: a later delivery with the same id and phone updates it (status and the team's work stay).lead_id, leadid
Attribution fieldsKept as the lead's attribution (UTM, click and ad ids).utm_source, utm_medium, utm_campaign, utm_content, utm_term, utm_id, fbclid, fbc, fbp, gclid, gbraid, wbraid, ttclid, fb_account_id, fb_campaign_id, fb_campaign_name, fb_adset_id, fb_adset_name, fb_ad_id, fb_ad_name, fb_form_id, fb_form_name, ad_id, adset_id, form_id, leadgen_id, landing_page, referrer

Example

JSON
{
  "name": "Dana Levi",
  "phone": "0541234567",
  "email": "dana@example.com",
  "utm_source": "facebook",
  "utm_campaign": "spring"
}

Answers

  • 200Stored; the lead is made within seconds.
  • 401integrations.webhook_bad_signature: a missing or wrong signature.
  • 404integrations.webhook_unknown: an unknown or disabled address.

Automation webhook

An automation whose trigger is a webhook has its own address (shown in the automation). Each request runs it with the fields sent.

The trigger says which fields to read and which one holds the lead's phone. The answer's accepted says whether the automation's conditions matched and it runs.

Signature: none

Address
POST https://app.allchatai.io/api/v1/hooks/automations/{token}

Example

JSON
{
  "phone": "0541234567",
  "order": "1042",
  "total": 180
}

Answers

  • 200`accepted`: whether the automation's conditions matched and it runs.
  • 404integrations.webhook_unknown: an unknown address, or the automation is off.

Customer sync from another system

Settings → Connections → "Customer sync from another system" gives an address and needs a signing secret.

Send events: customers, the sender's own leads, notes and calls (with recordings). Every request is signed. Resending is always safe: an event older than what we hold is skipped. A bad event is refused alone; the rest apply.

What arrives is read-only in the workspace, marked with the connection's name.

Signature: required

Address
POST https://app.allchatai.io/api/v1/hooks/customer-sync/{token}

Event types

typeFields in data
customer.upsertphone, externalId, name, email, company, taxId, customerSince, address, fields, editable, deals, status
customer.leavekey*
lead.upsertexternalId*, phone*, name, email, company, createdAt*, closedAt, status*, campaign, channel, publisher, agent, attribution, fields, editable, history
lead.deleteexternalId*
note.upsertexternalId*, phone*, leadExternalId, category, body*, author, createdAt*
note.deleteexternalId*
call.upsertexternalId*, phone*, leadExternalId, direction*, status*, startedAt*, durationSec, agentName, summary, transcript, recording
call.deleteexternalId*
field.edit.resulteditId*, status*, code, message
mirror.statuskinds*, orders*, cases*, lastOutAt*, lastInAt*, differences*

Example

JSON
{
  "events": [
    {
      "id": "evt-1",
      "type": "customer.upsert",
      "at": "2026-11-01T09:00:00Z",
      "data": {
        "phone": "0541234567",
        "name": "Dana Levi",
        "email": "dana@example.com",
        "fields": [
          {
            "key": "gift",
            "label": "Gift",
            "type": "text",
            "value": "Mug"
          }
        ]
      }
    },
    {
      "id": "evt-2",
      "type": "note.upsert",
      "at": "2026-11-01T09:30:00Z",
      "data": {
        "externalId": "note-77",
        "phone": "0541234567",
        "body": "Asked for a callback.",
        "createdAt": "2026-11-01T09:30:00Z"
      }
    }
  ]
}

Answers

  • 202Stored; applied within seconds. Don't resend.
  • 401integrations.webhook_bad_signature: a missing or wrong signature.
  • 404integrations.webhook_unknown: an unknown or disabled address.

Customer sync: what we hold

The same address with /query at the end, signed the same way. Returns, a page at a time, what was applied (by key and your hash) and what was refused, so the sender can resend what's missing. ts is your clock: a query more than 5 minutes off is refused.

Signature: required

Address
POST https://app.allchatai.io/api/v1/hooks/customer-sync/{token}/query

Example

JSON
{
  "op": "state",
  "ts": "2026-11-01T09:00:00Z",
  "kind": "lead",
  "limit": 5000
}

Answers

  • 200The page: { kind, items: [{ key, hash, state, code }], next, pendingDeliveries } (op state); see docs for deals and orders.
  • 401integrations.webhook_bad_signature.
  • 422crm.sync.stale_query: `ts` is more than 5 minutes off.

HMAC signature

The signature is an HMAC-SHA256 of the exact bytes of the request body, with the connection's signing secret, hex-encoded, in the X-Signature header with the sha256= prefix. Sign the same text you send (not an object serialized again).

Node.js
import { createHmac } from "node:crypto";

const body = JSON.stringify({ events: [/* ... */] });
const signature = "sha256=" + createHmac("sha256", process.env.ALLCHAT_SIGNING_SECRET)
  .update(body)
  .digest("hex");

await fetch("https://app.allchatai.io/api/v1/hooks/customer-sync/<token>", {
  method: "POST",
  headers: { "Content-Type": "application/json", "X-Signature": signature },
  body, // exactly the bytes that were signed
});
Python
import hashlib, hmac, json, os, requests

body = json.dumps({"events": [...]}).encode()
signature = "sha256=" + hmac.new(
    os.environ["ALLCHAT_SIGNING_SECRET"].encode(), body, hashlib.sha256
).hexdigest()

requests.post(
    "https://app.allchatai.io/api/v1/hooks/customer-sync/<token>",
    data=body,  # exactly the bytes that were signed
    headers={"Content-Type": "application/json", "X-Signature": signature},
)

Changelog

  • This page and an OpenAPI 3.1 document, built from the code: every route an API key reaches, the webhooks and the errors.
  • Lead numbers are digits only ("1042"). Older links with "L-1042" still work.

OpenAPI 3.1.0 · v1.0.0