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

# Send a transactional email

`POST /v1/send/email`

Send a transactional email. While not strictly required, we recommend that you include a `transactional_message_id` in your request. If you don't, Customer.io attributes metrics to `"transactional_message_id": 1`, so multiple messages can roll up under the same ID.

If this is the first time you send a message with the API, you can include the `auto_create` parameter along with a `transactional_message_id` string to create a record for you.

You can also include a `body`, `subject`, and `from` values to override the message template. Or, if you create your message entirely through the API, you *must* include these values because your `transactional_message_id` won't have any content. See [Examples and API parameters](/journeys/send/transactional/email/#auto-create-transactional-message-records) for more details.

## Headers

- `X-Workspace-Id` integer

## Request body

- Sendemail
  - `transactional_message_id` union — The transactional message template you want to use. You can call the template by its numerical ID or by the *Trigger Name* that you assigned to the template in the UI (case insensitive).
    - integer — The ID of the transactional message you want to send.
    - string — The name of trigger for the transactional message you want to send. You set the trigger name in the **Configure Settings** step in the UI when setting up your message. This is case insensitive.
  - `body` string — The HTML body of your message. If you provide a `transactional_message_id`, this overrides the template's body. It's also the fallback when you send AMP email (`body_amp`) to a client that doesn't support AMP.
  - `body_amp` string — AMP-enabled content for your email. If a recipient's email client doesn't support AMP, they receive your `body` content instead. Make sure you're [set up to send AMP](/journeys/channels/email/layouts/amp-for-email/) first.
  - `body_plain` string — The plaintext body of your message. If you provide `transactional_message_id`, this overrides the template's plaintext body.
  - `subject` string — The subject line for your message. If you provide `transactional_message_id`, this overrides the template's subject.
  - `from` string — The address your email is from. It must be a [verified sender](/journeys/channels/email/deliverability/authentication/). Quote any display name, like `\"Person\" <person@example.com>`. This overrides the template's sender; omit it to use the template or your workspace default.
  - `language` string — Overrides language preferences for the person you want to send your transactional message to. Use one of our [supported two- or four-letter language codes](/journeys/channels/localization/getting-started/#supported-languages).
  - `auto_create` boolean — If `true` and your `transactional_message_id` doesn't match a record, Customer.io creates an empty record using that value as the *Trigger Name*. The ID must be a string. If the name already belongs to another channel, the request fails with `400`, and numeric IDs ignore this setting. See [details](/journeys/transactional-email/#auto-create-transactional-message-records).
  - `identifiers` union — Identifies the person represented by your transactional message by one of, and only one of, `id`, `email`, or `cio_id`.
    - object
      - `id` string, required — The identifier for the person represented by the transactional message. **NOTE**: If your workspace identifies people by email, use the `email` identifier instead.
    - object
      - `email` string, required — The identifier for the person represented by the transactional message. Use this option if your workspace identifies people by email rather than by `id`.
    - object
      - `cio_id` string, required — A unique, immutable identifier for a person, set by Customer.io when you add a person.
  - `message_data` object — An object containing the key-value pairs referenced using liquid in your message.
  - `send_at` integer — A unix timestamp (seconds since epoch) determining when the message will be sent. The timestamp can be up to 90 days in the future. If this value is in the past, your message is sent immediately.
  - `disable_message_retention` boolean — If true, the message body is not retained in delivery history. Setting this value overrides the value set in the settings of your `transactional_message_id`.
  - `send_to_unsubscribed` boolean — If false, your message is not sent to unsubscribed recipients. Setting this value overrides the value set in the settings of your `transactional_message_id`.
  - `queue_draft` boolean — If true, your transactional message is held as a draft in Customer.io and not sent directly to your audience. You must go to the Deliveries and Drafts page to send your message.
  - `to` string, required — The recipients you want to send to, separated by commas. You can include up to 15 total recipients across `to`, `cc`, and `bcc`, with optional display names in quotes.
  - `cc` string — Carbon copy message recipients, separated by commas. Unlike BCC recipients, CC recipients are visible to everyone who receives the message. Their opens, clicks, and bounces count toward your message metrics. CC recipients count toward the limit of 15 total recipients across the `to`, `cc`, and `bcc` keys.
  - `bcc` string — Blind copy message recipients. Supports multiple addresses separated by commas. Your request can contain up to 15 total recipients between the `to`, `cc`, and `bcc` keys.
  - `fake_bcc` boolean — If true, rather than sending true copies to BCC addresses, Customer.io sends a copy of the message with the subject line containing the recipient address(es).
  - `reply_to` string — The address that recipients can reply to, if different from the `from` address.
  - `preheader` string — Also known as "preview text", this is the block block of text that users see next to, or underneath, the subject line in their inbox.
  - `attachments` Attachments — A dictionary of attachments where the filename is the key and the value is the base64-encoded contents. The filename must include the extension (i.e. `name.csv`). The total size of all attachments must be less than 2 MB.
    - `<file-name>` string, base64
  - `headers` string, json — A JSON string containing header objects with `name` and `value`. Names and values must be strings, with no non-ASCII characters or spaces. You can't overwrite reserved headers.
  - `disable_css_preprocessing` boolean — Set to `true` to disable CSS preprocessing. This setting overrides the CSS preprocessing setting on the `transactional_message_id` as set in the user interface. Transactional emails have CSS preprocessing enabled by default.
  - `tracked` boolean — If true, Customer.io tracks opens and link clicks in your message.

## Response `200`

Returns a unique ID for the delivery.

- object
  - `delivery_id` string — A unique identifier for the message.
  - `queued_at` integer — A Unix timestamp for when Customer.io accepted and queued your request. For scheduled messages (using `send_at`), this is when we received your request, not when the message sends.
  - `send_at` integer — For a scheduled message, the Unix timestamp when the message is set to send. Returned only when you provide a future `send_at`.

## Other responses

- `400` — The request was malformed or the attachment is not base64-encoded.
- `403` — Your attachment is not in a recognized format.
- `413` — This typically means your attachment exceeds the size limit.

---

[API](https://skmtc.dev/customer/apis/customer-io-journeys-api-reference.md) · [All operations](https://skmtc.dev/customer/apis/customer-io-journeys-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/customer/customer-io-journeys-api-reference/revisions/4b391af7cb06/schema)
