Skip to main content
DELETE
FIXED · campaign MUST Resume covers only unattempted work in the existing running launch, and neither resume nor reuse replays completed work.
reuse_campaign_id replaces settings and recipients atomically only on an owned, never-launched voice draft or scheduled campaign. A launch claim prevents replacement. SMS creation always generates a fresh ID, even if the request forwards this field. Omit it for SMS.
NOT OFFERED → do this instead · campaign A launched or finished campaign cannot run again. For another run create a campaign with a fresh ID, selected recipients and reviewed settings. The dashboard’s Use again button follows the same rule for voice: it edits a campaign that never launched, otherwise it opens a new campaign filled with the original settings and recipients for review before launch. SMS campaigns have no Use again button. YOU CAN CHANGE · campaign Use schedule_type=schedule, scheduled_date (YYYY-MM-DD), timezone, window_days and optional paired window_start_minutes/window_end_minutes. UTC date checks, local windows and capacity apply. SCOPE · campaign DELETE /v1/calls/batch/{id} deletes a voice campaign. Voice and SMS have separate cancel routes. Cancel stops future work. Running attempts may finish. For one owned sender, send business_number (encode + as %2B) on GET /v1/campaigns or GET /v1/sms/campaigns. Omit for account scope. Keep the same number and status through SMS cursors. Restart paging if either changes. Voice include_totals=true covers returned campaigns only (default 50, max 200). Pickup rate = answered attempts / all attempts, including failed starts. Answered means over five seconds with no detected voicemail. Sum counts before dividing. Zero attempts means no rate. SMS delivery rate = delivered / (delivered + failed). Read the compact AI rules Stop this campaign and remove its campaign view while preserving sent history and used charges.
Method: DELETE ·
Success: 200 ·
Permission: Owner or Admin
The important part
  • Running calls are hung up before content deletion.
  • A queued hang-up is not a completed delete; the same request safely resumes it.
  • Used charges remain. Customer-managed copies have their own lifecycle.

Authentication

Use the owning account’s server-side credential in Authorization: Bearer KEY_ID:KEY_SECRET. An organisation API key has Owner authority. Personal dashboard sessions need Owner or Admin authority; Members receive 403.

Request fields

Do not send a request body. Review the ID and effect before sending; completed content removal cannot be undone. Deleting a voice or SMS campaign cancels waiting work, hangs up its running calls, then removes the campaign and recipient list. Calls already made and texts already sent stay in history. Used charges stay in billing; there are no refunds. Owner and Admin can delete; Member cannot. Cancel alone stops future dispatch and lets active calls finish; Delete also requests their hang-up.

Response fields

HTTP 200 confirms content deletion. It does not erase billing or every external copy.

Example request

These examples use the existing Node, Python, CLI and MCP delete methods. They target test and use an owned fixture ID. Set NIXFLEX_API_KEY privately for that account; configure MCP for the same host. The request changes the campaign. The CLI and MCP require explicit confirmation. Use the exact supported client version. Its Node/Python clients preserve a proved 503 hangup_pending as NixflexServerError; other uncertain failures use outcome_unknown with the server code in details.original_code. A client exception for HTTP 503 does not mean deletion has stopped. Read its error code and details: hangup_pending is queued, while deletion_unavailable does not confirm a queue. Show deletion as complete only after HTTP 200 with deleted:true. See the response and recovery sections below.

Example response

Errors

The 503 flags are inside error.details, not at the response root. hangup_pending includes deleted:false and retry_pending:true; deletion_unavailable includes deleted:false without promising that a queue exists.

Retry and idempotency

If hang-up is not confirmed, HTTP 503 hangup_pending returns error.details.deleted:false and error.details.retry_pending:true. Deletion stays queued and continues automatically. Repeating the same DELETE for the same account and ID safely resumes it. A lost response or deletion_unavailable is not success: check the list, then repeat that same DELETE if needed. Missing and foreign IDs share HTTP 404. Bulk call deletion and account closure keep separate safety rules. Use bounded reads to refresh the list. Do not treat the generic write-retry rule for call creation or SMS sending as the deletion rule: this same-ID DELETE can be repeated deliberately to resume cleanup. It does not require an Idempotency-Key header.

Authorizations

Authorization
string
header
required

KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A verified personal dashboard Bearer session may be used where the operation documents role-based access.

Path Parameters

id
string
required

Owned campaign identifier. Missing and foreign IDs have the same 404.

Required string length: 1 - 200

Response

Campaign and recipient list removed. Sent history and used charges remain.

campaign_id
string
required
deleted
boolean
required
message
string
required
Allowed value: "Campaign deleted"