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

Send transactional email

Send a single transactional email with text, HTML, or template content.

Use this endpoint for:

  • Order confirmations

  • Password reset emails

  • Account notifications

  • Welcome emails

  • System alerts

post
Authorizations
Api-TokenstringRequired

API token in Api-Token header

Body
or
or
or
Responses
200

Email successfully sent

application/json
successbooleanOptionalExample: true
message_idsstring[]Optional

Message IDs (one per recipient)

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

Last updated

Was this helpful?