List Threads for an Agent API Endpoint
Returns Threads created by the authenticated API token caller.
GET
/agents/{agentId}/threadsReturns Threads created by the authenticated API token caller.
Authorization
publicApiBearer AuthorizationBearer <token>
Use Authorization: Bearer mst_... . API tokens identify an account and do not carry scopes.
In: header
Path Parameters
agentId*string
Agent API Endpoint ID from the Agent's API Access panel. v1 IDs are bare ULIDs.
Match
^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$Format
ulidQuery Parameters
archived?boolean
Filter by archived state: true returns only archived Threads, false only active ones. Omit to return all Threads.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/agents/01J00000000000000000000001/threads"{ "threads": [ { "agent_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "attributed_user": { "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV" }, "client_external_ref": "string", "created_at": "2019-08-24T14:15:22Z", "created_by": { "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "kind": "access_token" }, "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "kind": "pet", "last_run_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "source": "api", "status": "IDLE", "title": "string", "updated_at": "2019-08-24T14:15:22Z" } ]}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}