HTTP APIEndpoints
Upload an attachment
POST
Streams up to 16 MiB with Content-Type and a name query parameter. Returns a finalized reference scoped to this session. Flush commits linked attachments externally.
bearerheader
AuthorizationBearer <token>id*stringOpaque session ID.
Length
1 <= length <= 128name*stringbody*fileapplication/octet-streamFormat
binaryUpload an attachment
application/json- response
media_type*stringname*stringreference*stringsize*integerFormat
int64curl -X POST 'http://127.0.0.1:8080/sessions/string/attachments?name=string' \ -H 'Authorization: Bearer <BRAIN_TOKEN>' \ -H 'Content-Type: application/octet-stream' \ -d 'string'{ "media_type": "string", "name": "string", "reference": "string", "size": 0}