Skip to main content
GET
/
v1
/
boards
/
{boardId}
/
chats
/
{chatId}
/
messages
List messages
curl --request GET \
  --url https://api.chatgrid.ai/v1/v1/boards/{boardId}/chats/{chatId}/messages \
  --header 'Authorization: Bearer <token>'
{
  "object": "list",
  "data": [
    {
      "id": "d4e5f6a7-b8c9-0123-defa-234567890123",
      "role": "assistant",
      "content": "Here are three ideas for your marketing campaign...",
      "model": "anthropic/claude-sonnet-4",
      "created_at": "2026-03-15T12:50:00.000Z",
      "metadata": {
        "usage": {
          "prompt_tokens": 245,
          "completion_tokens": 312,
          "total_tokens": 557
        },
        "finish_reason": "stop"
      }
    }
  ],
  "has_more": true,
  "cursor": "<string>"
}

Authorizations

Authorization
string
header
required

Pass your API key (prefixed cgk_) or a Supabase JWT in the Authorization: Bearer <token> header.

Path Parameters

boardId
string<uuid>
required

Board UUID.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

chatId
string<uuid>
required

Chat thread UUID.

Example:

"b2c3d4e5-f6a7-8901-bcde-f12345678901"

Query Parameters

limit
integer
default:50

Maximum number of items to return (1-100, default 50).

Required range: 1 <= x <= 100
cursor
string

Opaque cursor for pagination. Pass the cursor value from a previous response.

Example:

"eyJpZCI6ImExYjJjM2Q0LWU1ZjYtNzg5MC1hYmNkLWVmMTIzNDU2Nzg5MCIsImNyZWF0ZWRfYXQiOiIyMDI2LTAzLTE1VDEwOjMwOjAwLjAwMFoifQ"

order
enum<string>
default:asc

Sort direction. Defaults to asc for messages.

Available options:
asc,
desc

Response

A paginated list of messages.

object
enum<string>
Available options:
list
data
object[]
has_more
boolean
cursor
string | null