MobiariDocs
Admin APIConversations

List a conversation's messages

GET
/stores/{store_id}/conversations/{conversation_id}/messages

Newest first, paged by cursor: the first page is the latest limit messages, next_cursor (or before) goes further back. Reverse a page to render it top to bottom.

With after (a message id) or created_after (a time) the order flips to oldest first and the page holds what came after it: use it to fetch what you missed while the WebSocket was down, following next_cursor (together with the same after) until has_more is false.

Internal notes are not messages; they come with the conversation.

Authorization

bearer_auth
AuthorizationBearer <token>

Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.

In: header

Path Parameters

store_id*string

Store id

Formatuuid
conversation_id*string

Conversation id

Formatuuid

Query Parameters

before?string

Only messages older than this message: scroll back from it. Same as following next_cursor.

Formatuuid
after?string

Only messages newer than this message, oldest first: catch up after a reconnect. Keep passing it with cursor to continue.

Formatuuid
created_after?string

Only messages created after this instant, oldest first (like after, when you have a time rather than a message).

Formatdate-time
limit?integer

Page size, 1 to 200. Defaults to 50.

Formatint64
Range1 <= value <= 200
cursor?string

next_cursor from the previous page. Omit for the first page.

offset?integer

Rows to skip, for UIs that jump to a page number. Ignored when cursor is set. Prefer cursor for walking a whole list.

Formatint64
Range0 <= value
include_total?boolean

Also return total, the count of all matching rows. Costs an extra query; leave off when you only walk pages.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/conversations/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages?limit=50"
{
  "data": [
    {
      "agent_user_id": "10fd0551-5cc1-4920-817b-63bd803087a9",
      "attachments": [
        {
          "index": 0,
          "kind": "string",
          "mime_type": "string",
          "name": "string",
          "path": "string",
          "size": 0,
          "url": "string"
        }
      ],
      "conversation_id": "cc71b11a-25cd-4c2d-9950-df2cc38e3407",
      "created_at": "2019-08-24T14:15:22Z",
      "delivery_error": "string",
      "delivery_status": "sent",
      "external_id": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "payload": {
        "assignee_user_id": "e942d24d-8cee-4fa2-bf68-164509e32e2f",
        "attachments": [
          {}
        ],
        "cart": null,
        "email": {},
        "interactive": true,
        "kind": "string",
        "location": {},
        "paid_order_id": "string",
        "pix": null,
        "pix_code": true,
        "products": [
          {
            "compare_at": "string",
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "image": "string",
            "price": "string",
            "title": "string",
            "url": "string"
          }
        ],
        "quick_replies": [
          "string"
        ],
        "reason": "string"
      },
      "read_at": "2019-08-24T14:15:22Z",
      "sender": "visitor",
      "store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0",
      "text": "string"
    }
  ],
  "has_more": true,
  "next_cursor": "string",
  "total": 0
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}