memo-circle-checkOverview

Test email sending in a safe environment before going to production

Mailtrap Email Sandbox provides a safe testing environment for email development. Capture and inspect emails without sending them to real recipients, perfect for development, staging, and QA environments.

Get Your Sandbox ID

To use the Sandbox API, you need your Sandbox (Inbox) ID. There are two ways to get it:

From the URL

Navigate to your Sandbox inbox in Mailtraparrow-up-right and get the ID from the URL:

https://mailtrap.io/inboxes/2564102/messages

                   Sandbox ID: 2564102

Via API

Use the API to get a list of your Sandboxes:

curl -X GET "https://mailtrap.io/api/accounts/{account_id}/inboxes" \
  -H "Api-Token: YOUR_API_TOKEN"

The response will include all your inboxes with their IDs:

[
  {
    "id": 2564102,
    "name": "My Test Inbox",
    "username": "abc123",
    "password": "xyz789",
    ...
  }
]
circle-info

Use the id field from the response as your Sandbox ID when making API calls.

Last updated

Was this helpful?