Get SMS campaign
curl --request GET \
--url https://api.nixflex.com/v1/sms/campaigns/{campaign_id}import requests
url = "https://api.nixflex.com/v1/sms/campaigns/{campaign_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.nixflex.com/v1/sms/campaigns/{campaign_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nixflex.com/v1/sms/campaigns/{campaign_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nixflex.com/v1/sms/campaigns/{campaign_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nixflex.com/v1/sms/campaigns/{campaign_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nixflex.com/v1/sms/campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodySMS
Get SMS campaign
GET /v1/sms/campaigns/:id
GET
/
v1
/
sms
/
campaigns
/
{campaign_id}
Get SMS campaign
curl --request GET \
--url https://api.nixflex.com/v1/sms/campaigns/{campaign_id}import requests
url = "https://api.nixflex.com/v1/sms/campaigns/{campaign_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.nixflex.com/v1/sms/campaigns/{campaign_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nixflex.com/v1/sms/campaigns/{campaign_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nixflex.com/v1/sms/campaigns/{campaign_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nixflex.com/v1/sms/campaigns/{campaign_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nixflex.com/v1/sms/campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyReturns 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.| Count | Calculation |
|---|---|
delivered_count | Recipients with status delivered |
failed_count | Recipients with status failed, undelivered, or sent |
pending_count | Recipients with status pending or queued |
total_count | All 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
| Status | Meaning |
|---|---|
pending | Just queued by Nixflex |
queued | Sent to Twilio API |
sent | Twilio handed to carrier (no delivery confirmation) — counted as failed |
delivered | Carrier confirmed delivery to handset |
undelivered | Carrier rejected — counted as failed |
failed | Twilio itself failed — counted as failed |
Errors
| Code | Cause |
|---|---|
campaign_not_found | ID does not exist or is not yours |
⌘I