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:

CodeDescription
account.contactsThe 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.statusThe account has been suspended, payment is past due, or was not activated.
brand.contactsThe maximum number of contacts allowed on this brand has been exceeded. Contact your account administrator for help.
campaign.statusThe campaign cannot be updated given it's current status.
connection.statusThe connection used to send email (AWS, SparkPost, etc) is not properly configured.
feed_url.formatThe RSS feed url is not valid.
from_email.formatThe from email address is not valid.
from_email.verifyThe from email address has not been verified.
html.unsubThe html template does not contains an unsubscribe link.
link_params.formatThe link parameters is not a valid query string.
lists.lengthAt least one list must be specified to send contacts to.
recipients.formatThe test recipients list is not a valid list of email addresses.
recipients.lengthThe test recipients list cannot exceed 10,000 characters.
reply_to_email.formatThe reply to email is not valid.
scheduled_for.dateThe date the campaign is scheduled for is in the past.
subject.formatThe subject must not be empty.
text.unsubThe text template does not contain an unsubscribe link.
update_days.lengthThe RSS campaign must specify at least one day to be sent on.