Skip to content
brain.GitHub
Developer docs OPEN SOURCE
HTTP APIEndpoints

Upload an attachment

POST
/sessions/{id}/attachments

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.

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

id*string

Opaque session ID.

Length1 <= length <= 128

Query Parameters

name*string

Request Body

body*fileapplication/octet-stream
Formatbinary

Response Body

Upload an attachment

application/json
  1. response
media_type*string
name*string
reference*string
size*integer
Formatint64
curl -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}