Skip to main content
PATCH
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 Update reply behaviour for one owned SMS campaign. This operation does not edit its recipients, schedule or message template, and it is not a cancellation control.
Method: PATCH ·
Success: 200 ·
Scope: Owning account
The important part
  • These settings control replies associated with the campaign.
  • A saved reply setting does not launch or resend campaign messages.

Authentication

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

Request fields

Send at least one supported field. Omitted fields stay unchanged; unknown fields are ignored. Database constraints still apply. The response is the campaign object directly, with no campaign wrapper. It contains saved counters, rather than the recomputed totals returned by list/detail. This route currently has no strict type/length validation before the database; empty updates, missing campaigns and database failures may return 500 server_error. Read detail after an uncertain save.

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.

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.

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

Exact saved campaign_id owned by this account. This operation does not declare a route-level length or character validator.

Body

application/json

Send at least one supported field. Omitted fields stay unchanged; unknown fields are ignored. Database constraints still apply.

is_active
boolean

Enable or disable reply behaviour; does not stop dispatch.

reply_context_prompt
string | null

Replace reply instructions; null clears.

reply_window_hours
integer

Saved reply association window in hours. Use a positive integer; no route-level range validator is declared.

Required range: x >= 1

Response

OK

campaign_id
string
required

Public campaign ID.

agent_id
string
required

Owning agent ID.

name
string | null
required

Saved campaign label.

from_number
string | null
required

International number with + and digits; no spaces.

Pattern: ^\+[1-9][0-9]{6,14}$
schedule_type
string
required

Saved now or schedule mode.

scheduled_date
string | null
required

Saved scheduled date.

window_start_minutes
integer | null
required

Configured start minute.

window_end_minutes
integer | null
required

Configured end minute.

window_days
string[] | null
required

Weekday.

timezone
string | null
required

Saved campaign time zone.

source
string
required

Saved origin label.

status
string
required

Current state; for example scheduled, launching, running, done, failed or cancelled. Treat new states conservatively.

total_count
integer
required

Count.

Required range: x >= 0
started_at
string<date-time> | null
required

Saved timestamp, or null.

completed_at
string<date-time> | null
required

Saved timestamp, or null.

created_at
string<date-time> | null
required

Saved timestamp, or null.

updated_at
string<date-time> | null
required

Saved timestamp, or null.

allow_wider_hours
boolean
required

True only with confirmation evidence for the current policy revision.

id
string<uuid>
required

Row ID of this campaign record (UUID); the opaque list cursor includes it. Use campaign_id in requests.

api_key_id
string
required

Owning account ID, not its secret.

message_template
string
required

Saved text template.

reply_context_prompt
string | null
required

Saved reply instructions.

reply_window_hours
integer
required

Reply association window in hours.

is_active
boolean
required

Reply behaviour enabled flag; not a dispatch cancellation control.

claimed_at
string<date-time> | null
required

Saved timestamp, or null.

sent_count
integer
required

Rows accepted for sending, including delivered or replied rows. Can overlap with later failures.

delivered_count
integer
required

Delivered or replied rows.

failed_count
integer
required

Failed or undelivered rows.

reply_count
integer
required

Recipients marked replied.

total_segments
integer
required

Estimated sum of recipient segments.