Send email
Create and queue an outbound message with POST /emails.
Endpoint
POST /emails
Authorization: Bearer pb_…
Content-Type: application/json
Idempotency-Key: optional-unique-stringRequires sending_access or full_access (or a portal session). The workspace must be allowed to send, and from must use an ownership-verified domain.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
from | string | Yes | Sender, e.g. Acme <[email protected]> or [email protected] |
to | string or string[] | Yes* | Primary recipients |
cc | string or string[] | No | Carbon copy |
bcc | string or string[] | No | Blind carbon copy |
reply_to | string or string[] | No | Reply-To addresses |
subject | string | Yes | Subject line |
html | string | No† | HTML body |
text | string | No† | Plain-text body |
headers | object | No | Custom headers (string map) |
attachments | array | No | See Attachments |
tags | array | No | { "name", "value" } pairs for filtering and webhooks |
scheduled_at | string | No | ISO 8601 or relative time — see Schedule |
*At least one recipient across to / cc / bcc is required.
†Provide html, text, or both.
Limits (per message)
| Limit | Value |
|---|---|
Recipients (to+cc+bcc) | 50 |
| Tags | 20 |
| Custom headers | 50 |
| Request body | 64 MB |
| Attachment payload | 40 MB total |
Response
{ "id": "…" }HTTP 200 with the new email id. Use GET /emails/:id for status and events.
Idempotency
Pass Idempotency-Key (max 256 characters) to make retries safe. Replaying the same key for the same workspace returns the original result and may set Idempotent-Replayed on the response.
Examples
Minimal HTML
curl -X POST https://api.postbound.app/emails \
-H "Authorization: Bearer pb_…" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <[email protected]>",
"to": ["[email protected]"],
"subject": "Welcome",
"html": "<p>Welcome to Acme.</p>",
"text": "Welcome to Acme."
}'With tags
{
"from": "[email protected]",
"to": ["[email protected]"],
"subject": "Receipt",
"html": "<p>Thanks for your order.</p>",
"tags": [
{ "name": "category", "value": "receipt" },
{ "name": "order_id", "value": "10042" }
]
}Tags are included on webhook payloads for matching events.
Common errors
name | Meaning |
|---|---|
invalid_from_address | from domain is missing or not verified |
validation_error / missing_required_field | Required fields missing or invalid |
sending_restricted | Workspace cannot send right now (access or enforcement) |
rate_limit_exceeded | HTTP rate limit — see Retry-After |
invalid_attachment | Attachment content or size invalid |
Full catalogue: Errors.