For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Getting started
    • Overview
    • Quickstart
    • Authentication
    • Rate limits
  • Messaging API
    • Send transactional email
      • Batch send emails
      • Batch email idempotency
      • Schedule emails
      • Sandbox mode
      • Weekly event exports
      • SMTP relay integration
      • Delete transactional logs
      • Parse inbound email
    • Send transactional SMS
    • Send transactional WhatsApp
  • Marketing Platform
    • Manage your contacts
    • Track website activity
    • Send WhatsApp campaigns
    • Weekly event exports
  • Webhooks
    • Getting started
    • Conversations webhooks
    • Payment webhooks
    • Marketing webhooks
    • Transactional webhooks
    • Loyalty webhooks
    • Batched webhooks
    • Secure webhook calls
    • Meetings and phone webhooks
    • Push notification webhooks
    • Sales CRM webhooks
  • Conversations
    • Getting started
    • Customize the chat widget
    • JavaScript API reference
    • REST API reference
    • Conversations webhooks
  • eCommerce
    • Activate eCommerce app
    • Manage product categories
    • Manage products
    • Manage orders
    • Coupon collections
    • eCommerce tracker events
  • Loyalty
    • Overview
    • Set up a program
    • Enroll members
    • Credit & debit points
    • Read member data
    • Best practices
  • Custom Objects
    • Custom objects management
  • Brevo tracker and events
    • Getting started
    • JavaScript implementation
    • REST implementation
    • Legacy tracker documentation
    • Events
  • Accounts and settings
    • Senders and domains
    • User activity logs
    • External feeds
    • Invited users
LogoLogo
Help CenterAPI KeysStatusSign In
On this page
  • How it works
  • Example request
  • Response
Messaging APISend transactional email

Using sandbox mode

Test transactional emails without sending them using sandbox mode
Was this page helpful?
Previous

Weekly event exports

Export raw transactional event data for analytics
Next
Built with

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.