attacca
Sessions

Send a message

Queues the agent's next turn and returns immediately with `202` — the agent runs server-side, so the reply survives you disconnecting. There is no turn handle to poll: wait for `session.settled` on `GET /v1/events`, then read the reply with `GET /v1/sessions/{session_id}/messages`. This is also how you answer a job whose state went `ambiguous` — post to the job's `primary_session_id`.

POST
/v1/sessions/{session_id}/messages

Queues the agent's next turn and returns immediately with 202 — the agent runs server-side, so the reply survives you disconnecting. There is no turn handle to poll: wait for session.settled on GET /v1/events, then read the reply with GET /v1/sessions/{session_id}/messages.

This is also how you answer a job whose state went ambiguous — post to the job's primary_session_id.

Authorization

api_key sessions:write
AuthorizationBearer <token>

An atk_-prefixed API key, created under Settings → API keys.

In: header

Scope: sessions:write

Path Parameters

session_id*string

Session id

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages" \  -H "Content-Type: application/json" \  -d '{    "message": "string"  }'
{  "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",  "created_at": "2019-08-24T14:15:22Z",  "depth": 0,  "factcheck_enabled": true,  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "parent_kind": "string",  "parent_schedule_id": "976bdf23-5dc8-4474-a778-a91df331c3aa",  "parent_session_id": "332c228e-f2af-4ec3-b6d2-c6dd59f66c36",  "parent_user_id": "d5c8e834-f292-42c2-b18e-c80e5d13a7f3",  "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",  "running": true,  "source_card_id": "3a228978-b733-49f5-a345-691ace7056d4",  "status": "string",  "title": "string",  "updated_at": "2019-08-24T14:15:22Z"}