Skip to content

API (Webhook)

The API channel exposes a REST endpoint that external systems can use to send messages — n8n, Make, Zapier, a CRM, your own backend, anything that can perform an HTTP POST. The reply can be synchronous (the agent answers in the same call) or asynchronous (the reply arrives at a webhook you provide).

The API channel is an inbox, like every other channel.

  1. Open Inboxes in the admin sidebar.
  2. Click Connect inbox.
  3. Under Other channels, pick API.
  4. Choose who handles it: an agent in your organization, or human support.
  5. Name the inbox and click Finish.

There are no credentials to configure: the API channel is connected from birth.

API channel inbox open under Settings

To see the address, open Actions → Settings on the inbox row and click Information:

Endpoint and identifier of the API inbox

To take it down, use Disconnect on the same screen — calls stop being accepted immediately.

POST https://api.squados.io/v1/chat/{id}

The {id} is the identifier shown under Information. It accepts either the inbox id or the agent id — but on a human support inbox only the inbox id works (there’s no agent to name). When in doubt, use the value the screen shows.

Full interactive documentation (schemas, examples, in-page testing) lives behind View full API documentation, in the same panel.

Authorization header with a Bearer token:

Authorization: Bearer <YOUR_TOKEN>
Content-Type: application/json

Tokens are issued per organization. Generate and manage them under Settings → API (from your avatar menu, top right).

Main fields:

  • message (string, required) — the message text.
  • sync (boolean, optional) — true for synchronous reply (10s timeout). Default: async.
  • webhook_url (string, optional) — URL that receives the reply in async mode. You receive a POST with the result.
  • attachments (array, optional) — attachments as { name, url, type, mimeType }. type: image, audio, or file. Accepts a public URL or base64.
  • metadata (object, optional) — arbitrary data echoed back in the webhook. Use it to correlate the reply with a CRM ticket, lead, order, etc.
  • conversation_id (string, optional) — to continue an existing conversation. Without it, a new conversation is created.
Terminal window
curl -X POST https://api.squados.io/v1/chat/INBOX_ID \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"message": "What are your business hours?",
"sync": true
}'

Response (summary):

{
"conversation_id": "uuid",
"message": "We are open Monday to Friday, 9am to 6pm.",
"credits_used": 12
}
Terminal window
curl -X POST https://api.squados.io/v1/chat/INBOX_ID \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"message": "Analyze this Q4 sales report",
"webhook_url": "https://hooks.n8n.cloud/webhook/abc123",
"metadata": {
"crm_ticket_id": "TKT-12345",
"customer_email": "[email protected]"
}
}'

The API returns 202 Accepted right away. When the agent finishes, you receive a POST at webhook_url with the result and the original metadata — use it to match the reply against your source record.

Accepted formats:

  • Images: JPEG, PNG, WebP, GIF.
  • Documents: PDF, TXT, MD, CSV, DOC, DOCX, XLS, XLSX.

Not accepted: video in any format. Audio only through dedicated chat channels (use Telegram or WhatsApp for audio).

The channel’s Information panel gives access to a log of recent incoming calls: status, payload, and timestamp. Useful for debugging integrations.

  • You already have a CRM/backend/n8n and want to call the agent as just another API.
  • You need to correlate replies with external IDs (ticket, lead, order) using metadata.
  • You want to integrate the agent into an automated flow with no end user in chat.

For anything else (human support, public link, messaging app), prefer Public page and Widget, WhatsApp Official, or Telegram.