GET/ sms-campaign/ :id/
Get single SMS campaign
You can return details about a specific SMS campaign.
Attributes
Optional unless marked required
- id
- A unique identifier for the campaign which is given by User automatically.
Request
- cURL
- JavaScript
- PHP
- Python
curl -X GET "https://<your_app_subdomain>.user.com/api/public/sms-campaign/:id/" \
-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/:id/",
{
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/:id/",
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/:id/",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
)
print(response.json())
Response examples
- 200 OK
{"extra_data": {"all_recipients": null,"recipients_lists": [],"recipients_segments": []},"id": 11,"description": "","type": 1,"eta": null,"name": "Example name","status": 1,"messages": [{"id": 40,"body": "Example body","name": "Example name","message_id": 11,"is_archived": false}],"recipients": [1081],"created_at": "2026-10-23T15:26:44.449379Z","updated_at": "2026-10-23T15:29:44.004077Z","phone_number": null,"provider": null,"recipients_count": 1,"statistics": {"scheduled": 1,"delivered": 0,"delivery_percentage": 0,"bounced": 0,"total_click_count": 0,"unique_click_count": 0,"click_percentage": 0},"twoway_provider": null,"provider_redlink": null,"provider_serwersms": null,"provider_clicksend": null,"provider_messente": null,"provider_cm": null,"provider_autopay": null,"use_trial_provider": false,"category": null,"url_shortener_enabled": false,"folder": null,"recipients_segments": [],"recipients_lists": []}Response fields
Fields returned in the 200 OK response body.
- extra_data
- Recipients chosen in the panel:
recipients_lists,recipients_segmentsandall_recipients.nullfor campaigns created through the API.- extra_data.
all_recipients - Whether the panel's all-recipients option was chosen.
- extra_data.
recipients_lists - IDs of the lists chosen as recipients.
- extra_data.
recipients_segments - IDs of the segments chosen as recipients.
- extra_data.
- id
- A unique identifier for the campaign which is given by User automatically.
- description
- A description of the SMS campaign.
- type
- A type of SMS campaign (1 - simple, 2 - automated).
- eta
- When sending starts. Set when the campaign is sent from the panel without one;
nulluntil then. - name
- A SMS campaign name.
- status
1draft,2active or3archived.- messages
- Message variations of the campaign.
- messages[].
id - A unique identifier for the campaign which is given by User automatically.
- messages[].
body - A content of a web push message.
- messages[].
name - A SMS campaign name.
- messages[].
message_id - ID of the SMS message.
- messages[].
is_archived - Whether the message is archived.
- messages[].
- recipients
- A list of user_ids.
- created_at
- A creation date of a campaign.
- updated_at
- A date of last campaign update.
- phone_number
- A phone number where SMS will be sent
- provider
- ID of the SMSAPI credentials the campaign sends with, or
null. - recipients_count
- A number of recipients.
- statistics
- Delivery and click statistics of the campaign.
- statistics.
scheduled - Number of notifications scheduled.
- statistics.
delivered - Number of notifications delivered.
- statistics.
delivery_percentage - Delivered messages as a percentage of scheduled ones, rounded.
- statistics.
bounced - Number of messages that failed to deliver.
- statistics.
total_click_count - Number of clicks on shortened links in the messages.
- statistics.
unique_click_count - Number of messages whose shortened links were clicked at least once.
- statistics.
click_percentage - Messages with a click as a percentage of messages with shortened links.
- statistics.
- twoway_provider
- ID of the two-way SMS provider, or
null. With one, every message ends withSTOPand the provider's short number. - provider_redlink
- ID of the RedLink credentials the campaign sends with, or
null. - provider_serwersms
- ID of the SerwerSMS credentials the campaign sends with, or
null. - provider_clicksend
- ID of the ClickSend credentials the campaign sends with, or
null. - provider_messente
- ID of the Messente credentials the campaign sends with, or
null. - provider_cm
- ID of the CM.com credentials the campaign sends with, or
null. - provider_autopay
- ID of the Autopay credentials the campaign sends with, or
null. - use_trial_provider
- Whether the campaign sends through User's trial SMS provider.
- category
- ID of the campaign's SMS category, or
null. - url_shortener_enabled
- Whether links in the messages are shortened so that clicks can be counted.
- folder
- ID of the folder the campaign is in, or
null. - recipients_segments
- IDs of the segments chosen as recipients in the panel, copied from
extra_data. - recipients_lists
- IDs of the lists chosen as recipients in the panel, copied from
extra_data. - all_recipients
- Whether the panel's all-recipients option was chosen.
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.