> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nixflex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Prepare and launch a voice campaign

> Validate voice campaign recipients, consent, local hours and duplicate policy before creating executable campaign work once.

**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](https://docs.nixflex.com/ai-rules.md#campaigns)

Prepare a voice campaign as executable work: validate recipients and sending choices before creating it.

Input: **Reviewed recipient rows** · Creation: **Can launch calls** · Recovery: **Saved campaign ID**

**The important part**

* You can choose a date and sending window. There is no exact-minute dispatch field. [Voice campaign creation](https://docs.nixflex.com/api-reference/calls/batch-create.md) describes the supported fields and when you can replace recipients.

* Default now mode requests launch immediately; scheduled work can launch when due.

* Duplicate warnings do not block dispatch or provide request idempotency.

* Save campaign\_id even when creation succeeds but launch is refused or uncertain.

[Business guide](https://docs.nixflex.com/guides/business/voice-campaigns.md) · [API reference](https://docs.nixflex.com/api-reference/introduction.md) · [Glossary](https://docs.nixflex.com/guides/glossary.md)

## Prepare each recipient

Choose an active owned agent and an eligible owned sender. Provide a nonblank campaign `prompt`. Each recipient needs an E.164 `phone`; put template values inside its `variables` object. Use `prompt_override` only when that row deliberately needs different instructions.

Set known `country` and IANA `timezone` values for each recipient. A campaign time zone does not fill an unknown recipient location. Preview [contact hours](https://docs.nixflex.com/guides/developer/contact-controls.md) and record permission to contact the people before creating work.

## Choose duplicates and timing

| Choice | Effect |
| - | - |
| `duplicate_policy:reject` | Refuses repeated accepted numbers. |
| `warn` | Retains duplicate rows and reports them; it can still launch. |
| `allow` | Explicitly retains every duplicate row. |
| `schedule_type:now` | Requests launch after creation; also the default. |
| `schedule_type:schedule` | Uses `scheduled_date` and may launch automatically when due. |

There is no public draft-only flag. `duplicate_choice_required` is advisory, not a safe sending lock. If wider hours are requested, supply the required explanation; consent, suppression, recipient-local policy and capacity checks still apply at dispatch.

## Build the request before sending

This is a request-body illustration for [POST /calls/batch](https://docs.nixflex.com/api-reference/calls/batch-create.md), with fictional IDs and numbers. It is not a runnable test fixture. Replace every identifier, date and contact choice deliberately; scheduled work can contact recipients when due.

```json theme={"dark"}
{
  "agent_id":"agent_example",
  "from_number":"+12025550100",
  "name":"Appointment follow-up",
  "prompt":"Ask {{name}} whether they want to discuss an appointment.",
  "recipients":[{"phone":"+12025550101","variables":{"name":"Sam"},"country":"US","timezone":"America/New_York"}],
  "duplicate_policy":"reject",
  "schedule_type":"schedule",
  "scheduled_date":"2030-11-04",
  "consent_confirmed":false
}
```

The false consent value leaves contact held until valid consent is recorded; it is not a general sandbox flag. Use the exact endpoint schema for optional hours and scheduling fields. Up to 100,000 accepted recipients are supported, but request-size limits can apply first.

## Submit once and retain the result

Create the campaign once with automatic write retries disabled. Save `campaign_id`, accepted/rejected row counts and current state. Immediate launch may return `queued`, `failed` and legacy `dialed`; `dialed` counts enqueued jobs, not connected calls.

| Result | Next step |
| - | - |
| Validation refusal | Correct the named input before a new deliberate request. |
| Saved campaign, launch refused | Read the returned campaign ID; resolve the hold on existing work. |
| `campaign_outcome_unknown` | Preserve the ID from error details and reconcile; never recreate automatically. |
| Network response lost | Inspect saved work and seek reconciliation if the ID is unavailable. |

`reuse_campaign_id` can replace an owned never-launched draft or scheduled voice campaign. It is not an idempotency key and cannot safely replay an unknown launch.

* [Track results and control dispatch](https://docs.nixflex.com/guides/developer/campaigns/results-and-controls.md)
* [Read the complete create reference](https://docs.nixflex.com/api-reference/calls/batch-create.md)
* [Review contact controls](https://docs.nixflex.com/guides/developer/contact-controls.md)

## Related dashboard and AI tasks

* [Review recipients before a voice campaign](https://docs.nixflex.com/guides/business/voice-campaigns/review-recipients.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.