Sandbox API

Reduce errors & improve
deliverability with SandboxAPI

Sending millions of emails needs testing infrastructure before mass deployment. Our sandbox systems help businesses stay compliant with GDPR, CAN-SPAM and Data protection standards.

Sandbox API for Email Testing
API Explorer

Explore the Sandbox API

Let's test, fix, and improve every part of email campaigns before going live.

API Request Flow

Send Request

Call any endpoint with your API key. RESTful, predictable, and fast.

GET /v1/messages
Authorization: Bearer ts_key

Process & Analyze

TrueSend fetches data, runs spam analysis, validates HTML, and checks auth.

spam_check: 0.8/5.0
dkim: pass  spf: pass

JSON Response

Get structured JSON with emails, scores, headers, and validation results.

{ "status": 200,
  "data": [{ "subject": "..." }] }
GET
/v1/messages

Email Campaign Testing

Test email content, subject lines, templates, and personalization before sending real campaigns.

GET
/v1/messages/{id}

Automation Workflow Testing

Test welcome emails, cart recovery, and drip flows automatically and make sure every trigger works correctly at the right moment.

POST
/v1/html-check

API Request & Response Testing

Send sample API calls and quickly evaluate the results to guarantee proper integration and data flow.

GET
/v1/inboxes

Contact & Data Simulation

Make test contacts and set off events such as clicks, purchases, or signups. This will safely test actual campaign behaviour.

GET
/v1/messages/{id}/spam

Template Rendering Preview

Check how your emails look across multiple devices and inbox clients. Don't compromise on formatting & design.

DEL
/v1/inboxes/{id}/clean

Logs & Debugging View

Track all test activities, API responses, and errors to quickly identify and fix issues before production.

How It Works

Simple Steps to Start Using Sandbox API

Start using the sandbox API in 3 simple steps.

1

Log in to your ESP dashboard

Enter your ESP account to reach sandbox tools and settings.

2

Generate Sandbox API Key and Secret

Create secure test credentials that allow you to safely use the sandbox environment.

3

Open API Explorer and send a test request

Utilize the built-in testing tool to test API calls and email operations.Utilize the built-in testing tool to test API calls and email operations.

4

Review results and fix issues.

Lastly, review responses, check errors, and fix them before moving to production campaigns.

Quick Start

Get Started in Any Language

Get started with TrueSend's Sandbox API using SDKs for Node.js, Python, PHP, Ruby, Go, and Java, or connect directly via the REST API in any programming language.

Full API Docs
// Node.js SDK — Quick Start
const { TrueSend } = require('truesend');

const client = new TrueSend('ts_live_a1b2c3d4');

// Fetch latest emails
const emails = await client.messages.list({
  inbox_id: 'inbox_9f8e7d6c',
  to: 'user@example.com'
});

// Check the first email
const msg = emails.data[0];
console.log(msg.subject);
// → "Welcome to MyApp!"
console.log(msg.spam_score);
// → 0.8
Related Tools

Sandbox API Toolkit

Unlock a complete set of built-in utilities to support safe testing, debugging, and optimization of email campaigns.

Sandbox API Credentials Manager

Generate and manage API keys and secrets for secure access to the sandbox environment.

Learn More

Email Testing Simulator

Send controlled test emails without reaching real users to validate content and delivery flow.

Learn More

Event & Automation Simulator

Trigger sample user actions like signup or purchase

Learn More
FAQ

Frequently Asked Questions

Everything you need to know about TrueSend's Sandbox API

Sandbox API FAQ
Does the sandbox API support tracking like opens and clicks?
Yes, but tracking is simulated. You can test event triggers like clicks or opens, but they do not reflect real user behaviour.
Can I use real customer data in sandbox testing?
You can use limited or masked test data because if you use full real customer data, you may face a protection issue and accidental sends.
What happens if we skip sandbox testing?
Skipping sandbox testing can lead to broken campaigns going live, loss of customer trust, lower engagement and sales, and deliverability issues.
Do sandbox emails go to the inbox or spam?
Sandbox emails do not go to real inboxes. They are usually captured inside the platform or shown as test logs for debugging purposes.
What can I test using the sandbox API?
You can test email templates, automation workflows, API integrations, trigger events and also email rendering with the sandbox API.

Deliver Your Best Work With TrueSend

  • No Credit Card Needed
  • Unlimited Time On Free Plan