Send an email
Auth: Bearer key scoped to the from domain.
html or text is required; at least one must be set. Accepts an Idempotency-Key header — a repeat within 24 hours returns the original response. layout is a boolean or an object: true uses the domain's layout as configured, an object of { name, logo, accent, footer } (all optional) overrides those fields for this send only.
bearerAuthorizationBearer <token>An API key in the Authorization header.
application/json- body
from*stringSender as Name <address> or a bare address. The domain must be verified and in the key's scope.
3 <= lengthto*|array<string>One or more recipient addresses.
cc?|array<string>One or more carbon-copy addresses.
bcc?|array<string>One or more blind carbon-copy addresses.
reply_to?|array<string>One or more reply-to addresses.
subject*stringSubject line.
^[^\x00-\x1F\x7F\u0085\u2028\u2029]*$1 <= length <= 998html?stringHTML body. At least one of html or text is required.
text?stringPlain-text body. At least one of html or text is required.
headers?Custom headers. Reserved headers are rejected. Mailpace domains reject custom headers entirely.
tags?array<>Free-form tags, filterable in the dashboard.
items <= 20attachments?array<>Files to attach, base64-encoded.
items <= 20layout?|Wrap html in the domain's layout. The domain must have one. true uses it as configured; an object of name, logo, accent and footer overrides those fields for this send only, falling back to the domain's value for anything omitted. Default false.
subscribe?array<>List ids to add every address in to to, as an api membership recording this message's id. Each list must be on the sending domain. This is the only door a send can grow a list through — omit it and a send never touches a list.
items <= 20sensitive?booleanWithhold the body from every read: the API, MCP, exports and the dashboard. Its key is shredded once it leaves the queue, and it can't be resent. Default false.
The queued message. A Location header points at its url. Acceptance means persisted, not delivered.
application/json- response
id?stringOpaque id, prefixed msg_.
url?stringWhere this message can be read at.
status?stringLifecycle status.
"queued""sent""delivered""deferred""bounced""complained""failed"from?stringSender, as Name when a name was given.
to?array<string>Recipient addresses.
cc?array<string>Carbon-copy addresses.
bcc?array<string>Blind carbon-copy addresses.
reply_to?array<string>Reply-to addresses.
subject?stringSubject line.
tags?array<string>Tags as sent.
headers?Custom headers as accepted. Empty when the send had none.
layout?|As the send asked for it: false, true for the domain's layout as configured, or the fields it overrode for this send.
key_id?|The key that sent it, prefixed key_. Null for mail sent without a key, from the dashboard or by the service itself.
batch_id?|The batch it was sent in, prefixed bat_. Null for a single send.
test_mode?booleanWhether the sending key was test-mode.
sensitive?booleanWhether the body is withheld from every read: the send set sensitive, or the message carried a credential.
warnings?array<>Hints from the recipient's send history, as they stood when this message was accepted. Empty when there's nothing worth flagging. Never changes whether the message was accepted.
provider_message_id?|The provider's own id for the message, once sent.
reason?|The provider's reason for the current status, when there is one.
attempts?integerDelivery attempts made so far.
next_attempt_at?|When the service next tries to send it, as an ISO 8601 timestamp. Null unless status is queued. A time in the past means it's due now.
created_at?stringISO 8601 timestamp.
sent_at?|ISO 8601 timestamp, or null.
delivered_at?|ISO 8601 timestamp, or null.
abandoned_at?|When the service stopped waiting on a sent message the provider never reported back on. status stays sent. Null otherwise.
size?Bytes as accepted. body_bytes is the UTF-8 size of the html and text parts before the domain's layout, attachment_bytes the decoded size of the attachments, 0 with none. Each is null on a message accepted before sizes were recorded.
resent_from?|The message this one was resent from, prefixed msg_. Null for an original send.
curl -X POST 'https://pouch.example.com/v1/emails' \ -H 'Content-Type: application/json' \ -d '{ "from": "string", "to": "string", "subject": "string"}'{ "id": "string", "url": "string", "status": "queued", "from": "string", "to": [ "string" ], "cc": [ "string" ], "bcc": [ "string" ], "reply_to": [ "string" ], "subject": "string", "tags": [ "string" ], "headers": {}, "layout": true, "key_id": "string", "batch_id": "string", "test_mode": true, "sensitive": true, "warnings": [ { "code": "previously_bounced", "address": "string", "message": "string", "detail": {} } ], "provider_message_id": "string", "reason": "string", "attempts": 0, "next_attempt_at": "string", "created_at": "string", "sent_at": "string", "delivered_at": "string", "abandoned_at": "string", "size": { "body_bytes": 0, "attachment_bytes": 0 }, "resent_from": "string"}