GET/ email-campaign/
Get all email campaigns
You can return information about all of your email campaigns. These results can be filtered by conditions defined as request parameters.
Returns up to 100 email campaigns per page. To get the rest, follow next (see Response pagination).
| Lookup | Description | Example usage |
|---|---|---|
| __lt | Lesser than | ?started_at__lt=2021-05-16 |
| __lte | Lesser than or equal | ?started_at__lte=2021-05-16 |
| __gt | Greater than | ?started_at__gt=2022-05-05 |
| __gte | Greater than or equal | ?started_at__gte=2021-05-05 |
| count_from | A date from when stats should be counted | ?count_from=2021-05-16 |
| count_to | A date utill stats should be counted | ?count_from=2022-05-16 |
Request
- cURL
- JavaScript
- PHP
- Python
curl -X GET "https://<your_app_subdomain>.user.com/api/public/email-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/email-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/email-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/email-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": [{"statistics": ,32 fields"smtp": "default SMTP: 1.userengagemedium.smtp","custom_settings": "-","real_sender": "None","name": "Your weekly summary","type": 1,"status": 2,"recipients_count": 1,"closed": null,"started_at": null,"finished_at": "2026-11-17T14:59:55.653003Z","created_at": "2026-11-17T14:59:55.563462Z","updated_at": "2026-11-17T14:59:55.563481Z","id": 180,"eta": "2026-11-17T14:59:55.594223Z","description": "","category": 1,"messages": ,1 item"ab_test_stage": 0,"ab_test_distribution": 0,"ab_test_winning_metric": 1,"ab_test_duration": 0,"ab_variations": ,1 item"folder": 1},{"statistics": ,32 fields"smtp": "default SMTP: 1.userengagemedium.smtp","custom_settings": "-","real_sender": "None","name": "Your weekly summary","type": 1,"status": 2,"recipients_count": 1,"closed": null,"started_at": null,"finished_at": "2026-11-17T14:59:55.347277Z","created_at": "2026-11-17T14:59:55.264024Z","updated_at": "2026-11-17T14:59:55.264055Z","id": 179,"eta": "2026-11-17T14:59:55.294097Z","description": "","category": 1,"messages": ,1 item"ab_test_stage": 0,"ab_test_distribution": 0,"ab_test_winning_metric": 1,"ab_test_duration": 0,"ab_variations": ,1 item"folder": 1}]}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[].
statistics - Sending and engagement statistics of the campaign.
- results[].
statistics. real_sender_email - Address the campaign is sent from: the own SMTP server's sender address, the sending domain as
name <domain>, or the campaign's sender address;--if none is set. - results[].
statistics. recipients - Number of contacts the campaign was sent to.
- results[].
statistics. scheduled - Number of emails scheduled to be sent.
- results[].
statistics. delivered - Number of emails delivered.
- results[].
statistics. delivered_tracked - Number of delivered emails that had open and click tracking on.
- results[].
statistics. opened - Number of emails opened.
- results[].
statistics. opened_tracked - Number of opened emails that had open and click tracking on.
- results[].
statistics. clicked - Number of emails with at least one link clicked.
- results[].
statistics. clicked_tracked - Number of clicked emails that had open and click tracking on.
- results[].
statistics. unsubscribed - Number of contacts who unsubscribed from this campaign.
- results[].
statistics. hardbounce - Number of hard bounces (the address doesn't exist or permanently rejects mail).
- results[].
statistics. softbounce - Number of soft bounces (a temporary delivery problem, such as a full mailbox).
- results[].
statistics. spambounce - Number of emails rejected as spam by the receiving server.
- results[].
statistics. unsub_ratio - Unsubscribed contacts as a percentage of opened emails, rounded up.
- results[].
statistics. delivered_ratio - Delivered emails as a percentage of recipients.
- results[].
statistics. delivered_tracked_ratio - Delivered emails with tracking on as a percentage of all delivered emails, rounded up.
- results[].
statistics. opened_ctr - Opened emails as a percentage of delivered emails.
- results[].
statistics. opened_tracked_ctr - Opened emails as a percentage of delivered emails with tracking on, rounded up.
- results[].
statistics. clicked_ctr - Clicked emails as a percentage of opened emails, rounded up.
- results[].
statistics. clicked_tracked_ctr - Clicked emails as a percentage of opened emails with tracking on, rounded up.
- results[].
statistics. revenue - Revenue attributed to the campaign.
- results[].
statistics. webhook - Number of emails whose delivery failed after sending (bounced, rejected as spam or failed for another reason).
- results[].
statistics. webhooks - Failed deliveries grouped by reason;
hardbounce,softbounceandspambounceare always listed, with acountof0if none.- results[].
statistics. webhooks[]. failure_reason - Reason the delivery failed, for example
hardbounce,softbounce,spambounce,droppedorfeedbackloop. - results[].
statistics. webhooks[]. count - Number of emails that failed for this reason.
- results[].
statistics. webhooks[]. ratio - Emails that failed for this reason as a percentage of delivered emails, to one decimal place; missing when no email was delivered.
- results[].
- results[].
statistics. utm_term utm_termadded to the campaign's links.- results[].
statistics. utm_medium utm_mediumadded to the campaign's links.- results[].
statistics. utm_source utm_sourceadded to the campaign's links.- results[].
statistics. utm_campaign utm_campaignadded to the campaign's links.- results[].
statistics. deferred - Number of emails the receiving server deferred for a later delivery attempt.
- results[].
statistics. dropped - Number of emails not sent, for example to banned or unsubscribed addresses.
- results[].
statistics. feedbackloop - Number of spam complaints reported by recipients.
- results[].
statistics. success - Number of emails with delivery status
2(success). - results[].
statistics. failed - Number of emails with delivery status
3(failure): sending failed after all retries.
- results[].
- results[].
smtp - A SMTP settings used for campaign
- results[].
custom_settings - Sending domain the campaign uses, as
name <domain>, or-if it uses none. - results[].
real_sender - Sender name of the campaign, or the string
Noneif it has none. - results[].
name - An email campaign name.
- results[].
type - An identifier of email campaign type.
- results[].
status - An email campaign status.
- results[].
recipients_count - Number of contacts the campaign is sent to.
- results[].
closed trueif the campaign was closed because its sending domain or SMTP server was deleted, which stops it from sending;nullotherwise.- results[].
started_at - A date when campaign started.
- results[].
finished_at - A date when campaign finished.
- results[].
created_at - A creation date of email campaign.
- results[].
updated_at - A last update of email campaign
- results[].
id - A unique identifier for the campaign which is given by User
- results[].
eta - A datetime when email campaign should start. Will start instantly if not provided
- results[].
description - A description of email campaign.
- results[].
category - An email category.
- results[].
messages - IDs of the email messages used by the campaign.
- results[].
ab_test_stage - Stage of the A/B test:
0not an A/B test,1sending to the test group,2waiting to send the winning variation,3or4retrying stage1or2,5winning variation sent. - results[].
ab_test_distribution - Size of the A/B test group as a percentage of recipients;
0if the campaign isn't an A/B test. - results[].
ab_test_winning_metric - Metric that picks the winning variation:
1opens or2clicks. - results[].
ab_test_duration - How long the A/B test runs before the winning variation is sent, in hours.
- results[].
ab_variations - Message variations of the campaign, each with its own statistics.
- results[].
ab_variations[]. id - A unique identifier for the campaign which is given by User
- results[].
ab_variations[]. name - An email campaign name.
- results[].
ab_variations[]. preview_file - URL of a rendered preview of this variation.
- results[].
ab_variations[]. message_subject - Subject line of this variation's message.
- results[].
ab_variations[]. message_id - ID of this variation's email message.
- results[].
ab_variations[]. recipients - Number of contacts the campaign was sent to.
- results[].
ab_variations[]. scheduled - Number of emails scheduled to be sent.
- results[].
ab_variations[]. delivered - Number of emails delivered.
- results[].
ab_variations[]. opened - Number of emails opened.
- results[].
ab_variations[]. clicked - Number of emails with at least one link clicked.
- results[].
ab_variations[]. unsubscribed - Number of contacts who unsubscribed from this campaign.
- results[].
ab_variations[]. hardbounce - Number of hard bounces (the address doesn't exist or permanently rejects mail).
- results[].
ab_variations[]. softbounce - Number of soft bounces (a temporary delivery problem, such as a full mailbox).
- results[].
ab_variations[]. spambounce - Number of emails rejected as spam by the receiving server.
- results[].
ab_variations[]. opened_ctr - Opened emails as a percentage of delivered emails.
- results[].
ab_variations[]. clicked_ctr - Clicked emails as a percentage of opened emails, rounded up.
- results[].
ab_variations[]. utm - UTM parameters added to this variation's links.
- results[].
ab_variations[]. utm. utm_term utm_termadded to the campaign's links.- results[].
ab_variations[]. utm. utm_medium utm_mediumadded to the campaign's links.- results[].
ab_variations[]. utm. utm_source utm_sourceadded to the campaign's links.- results[].
ab_variations[]. utm. utm_campaign utm_campaignadded to the campaign's links.
- results[].
- 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.