Transactional email

Send one email to one profile, triggered by your own system: order confirmations, password resets, booking receipts. Transactional mail ignores marketing consent and carries no unsubscribe link — its brake is the suppression list.

POST/transactional/send
{
  "to": { "externalId": "cus_42", "email": "ada@example.com", "firstName": "Ada" },
  "templateKey": "order-confirmation",
  "variables": { "orderNumber": "ORD-1042", "trackingUrl": "https://..." },
  "idempotencyKey": "order-1042-confirmation"
}

# 200 →
{ "id": "...", "status": "sent", "to": "ada@example.com", "contactId": "...",
  "contactCreated": false, "templateId": "...", "templateVersion": 3,
  "deduplicated": false }

One message per request — a transactional send is triggered by one event, not a batch job. status is one of sent, failed or suppressed.

Addressing: who receives it

to carries exactly one of contactId (the OpenHouse uuid) or externalId (your customer id):

  • contactId must exist (404 otherwise). A payload email is the send-to address for this message only — it does not change the contact.
  • externalId upserts: a match is enriched (the payload email becomes the contact's address; firstName/lastName fill in, never erase), a miss creates the contact — which requires an email in the payload. Created contacts start at consent unknown: a transactional send never manufactures marketing consent.
  • The mail goes to the payload email when present, the contact's stored email otherwise.

Every transactional email lands on a contact timeline — there are no contact-less sends.

Content: a template or your own HTML

Template mode (templateKey or templateId): resolves the template's current published version at send time, so a fix made in OpenHouse ships on your very next email with no change on your side. Pass templateVersion to freeze one explicitly. subject falls back to the template's default.

HTML mode (html + subject): your already-rendered email, delivered as-is (≤300 KB; a text part is derived). Personalization tokens still render, so you can keep personalization in OpenHouse even with your own markup.

Exactly one of the two — a request carrying both, or neither, is a 400. Content containing {{unsubscribe_url}} is refused: transactional mail has no unsubscribe. If it's marketing, send it as a campaign.

Variables and personalization

Request data no contact field holds — an order number, a reset link — travels in variables and is referenced in content as {{api.orderNumber}}:

variables
object
Flat map of name → string (≤2000 chars), number or boolean. Names are letters, digits and underscores.
  • Every api.* token printed as is must have a variable — a missing one is a 400 naming it, so a literal {{api.resetLink}} can never reach a recipient. A variable read behind a fallback, {{ api.coupon | default: "none" }}, may be left out.
  • Variable values render verbatim (booleans as Yes/No): an order id or URL is never locale-reformatted. To show a number as money in your organization's currency, write {{ api.total | money }}.
  • Content may use basic Liquid: fallbacks with default, conditions with {% if %} and {% case %}, and filters such as upcase, truncate, date, money. Anything else (loops, include) is a 400 naming it. Content that cannot render — dividing by zero — is a 422 and nothing is sent.
  • Contact tokens — {{firstName}}, {{email}}, any field in your organization's field registry — render with your organization's locale and currency, exactly like campaign email.
  • Organization tokens — {{org.name}}, {{org.tagline}}, {{org.postalAddress}}, {{org.consentLine}} — are filled from your brand (Settings → Brand), in the subject and the body alike.

Suppression instead of consent

The send ignores consent_status but refuses addresses on the suppression list, which fills automatically on every permanent bounce and spam complaint. A suppressed send returns 200 with status: "suppressed" — an outcome to record, not a caller error to retry.

The list is your organization's own. Reading and changing it needs an administrator's key.

GET/transactional/suppressions
GET /transactional/suppressions?q=example.com&limit=50&offset=0

# 200 → { "total": 2, "rows": [ { "address": "ada@example.com", "reason": "bounce", "since": "…" } ] }

Newest first. q (optional) matches part of the address; limit is 1–100, default 50. reason is bounce (a permanent bounce) or complaint (a spam complaint).

DELETE/transactional/suppressions/ada@example.com
# 200 → { "removed": true, "address": "ada@example.com" }
# 404 when the address is not on the list

Lifts the block, for example after the person fixed their mailbox, and is written to your audit log. Transactional sends to the address go out again at once. Marketing mail does not resume by itself: a bounce or complaint also opted the contact out, so send consentStatus: "opted_in" through /ingest/contacts once they have agreed to receive it again. Matching ignores case; encode @ as %40 if your HTTP client requires it.

Choosing a sender

senderId (optional, a uuid) sends as one of your senders, with its From and Reply-To. Copy the id from the sender's dialog in Settings → Domains. Leave it out to use your default sender. An unknown or archived id is a 400 that names the problem, and nothing is sent or recorded.

Idempotency and tracking

idempotencyKey (optional, ≤200 chars, unique per organization): a replayed request returns the original outcome and never mails twice. Use your event's stable id (order-1042-confirmation), not a random value per attempt.

Delivery, bounces, opens and clicks are tracked back onto the send and the contact's timeline automatically.

Every send that goes out counts once against your plan's monthly e-mail volume, and above it as overage, like campaign and automation mail; a suppressed or refused send does not count. An e-mail overage cap, if your workspace has one, pauses campaigns and automations only: transactional sends keep going.

GET/transactional

Lists recent sends, newest first (?limit=, default 50) — the tracing surface while you wire up an integration.