Skip to main content
POST
/
threads
/
{threadId}
/
files
Add a Thread file
curl --request POST \
  --url https://mosoo.ai/api/v1/threads/{threadId}/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contentBase64": "SGVsbG8gZnJvbSBHcm9vdHMuCg==",
  "contentType": "text/plain",
  "name": "brief.txt"
}
'
{
  "file": {
    "committed": true,
    "createdAt": "2026-05-19T00:02:00.000Z",
    "id": "file_01KQX0V62MEXAMPLE7W6X3B2A",
    "kind": "attachment",
    "mimeType": "text/plain",
    "name": "brief.txt",
    "size": 19
  }
}

Authorizations

Authorization
string
header
required

Use Authorization: Bearer grt_pat_... . PATs identify an account and do not carry scopes.

Path Parameters

threadId
string
required

Thread ID returned by create thread.

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$

Body

application/json
contentBase64
string
required

Base64-encoded file bytes, or a data URL.

Maximum string length: 13981272
contentType
string
required
Maximum string length: 255
name
string
required
Maximum string length: 255

Response

Created Thread file.

file
object
required