curl -X GET "https://api.sayvy.ai/api/v1/campaigns/e4a2e584-3672-4d69-b541-6e9f1a238491/export/pdf" \
-H "Authorization: Bearer <token>" \
--output campaign_report.pdf
import requests
url = "https://api.sayvy.ai/api/v1/campaigns/e4a2e584-3672-4d69-b541-6e9f1a238491/export/pdf"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
with open("campaign_report.pdf", "wb") as f:
f.write(response.content)
print("Report saved successfully.")
else:
print(response.status_code, response.json())
const response = await fetch(
"https://api.sayvy.ai/api/v1/campaigns/e4a2e584-3672-4d69-b541-6e9f1a238491/export/pdf",
{
method: "GET",
headers: {
"Authorization": "Bearer <token>"
}
}
);
const blob = await response.blob();
// In browser environments:
const downloadUrl = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = downloadUrl;
a.download = "campaign_report.pdf";
document.body.appendChild(a);
a.click();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sayvy.ai/api/v1/campaigns/e4a2e584-3672-4d69-b541-6e9f1a238491/export/pdf"))
.header("Authorization", "Bearer <token>")
.GET()
.build();
HttpResponse<Path> response =
HttpClient.newHttpClient().send(
request,
HttpResponse.BodyHandlers.ofFile(Paths.get("campaign_report.pdf"))
);
System.out.println("Downloaded PDF to " + response.body());
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Disposition: attachment; filename="campaign_report_e4a2e584.pdf"
Content-Length: 48320
<binary PDF stream>
{
"detail": "Unauthorized"
}
{
"detail": "Campaign not found or does not belong to this organization."
}
Campaigns
Export campaign PDF
Download an executive summary PDF performance report for a campaign
GET
/
api
/
v1
/
campaigns
/
{campaign_id}
/
export
/
pdf
curl -X GET "https://api.sayvy.ai/api/v1/campaigns/e4a2e584-3672-4d69-b541-6e9f1a238491/export/pdf" \
-H "Authorization: Bearer <token>" \
--output campaign_report.pdf
import requests
url = "https://api.sayvy.ai/api/v1/campaigns/e4a2e584-3672-4d69-b541-6e9f1a238491/export/pdf"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
with open("campaign_report.pdf", "wb") as f:
f.write(response.content)
print("Report saved successfully.")
else:
print(response.status_code, response.json())
const response = await fetch(
"https://api.sayvy.ai/api/v1/campaigns/e4a2e584-3672-4d69-b541-6e9f1a238491/export/pdf",
{
method: "GET",
headers: {
"Authorization": "Bearer <token>"
}
}
);
const blob = await response.blob();
// In browser environments:
const downloadUrl = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = downloadUrl;
a.download = "campaign_report.pdf";
document.body.appendChild(a);
a.click();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sayvy.ai/api/v1/campaigns/e4a2e584-3672-4d69-b541-6e9f1a238491/export/pdf"))
.header("Authorization", "Bearer <token>")
.GET()
.build();
HttpResponse<Path> response =
HttpClient.newHttpClient().send(
request,
HttpResponse.BodyHandlers.ofFile(Paths.get("campaign_report.pdf"))
);
System.out.println("Downloaded PDF to " + response.body());
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Disposition: attachment; filename="campaign_report_e4a2e584.pdf"
Content-Length: 48320
<binary PDF stream>
{
"detail": "Unauthorized"
}
{
"detail": "Campaign not found or does not belong to this organization."
}
Generate and download a branded, publication-ready PDF report for a campaign. The document contains complete metadata, audience resolution details, broadcast delivery funnel visuals, and an itemized breakdown of sent, delivered, read, and failed messages.
Authentication
This endpoint requires Bearer token authentication.Authorization: Bearer <token>
| Header | Type | Required | Description | Format |
|---|---|---|---|---|
Authorization | string | Yes | Scoped organization API key or Bearer JWT token | Bearer <token> |
Input parameters
string
required
Unique UUID identifier of the campaign. Example:
e4a2e584-3672-4d69-b541-6e9f1a238491.string
required
Bearer token for authentication. Format:
Bearer <token>.Response Headers
This endpoint returns binary PDF stream data with appropriate content headers:| Header | Value | Description |
|---|---|---|
Content-Type | application/pdf | MIME type for Portable Document Format. |
Content-Disposition | attachment; filename="campaign_report_{id}.pdf" | Prompts the client or browser to save the file. |
curl -X GET "https://api.sayvy.ai/api/v1/campaigns/e4a2e584-3672-4d69-b541-6e9f1a238491/export/pdf" \
-H "Authorization: Bearer <token>" \
--output campaign_report.pdf
import requests
url = "https://api.sayvy.ai/api/v1/campaigns/e4a2e584-3672-4d69-b541-6e9f1a238491/export/pdf"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
with open("campaign_report.pdf", "wb") as f:
f.write(response.content)
print("Report saved successfully.")
else:
print(response.status_code, response.json())
const response = await fetch(
"https://api.sayvy.ai/api/v1/campaigns/e4a2e584-3672-4d69-b541-6e9f1a238491/export/pdf",
{
method: "GET",
headers: {
"Authorization": "Bearer <token>"
}
}
);
const blob = await response.blob();
// In browser environments:
const downloadUrl = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = downloadUrl;
a.download = "campaign_report.pdf";
document.body.appendChild(a);
a.click();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sayvy.ai/api/v1/campaigns/e4a2e584-3672-4d69-b541-6e9f1a238491/export/pdf"))
.header("Authorization", "Bearer <token>")
.GET()
.build();
HttpResponse<Path> response =
HttpClient.newHttpClient().send(
request,
HttpResponse.BodyHandlers.ofFile(Paths.get("campaign_report.pdf"))
);
System.out.println("Downloaded PDF to " + response.body());
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Disposition: attachment; filename="campaign_report_e4a2e584.pdf"
Content-Length: 48320
<binary PDF stream>
{
"detail": "Unauthorized"
}
{
"detail": "Campaign not found or does not belong to this organization."
}
‹ PreviousOverview ›
Campaigns Overview
Back to Campaigns documentation hub
Was this page helpful?