mosoodocs

Agent ファイルをアップロードする

Thread が存在する前に、Agent API Endpoint の App ドラフト スコープにファイルをアップロードします。返されたファイル ID は、create-thread リソースまたは send-events リソースで使用します。

POST/agents/{agentId}/files

Thread が存在する前に、Agent API Endpoint の App ドラフト スコープにファイルをアップロードします。返されたファイル ID は、create-thread リソースまたは send-events リソースで使用します。

Authorization

publicApiBearer
AuthorizationBearer <token>

Authorization: Bearer mst_... を使用します。 API token はアカウントを識別しますが、スコープは持ちません。

In: header

Path Parameters

agentId*string

Agent の API アクセス パネルからの Agent API Endpoint ID。 v1 ID は裸の ULID です。

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

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/agents/01J00000000000000000000001/files" \  -F file="string"
{  "file": {    "createdAt": "2026-05-19T00:02:00.000Z",    "id": "01J0000000000000000000000J",    "mimeType": "text/plain",    "name": "brief.txt",    "size": 19  }}
{  "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"  }}