Skip to main content
GET
https://api.app.shinzo.ai
/
v1
/
agent
/
{id}
/
messages
List Messages
curl --request GET \
  --url https://api.app.shinzo.ai/v1/agent/{id}/messages \
  --header 'Authorization: Bearer <token>'

Authentication

Requires JWT token or Platform API key via Authorization: Bearer <token> header.
id
string
required
Agent UUID
limit
number
default:"50"
Results per page (1-100)
before
string
UUID cursor — return messages before this message ID
after
string
UUID cursor — return messages after this message ID
status
string
Filter by status: pending, delivered, or read
channel
string
Filter by channel: api or discord

Example Request

curl -X GET "https://api.app.shinzo.ai/v1/agent/a1b2c3d4-e5f6-7890-abcd-ef1234567890/messages?limit=20&channel=api" \
  -H "Authorization: Bearer <token>"

Example Response

{
  "messages": [
    {
      "id": "msg_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "role": "user",
      "content": "Review the code in /workspace/src and provide feedback",
      "status": "delivered",
      "channel": "api",
      "queue_mode": "collect",
      "reply_to_id": null,
      "created_at": "2025-01-20T10:00:00Z",
      "delivered_at": "2025-01-20T10:00:05Z",
      "read_at": null
    },
    {
      "id": "msg_b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "role": "assistant",
      "content": "I've reviewed the code in /workspace/src. Here are my findings...",
      "status": "read",
      "channel": "api",
      "queue_mode": null,
      "reply_to_id": "msg_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "created_at": "2025-01-20T10:02:30Z",
      "delivered_at": "2025-01-20T10:02:30Z",
      "read_at": "2025-01-20T10:03:00Z"
    }
  ],
  "has_more": false
}

Pagination

This endpoint uses cursor-based pagination. To fetch the next page, pass the id of the last message in your current page as the after parameter. To fetch previous messages, pass the id of the first message as the before parameter.

Status Codes

CodeDescription
200Success
401Unauthorized - invalid or missing authentication
404Agent not found