Delete an agent
Deletes an agent. The steps run in this order:
- Every
activecampaign that uses the agent is set topaused. - The agent’s phone numbers are unbound at the voice provider (best effort).
- 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.
- 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.
- The agent’s MCP gateway identity is retired and a final
deleteversion 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 withwriteare 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
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.
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
UUID of the agent to delete. An id from another workspace answers 404; a value that is not a UUID answers 400.

