Skip to main content
GET
/
api
/
v1
/
messages
List messages for a channel (chat-as-storage)
curl --request GET \
  --url http://localhost:3001/api/v1/messages \
  --header 'x-api-key: <api-key>'
{
  "data": [
    {
      "id": "clxyz111",
      "channelId": "clxyz456",
      "senderType": "agent",
      "senderId": "clxyz456",
      "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"
        }
      ],
      "text": "Hello from agent",
      "status": "info",
      "review": {
        "type": "approval",
        "status": "pending"
      },
      "metadata": {
        "source": "automation"
      }
    }
  ],
  "nextCursor": "clxyz999"
}

Authorizations

x-api-key
string
header
required

Placet API key (hp_...)

Query Parameters

channel
string
required

Channel (agent) ID

limit
string

Max results (default 50)

cursor
string

Cursor for pagination

Full-text search in message text

has_attachments
string

Filter messages with attachments (true/false)

Response

Paginated messages

data
object[]
required
nextCursor
object

Cursor for next page, null if no more

Example:

"clxyz999"