v4

latestOpenAPI 3.0.0raw.githubusercontent.com2026-04-06211660.4 KB
Messages

List messages for a channel (chat-as-storage)

get/api/v1/messages

Query parameters

channelstring required

Channel (agent) ID

limitstring

Max results (default 50)

cursorstring

Cursor for pagination

searchstring

Full-text search in message text

has_attachmentsstring

Filter messages with attachments (true/false)

Response

Paginated messages

nextCursorobject nullable

Cursor for next page, null if no more

Example response

{
  "data": [
    {
      "id": "clxyz111",
      "channelId": "clxyz456",
      "senderType": "agent",
      "senderId": "clxyz456",
      "text": "Hello from agent",
      "status": "info",
      "review": {
        "type": "approval",
        "status": "pending"
      },
      "metadata": {
        "source": "automation"
      },
      "createdAt": "2025-01-01T00:00:00.000Z",
      "attachments": [
        {
          "id": "clxyz789",
          "messageId": "clxyz123",
          "pluginType": "file",
          "filename": "report.pdf",
          "mimeType": "application/pdf",
          "size": 1024,
          "storageKey": "uploads/clxyz123/report.pdf",
          "createdAt": "2025-01-01T00:00:00.000Z"
        }
      ]
    }
  ]
}