Skip to content

Get campaign errors

Returns a list of errors with reasons why this campaign cannot be sent.

HTTP method: GET

https://api.sender.net/v2/campaigns/{id}/errors


ParameterTypeDescription
idstring requiredCampaign ID

const url = new URL("https://api.sender.net/v2/campaigns/{id}/errors");
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Example Response
{
"errors": [
{
"title": "No subscribers selected",
"details": "Please select at least one subscriber group",
"route": "campaigns/883133/subscribers"
}
],
"warnings": [
{
"title": "Add email preview text",
"details": "We recommend using email preview text - this can improve your open rate",
"route": "campaigns/883133/edit"
},
{
"title": "SPF record is not verified",
"details": "To improve your email deliverability, we advise you to set up SPF email authentication",
"route": "settings/domains"
},
{
"title": "DKIM record is not verified",
"details": "To improve your email deliverability, we advise you to set up DKIM email authentication",
"route": "settings/domains"
}
]
}