Skip to main content
Auth. HMAC v1 or bearer token — see Authentication. Status. Live · Idempotent: Yes (read-only).
Returns the 200 most recent messages in a chat, oldest first. This is a chat-scoped route: {id} is the chat_id, not a message_id. Chert combines saved conversation rows with durable inbound event rows so recent inbound messages still appear if a best-effort conversation append was missed. has_more is true if older messages were truncated. If the chat has no conversation yet, returns an empty array.

Request

GET /api/v1/chats/{id}/messages
curl "https://console.trychert.com/api/v1/chats/0f2d3c1a-8b4e-4f6a-90d2-1a3b4c5d6e7f/messages" \
  -H "x-chert-tenant: $TENANT" \
  -H "x-chert-signature: v1,$TS,$SIG"

Response

{
  "messages": [
    {
      "id": "46eb1003c8b54b7ea8f1c2b03e9a7d12",
      "chat_id": "0f2d3c1a-8b4e-4f6a-90d2-1a3b4c5d6e7f",
      "parts": [{ "type": "text", "value": "Hi Sam — got a minute?" }],
      "status": "delivered",
      "direction": "outbound",
      "created_at": "2026-05-01T12:00:00Z",
      "delivered_at": "2026-05-01T12:00:00Z",
      "read_at": null,
      "service": "imessage"
    },
    {
      "id": "abf41d8b6c2f4f9e9c1a3d5e7f8a9b0c",
      "chat_id": "0f2d3c1a-8b4e-4f6a-90d2-1a3b4c5d6e7f",
      "parts": [{ "type": "text", "value": "Sure, what time?" }],
      "status": "delivered",
      "direction": "inbound",
      "created_at": "2026-05-01T12:05:00Z",
      "delivered_at": "2026-05-01T12:05:00Z",
      "read_at": null,
      "service": "imessage"
    }
  ],
  "has_more": false
}
Message id values are opaque. For messages returned by this endpoint, pass the listed id to message-scoped actions such as POST /api/v1/messages/{id}/react.

Path parameters

id
string
required
Chat identifier — the chat.id returned by POST /api/v1/chats. Do not pass message.id or convo_id here.

Response fields

messages
object[]
Array of message rows, oldest first. Capped at the 200 most recent messages.
has_more
boolean
true when the underlying conversation has more than 200 messages and only the most recent 200 are included in this response. Cursor pagination on this endpoint is not yet supported.

Errors

CodeHTTPWhen
2002404Chat not found in your tenant.
See the full error code reference.

See also