curl --request POST \
--url "https://api.nixflex.com/v1/sms/campaigns/campaign_fixture/launch" \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
import Nixflex from 'nixflex';
const c = new Nixflex({
apiKey: process.env.NIXFLEX_API_KEY,
baseUrl: 'https://api.nixflex.com',
maxRetries: 0,
});
const result = await c.sms.campaigns.launch("campaign_fixture");
import os
from nixflex import Nixflex
with Nixflex(
api_key=os.environ["NIXFLEX_API_KEY"],
base_url="https://api.nixflex.com",
max_retries=0,
) as c:
result = c.sms.campaigns.launch('campaign_fixture')
nixflex sms campaigns launch campaign_fixture --confirm --json --base-url "https://api.nixflex.com"
{
"name": "launch_sms_campaign",
"arguments": {
"campaign_id": "campaign_fixture",
"confirm": true
}
}
{
"campaign_id": "campaign_example",
"status": "running",
"sent": 0,
"failed": 0,
"total_segments": 0,
"held": 1,
"reason": "recipients_held",
"safe_to_retry": false
}
SMS campaigns
Launch an SMS campaign
Request the first launch of an owned Nixflex SMS campaign. Check readiness, consent and launch state before dispatching messages.
POST
/
sms
/
campaigns
/
{id}
/
launch
curl --request POST \
--url "https://api.nixflex.com/v1/sms/campaigns/campaign_fixture/launch" \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
import Nixflex from 'nixflex';
const c = new Nixflex({
apiKey: process.env.NIXFLEX_API_KEY,
baseUrl: 'https://api.nixflex.com',
maxRetries: 0,
});
const result = await c.sms.campaigns.launch("campaign_fixture");
import os
from nixflex import Nixflex
with Nixflex(
api_key=os.environ["NIXFLEX_API_KEY"],
base_url="https://api.nixflex.com",
max_retries=0,
) as c:
result = c.sms.campaigns.launch('campaign_fixture')
nixflex sms campaigns launch campaign_fixture --confirm --json --base-url "https://api.nixflex.com"
{
"name": "launch_sms_campaign",
"arguments": {
"campaign_id": "campaign_fixture",
"confirm": true
}
}
{
"campaign_id": "campaign_example",
"status": "running",
"sent": 0,
"failed": 0,
"total_segments": 0,
"held": 1,
"reason": "recipients_held",
"safe_to_retry": false
}
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
Do not send a request body.
No request body is used. This can contact real recipients. A second launch is refused after a campaign has been claimed, including finished runs. A missing or foreign campaign is reported as 400 invalid_request.
Consent, suppression, recipient-local windows and capacity remain normal contact gates. A manual launch is not permission to bypass them. A 200 response may report running with held recipients. A refusal after some sends does not undo those sends.
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
Request the first launch of an owned SMS campaign. Ownership, readiness and launch state are checked before dispatch; each recipient still passes current contact checks.
Method: POST ·
Success: 200 ·
Scope: Owning account
The important part
- Launching can send real messages to the saved recipients.
- After a lost response, read campaign state before a deliberate next action.
Authentication
SendAuthorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side credential.
Request fields
| Field | Type | Required | Default | Limits and meaning |
|---|---|---|---|---|
id (path) | string | Yes | None | Exact saved campaign_id owned by this account. This operation does not declare a route-level length or character validator. |
Response fields
200 OK returns the shape below. Nullable fields can be unknown or unset; do not turn null into zero or false.
| Field | Type | Meaning |
|---|---|---|
campaign_id | string | Campaign ID. |
status | string | running while held; otherwise done or failed. |
sent | integer | Accepted sends; not delivery proof. |
failed | integer | Known failures, distinct from accepted sends. |
total_segments | integer | Segment count for this run. |
held | integer | Held recipients when present. |
reason | string | Hold reason when present. |
safe_to_retry | boolean | False when held or outcome requires reconciliation. |
stopped | boolean | Present when number changes stop a legacy run. |
stop_reason | string | Why sending stopped. |
not_sent | integer | Remaining unattempted recipients when known. |
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. KeepNIXFLEX_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. Running it can contact recipients immediately or when scheduled; scheduled creation is executable, not a draft.
curl --request POST \
--url "https://api.nixflex.com/v1/sms/campaigns/campaign_fixture/launch" \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
import Nixflex from 'nixflex';
const c = new Nixflex({
apiKey: process.env.NIXFLEX_API_KEY,
baseUrl: 'https://api.nixflex.com',
maxRetries: 0,
});
const result = await c.sms.campaigns.launch("campaign_fixture");
import os
from nixflex import Nixflex
with Nixflex(
api_key=os.environ["NIXFLEX_API_KEY"],
base_url="https://api.nixflex.com",
max_retries=0,
) as c:
result = c.sms.campaigns.launch('campaign_fixture')
nixflex sms campaigns launch campaign_fixture --confirm --json --base-url "https://api.nixflex.com"
{
"name": "launch_sms_campaign",
"arguments": {
"campaign_id": "campaign_fixture",
"confirm": true
}
}
Example response
Illustrative200 response. Identifiers and values are examples; some optional or compatibility fields are omitted.
{
"campaign_id": "campaign_example",
"status": "running",
"sent": 0,
"failed": 0,
"total_segments": 0,
"held": 1,
"reason": "recipients_held",
"safe_to_retry": false
}
Errors
Failures return anerror 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.
| Status | Code | Meaning | What to do |
|---|---|---|---|
| 400 | invalid_request | The identifier or request fields are invalid. | Correct the documented fields before resending. |
| 500 | campaign_outcome_unknown | A campaign save or launch result is uncertain. | Use details.campaign_id to reconcile; safe_to_retry is false. |
| 503 | campaigns_paused | Campaign admission is temporarily paused. | Wait before a deliberate retry; check any saved campaign first. |
| 500 | server_error | The result could not be confirmed. | Read the current state before repeating a write. |
| 503 | dispatch_safety_unavailable | The current recipient was refused before sending because its safety record was unavailable. | Reconcile earlier accepted sends; do not replay the whole campaign. |
| 409 | account_inactive | Account sending is disabled. | Read details for this attempt and reconcile earlier accepted messages. |
| 409 | number_changed | The sending number changed. | Read details for this attempt and reconcile earlier accepted messages. |
| 409 | do_not_contact | The current recipient is suppressed. | Read details for this attempt and reconcile earlier accepted messages. |
| 401 | unauthorized | The credential is missing or invalid. | Check the full account credential. |
| 429 | rate_limit_exceeded | The account request limit was reached. | Wait for Retry-After. Reconcile uncertain writes before resending. |
Retry and idempotency
No idempotency key is documented. A launch claim prevents a second first launch, but it does not make blind HTTP retries safe. After a timeout or uncertain result, read the same campaign before acting. Resume only verified unattempted rows of the current running campaign; create a new campaign only as an intentional new run.Related endpoints
Authorizations
Path Parameters
Response
OK