Send session events
⚠️
Preview — this feature is being built; the design below is the spec.
POST https://app.syntic.ai/v1/sessions/{session_id}/eventsSend up to 20 events to a session: a new user message, the result of a function tool your code ran, or an approval decision. A message to an idle session starts a new turn; a message to a running session is queued for the next one.
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 |
|---|---|---|---|
events | array | Yes | 1 to 20 events, each up to 1 MB. |
Event types:
type | Fields | Use |
|---|---|---|
user.message | content: a string or content parts | Say something to the agent. |
user.tool_result | tool_call_id, content, optional is_error | Return the result of a tool whose executor is client. |
user.approval | tool_call_id, decision (approve or reject), optional reason | Answer an approval.required event. |
user.interrupt | none | Stop the current turn, like Interrupt a session. |
Response
202 Accepted, Content-Type: application/json
{
"data": [
{
"id": "evt_01JC7M4D",
"type": "user.tool_result",
"tool_call_id": "call_7",
"created_at": "2026-11-05T10:00:09Z"
}
]
}Examples
curl -sS https://app.syntic.ai/v1/sessions/sesn_01JC7M2K4P6R8T0V2X4Z/events \
-H "Authorization: Bearer $SYNTIC_API_KEY" \
-H "syntic-beta: agents-2026-11-01" \
-H "Content-Type: application/json" \
-d '{
"events": [
{
"type": "user.tool_result",
"tool_call_id": "call_7",
"content": "{\"status\": \"delivered\", \"total\": 41.20}"
}
]
}'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. |
| 404 | not_found_error | session_not_found | No session with that id in this workspace. |
| 409 | conflict_error | session_archived | The session is archived. |
| 409 | conflict_error | tool_call_not_pending | No tool call with that id is waiting for a result or approval. |
| 413 | invalid_request_error | event_too_large | One event is over 1 MB. |
| 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?