Pistis
API referenceMessages

Send a message

POST
/sessions/{id}/messages

The same idempotencyKey is accepted once. While a turn runs, whenBusy followUp (default) waits for it to end and steer joins it. attachments are ids from the attachments route. Wait for the turn with the submissions route, or follow the events.

Authorization

bearer
headerAuthorizationBearer <token>

An API token

Path Parameters

id*string

A session id

Request Body

application/json
  1. body
input*string
idempotencyKey*string
mode?InputMode

agent runs tools and gated ones wait for a person; plan refuses every tool that could change something; auto approves gated tools as they are called, by the sender (where the server allows it)

Value in"agent""plan""auto"
whenBusy?string
Value in"followUp""steer"
attachments?array<>

Response Body

Accepted

application/json
  1. response
submissionId*string
Example Request
curl -X POST 'http://127.0.0.1:7777/sessions/ses_6c1f2a0b9d3e4f5a6b7c/messages' \  -H 'Content-Type: application/json' \  -d '{  "input": "run: ls -la /workspace",  "idempotencyKey": "msg-1"}'
Example Response
{  "submissionId": "string"}