GET/ sms-campaign/
Get all SMS campaigns
You can return a list of your SMS campaigns.
Results are paginated: follow next to get the next page (see Response pagination).
Request
- cURL
- JavaScript
- PHP
- Python
curl -X GET "https://<your_app_subdomain>.user.com/api/public/sms-campaign/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"
const response = await fetch(
"https://<your_app_subdomain>.user.com/api/public/sms-campaign/",
{
method: "GET",
headers: {
Authorization: "Token <your_64_char_api_key>",
Accept: "*/*; version=2",
},
},
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://<your_app_subdomain>.user.com/api/public/sms-campaign/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Token <your_64_char_api_key>",
"Accept: */*; version=2",
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
response = requests.get(
"https://<your_app_subdomain>.user.com/api/public/sms-campaign/",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
)
print(response.json())
Response examples
- 200 OK
{"count": 2,"next": null,"previous": null,"results": [{"id": 11,"name": "Example name","description": "","phone_number": null,"type": 1,"eta": null,"status": 1,"recipients": ,1 item"recipients_ids": "Example recipients ids","recipients_count": 1,"started_at": null,"last_message_sent_at": null,"finished_at": null,"author": 77,"created_at": "2026-10-23T15:26:44.449379Z","updated_at": "2026-10-23T15:29:44.004077Z","statistics": ,7 fields"folder": null},{"id": 10,"name": "Example name","description": "","phone_number": null,"type": 1,"eta": null,"status": 1,"recipients": null,"recipients_ids": null,"recipients_count": null,"started_at": null,"last_message_sent_at": null,"finished_at": null,"author": 59,"created_at": "2026-10-23T10:56:40.548493Z","updated_at": "2026-10-23T10:56:40.548537Z","statistics": ,7 fields"folder": null}]}Response fields
Fields returned in the 200 OK response body.
- count
- Number of results across all pages. It can lag behind recent changes; see Response pagination.
- next
- URL of the next page of results. null on the last page.
- previous
- URL of the previous page of results. null on the first page.
- results
- Results on this page.
- results[].
id - A unique identifier for the campaign which is given by User automatically.
- results[].
name - A SMS campaign name.
- results[].
description - A description of the SMS campaign.
- results[].
phone_number - A phone number where SMS will be sent
- results[].
type - A type of SMS campaign (1 - simple, 2 - automated).
- results[].
eta - When sending starts. Set when the campaign is sent from the panel without one;
nulluntil then. - results[].
status 1draft,2active or3archived.- results[].
recipients - A list of user_ids.
- results[].
recipients_ids - Contact IDs the campaign goes to, as a JSON array in a string; worked out when the recipients are saved.
- results[].
recipients_count - A number of recipients.
- results[].
started_at - A date when SMS campaign started.
- results[].
last_message_sent_at - When the campaign last sent a message, or
null. - results[].
finished_at - A finish date of a campaign.
- results[].
author - ID of the agent who created the campaign or last changed it through the API.
- results[].
created_at - A creation date of a campaign.
- results[].
updated_at - A date of last campaign update.
- results[].
statistics - Delivery and click statistics of the campaign.
- results[].
statistics. scheduled - Number of notifications scheduled.
- results[].
statistics. delivered - Number of notifications delivered.
- results[].
statistics. delivery_percentage - Delivered messages as a percentage of scheduled ones, rounded.
- results[].
statistics. bounced - Number of messages that failed to deliver.
- results[].
statistics. total_click_count - Number of clicks on shortened links in the messages.
- results[].
statistics. unique_click_count - Number of messages whose shortened links were clicked at least once.
- results[].
statistics. click_percentage - Messages with a click as a percentage of messages with shortened links.
- results[].
- results[].
folder - ID of the folder the campaign is in, or
null.
- results[].
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.