Skip to main content
POST
Create a message.

Authorizations

Authorization
string
header
required

Bearer JWT token or API Key (sk-*).

Path Parameters

threadId
string
required

Body

application/json
text
string

Message body. Maximum 10kB.

Maximum string length: 10000
Example:

"The nightly sync has completed successfully."

replyToMessageId
string

Message id this message replies to. Must belong to the same thread.

Example:

"00000000-0000-4000-8000-000000000001"

attachments
object[]

Attachment descriptors included with the message. Use STORAGE_UPLOAD with storageUploadSessionId for direct uploads that may still be finalizing.

Example:
chatUploadBatchId
string

Upload batch id whose finalized files are bound to this message.

Example:

"00000000-0000-4000-8000-000000000003"

clientDraftId
string

Client draft id used to bind finalized pending uploads to this message.

Maximum string length: 128
Example:

"draft-01hx3k4z7pq9"

metadata
object

Additional application metadata persisted with the message. Values may use any JSON type. Maximum 16 KiB and 64 top-level keys. Top-level keys starting with "__" are reserved for backend use.

Example:

Response

200

OK.

Last modified on September 5, 2026