GET/ email-campaign/ :id/
Get single email campaign
You can return information about a specific email campaign. These results can be filtered by conditions defined as request parameters.
| Lookup | Description | Example usage |
|---|---|---|
| __lt | Lesser than | ?started_at__lt=2021-05-07-16 |
| __lte | Lesser than or equal | ?started_at__lte=2021-05-07-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-05-16 |
| count_to | A date utill stats should be counted | ?count_from=2022-05-05-16 |
Request
- cURL
- JavaScript
- PHP
- Python
curl -X GET "https://<your_app_subdomain>.user.com/api/public/email-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/email-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/email-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/email-campaign/:id/",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
)
print(response.json())
Response examples
- 200 OK
- 404 Not Found
{"statistics": {"real_sender_email": "value","recipients": 1,"scheduled": 1,"delivered": 1,"delivered_tracked": 1,"opened": 1,"opened_tracked": 1,"clicked": 0,"clicked_tracked": 0,"unsubscribed": 0,"hardbounce": 0,"softbounce": 0,"spambounce": 0,"unsub_ratio": 0,"delivered_ratio": 100,"delivered_tracked_ratio": 100,"opened_ctr": 100,"opened_tracked_ctr": 100,"clicked_ctr": 0,"clicked_tracked_ctr": 0,"revenue": null,"webhook": 0,"webhooks": [,3 fields,3 fields3 fields],"utm_term": null,"utm_medium": null,"utm_source": null,"utm_campaign": null,"deferred": 0,"dropped": 0,"feedbackloop": 0,"success": 1,"failed": 0},"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": "2026-11-17T14:59:57.618303Z","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": [189],"ab_test_stage": 0,"ab_test_distribution": 0,"ab_test_winning_metric": 1,"ab_test_duration": 0,"ab_variations": [{"id": 763,"name": "A","preview_file": "https://<your_app_subdomain>.user.com/previews/message/70d838ef-785d-486f-b2e3-bd9c3c09033a_CvcA7ov.png","message_subject": "Your weekly summary","message_id": 189,"recipients": 1,"scheduled": 1,"delivered": 1,"opened": 1,"clicked": 0,"unsubscribed": 0,"hardbounce": 0,"softbounce": 0,"spambounce": 0,"opened_ctr": 100,"clicked_ctr": 0,"utm": 4 fields}],"folder": 1}{
"detail": "No EmailCampaign matches the given query."
}
Response fields
Fields returned in the 200 OK response body.
- statistics
- Sending and engagement statistics of the campaign.
- 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. - statistics.
recipients - Number of contacts the campaign was sent to.
- statistics.
scheduled - Number of emails scheduled to be sent.
- statistics.
delivered - Number of emails delivered.
- statistics.
delivered_tracked - Number of delivered emails that had open and click tracking on.
- statistics.
opened - Number of emails opened.
- statistics.
opened_tracked - Number of opened emails that had open and click tracking on.
- statistics.
clicked - Number of emails with at least one link clicked.
- statistics.
clicked_tracked - Number of clicked emails that had open and click tracking on.
- statistics.
unsubscribed - Number of contacts who unsubscribed from this campaign.
- statistics.
hardbounce - Number of hard bounces (the address doesn't exist or permanently rejects mail).
- statistics.
softbounce - Number of soft bounces (a temporary delivery problem, such as a full mailbox).
- statistics.
spambounce - Number of emails rejected as spam by the receiving server.
- statistics.
unsub_ratio - Unsubscribed contacts as a percentage of opened emails, rounded up.
- statistics.
delivered_ratio - Delivered emails as a percentage of recipients.
- statistics.
delivered_tracked_ratio - Delivered emails with tracking on as a percentage of all delivered emails, rounded up.
- statistics.
opened_ctr - Opened emails as a percentage of delivered emails.
- statistics.
opened_tracked_ctr - Opened emails as a percentage of delivered emails with tracking on, rounded up.
- statistics.
clicked_ctr - Clicked emails as a percentage of opened emails, rounded up.
- statistics.
clicked_tracked_ctr - Clicked emails as a percentage of opened emails with tracking on, rounded up.
- statistics.
revenue - Revenue attributed to the campaign.
- statistics.
webhook - Number of emails whose delivery failed after sending (bounced, rejected as spam or failed for another reason).
- statistics.
webhooks - Failed deliveries grouped by reason;
hardbounce,softbounceandspambounceare always listed, with acountof0if none.- statistics.
webhooks[]. failure_reason - Reason the delivery failed, for example
hardbounce,softbounce,spambounce,droppedorfeedbackloop. - statistics.
webhooks[]. count - Number of emails that failed for this reason.
- 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.
- statistics.
- statistics.
utm_term utm_termadded to the campaign's links.- statistics.
utm_medium utm_mediumadded to the campaign's links.- statistics.
utm_source utm_sourceadded to the campaign's links.- statistics.
utm_campaign utm_campaignadded to the campaign's links.- statistics.
deferred - Number of emails the receiving server deferred for a later delivery attempt.
- statistics.
dropped - Number of emails not sent, for example to banned or unsubscribed addresses.
- statistics.
feedbackloop - Number of spam complaints reported by recipients.
- statistics.
success - Number of emails with delivery status
2(success). - statistics.
failed - Number of emails with delivery status
3(failure): sending failed after all retries.
- statistics.
- smtp
- A SMTP settings used for campaign
- custom_settings
- Sending domain the campaign uses, as
name <domain>, or-if it uses none. - real_sender
- Sender name of the campaign, or the string
Noneif it has none. - name
- An email campaign name.
- type
- An identifier of email campaign type.
- status
- An email campaign status.
- recipients_count
- Number of contacts the campaign is sent to.
- closed
trueif the campaign was closed because its sending domain or SMTP server was deleted, which stops it from sending;nullotherwise.- started_at
- A date when campaign started.
- finished_at
- A date when campaign finished.
- created_at
- A creation date of email campaign.
- updated_at
- A last update of email campaign
- id
- A unique identifier for the campaign which is given by User
- eta
- A datetime when email campaign should start. Will start instantly if not provided
- description
- A description of email campaign.
- category
- An email category.
- messages
- IDs of the email messages used by the campaign.
- 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. - ab_test_distribution
- Size of the A/B test group as a percentage of recipients;
0if the campaign isn't an A/B test. - ab_test_winning_metric
- Metric that picks the winning variation:
1opens or2clicks. - ab_test_duration
- How long the A/B test runs before the winning variation is sent, in hours.
- ab_variations
- Message variations of the campaign, each with its own statistics.
- ab_variations[].
id - A unique identifier for the campaign which is given by User
- ab_variations[].
name - An email campaign name.
- ab_variations[].
preview_file - URL of a rendered preview of this variation.
- ab_variations[].
message_subject - Subject line of this variation's message.
- ab_variations[].
message_id - ID of this variation's email message.
- ab_variations[].
recipients - Number of contacts the campaign was sent to.
- ab_variations[].
scheduled - Number of emails scheduled to be sent.
- ab_variations[].
delivered - Number of emails delivered.
- ab_variations[].
opened - Number of emails opened.
- ab_variations[].
clicked - Number of emails with at least one link clicked.
- ab_variations[].
unsubscribed - Number of contacts who unsubscribed from this campaign.
- ab_variations[].
hardbounce - Number of hard bounces (the address doesn't exist or permanently rejects mail).
- ab_variations[].
softbounce - Number of soft bounces (a temporary delivery problem, such as a full mailbox).
- ab_variations[].
spambounce - Number of emails rejected as spam by the receiving server.
- ab_variations[].
opened_ctr - Opened emails as a percentage of delivered emails.
- ab_variations[].
clicked_ctr - Clicked emails as a percentage of opened emails, rounded up.
- ab_variations[].
utm - UTM parameters added to this variation's links.
- ab_variations[].
utm. utm_term utm_termadded to the campaign's links.- ab_variations[].
utm. utm_medium utm_mediumadded to the campaign's links.- ab_variations[].
utm. utm_source utm_sourceadded to the campaign's links.- ab_variations[].
utm. utm_campaign utm_campaignadded to the campaign's links.
- ab_variations[].
- ab_variations[].
- folder
- ID of the folder the campaign is in, or
null.
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.