Sandbox mode is only used to validate your request. The email will never be delivered while this feature is enabled!
Sandbox mode is an optional parameter within
mail_settings. Enabling sandbox mode allows you to send a test email to ensure that your request body is formatted correctly without delivering the email to any of your recipients.
When making a request with sandbox mode enabled, we will validate the form, type, and shape of your request. In other words, sandbox mode will validate each parameter you include and the structure of your JSON payload. If you include a
template_id in your sandbox mode request, it will be assumed that you have included a subject line and body within the template. We will not validate this content.
When using sandbox mode, you must include the “enable” parameter and it must be given a boolean value of either true, or false. Do not enclose the boolean value in quotes, or you will receive the error:
The sandbox mode enable param should be a boolean value.
When your request validates, you will receive a 200 OK response (as opposed to the 202 ACCEPTED response that is returned for successful non-sandbox requests).
If you submit a request with sandbox mode enabled, but your request body is invalid, you will receive one or more error messages with error codes, detailed explanations for the error or errors, and links to any relevant documentation.
Please note: The following is an invalid request body intended to demonstrate the validation behavior of sandbox mode for a bad request.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
1 2 3 4 5 6 7 8 9