Campaign precondition codes
When setting a campaign to ready=true
, the API can return an HTTP status code of 422 unprocessable entity with code failed_precondition
.
{
"type": "failed_precondition",
"message": "The campaign cannot be sent in it's current state. See <https://docs.bigmailer.io/docs/campaign-api-precondition-codes>",
"preconditions": [
"scheduled_for.date"
]
}
If this is returned by the API, there are one or more changes that need to be made to the campaign in order for it to be sendable. The codes in the preconditions array tells you what needs to be changed.
Here are the codes and their meanings:
Code | Description |
---|---|
account.contacts | The account has exceeded the maximum number of contacts on the current subscription plan. The subscription needs to be updated before campaigns can be sent. |
account.status | The account has been suspended, payment is past due, or was not activated. |
brand.contacts | The maximum number of contacts allowed on this brand has been exceeded. Contact your account administrator for help. |
campaign.status | The campaign cannot be updated given it's current status. |
connection.status | The connection used to send email (AWS, SparkPost, etc) is not properly configured. |
feed_url.format | The RSS feed url is not valid. |
from_email.format | The from email address is not valid. |
from_email.verify | The from email address has not been verified. |
html.unsub | The html template does not contains an unsubscribe link. |
link_params.format | The link parameters is not a valid query string. |
lists.length | At least one list must be specified to send contacts to. |
recipients.format | The test recipients list is not a valid list of email addresses. |
recipients.length | The test recipients list cannot exceed 10,000 characters. |
reply_to_email.format | The reply to email is not valid. |
scheduled_for.date | The date the campaign is scheduled for is in the past. |
subject.format | The subject must not be empty. |
text.unsub | The text template does not contain an unsubscribe link. |
update_days.length | The RSS campaign must specify at least one day to be sent on. |
Updated over 2 years ago