mosoodocs
简体中文API Reference

列出 Agent API Endpoint 的 Thread

返回由已认证 API token 调用方创建的 Thread。

GET/agents/{agentId}/threads

返回由已认证 API token 调用方创建的 Thread。

Authorization

publicApiBearer
AuthorizationBearer <token>

使用 Authorization: Bearer mst_...。API token 用于识别账号,不携带 scope。

In: header

Path Parameters

agentId*string

来自 Agent API Access 面板的 Agent API Endpoint ID。v1 ID 是不带前缀的 ULID。

Match^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$
Formatulid

Query Parameters

archived?boolean

按归档状态筛选:true 仅返回已归档 Thread,false 仅返回活动 Thread。省略时返回全部 Thread。

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"  }}