API Error and Response Codes
HTTP Response Codes
The Sailthru API will return one of the following HTTP response codes with each request. If the response is anything other than a 200 OK, a Sailthru error code and message will also be returned (see API Response Errors, below).
200 OK: Success!
400 Bad Request: The request cannot be fulfilled due to bad syntax or an invalid parameter.
401 Unauthorized: Invalid authentication credentials. For example, a request to Sailthru API with an invalid API Key
403 Forbidden: Valid request but it has been rejected by the server. For example: a request to cancel a send that was already sent; a request to delete a blast that has started sending; etc.
404 Not Found: Resource was not found. For example: request to get a blast that doesn’t exist
405 Method Not Found: A request was made of a resource using a request method not supported by that resource.
409 Method Not Found: The web server notes that the request submitted by the client can not be completed because it conflicts with an established ruleset.
- 429 Too Many Requests: You have exceeded the limit of requests per minute for the given type (GET or POST) and endpoint. For limit details, see the Rate Limiting section on the API Technical Details page.
500 Internal Server Error: Something is broken on the Sailthru side. This shouldn’t happen normally.
API Response Errors
This is a list of global error codes you can receive from the API. Each endpoint documentation page also lists endpoint-specific error codes and messages.
1: Unsupported HTTPS method
The API only supports GET, POST or DELETE, and some calls only support one or the other. This means you are trying to access an API call with an HTTPS method you can’t use.
2: Missing HTTPS GET/POST parameter
You failed to pass a parameter that was required for this API call.
3: Invalid API key
You used the wrong api_key parameter. Check that your client code is using the right API key (obtained in the Settings page).
4: Disallowed IP
You are coming from an IP address that is not allowed according to your settings. You can add the IP to the list on your Settings page.
5: Authentication failed
The sig parameter you passed was not a correct signature hash of your shared secret and the sorted alphabetical list of the other parameters. For more details on this, see API Details.
6: Invalid UTF-8 characters for field
You are passing invalid UTF-8 character as a parameter value.
9: Internal Error
Something’s gone wrong on our end. Your request was probably not saved – try waiting a moment and trying again.
11: Invalid Email
You tried to send to or access an invalid email address.
12: Unknown send_id
You tried to access a send_id that doesn’t exist or doesn’t belong to you.
13: Unknown blast_id
You tried to access a blast_id that doesn’t exist or doesn’t belong to you.
14: Unknown template
You tried to use a template that doesn’t exist. Double-check the name.
15: Unknown list
You tried to use a list that doesn’t exist. Double-check the name.
16: Unknown site
You tried to import contacts from a site that we don’t support.
17: Login failure
You tried to import contacts, but we couldn’t access them – probably either the username or the password was wrong.
18: Invalid time
You specified a time that didn’t make any sense to us. We are very liberal with accepted time formats (anything that PHP’s strtotime function can parse), but we recommend a standard format that includes timezone such as RFC 2822 (e.g. Sun, 22 Nov 2012 22:50:27 -0500).
21: You must be approved to email
Your account is not yet approved – until you are approved, you can only send emails to yourself. To get approval contact Support.
22: You must be a Premium client to use this API call
A few features of the API are only available to paid customers. To set up a paying account, contact Sales.
32: Email has opted out of delivery from client
This email has opted out of delivery from any emails coming from your site and should not be emailed.
33: Email has opted out of delivery from template
This email has opted out of delivery from the specific template you are sending, and should not be sent this type of email.
34: Email may not be emailed
This email has been identified as an email that should never be emailed.
35: Email is a known hardbounce
This email has been previously identified as a hardbounce, so should not be emailed.
36: Unverified from email
You attempted to set the From email to an email address you have not yet verified. You can verify additional From emails in MySailthru.
37: Email will only accept basic templates
The user has opted out of delivery from all templates except basic templates.
41: Unable to delete, already sent
You attempted to cancel an email that was already sent. It’s too late to cancel after it’s been sent.
42: Invalid UTF-8 characters for field: [field name]
You attempted to upload data in a character set that is not UTF-8 compatible, and therefore won’t display properly in a message.
43: Too many [type] requests this minute to /[endpoint] API
You have exceeded the limit of requests per minute for the given type (GET or POST) and endpoint. For limit details, see the Rate Limiting section on the API Technical Details page.
99: Other error
These errors are disambiguated by the error message they contain. For details on these errors, see the documentation for the endpoint in which they occur.
XX: Unable To Stream
API requests and responses in ISO-8859-1, not UTF-8