Skip to Content

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-string

Requires 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

FieldTypeRequiredDescription
fromstringYesSender, e.g. Acme <[email protected]> or [email protected]
tostring or string[]Yes*Primary recipients
ccstring or string[]NoCarbon copy
bccstring or string[]NoBlind carbon copy
reply_tostring or string[]NoReply-To addresses
subjectstringYesSubject line
htmlstringNo†HTML body
textstringNo†Plain-text body
headersobjectNoCustom headers (string map)
attachmentsarrayNoSee Attachments
tagsarrayNo{ "name", "value" } pairs for filtering and webhooks
scheduled_atstringNoISO 8601 or relative time — see Schedule

*At least one recipient across to / cc / bcc is required.
†Provide html, text, or both.

Limits (per message)

LimitValue
Recipients (to+cc+bcc)50
Tags20
Custom headers50
Request body64 MB
Attachment payload40 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

nameMeaning
invalid_from_addressfrom domain is missing or not verified
validation_error / missing_required_fieldRequired fields missing or invalid
sending_restrictedWorkspace cannot send right now (access or enforcement)
rate_limit_exceededHTTP rate limit — see Retry-After
invalid_attachmentAttachment content or size invalid

Full catalogue: Errors.

On this page