Delete an agent
⚠️
Preview — this feature is being built; the design below is the spec.
DELETE https://app.syntic.ai/v1/agents/{agent_id}Delete an archived agent and all of its versions. Execution records keep the agent’s id and name so run history stays readable. Archive the agent first; deleting an active agent or one with running sessions is refused.
For how this fits into a full workflow, see Agent definitions.
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 |
|---|---|---|
agent_id | string | The agent id, starting with agt_. |
Response
200 OK, Content-Type: application/json
{
"id": "agt_01JC4R8W6Q2N9X3T5V7Y",
"type": "agent_deleted"
}Examples
curl -sS -X DELETE https://app.syntic.ai/v1/agents/agt_01JC4R8W6Q2N9X3T5V7Y \
-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 does not hold the role this change needs. |
| 404 | not_found_error | agent_not_found | No agent with that id in this workspace. |
| 409 | conflict_error | agent_not_archived | Archive the agent before deleting it. |
| 409 | conflict_error | agent_has_running_sessions | Sessions are still running. |
| 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?