Update a session
⚠️
Preview — this feature is being built; the design below is the spec.
PATCH https://app.syntic.ai/v1/sessions/{session_id}Change the title or metadata of a session. The agent, its version and the conversation are fixed once a session starts; to run a different agent, create a new session. Metadata keys you send are merged into the existing map, and a key set to null is removed.
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 |
Path parameters
| Parameter | Type | Description |
|---|---|---|
session_id | string | The session id, starting with sesn_. |
Body parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
title | string | No | Up to 200 characters. Shown in the Console session list. |
metadata | object | No | Up to 16 keys, string values up to 512 characters. null removes a key. |
Response
200 OK, Content-Type: application/json
{
"id": "sesn_01JC7M2K4P6R8T0V2X4Z",
"type": "session",
"agent_id": "agt_01JC4R8W6Q2N9X3T5V7Y",
"agent_version": 4,
"status": "idle",
"channel": "api",
"title": "Refund for order 88123 (escalated)",
"usage": {
"input_tokens": 18234,
"cached_input_tokens": 12288,
"output_tokens": 1420,
"cost_usd": "0.0436"
},
"outcome": null,
"created_at": "2026-11-05T10:00:00Z",
"last_event_at": "2026-11-05T10:04:12Z",
"metadata": {
"ticket": "88123",
"tier": "gold"
}
}| Field | Type | Description |
|---|---|---|
title | string or null | The new title. |
metadata | object | The merged map after the update. |
status | string | Unchanged by this call. |
Examples
curl -sS -X PATCH "https://app.syntic.ai/v1/sessions/sesn_01JC7M2K4P6R8T0V2X4Z" \
-H "Authorization: Bearer $SYNTIC_API_KEY" \
-H "syntic-beta: agents-2026-11-01" \
-H "Content-Type: application/json" \
-d '{
"title": "Refund for order 88123 (escalated)",
"metadata": {
"tier": "gold",
"draft": null
}
}'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 | metadata_too_large | More than 16 keys, or a value over 512 characters. |
| 409 | conflict_error | session_archived | Archived sessions are read-only. |
| 404 | not_found_error | session_not_found | No session with this id in the key’s workspace. |
| 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?