curl --request GET \
--url "https://api.nixflex.com/v1/sms/campaigns?status=running&limit=2" \
--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.list({"status": "running", "limit": 2});
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.list(status='running', limit=2)
nixflex sms campaigns list --status running --limit 2 --json --base-url "https://api.nixflex.com"
{
"name": "list_sms_campaigns",
"arguments": {
"status": "running",
"limit": 2
}
}
{
"campaigns": [],
"next_cursor": null
}
SMS campaigns
List SMS campaigns
List the account’s Nixflex SMS campaigns, newest first. Delivery totals cover all campaign recipients, beyond the current recipient page.
GET
/
sms
/
campaigns
curl --request GET \
--url "https://api.nixflex.com/v1/sms/campaigns?status=running&limit=2" \
--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.list({"status": "running", "limit": 2});
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.list(status='running', limit=2)
nixflex sms campaigns list --status running --limit 2 --json --base-url "https://api.nixflex.com"
{
"name": "list_sms_campaigns",
"arguments": {
"status": "running",
"limit": 2
}
}
{
"campaigns": [],
"next_cursor": null
}
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.
Sort order is created_at descending then row id descending. Send next_cursor back as before and keep the same status filter. Continue until an empty page returns null; a nonnull cursor does not confirm that another row exists. A malformed before cursor currently returns 500 server_error.
Sent and failed totals are distinct measures and may overlap after a later delivery failure. Do not add them to infer a unique recipient total. Segments are estimates.
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
List this account’s SMS campaigns, newest first. Delivery totals cover all campaign recipients, not just the returned page.
Method: GET ·
Success: 200 ·
Scope: Owning account
The important part
- This list covers the account. Store each customer’s campaign IDs on your server and use SMS campaign detail for the selected campaign.
- Use saved campaign IDs for detail and action requests.
- A list summary is not the complete recipient outcome record.
Authentication
SendAuthorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side credential.
Request fields
| Field | Type | Required | Default | Limits and meaning |
|---|---|---|---|---|
status (query) | string | No | Omitted | Optional exact status filter. Unknown values normally return no matches. |
limit (query) | integer | No | 1000 | Positive integer; omitted or invalid uses 1,000; capped at 1,000. Minimum 1. Maximum 1000. |
before (query) | string | No | Omitted | Opaque next_cursor from the previous response; preserve unchanged. |
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 |
|---|---|---|
campaigns | array of object | Saved value. |
campaigns[].campaign_id | string | Public campaign ID. |
campaigns[].agent_id | string | Owning agent ID. |
campaigns[].name | string or null | Saved campaign label. |
campaigns[].from_number | string or null | International number with + and digits; no spaces. Pattern: ^\+[1-9][0-9]{6,14}$. |
campaigns[].schedule_type | string | Saved now or schedule mode. |
campaigns[].scheduled_date | string or null | Saved scheduled date. |
campaigns[].window_start_minutes | integer or null | Configured start minute. |
campaigns[].window_end_minutes | integer or null | Configured end minute. |
campaigns[].window_days | array or null | Saved value. |
campaigns[].timezone | string or null | Saved campaign time zone. |
campaigns[].source | string | Saved origin label. |
campaigns[].status | string | Current state; for example scheduled, launching, running, done, failed or cancelled. Treat new states conservatively. |
campaigns[].total_count | integer | Count. Minimum 0. |
campaigns[].started_at | string or null | Saved timestamp, or null. Format: date-time. |
campaigns[].completed_at | string or null | Saved timestamp, or null. Format: date-time. |
campaigns[].created_at | string or null | Saved timestamp, or null. Format: date-time. |
campaigns[].updated_at | string or null | Saved timestamp, or null. Format: date-time. |
campaigns[].allow_wider_hours | boolean | True only with confirmation evidence for the current policy revision. |
campaigns[].id | string | Row ID of this campaign record (UUID); the opaque list cursor includes it. Use campaign_id in requests. Format: uuid. |
campaigns[].api_key_id | string | Owning account ID, not its secret. |
campaigns[].message_template | string | Saved text template. |
campaigns[].reply_context_prompt | string or null | Saved reply instructions. |
campaigns[].reply_window_hours | integer | Reply association window in hours. |
campaigns[].is_active | boolean | Reply behaviour enabled flag; not a dispatch cancellation control. |
campaigns[].claimed_at | string or null | Saved timestamp, or null. Format: date-time. |
campaigns[].sent_count | integer | Rows accepted for sending, including delivered or replied rows. Can overlap with later failures. |
campaigns[].delivered_count | integer | Delivered or replied rows. |
campaigns[].failed_count | integer | Failed or undelivered rows. |
campaigns[].reply_count | integer | Recipients marked replied. |
campaigns[].total_segments | integer | Estimated sum of recipient segments. |
campaigns[].pending_count | integer | Rows pending or queued. |
campaigns[].segments_estimated | boolean | Reported segments are estimates. Value: true. |
next_cursor | string or null | Opaque next page cursor. Nonempty pages produce a cursor even when shorter than the limit. |
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 is the first page; use only cursors returned by the API for subsequent pages.
curl --request GET \
--url "https://api.nixflex.com/v1/sms/campaigns?status=running&limit=2" \
--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.list({"status": "running", "limit": 2});
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.list(status='running', limit=2)
nixflex sms campaigns list --status running --limit 2 --json --base-url "https://api.nixflex.com"
{
"name": "list_sms_campaigns",
"arguments": {
"status": "running",
"limit": 2
}
}
Example response
Illustrative200 response. Identifiers and values are examples; some optional or compatibility fields are omitted.
{
"campaigns": [],
"next_cursor": null
}
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 |
|---|---|---|---|
| 500 | server_error | The result could not be confirmed. | Read the current state before repeating a write. |
| 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. |