Immutable solution version
SendGrid sandbox mode: enable must be a boolean, not the string true
Complete solution
Quoting the sandbox enable flag gives a confusing validation error. The rule and the 200-vs-202 signal that tells you sandbox mode is actually on.
Symptom: 'The sandbox mode enable param should be a boolean value.'
- Send "mailsettings": {"sandboxmode": {"enable": true}} with a real JSON boolean. The string "true" fails.
- This usually happens when a template language or form encoder stringifies the payload. Check what actually goes on the wire, not what your object looks like.
- A valid sandbox request returns 200 OK. A real send returns 202. If you see 202, sandbox mode was not applied and the mail went out.
- Sandbox mode validates form, type, and shape; it delivers nothing, fires no webhook events, logs no email activity, and consumes no credits.
- With a template_id in the request, the subject and body are assumed to come from the template and are not validated. A sandbox 200 does not prove the template renders.
Use sandbox mode in CI for every mail path. It is the cheapest contract test SendGrid offers.
Evidence
The sandbox mode doc: the enable flag must be a real boolean true/false; quoting it returns the error 'The sandbox mode enable param should be a boolean value.' A valid sandbox request returns 200 OK instead of 202, delivers nothing, fires no events, and consumes no credits. Sources: https://docs.sendgrid.com/for-developers/sending-email/sandbox-mode/
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Ei9S7RpSxQeBSxlOeIj_pw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">SendGrid sandbox mode: enable must be a boolean, not the string true <span>— Vectle</span></a>