Skip to navigation

Delete an agent

View as Markdown

Deletes an agent. The steps run in this order:

  1. Every active campaign that uses the agent is set to paused.
  2. The agent’s phone numbers are unbound at the voice provider (best effort).
  3. The voice agent is deleted in the voice engine. If that fails the request fails and nothing else is deleted — but the campaigns paused in step 1 stay paused.
  4. In one transaction the agent is soft-deleted together with its tools, A/B variants, widgets, knowledge documents and MCP server assignments, and its phone numbers are detached.
  5. The agent’s MCP gateway identity is retired and a final delete version is recorded.

The agent’s history (calls, conversations, change versions) is kept.

Side effects. Pauses campaigns, calls the voice engine (unbind numbers, delete agent), disables the agent’s widgets, posts an in-app notification and writes an audit entry. Inbound calls to numbers that pointed at the agent stop being answered until another agent is assigned.

Idempotency. Safe to retry: a second call answers 404 AGENT_NOT_FOUND. Retrying after a 502 re-attempts the provider deletion.

Webhook events. campaign.paused ({ campaign_id, campaign_name, agent_id, channel, status: paused, reason: agent_deleted }) for each active campaign the deletion pauses, and audit.log_recorded (when subscribed). See Webhooks.

Access

  • Required scope: full. Admin-only: API keys with write are refused; signed-in users need the owner or admin role.
  • Rate limit: Agent mutations — 10 requests/min per workspace, shared with every agent, A/B variant, tool and knowledge write; the request also counts against the General API limit. See Rate limits.
  • Plan: Available on every plan.

Authentication

AuthorizationBearer

Workspace API key: jl_ followed by 64 lowercase hex characters, created by the workspace owner in the dashboard (Settings → API Keys) and sent as Authorization: Bearer jl_.... The plaintext is shown once, at creation; Jelliu stores only a SHA-256 hash. A workspace can hold up to 25 active keys.

ScopeGET / HEADPOST / PUT / PATCH / DELETEAdmin-only routes
readYesNoNo
writeYesYesNo
fullYesYesYes

Operations restricted to admins or owners reject keys without the full scope with 403, and say so in their description. No key, whatever its scope, can mint or revoke API keys or rotate a webhook secret — that requires a signed-in owner session. A revoked key stops authenticating within about 10 seconds. See Authentication.

Path parameters

agentIdstringRequiredformat: "uuid"

UUID of the agent to delete. An id from another workspace answers 404; a value that is not a UUID answers 400.

Response

Deleted. No body.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
502
Bad Gateway Error