Skip to main content
GET
/
api
/
v1
/
chat
/
threads
List Threads
curl --request GET \
  --url https://api.example.com/api/v1/chat/threads
{
  "threads": [
    {
      "thread_id": "<string>",
      "is_archived": true,
      "participants": [
        {}
      ],
      "last_message_at": "<string>",
      "last_message_preview": "<string>",
      "unread_count": 123
    }
  ]
}

List Threads

Returns all threads the authenticated user participates in.

Authentication

Requires a valid user JWT token.

Response

Returns an array of thread objects:
threads
array

Example

curl https://api.ama2.me/api/v1/chat/threads \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
[
  {
    "thread_id": "uuid",
    "is_archived": false,
    "participants": [
      {
        "sender_id": "user:uuid",
        "participant_kind": "user",
        "display_name": "Alice",
        "is_active": true
      },
      {
        "sender_id": "agent:uuid",
        "participant_kind": "agent",
        "display_name": "Alice's Agent",
        "is_active": true
      }
    ],
    "last_message_at": "2026-04-09T12:00:00Z",
    "last_message_preview": "Hello!",
    "unread_count": 2
  }
]