Skip to main content
POST
Send a transactional e-mail

Authorizations

Authorization
string
header
required

An API token. The "read" ability: GET routes only. "read + write": every route.

Headers

Idempotency-Key
string

Replay a write safely: the same key gives back the first answer for 24 hours (header Idempotent-Replay: true). Read on POST, PUT and PATCH; DELETE ignores it. 255 characters at most.

Maximum string length: 255

Body

application/json
template
string | null

The name of one of the team's transactional templates.

html
string | null

The HTML body, when no template is given.

subject
string | null

Replaces the template's subject.

to
string<email>[]

50 addresses at most, cc and bcc included.

Maximum array length: 50
cc
string<email>[]
Maximum array length: 50
bcc
string<email>[]
Maximum array length: 50
variables
object

They fill the template: {{ order.number }}, {% for %} loops…

locale
string | null

Which language version of the template to send (fr, pt-BR…). Without a value, the base version.

from_email
string<email> | null
from_name
string | null
reply_to
string<email> | null
mailer
string | null

The name of one of the team's providers, or of one the platform offers, to force that one. Any other name is refused.

attachments
object[]
Maximum array length: 10

Response

The e-mail had already been handed to the provider when the answer left (status: sent).

data
object