Using sandbox mode

Test transactional emails without sending them using sandbox mode

Use sandbox mode to test transactional email requests without sending actual emails. This lets you validate your API integration in a safe testing environment.

How it works

Add the X-Sib-Sandbox header with the value drop to your request. In sandbox mode:

  • No emails are sent to recipients
  • No email logs are created in your Brevo account
  • You receive a success response indicating the API endpoint is working correctly

Example request

$curl --request POST \
> --url https://api.brevo.com/v3/smtp/email \
> --header 'accept: application/json' \
> --header 'api-key: YOUR_API_KEY' \
> --header 'content-type: application/json' \
> --data '{
> "sender": {
> "name": "Sender Name",
> "email": "sender@example.com"
> },
> "headers": {
> "X-Sib-Sandbox": "drop"
> },
> "to": [
> {
> "email": "recipient@example.com",
> "name": "Recipient Name"
> }
> ],
> "htmlContent": "<!DOCTYPE html><html><body><h1>Confirm your email</h1><p>Please confirm your email address by clicking on the link below</p></body></html>",
> "textContent": "Please confirm your email address by clicking on the link https://text.domain.com",
> "subject": "Login Email confirmation"
>}'

Response

You receive a 201 success response with a messageId, but no email is sent:

1{
2 "messageId": "<20x31xxx02xx.2004x1008xx@smtp-relay.mailin.fr>"
3}

Sandbox mode only validates the API request format. To test actual email delivery, send emails without the sandbox header.