Skip to main content
GET
/
v1
/
sms
/
campaigns
/
{campaign_id}
Get SMS campaign
curl --request GET \
  --url https://api.nixflex.com/v1/sms/campaigns/{campaign_id}
Returns full campaign details including computed delivery counts and per-recipient status.

Request

curl https://api.nixflex.com/v1/sms/campaigns/smsc_a1b2c3d4 \
  -H "Authorization: Bearer KEY_ID:KEY_SECRET"

Response

{
  "campaign_id": "smsc_a1b2c3d4",
  "name": "March promotion",
  "agent_id": "agent_125207e452f8714a",
  "from_number": "+447446466847",
  "message_template": "Hi {{first_name}}, 20% off cleanings...",
  "status": "done",
  "total_count": 100,
  "delivered_count": 95,
  "failed_count": 3,
  "pending_count": 2,
  "source": "dashboard",
  "scheduled_at": null,
  "created_at": "2026-05-17T03:45:12Z",
  "recipients": [
    {
      "phone": "+447111000001",
      "variables": { "first_name": "Sarah" },
      "status": "delivered",
      "twilio_sid": "SM1234567890",
      "rendered_message": "Hi Sarah, 20% off cleanings...",
      "sent_at": "2026-05-17T03:45:14Z"
    },
    {
      "phone": "+447111000002",
      "variables": { "first_name": "James" },
      "status": "failed",
      "twilio_sid": "SM0987654321",
      "rendered_message": "Hi James, 20% off cleanings...",
      "error_message": "Unknown handset",
      "sent_at": "2026-05-17T03:45:15Z"
    }
  ]
}

How counts are calculated

All counts are computed from per-recipient status — never from cached fields. Same logic in the dashboard and the API.
CountCalculation
delivered_countRecipients with status delivered
failed_countRecipients with status failed, undelivered, or sent
pending_countRecipients with status pending or queued
total_countAll recipients
Twilio status sent means the message was handed to the carrier but never confirmed reaching the handset. Nixflex treats sent as a soft failure.

Per-recipient status values

StatusMeaning
pendingJust queued by Nixflex
queuedSent to Twilio API
sentTwilio handed to carrier (no delivery confirmation) — counted as failed
deliveredCarrier confirmed delivery to handset
undeliveredCarrier rejected — counted as failed
failedTwilio itself failed — counted as failed

Errors

CodeCause
campaign_not_foundID does not exist or is not yours