curl --request POST \
--url https://cloudapi.mailercloud.com/v1/campaign/domain/report/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: <content-type>' \
--data '
{
"limit": 10,
"page": 1,
"sort_field": "sent",
"sort_order": "asc"
}
'import requests
url = "https://cloudapi.mailercloud.com/v1/campaign/domain/report/{id}"
payload = {
"limit": 10,
"page": 1,
"sort_field": "sent",
"sort_order": "asc"
}
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, sort_field: 'sent', sort_order: 'asc'})
};
fetch('https://cloudapi.mailercloud.com/v1/campaign/domain/report/{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/domain/report/{id}",
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,
'sort_field' => 'sent',
'sort_order' => 'asc'
]),
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/domain/report/{id}"
payload := strings.NewReader("{\n \"limit\": 10,\n \"page\": 1,\n \"sort_field\": \"sent\",\n \"sort_order\": \"asc\"\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": 1,
"data": [
{
"abuse": 0,
"abuse_pct": "0.00",
"clicks": 0,
"clicks_pct": "0.00",
"domain": "bulk.regalwork.com",
"hard_bounce": 0,
"hard_bounce_pct": "0.00",
"opens": 15548,
"opens_pct": "15.54",
"sent": 100000,
"sent_pct": "100.00",
"soft_bounce": 0,
"soft_bounce_pct": "0.00",
"spam_complaints": 0,
"spam_complaints_pct": "0.00",
"unsubscribe": 307,
"unsubscribe_pct": "1.97"
}
],
"name": "Campaign name"
}{
"error": {
"field": "sort_order",
"message": "Invalid sort_order"
}
}{
"errors": [
{
"field": "",
"message": "Authorization failed"
}
]
}Campaign Domain Report
This report contains statistics for the top-performing email domains in a campaign. The domains report allows you to break down your customers into groups according to their mailbox service provider.
curl --request POST \
--url https://cloudapi.mailercloud.com/v1/campaign/domain/report/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: <content-type>' \
--data '
{
"limit": 10,
"page": 1,
"sort_field": "sent",
"sort_order": "asc"
}
'import requests
url = "https://cloudapi.mailercloud.com/v1/campaign/domain/report/{id}"
payload = {
"limit": 10,
"page": 1,
"sort_field": "sent",
"sort_order": "asc"
}
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, sort_field: 'sent', sort_order: 'asc'})
};
fetch('https://cloudapi.mailercloud.com/v1/campaign/domain/report/{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/domain/report/{id}",
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,
'sort_field' => 'sent',
'sort_order' => 'asc'
]),
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/domain/report/{id}"
payload := strings.NewReader("{\n \"limit\": 10,\n \"page\": 1,\n \"sort_field\": \"sent\",\n \"sort_order\": \"asc\"\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": 1,
"data": [
{
"abuse": 0,
"abuse_pct": "0.00",
"clicks": 0,
"clicks_pct": "0.00",
"domain": "bulk.regalwork.com",
"hard_bounce": 0,
"hard_bounce_pct": "0.00",
"opens": 15548,
"opens_pct": "15.54",
"sent": 100000,
"sent_pct": "100.00",
"soft_bounce": 0,
"soft_bounce_pct": "0.00",
"spam_complaints": 0,
"spam_complaints_pct": "0.00",
"unsubscribe": 307,
"unsubscribe_pct": "1.97"
}
],
"name": "Campaign name"
}{
"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
Path Parameters
Campaign id
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
Sort list data based on this field
Available sort fields
domain,sent,soft_bounce,hard_bounce,opens, clicks,unsubscribe,abuse,spam_complaints
1Sorting order for sort field
Available sort orders
asc, ASC, desc, DESC
1