When you make an API call you may receive an error message in response. Either there is something wrong with your request or something went wrong on our end. Errors respond with an error code and JSON that contains a more precise message, description and API code.
List of SparkPost API Error Codes are as follows
CODE | STATUS NAME | DESCRIPTION | SUGGESTED ACTION |
---|---|---|---|
400 | Bad Request | There is a problem with your request. | Check your request follows the API documentation and uses correct syntax. |
401 | Unauthorized | You don’t have the needed authorization to make the request. | Make sure you are using a valid API key with the necessary permissions for your request. |
403 | Forbidden | The server understood the request but refused to fulfill it. | See if your SparkPost plan includes the resource you are requesting and your API key has the necessary premissions. |
404 | Not Found | The server couldn’t find the requested file. | Change your request URL to match a valid API endpoint. |
405 | Method Not Allowed | The resource does not have the specified method. (e.g. PUT on transmissions) | Change the method to follow the documentation for the resource. |
409 | Conflict | A conflict arose from your request. (e.g. user already exists with that email) | Modify the payload to clear the conflict. |
413 | Request Entity Too Large | The size of the request exceeds the limit. | Check the documented limit for the API and reduce the size of the request. |
415 | Unsupported Media Type | The request is not in a supported format. | Check that your Content-Type header is a supported type and that your request adheres to the documentation. |
420 | Exceed Sending Limit | You exceeded your daily, monthly, or sandbox sending limit. | Check that you are within the limits of your SparkPost plan. If you are using the sandbox domain, then you’ll need to add a sending domain to continue. |
422 | Unprocessable Entity | The request was syntactically correct but failed due to semantic errors. | Make sure that your request includes all of the required fields and your data is valid. |
429 | Too Many Requests | You sent too many requests in a given time period. | Wait 1 to 5 seconds before making another request. Heavier usage patterns may require a more sophisticated and incremental backoff strategy. |
500 | Internal Server Error | Something went wrong on our end. | Try the request again later. If the error does not resolve, check our status page for service updates. You can also contact Support from the app [EU] if your issue persists. |
503 | Service Unavailable | We are experiencing higher than normal levels of traffic. | Try the request again later. |
Visit https://developers.sparkpost.com/api/#header-error-table
Contact ccs.rentacoder (at) gmail (dot) com if you want Classic ASP or .Net Mail sending Function.