GET
/email-campaign/:idGet 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 -H "Authorization: Token <your_64_char_api_key>"
-H "Accept: */*; version=2"
"https://<your_app_subdomain>.user.com/api/public/email-campaign/:id"
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://<your_app_subdomain>.user.com/api/public/email-campaign/:id");
xhr.setRequestHeader("authorization", "Token <your_64_char_api_key>");
xhr.setRequestHeader("accept", "*/*; version=2");
xhr.send(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://<your_app_subdomain>.user.com/api/public/email-campaign/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => array(
"Accept: */*; version=2",
"authorization: Token <your_64_char_api_key>"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
import requests
url = "https://<your_app_subdomain>.user.com/api/public/email-campaign/:id"
headers = {'authorization': 'Token <your_64_char_api_key>'}
response = requests.get(url, headers=headers)
print(response.text)
Response
{
"statistics": {
"real_sender_email": "newsletter <newsletter.example.com>",
"recipients": 67980,
"scheduled": 67979,
"delivered": 67883,
"opened": 8979,
"clicked": 803,
"unsubscribed": 39,
"hardbounce": 14,
"softbounce": 23,
"spambounce": 1,
"unsub_ratio": 1,
"delivered_ratio": 99,
"opened_ctr": 14,
"clicked_ctr": 9,
"revenue": 68623.07,
"webhook": 42,
"webhooks": [
{
"failure_reason": "dropped",
"count": 2,
"ratio": 0.0
},
{
"failure_reason": "feedbackloop",
"count": 1,
"ratio": 0.0
},
{
"failure_reason": "hardbounce",
"count": 14,
"ratio": 0.0
},
{
"failure_reason": "softbounce",
"count": 23,
"ratio": 0.0
},
{
"failure_reason": "spambounce",
"count": 1,
"ratio": 0.0
}
],
"utm_term": null,
"utm_medium": "newsletter",
"utm_source": "user_com",
"utm_campaign": "campaign_164",
"deferred": 0,
"dropped": 2,
"feedbackloop": 1,
"success": 67841,
"failed": 96
},
"smtp": "email domain: newsletter.user.com 5.userengage3.smtp",
"custom_settings": "newsletter <newsletter.example.com>",
"real_sender": "None",
"name": "Example Campaign",
"type": 1,
"status": 2,
"recipients_count": 67980,
"closed": null,
"started_at": "2025-08-27T09:47:56.469861Z",
"finished_at": "2025-08-27T09:48:56.708871Z",
"created_at": "2025-08-27T06:20:02.525168Z",
"updated_at": "2025-08-27T09:47:53.286767Z",
"id": 164,
"eta": "2025-08-27T09:47:53.520142Z",
"description": "",
"category": 7,
"messages": [
192
],
"ab_test_stage": 0,
"ab_test_distribution": 0,
"ab_test_winning_metric": 1,
"ab_test_duration": 0,
"ab_variations": [
{
"id": 1279,
"name": "A",
"preview_file": "<link>",
"message_subject": "Example Campaign Subjcet",
"message_id": 192,
"recipients": 67979,
"scheduled": 67979,
"delivered": 67883,
"opened": 8979,
"clicked": 803,
"unsubscribed": 39,
"hardbounce": 14,
"softbounce": 23,
"spambounce": 1,
"opened_ctr": 14,
"clicked_ctr": 9,
"utm": {
"utm_term": null,
"utm_medium": "newsletter",
"utm_source": "user_com",
"utm_campaign": "campaign_164"
}
}
]
}