POST
/api/v1/sendSend a message
Sends a message through the HTTP API using the supplied sender, recipients, content, and optional delivery metadata. Provide From with an Email address; add recipients, message bodies, attachments, headers, or tags as needed. A 200 response returns the message ID.
- RetriesRetries up to 2×, 250ms backoff, 10s timeout.
JSON payload containing the sender and optional message content, recipients, and delivery metadata. From is required.
Attachmentsarray<object>optional
Attachments
Bccarray<string>optional
Bcc recipients email addresses only
Ccarray<object>optional
Cc recipients
Fromobjectrequired
"From" recipient
HTMLstringoptional
Message body (HTML)
Headersobjectoptional
Optional headers in {"key":"value"} format
ReplyToarray<object>optional
Optional Reply-To recipients
Subjectstringoptional
Subject
Tagsarray<string>optional
Mailpit tags
Textstringoptional
Message body (text)
Toarray<object>optional
"To" recipients
200Returns a confirmation object containing the message's database ID in `ID`.
IDstringoptional
Database ID
400Returned when the request cannot be processed; the JSON response contains an error message in `Error`.
Errorstringoptional
Error message
Error handling
A 400 is returned when the request JSON cannot be accepted; check the Error value in the response for details. From and its Email are required, each recipient object must include Email, and each attachment must include Content and Filename.