Get Single Campaign Details
curl --request GET \
--url https://cloudapi.mailercloud.com/v1/campaign/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://cloudapi.mailercloud.com/v1/campaign/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://cloudapi.mailercloud.com/v1/campaign/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloudapi.mailercloud.com/v1/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_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cloudapi.mailercloud.com/v1/campaign/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"0": {
"blacklisted_domains": {},
"broken_links": {},
"conversion_tracking": {},
"created_date": "2021-04-27 11:31:04",
"email_preheader": "Save more on your Home & Kitchen shopping",
"finish_date": "2021-04-27 15:07:02",
"html": "",
"id": "BBBghIFI",
"modified_date": "2021-04-27 11:44:15",
"name": "Offer Of The Day",
"pause_rules": {},
"permission_reminder": "",
"plain_text": "",
"recepiant": {
"lists": "Subscriber list",
"lists_contact_count": 100000,
"segments": "",
"segments_contact_count": 0,
"total_lists": 1
},
"reply_email": "sender@yourdomain.com",
"report_abuse": true,
"report_summary": {
"abuse": 0,
"abuse_percentage": "0.00",
"clicks": 0,
"clicks_percentage": "0.00",
"conversions": 0,
"conversions_percentage": "0.00",
"delivered": 100000,
"delivered_percentage": "100.00",
"hard_bounce": 0,
"hard_bounce_percentage": "0.00",
"open_percentage": "15.55",
"04\"": null,
"status": "Finished",
"opens": 15548,
"queue": 0,
"queue_percentage": "0.00",
"queued_total": 100000,
"sent": 100000,
"sent_percentage": "100.00",
"soft_bounce": 0,
"soft_bounce_percentage": "0.00",
"spam_complaints_count": 0,
"spam_complaints_percentage": "0.00",
"unsubscribe": 307,
"unsubscribe_percentage": "1.97"
},
"rule": {
"contacts_order": "first",
"limit": ""
},
"scheduled_date": {
"date": "2021-04-27 17:14:15",
"timezone": "Asia/Kolkata"
},
"sender": {
"sender_email": "sender@yourdomain.com",
"sender_name": "Sender Name Shan"
},
"start_date": "2021-04-27 11:47:04",
"status": "Finished",
"status_change_date": "2021-04-27 15:07:02",
"status_change_message": "",
"subject": "Amazon offers",
"tag": "Amazon offers",
"time_rule": {},
"type": "Normal campaign"
}
}
}{
"errors": [
{
"field": "",
"message": "Authorization failed"
}
]
}{
"error": {
"field": "string",
"message": "string"
}
}Get Single Campaign Details
Get the details of a single campaign.
GET
/
campaign
/
{id}
Get Single Campaign Details
curl --request GET \
--url https://cloudapi.mailercloud.com/v1/campaign/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://cloudapi.mailercloud.com/v1/campaign/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://cloudapi.mailercloud.com/v1/campaign/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloudapi.mailercloud.com/v1/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_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cloudapi.mailercloud.com/v1/campaign/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"0": {
"blacklisted_domains": {},
"broken_links": {},
"conversion_tracking": {},
"created_date": "2021-04-27 11:31:04",
"email_preheader": "Save more on your Home & Kitchen shopping",
"finish_date": "2021-04-27 15:07:02",
"html": "",
"id": "BBBghIFI",
"modified_date": "2021-04-27 11:44:15",
"name": "Offer Of The Day",
"pause_rules": {},
"permission_reminder": "",
"plain_text": "",
"recepiant": {
"lists": "Subscriber list",
"lists_contact_count": 100000,
"segments": "",
"segments_contact_count": 0,
"total_lists": 1
},
"reply_email": "sender@yourdomain.com",
"report_abuse": true,
"report_summary": {
"abuse": 0,
"abuse_percentage": "0.00",
"clicks": 0,
"clicks_percentage": "0.00",
"conversions": 0,
"conversions_percentage": "0.00",
"delivered": 100000,
"delivered_percentage": "100.00",
"hard_bounce": 0,
"hard_bounce_percentage": "0.00",
"open_percentage": "15.55",
"04\"": null,
"status": "Finished",
"opens": 15548,
"queue": 0,
"queue_percentage": "0.00",
"queued_total": 100000,
"sent": 100000,
"sent_percentage": "100.00",
"soft_bounce": 0,
"soft_bounce_percentage": "0.00",
"spam_complaints_count": 0,
"spam_complaints_percentage": "0.00",
"unsubscribe": 307,
"unsubscribe_percentage": "1.97"
},
"rule": {
"contacts_order": "first",
"limit": ""
},
"scheduled_date": {
"date": "2021-04-27 17:14:15",
"timezone": "Asia/Kolkata"
},
"sender": {
"sender_email": "sender@yourdomain.com",
"sender_name": "Sender Name Shan"
},
"start_date": "2021-04-27 11:47:04",
"status": "Finished",
"status_change_date": "2021-04-27 15:07:02",
"status_change_message": "",
"subject": "Amazon offers",
"tag": "Amazon offers",
"time_rule": {},
"type": "Normal campaign"
}
}
}{
"errors": [
{
"field": "",
"message": "Authorization failed"
}
]
}{
"error": {
"field": "string",
"message": "string"
}
}⌘I