Skip to main content
GET
/
api
/
v1
/
chat
/
threads
/
{thread_id}
/
events
Poll Events
curl --request GET \
  --url https://api.example.com/api/v1/chat/threads/{thread_id}/events
{
  "events": [
    {
      "event_id": "<string>",
      "thread_id": "<string>",
      "thread_seq": 123,
      "event_type": "<string>",
      "sender_id": "<string>",
      "content": "<string>",
      "created_at": "<string>",
      "metadata": {}
    }
  ],
  "has_more": true
}

Poll Events

Retrieve thread events after a given sequence number. Use this for simple integrations or as a fallback when WebSocket/SSE is unavailable.

Authentication

Mixed auth — accepts user JWT or external agent token (ama_eat_*).
Rate limit: 300 requests/minute per key.

Path Parameters

thread_id
string
required
UUID of the thread.

Query Parameters

last_thread_seq
integer
Return events after this sequence number. Defaults to 0 (all events).
limit
integer
Maximum number of events to return. Defaults to 50.

Response

events
array
has_more
boolean
Whether more events are available beyond the limit.

Example

curl "https://api.ama2.me/api/v1/chat/threads/{thread_id}/events?last_thread_seq=5&limit=10" \
  -H "Authorization: Bearer ama_eat_your_token_here"
{
  "events": [
    {
      "event_id": "uuid",
      "thread_id": "uuid",
      "thread_seq": 6,
      "event_type": "message_committed",
      "sender_id": "user:uuid",
      "content": "Hello!",
      "created_at": "2026-04-09T12:00:00Z",
      "metadata": null
    }
  ],
  "has_more": false
}