For the complete documentation index, see llms.txt. This page is also available as Markdown.

Send email (including templates)

Send email message to the specified sandbox.

post
Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Path parameters
sandbox_idinteger · int64 · min: 1Required

Sandbox ID

Example: 4015
Body
or
or
or
Responses
200

Success. Message has been delivered.

application/json
successbooleanOptionalExample: true
message_idsstring[]Optional

An array of message IDs, one per recipient, in order of To, Cc, Bcc

Example: 0c7fd939-02cf-11ed-88c2-0a58a9feac02
post/api/send/{sandbox_id}
curl -X POST https://sandbox.api.mailtrap.io/api/send/{sandbox_id} \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "from": {"email": "sender@example.com"},
    "to": [{"email": "recipient@example.com"}],
    "subject": "Test Email",
    "text": "This is a test email sent to sandbox"
  }'
{
  "success": true,
  "message_ids": [
    "0c7fd939-02cf-11ed-88c2-0a58a9feac02"
  ]
}

Last updated

Was this helpful?