Get customer messages

Returns the conversation transcript for customer_id — every message exchanged with the customer.

The response is the complete transcript; there is no pagination or offset. Messages are not returned in a guaranteed order — sort by message_datetime client-side if you need them chronological.

Each entry's fields depend on its type — e.g. text, button, dialog, image, event, multi_question, structured_data, … The set is open-ended, so handle unknown types gracefully.

  • message_datetime is a formatted string ("YYYY-MM-DD HH:MM:SS"), not a Unix timestamp.
  • sender is a display name (the customer, a bot persona, "Landbot", or an agent) — there is no separate sender role/type field.
  • On event messages, message is a number (the agent_id), not a string.
Path Parameters
  • customer_id
    Type: integer
    required

    Identifier of the customer.

Responses
  • application/json
Request Example for get/customers/{customer_id}/messages/
curl https://api.landbot.io/v1/customers/1/messages/ \
  --header 'Authorization: Token YOUR_AGENT_TOKEN'
{
  "success": true,
  "messages": [
    {
      "type": "button",
      "message": "Book a demo",
      "payload": "$0",
      "message_datetime": "2026-06-12 11:48:07",
      "sender": "Visitor #1234"
    },
    {
      "type": "text",
      "message": "What's your email?",
      "rich_text": "What's your email?",
      "message_datetime": "2026-06-12 11:48:25",
      "sender": "Sales bot"
    },
    {
      "type": "dialog",
      "title": "Pick a plan",
      "buttons": [
        "Starter",
        "Pro"
      ],
      "payloads": [
        "$0",
        "$1"
      ],
      "urls": [
        null,
        null
      ],
      "attachments": null,
      "message": "Pick a plan\n\nStarter\nPro",
      "rich_text": null,
      "message_datetime": "2026-06-12 11:48:25",
      "sender": "Sales bot"
    },
    {
      "type": "image",
      "url": "https://media.giphy.com/media/abc/giphy.gif",
      "message": "",
      "message_datetime": "2026-06-12 11:48:26",
      "sender": "Sales bot"
    },
    {
      "type": "event",
      "action": "assign",
      "agent_id": 1023738,
      "message": 1023738,
      "message_datetime": "2026-06-12 11:49:07",
      "sender": "Landbot"
    },
    {
      "type": "text",
      "message": "Hi! How can I help?",
      "rich_text": null,
      "message_datetime": "2026-06-12 11:49:10",
      "sender": "Jane (agent)"
    }
  ]
}