Skip to main content
POST
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 Record a consent or consent-withdrawal decision for the current SMS campaign policy revision. The owner confirms the selected event explicitly.
Method: POST ·
Success: 200 ·
Scope: Owning account
The important part
  • Save consent only when it was actually obtained.
  • A consent record does not override suppression or allowed contact hours.
Review the audience and policy, then record the actual consent decision for the current campaign revision before launch. A revision identifies the campaign policy you confirmed. Reusing a campaign creates a new revision and invalidates earlier confirmations. A campaign confirmation does not override a recipient’s STOP.
  • When it applies. Nixflex can require a consent confirmation before campaign texts are sent. This requirement is managed by Nixflex and may be off. While it is on, each recipient waits with consent_required until consent is recorded for the campaign.
  • What the owner confirms. Recording consent confirms that your business has permission to contact the recipients in this campaign on this channel. It is your statement; Nixflex does not check it.
  • What the policy revision is. The revision is the version of this campaign’s recipients and contact settings that you are confirming. A new campaign starts a new revision, so a confirmation never carries over to another campaign. Reusing an SMS campaign creates a new campaign, which needs its own confirmation. Later edits to is_active, the reply context or the reply window keep the same revision.
  • Withdrawal. Recording consent_withdrawn holds the remaining recipients with consent_withdrawn, even when Nixflex does not require confirmations.
  • Your own rules. Nixflex does not decide which texts are legal in each country. Check the rules that apply to your business before you launch. For example, marketing texts usually need prior consent, while service or reminder texts to existing customers often have different rules. This is not legal advice.
If you already have the necessary permission, consent_confirmed: true can record it when creating the campaign. Use the consent endpoint for a subsequent confirmation or withdrawal.

Authentication

Send Authorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side credential. Send Content-Type: application/json.

Request fields

Send a JSON object. confirmed must be true for either event. Omitted fields and false are refused. This endpoint does not launch a campaign or clear suppression. Recording consent can unblock otherwise eligible scheduled or running work. Missing campaigns and unconfirmed database results currently return 503 outcome_unknown.

Response fields

200 OK returns the shape below. Nullable fields can be unknown or unset; do not turn null into zero or false.

Example request

These examples require Node/CLI 0.11.0 or later, Python 0.4.0 or later and MCP 0.5.0 or later. Keep NIXFLEX_API_KEY private. cURL uses Bash; CLI uses PowerShell and reads the key through NIXFLEX_API_KEY. Replace fixture identifiers and reserved example numbers with approved account-owned values. Configure the existing MCP installation for the same account at https://api.nixflex.com before using the shown tool arguments. Python shows the synchronous client; AsyncNixflex uses the same method with async with and await. This example changes state. Review the target and payload before running it.
MCP does not offer this operation because it can enable outreach; use the API, Node, CLI or Python.

Example response

Illustrative 200 response. Identifiers and values are examples; some optional or compatibility fields are omitted.

Errors

Failures return an error object with code, message, doc_url and optional details. Each code links to the shared error catalog. Read the message and details before deciding whether to resend.

Retry and idempotency

No idempotency key is documented. A timeout or 5xx can follow a committed change. Read the current state before deciding whether to submit again; never automatically repeat an uncertain write. Each accepted request appends a decision event; it is not a deduplicated update.

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

Account-owned campaign identifier.

Required string length: 1 - 100
Pattern: ^[A-Za-z0-9_-]+$

Body

application/json
event
enum<string>
required

Decision to record.

Available options:
consent,
consent_withdrawn
confirmed
boolean
required

Explicitly confirm the selected event, including withdrawal.

Response

OK

campaign_id
string
required

Campaign ID.

recorded
boolean
required

The decision was recorded.