technical · sourced answer

What is SendGrid Sandbox Mode?

SendGrid sandbox mode is a restricted environment that allows developers to test API integrations and SMTP configurations without sending emails to live recipients. In this mode, the system validates the request and returns a success response, but the actual email is not delivered to the destination address to prevent accidental spam or misuse during development.

Sandbox Mode Mechanics

When an account is in sandbox mode, SendGrid processes the incoming API call or SMTP request to ensure the payload is syntactically correct and the authentication is valid. The API returns a 202 Accepted status code, indicating the request was received. However, the mail transfer agent does not relay the message to the external internet. This allows developers to verify their code logic and error handling without risking their sender reputation or incurring costs.

Verification Requirements

To move out of sandbox mode, users must complete a verification process. This typically involves providing account details and verifying a sender identity. SendGrid requires this step to mitigate the risk of the platform being used for malicious purposes. Until the account is fully approved, any attempt to send mail to unverified addresses will result in the message being dropped despite the API returning a success response.

Testing Strategies

Developers should use sandbox mode to test the integration of their application with the SendGrid API. Once the API responses are confirmed as successful, the next step is to verify a single sender email address or a full domain. Using SendHQ free tools can help developers ensure their DNS records are correctly configured before moving to production to avoid delivery failures.

Transitioning to Production

Transitioning to production requires completing the account activation process and configuring domain authentication. This involves adding SPF and DKIM records to the DNS settings of the sending domain. Once the account status changes from sandbox to active, emails will be routed to the actual recipients. Developers should perform a final test with a known internal address before launching to a full user list.

Questions teams ask

Why am I getting a 202 response but no email?

This is the expected behavior of sandbox mode. The 202 status means the API request was valid, but the email was not delivered because the account is still restricted.

How do I disable sandbox mode?

You must complete the account verification process and provide the requested business information to the SendGrid team for approval.

Can I send to my own email in sandbox mode?

Generally, no. Unless the email address is specifically verified as a sender or part of a verified identity, sandbox mode will block delivery to all addresses.

Does sandbox mode cost money?

No, requests made in sandbox mode do not count toward your monthly sending quota as no actual mail is delivered.

Primary sources