---
title: "Send a transactional email"
method: POST
path: "/v1/transactional"
tags: ["Transactional emails"]
---

# Send a transactional email

`POST /v1/transactional`

Send a transactional email to a contact.<br>Please [email us](mailto:help@loops.so) to enable attachments on your account before using them with the API.

To set dynamic Subject, From, Reply to, CC, BCC email header fields, add data variables to those fields in the editor, then include data for each variable in the API request. Read our transactional email guide for more details.

## Headers

- `Idempotency-Key` string

## Request body

- TransactionalRequest
  - `email` string, required — The recipient's email address.
  - `transactionalId` string, required — The ID of the transactional email to send.
  - `addToAudience` boolean — If `true`, a contact will be created in your audience using the `email` value (if a matching contact doesn't already exist).
  - `dataVariables` object — An object containing data as defined by the data variables added to the transactional email template. Values can be of type string or number. If you have added optional data variables to your email, you can exclude them from the dataVariables object or set the value to "". If you have added an array data variable to your email, make sure to include an array matching the data variables you added to your array block.
  - `attachments` object[] — A list containing file objects to be sent along with an email message. Attachments must be enabled by Loops support before they can be used with the API.
    - `filename` string, required — The name of the file, shown in email clients.
    - `contentType` string, required — The MIME type of the file.
    - `data` string, required — The base64-encoded content of the file.

## Response `200`

Successful send.

- TransactionalSuccessResponse
  - `success` boolean, required

## Other responses

- `400` — Bad request (e.g. transactional email is not published).
- `404` — Transactional email not found.
- `405` — Wrong HTTP request method.
- `409` — Idempotency key has been used.

---

[API](https://skmtc.net/loops/apis/loops-openapi-spec.md) · [All operations](https://skmtc.net/loops/apis/loops-openapi-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loops/loops-openapi-spec/versions/96c4b50b8b95/schema)
