Terminate an execution
⚠️
Preview — this feature is being built; the design below is the spec.
POST https://app.syntic.ai/v1/agents/executions/{execution_id}/terminateStop a run that is in_progress. It ends with state terminated. Needs a key created by an Administrator or Owner, and writes an audit event with the key as actor.
For how this fits into a full workflow, see Executions.
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. |
Path parameters
| Parameter | Type | Description |
|---|---|---|
execution_id | string | The run id, starting with exec_. |
Response
200 OK, Content-Type: application/json
{
"id": "exec_01JC7N0Q8S2U4W6Y8A0C",
"type": "agent_execution",
"agent_id": "agt_01JC4R8W6Q2N9X3T5V7Y",
"agent_name": "refund-desk",
"agent_version": 4,
"session_id": "sesn_01JC7M2K4P6R8T0V2X4Z",
"state": "terminated",
"started_at": "2026-11-05T10:00:01Z",
"ended_at": "2026-11-05T10:00:19Z",
"duration_ms": 18234,
"error": null,
"usage": {
"input_tokens": 9120,
"cached_input_tokens": 6400,
"output_tokens": 412,
"cost_usd": "0.0294"
},
"trace_count": 7
}Examples
curl -sS -X POST https://app.syntic.ai/v1/agents/executions/exec_01JC7N0Q8S2U4W6Y8A0C/terminate \
-H "Authorization: Bearer $SYNTIC_API_KEY" \
-H "syntic-beta: agents-2026-11-01"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. |
| 403 | permission_error | role_required | The key’s creator is not an Administrator or Owner. |
| 404 | not_found_error | execution_not_found | No run with that id in this workspace. |
| 409 | conflict_error | execution_not_running | The run already ended. |
| 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?