Webhooks

One address per workspace receives everything that happens in its inboxes, on every channel, signed with your secret.

Set it up

In API & MCP, enter your address (https on a public host) and save. Press Send a test event to receive a ping; the page lists the last week’s deliveries and what your server answered. Answer with any 2xx status within 10 seconds.

Each event is sent once. If your server is down when it comes, read what you missed with GET /api/conversations?updated_after=… and GET /api/conversations/{id}/messages.

Events

TypeWhen
message.receivedA person sent a direct message: Messenger, Instagram Direct, WhatsApp or TikTok.
comment.receivedA person commented on a post of a Facebook page, Instagram account or TikTok account, or replied in a comment thread.
message.sentA reply went out: from your system (sender api), the bot, the team in Autoobot, or the owner in the platform’s own app (sender app).
message.failedA reply could not be sent; the message carries the reason.
conversation.updatedA conversation’s status or assignee changed.
conversation.handoffA person on the team took the conversation over (the bot and the API pause), or the bot resumed.
asset.connectionA page, account or number lost its connection to its platform, or got it back.
pingA test event sent from the dashboard.

Payload

POST to your address
{
  "id": "evt_5f1c0a9e2b7d4c3a8e6f1b2c",
  "type": "comment.received",
  "created_at": "2026-11-26T09:30:00.000Z",
  "workspace_id": "6a1f…",
  "data": {
    "asset": { "id": "9d2e…", "channel": "facebook", "type": "facebook_page", "name": "Rose Bakery" },
    "conversation": {
      "id": "0b7c2f8e-4a51-4d0e-9a39-2a2f6c1d5e77",
      "kind": "comment",
      "status": "open",
      "contact": { "id": "…", "name": "Sara Ali", "username": null, "avatar_url": null },
      "post": { "id": "104000000000001_987654321", "title": "Our new cakes" },
      "bot": { "state": "active", "paused_until": null },
      "reply_window_ends_at": null
    },
    "message": {
      "id": "1d4f…",
      "direction": "in",
      "sender": "contact",
      "type": "comment",
      "text": "How much is the chocolate one?",
      "attachments": [],
      "platform_id": "987654321_112233",
      "created_at": "2026-11-26T09:30:00.000Z"
    }
  }
}

Reply with POST /api/conversations/{data.conversation.id}/messages. Files people send come as links valid for at least seven days.

Headers

HeaderValue
Autoobot-Event-IdThe event’s id: the same for every delivery of the same event. Use it to skip one you already handled.
Autoobot-Event-TypeThe event’s type.
Autoobot-Signaturet=<unix seconds>,v1=<hex>: an HMAC-SHA256 of <t>.<raw body> with your webhook secret.

Check the signature

Compute the HMAC over the raw body (before parsing it), compare in constant time, and refuse a timestamp more than five minutes old. The secret starts with whsec_; show it or make a new one in API & MCP.

Node.js
import crypto from 'node:crypto';

export function verify(rawBody, header, secret) {
  const parts = Object.fromEntries(header.split(',').map((part) => part.split('=')));
  const age = Math.abs(Date.now() / 1000 - Number(parts.t));
  if (!parts.t || !parts.v1 || age > 300) return false;
  const expected = crypto.createHmac('sha256', secret).update(`${parts.t}.${rawBody}`).digest('hex');
  return expected.length === parts.v1.length && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}
Python
import hashlib, hmac, time

def verify(raw_body: bytes, header: str, secret: str) -> bool:
    parts = dict(part.split("=", 1) for part in header.split(","))
    if "t" not in parts or "v1" not in parts or abs(time.time() - int(parts["t"])) > 300:
        return False
    expected = hmac.new(secret.encode(), f"{parts['t']}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts["v1"])
PHP
function autoobot_verify(string $rawBody, string $header, string $secret): bool {
    parse_str(str_replace(',', '&', $header), $parts);
    if (empty($parts['t']) || empty($parts['v1']) || abs(time() - (int) $parts['t']) > 300) return false;
    $expected = hash_hmac('sha256', $parts['t'] . '.' . $rawBody, $secret);
    return hash_equals($expected, $parts['v1']);
}

Good to know

  • Events go to public https addresses only, never follow a redirect, and wait at most 10 seconds.
  • Events may arrive out of order; use created_at.
  • When several workspaces hold the same page, account or number, each gets the event on its own webhook.
  • A team’s internal notes are never sent.