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

Send input

POST
/sessions/{id}/events

Queues a user.message (with text and an optional idempotency key) or requests an interruption with user.interrupt. Returns 202 Accepted once the input is recorded locally.

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

id*string

Opaque session ID.

Match^[a-fA-F0-9]{32}$

Request Body

application/json
  1. body
delivery?string
key?string
text?string
type*string

Response Body

Send input

application/json
  1. response
cursor?string
data*unknown
id*string
input_id?string
time*string
Formatdate-time
type*string
curl -X POST 'http://127.0.0.1:8080/sessions/string/events' \  -H 'Authorization: Bearer <BRAIN_TOKEN>' \  -H 'Content-Type: application/json' \  -d '{  "type": "string"}'
{  "cursor": "string",  "data": null,  "id": "string",  "input_id": "string",  "time": "2019-08-24T14:15:22Z",  "type": "string"}