curl --request GET \
--url https://api.mailbeast.ai/v1/campaigns/{id}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mailbeast.ai/v1/campaigns/{id}/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mailbeast.ai/v1/campaigns/{id}/analytics', 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://api.mailbeast.ai/v1/campaigns/{id}/analytics",
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: Bearer <token>"
],
]);
$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://api.mailbeast.ai/v1/campaigns/{id}/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mailbeast.ai/v1/campaigns/{id}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mailbeast.ai/v1/campaigns/{id}/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"campaignId": "c1a2b3d4-...",
"period": {
"start": "2026-06-01T00:00:00.000Z",
"end": "2026-06-30T23:59:59.000Z",
"clamped": false,
"retentionDays": 90
},
"totals": {
"sent": 1200,
"failed": 8,
"delivered": 1186,
"leadsContacted": 640,
"opens": {
"total": 240,
"uniqueLeads": 180
},
"clicks": {
"total": 240,
"uniqueLeads": 180
},
"replies": 26,
"bounces": 14,
"unsubscribed": 5,
"positiveLeads": 21,
"conversions": 6,
"rates": {
"open": 42.5,
"click": 8.1,
"reply": 4.2,
"bounce": 1.9,
"delivery": 98.1,
"unsubscribe": 0.4,
"conversion": 2
},
"conversionValue": 18000
},
"bySmtp": [
{
"accountId": "a7f1c2d4-...",
"email": "[email protected]",
"totals": {
"sent": 400,
"delivered": 396,
"opens": {
"total": 240,
"uniqueLeads": 180
},
"clicks": {
"total": 240,
"uniqueLeads": 180
},
"replies": 12,
"bounces": 4,
"positiveLeads": 3,
"conversions": 2,
"rates": {
"open": 42.5,
"click": 8.1,
"reply": 4.2,
"bounce": 1.9,
"delivery": 98.1,
"positive": 2,
"conversion": 1.5
},
"conversionValue": 6000
}
}
],
"bySequence": [
{
"step": 1,
"variant": "A",
"totals": {
"sent": 400,
"delivered": 396,
"opens": {
"total": 240,
"uniqueLeads": 180
},
"clicks": {
"total": 240,
"uniqueLeads": 180
},
"replies": 12,
"bounces": 4,
"positiveLeads": 3,
"conversions": 2,
"rates": {
"open": 42.5,
"click": 8.1,
"reply": 4.2,
"bounce": 1.9,
"delivery": 98.1,
"positive": 2,
"conversion": 1.5
},
"conversionValue": 6000
}
}
],
"bounceBreakdown": {
"total": 14,
"hard": 9,
"soft": 5,
"senderBounces": 3,
"recipientBounces": 11,
"unknownBounces": 0,
"byCategory": [
{
"category": "invalid-mailbox",
"label": "Invalid mailbox",
"type": "recipient",
"count": 9,
"percentage": 64.3
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_failed",
"message": "One or more fields are invalid.",
"status": 400,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f",
"details": [
"name should not be empty"
]
}
}{
"error": {
"type": "authentication_error",
"code": "unauthenticated",
"message": "Missing or invalid API key.",
"status": 401,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f"
}
}{
"error": {
"type": "authorization_error",
"code": "permission_denied",
"message": "This API key is missing the required scope.",
"status": 403,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f"
}
}{
"error": {
"type": "invalid_request_error",
"code": "not_found",
"message": "Resource not found.",
"status": 404,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Retry after the interval in the Retry-After header.",
"status": 429,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f",
"retryAfter": 30
}
}Campaign analytics
Aggregate engagement for one campaign. Ask for extra breakdowns with breakdown=smtp,sequence,bounce – each is an extra query, so request only what you will read.
Requires one of the following scopes: metrics:read, all:read, all:all.
curl --request GET \
--url https://api.mailbeast.ai/v1/campaigns/{id}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mailbeast.ai/v1/campaigns/{id}/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mailbeast.ai/v1/campaigns/{id}/analytics', 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://api.mailbeast.ai/v1/campaigns/{id}/analytics",
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: Bearer <token>"
],
]);
$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://api.mailbeast.ai/v1/campaigns/{id}/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mailbeast.ai/v1/campaigns/{id}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mailbeast.ai/v1/campaigns/{id}/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"campaignId": "c1a2b3d4-...",
"period": {
"start": "2026-06-01T00:00:00.000Z",
"end": "2026-06-30T23:59:59.000Z",
"clamped": false,
"retentionDays": 90
},
"totals": {
"sent": 1200,
"failed": 8,
"delivered": 1186,
"leadsContacted": 640,
"opens": {
"total": 240,
"uniqueLeads": 180
},
"clicks": {
"total": 240,
"uniqueLeads": 180
},
"replies": 26,
"bounces": 14,
"unsubscribed": 5,
"positiveLeads": 21,
"conversions": 6,
"rates": {
"open": 42.5,
"click": 8.1,
"reply": 4.2,
"bounce": 1.9,
"delivery": 98.1,
"unsubscribe": 0.4,
"conversion": 2
},
"conversionValue": 18000
},
"bySmtp": [
{
"accountId": "a7f1c2d4-...",
"email": "[email protected]",
"totals": {
"sent": 400,
"delivered": 396,
"opens": {
"total": 240,
"uniqueLeads": 180
},
"clicks": {
"total": 240,
"uniqueLeads": 180
},
"replies": 12,
"bounces": 4,
"positiveLeads": 3,
"conversions": 2,
"rates": {
"open": 42.5,
"click": 8.1,
"reply": 4.2,
"bounce": 1.9,
"delivery": 98.1,
"positive": 2,
"conversion": 1.5
},
"conversionValue": 6000
}
}
],
"bySequence": [
{
"step": 1,
"variant": "A",
"totals": {
"sent": 400,
"delivered": 396,
"opens": {
"total": 240,
"uniqueLeads": 180
},
"clicks": {
"total": 240,
"uniqueLeads": 180
},
"replies": 12,
"bounces": 4,
"positiveLeads": 3,
"conversions": 2,
"rates": {
"open": 42.5,
"click": 8.1,
"reply": 4.2,
"bounce": 1.9,
"delivery": 98.1,
"positive": 2,
"conversion": 1.5
},
"conversionValue": 6000
}
}
],
"bounceBreakdown": {
"total": 14,
"hard": 9,
"soft": 5,
"senderBounces": 3,
"recipientBounces": 11,
"unknownBounces": 0,
"byCategory": [
{
"category": "invalid-mailbox",
"label": "Invalid mailbox",
"type": "recipient",
"count": 9,
"percentage": 64.3
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_failed",
"message": "One or more fields are invalid.",
"status": 400,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f",
"details": [
"name should not be empty"
]
}
}{
"error": {
"type": "authentication_error",
"code": "unauthenticated",
"message": "Missing or invalid API key.",
"status": 401,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f"
}
}{
"error": {
"type": "authorization_error",
"code": "permission_denied",
"message": "This API key is missing the required scope.",
"status": 403,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f"
}
}{
"error": {
"type": "invalid_request_error",
"code": "not_found",
"message": "Resource not found.",
"status": 404,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Retry after the interval in the Retry-After header.",
"status": 429,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f",
"retryAfter": 30
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Campaign id.
"c1a2b3d4-..."
Query Parameters
Start of the reporting window (ISO-8601). ⚠️ Reporting is by whole calendar day in your workspace timezone – the time component is ignored, so this date counts from the START of that day.
"2026-06-01T00:00:00Z"
End of the reporting window (ISO-8601). Defaults to now. ⚠️ Inclusive and by whole calendar day (time component ignored) – this counts through the END of that day in your workspace timezone.
"2026-06-30T23:59:59Z"
Exclude out-of-office auto-replies from reply counts and reply rate. Mirrors the dashboard toggle.
true
Extra breakdowns to include. Repeat the param or pass a comma-separated list. Each one costs an extra query, so ask only for what you will read.
smtp, sequence, bounce ["sequence", "bounce"]
Response
"c1a2b3d4-..."
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Present only when requested via breakdown=smtp.
Show child attributes
Show child attributes
Present only when requested via breakdown=sequence.
Show child attributes
Show child attributes
Present only when requested via breakdown=bounce.
Show child attributes
Show child attributes
Related topics
AnalyticsCampaign analytics over timeWorkspace analytics roll-upCampaign send statusAuthentication