EmailElement Docs

Transactional Email API

The Transactional Email API sends one email per request through a Transactional Relay, which is where the Send Integration and the suppression settings come from. You post a recipient, a subject and either a body or a template, and read the status code to know it was accepted.

Instructions

  1. Create a Transactional Relay and copy its number: Transactional Emails > Create Transactional Relay. The relay decides which Send Integration sends the email and which Suppression Lists apply.
  2. Give your API key the right permission: Account > API Keys > select the key > set Transactional Email API to Full Access > Save > Copy.
  3. Build the request: API Documentation > Transactional Email API. Tick the fields you want, then copy the Request URL and Request Body.
  4. Send a POST to the request URL with the x-api-key header holding your key, and the JSON body. Supply to.email, subject, transactionRelayId, and at least one of htmlBody, textBody or templateId.
  5. Read the status code, not the body, to decide whether it worked. A 200 returns a messageId that ties webhook events back to the request.

A 200 means the email was validated and queued, not that it was delivered. Suppression, bounce handling and the relay itself run afterwards and can still stop the send.

Something went wrong. Reloading the page usually fixes it. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.