Skip to main content
GET
/
threads
List all threads
curl --request GET \
  --url https://app.usechar.ai/api/threads \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": "<string>",
    "organization_id": "<string>",
    "end_user_id": "<string>",
    "title": "<string>",
    "status": "regular",
    "message_count": 0,
    "total_tokens": 0,
    "created_at": "2023-11-07T05:31:56Z",
    "last_message_at": "2023-11-07T05:31:56Z",
    "resolved_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
]

Authorizations

Authorization
string
header
required

WorkOS JWT token. Obtain via WorkOS AuthKit authentication flow. The token must include organization_id claim for organization-scoped endpoints.

Response

OK

id
string
required

Thread ID (matches the ThreadAgent Durable Object name).

organization_id
string
required

WorkOS organization ID that owns the thread.

end_user_id
string
required

Internal end user ID associated with the thread.

title
string | null
required

Optional thread title.

status
enum<string>
required

Thread status (regular, archived, or deleted).

Available options:
regular,
archived,
deleted
message_count
integer
required

Total number of messages in the thread.

Required range: -9007199254740991 <= x <= 9007199254740991
total_tokens
integer
required

Total token usage accumulated for the thread.

Required range: -9007199254740991 <= x <= 9007199254740991
created_at
string<date-time>
required

Timestamp when the thread was created.

last_message_at
string<date-time> | null
required

Timestamp of the most recent message in the thread.

resolved_at
string<date-time> | null
required

Timestamp when the thread was resolved or closed, if applicable.

updated_at
string<date-time>
required

Timestamp when the thread record was last updated.