Testing Emails
Test email sends in the sandbox without affecting your production quota.
Test your integration before sending to real users. Notify provides a dashboard sandbox and a test API endpoint. Test sends are logged in Email Logs but do not count against your monthly quota.
Dashboard sandbox
Open the sandbox to compose and preview test emails visually.
- Enter recipient, subject, and message
- Preview the rendered output
- Send the test
- Review the result in Email Logs
See Sandbox vs Production for how sandbox differs from production sends.
Test via API
Send test emails to POST https://notify.cx/api/email/send/test — same as production send, with /test on the end. The request body uses the same fields as production: subject, to, and message.
async function testEmail() {
const response = await fetch('https://notify.cx/api/email/send/test', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.NOTIFY_API_KEY!
},
body: JSON.stringify({
to: 'test@example.com',
subject: 'Test Email',
message: 'Test content'
})
});
if (!response.ok) {
throw new Error(`Test failed: ${await response.text()}`);
}
console.log('Test logged:', await response.json());
}
testEmail();
Test emails are recorded in your logs but are not delivered to real inboxes.
Error handling
Always check the response status and body:
const response = await fetch('https://notify.cx/api/email/send/test', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.NOTIFY_API_KEY!
},
body: JSON.stringify({
to: 'test@example.com',
subject: 'Test Email',
message: 'Test content'
})
});
const result = await response.json();
if (!response.ok) {
console.error('Test failed:', result);
return;
}
console.log('Test logged:', result);
Common errors:
- Invalid or missing API key (
401) - Invalid email format (
400) - Missing required fields (
400)
Next steps
- Sending Emails — production sends
- Logs & Monitoring — verify test results
- Transactional Email Best Practices