Create a direct upload session for a thread attachment.
Create a direct upload session for a thread attachment. The request enforces thread membership and content visibility for the authenticated caller.
Authorizations
Bearer JWT token or API Key (sk-*).
Path Parameters
Body
Attachment file retention. Omit for no expiration, null for explicitly durable, or provide ttlSeconds/expiresAt.
File name. Required for create mode.
"contract.pdf"
Expected content type.
"application/pdf"
Expected size in bytes.
x >= 01048576
Optional message id when attaching to an existing chat message.
Optional client draft id used to correlate uploads in the composer. Send the returned attachment.storageUploadSessionId on message creation.
128File metadata. Values may use any JSON type. Maximum 16 KiB and 64 top-level keys. Top-level keys starting with "__" are reserved for backend use.
Response
OK.

