Webhook

Message hook delivery

​

Landbot POSTs this payload to every message hook registered on the channel, once per message. It sends Authorization: Token <token> with the token you set on the hook (a static secret, with no signature), Content-Type: application/json and User-Agent: landbot/webhooks.

Answer any 2xx within 10 seconds. Any other status is retried about 5, 10, 15, 20 and 25 seconds later; timeouts and connection errors aren't. _raw.uuid identifies the message across retries. See Webhooks.

Body·

required
application/json

Webhook delivery body. Always exactly one entry in messages — Landbot never batches.

Responses

  • Acknowledged. Any 2xx works; the body is ignored.

Request Example for postmessage
{
  "messages": [
    {
      "type": "text",
      "timestamp": 1,
      "data": {
        "body": ""
      },
      "sender": {
        "id": 1,
        "name": "",
        "type": "customer"
      },
      "customer": {
        "id": 1,
        "agent_id": null,
        "archived": true,
        "name": "",
        "is_external": "",
        "country": "",
        "webchat_type": "",
        "url": "",
        "phone": "",
        "additionalProperty": "anything"
      },
      "channel": {
        "id": 1,
        "name": "",
        "type": "landbot"
      },
      "_raw": {
        "samurai": 1,
        "author_type": "user",
        "author_uuid": null,
        "uuid": "",
        "seq": null,
        "rich_text": null,
        "read": true,
        "additionalProperty": "anything"
      }
    }
  ]
}
No Body