Delete a campaign

View as Markdown
Soft-deletes a campaign that is not `active`. An active campaign must be paused first with `PATCH /api/campaigns/{campaignId}/pause` (400 otherwise). The campaign then disappears from every endpoint (404). Its contacts, calls and conversations are kept for reporting, and nothing is dialed or sent for it again: queued jobs are dropped when they find the campaign is not active. **Side effects.** Sets `deleted_at`, clears the campaign caches and writes an audit entry. **Idempotency.** Safe to retry: a repeated delete answers 404, which you can treat as success. **Webhook events.** `audit.log_recorded` for webhooks subscribed to it. See [Webhooks](/webhooks). **Access** - **Required scope:** `full`. Admin-only route: `read`/`write` keys get 403; signed-in users need the admin or owner role. - **Rate limit:** Configuration mutations — 10 requests/min per workspace, shared with agent mutations, on top of the general API limit (120 to 600 requests/min by plan). See [Rate limits](/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. | Scope | GET / HEAD | POST / PUT / PATCH / DELETE | Admin-only routes | | --- | --- | --- | --- | | `read` | Yes | No | No | | `write` | Yes | Yes | No | | `full` | Yes | Yes | Yes | 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](/authentication).

Path parameters

campaignIdstringRequiredformat: "uuid"

UUID of the campaign to delete. An unknown, already-deleted or foreign campaign 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