curl --request POST \
--url https://cloudapi.mailercloud.com/v1/campaign/list \
--header 'Authorization: <api-key>' \
--header 'Content-Type: <content-type>' \
--data '
{
"limit": 10,
"page": 1
}
'import requests
url = "https://cloudapi.mailercloud.com/v1/campaign/list"
payload = {
"limit": 10,
"page": 1
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<api-key>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<api-key>'},
body: JSON.stringify({limit: 10, page: 1})
};
fetch('https://cloudapi.mailercloud.com/v1/campaign/list', 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/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'limit' => 10,
'page' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloudapi.mailercloud.com/v1/campaign/list"
payload := strings.NewReader("{\n \"limit\": 10,\n \"page\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"count": [
{
"count": 2
}
],
"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",
"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"
},
"1": {
"blacklisted_domains": {},
"broken_links": {},
"conversion_tracking": {},
"created_date": "2021-04-27 11:31:04",
"email_preheader": "How To Make Veg Pizza",
"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": "newsletter 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",
"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": "Pizza",
"tag": "Pizz noodles",
"time_rule": {},
"type": "Normal campaign"
}
}
}{
"error": {
"field": "sort_order",
"message": "Invalid sort_order"
}
}{
"errors": [
{
"field": "",
"message": "Authorization failed"
}
]
}Campaign List
Get the details of all the campaigns you have created.
curl --request POST \
--url https://cloudapi.mailercloud.com/v1/campaign/list \
--header 'Authorization: <api-key>' \
--header 'Content-Type: <content-type>' \
--data '
{
"limit": 10,
"page": 1
}
'import requests
url = "https://cloudapi.mailercloud.com/v1/campaign/list"
payload = {
"limit": 10,
"page": 1
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<api-key>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<api-key>'},
body: JSON.stringify({limit: 10, page: 1})
};
fetch('https://cloudapi.mailercloud.com/v1/campaign/list', 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/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'limit' => 10,
'page' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloudapi.mailercloud.com/v1/campaign/list"
payload := strings.NewReader("{\n \"limit\": 10,\n \"page\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"count": [
{
"count": 2
}
],
"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",
"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"
},
"1": {
"blacklisted_domains": {},
"broken_links": {},
"conversion_tracking": {},
"created_date": "2021-04-27 11:31:04",
"email_preheader": "How To Make Veg Pizza",
"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": "newsletter 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",
"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": "Pizza",
"tag": "Pizz noodles",
"time_rule": {},
"type": "Normal campaign"
}
}
}{
"error": {
"field": "sort_order",
"message": "Invalid sort_order"
}
}{
"errors": [
{
"field": "",
"message": "Authorization failed"
}
]
}Authorizations
Your Mailercloud API key (plain text, no Bearer prefix). Create keys in Settings → API.
Headers
application/json
Body
Maximum number of elements to return.
Maximum: 100 Minimum: 10
You can retrieve a subset of records starting from the page value you have specified. You can add a limit, which will determine the number of records you can retrieve on a single page.
Starts From: 1
When the campaign type is a draft or duplicate, date_from checks modified date; otherwise, date_from checks your scheduled date.
Format Y-m-d.
1When the campaign type is a draft or duplicate, date_to checks modified date; otherwise, date_to checks your scheduled date.
Format Y-m-d.
1Filter campaign list by campaign name
1Filter campaign list by sender email.
1Sort list data based on the following field.
Available sort fields name,schedule_date,open_percentage, modified_date,clicks,opens,sent,unsubscribe
1Sorting order for sort field
Available sort orders
asc, ASC, desc, DESC
1Filter campaign list by campaign status
Available statuses
Processing,Queued,Sending,Paused,Finished, Aborted,Duplicate,Draft,Scheduled,Rescheduled,Failed
1