Start a session
⚠️
Preview — this feature is being built; the design below is the spec.
POST https://app.syntic.ai/v1/sessionsStart a conversation with an agent. Pass the first message in input to save a round trip; the agent begins working at once and the session is running. Follow progress with Stream session events.
For how this fits into a full workflow, see Sessions.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <key>: a private inference key (sk_live_...). See Authentication. |
syntic-beta | Yes, while in preview | agents-2026-11-01. Without it the call fails with 400 beta_required. See Versioning. |
Content-Type | Yes | application/json |
Idempotency-Key | No | Up to 255 characters. Retrying with the same key within 24 hours returns the first result instead of creating a duplicate. See Idempotency. |
Body parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
agent_id | string | Yes | An active agent. |
agent_version | integer | No | Pin a version; default latest. |
input | array | No | Events to send immediately, in the Send events format. |
title | string | No | Shown in the Console, up to 200 characters. |
contact | object | No | {id, display_name} for your own tracking. |
environment_id | string | No | Override the agent’s environment. |
memory_scope | string | No | Scope this session reads and writes in the agent’s memory stores, such as customer:4821. Without it only global is readable and nothing is written. |
limits | object | No | Lower max_turns, session_token_budget or session_cost_budget_usd. Higher values than the agent’s are refused. |
metadata | object | No | Up to 16 string pairs. |
Response
201 Created, Content-Type: application/json
{
"id": "sesn_01JC7M2K4P6R8T0V2X4Z",
"type": "session",
"agent_id": "agt_01JC4R8W6Q2N9X3T5V7Y",
"agent_version": 4,
"status": "running",
"channel": "api",
"title": "Refund for order 88123",
"usage": {
"input_tokens": 0,
"cached_input_tokens": 0,
"output_tokens": 0,
"cost_usd": "0.0000"
},
"outcome": null,
"created_at": "2026-11-05T10:00:00Z",
"last_event_at": "2026-11-05T10:00:00Z",
"metadata": {}
}| Field | Type | Description |
|---|---|---|
id | string | Starts with sesn_. |
agent_id | string | The agent the session runs. |
agent_version | integer | The version it is pinned to for its whole life. |
status | string | running, requires_action (waiting for your tool result or approval), idle or archived. |
channel | string | api for sessions started here; channel sessions show telegram, slack and so on. |
usage | object | Running token and cost totals. |
outcome | object or null | Set when a turn ends: reason is end_turn, max_turns, budget_exhausted, interrupted or error. |
last_event_at | string | Time of the latest event. |
Examples
curl -sS https://app.syntic.ai/v1/sessions \
-H "Authorization: Bearer $SYNTIC_API_KEY" \
-H "syntic-beta: agents-2026-11-01" \
-H "Idempotency-Key: 8d6f0c1e-4b2a-4a57-9f0e-2f1d3c4b5a69" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agt_01JC4R8W6Q2N9X3T5V7Y",
"title": "Refund for order 88123",
"memory_scope": "customer:4821",
"input": [
{
"type": "user.message",
"content": "Please refund order 88123."
}
]
}'Errors
Errors use the error envelope and carry a request_id. Codes specific to this operation:
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request_error | beta_required | The syntic-beta header is missing. |
| 400 | invalid_request_error | limit_above_agent | A session limit exceeds the agent’s. |
| 402 | quota_exhausted | quota_exhausted | Plan allowance and credits cannot cover the first model call. |
| 404 | not_found_error | agent_not_found | No such agent in this workspace. |
| 409 | conflict_error | agent_archived | The agent is archived. |
| 409 | conflict_error | environment_not_ready | The environment has not finished its first build. |
| 401 | authentication_error | invalid_api_key | The key is missing, unknown, revoked or expired. |
| 429 | rate_limit_error | rate_limited | Too many requests; wait for Retry-After. See Rate-limit headers. |
Related
Was this page helpful?