> This page is part of the [Customer.io documentation](https://docs.customer.io). For the complete index, see [llms.txt](https://docs.customer.io/llms.txt).
> Last updated: November 12, 2026
> To take actions in Customer.io from an agent, use the [Customer.io CLI](https://docs.customer.io/ai/cli/get-started.md) or the [MCP server](https://docs.customer.io/ai/mcp/get-started.md).

# Set up a transactional email

Transactional messages are email or push notifications that your audience implicitly opts-into, like a transaction receipt or a password reset request. You can send transactional messages programmatically through Customer.io.

New to transactional messaging?

Check out our [getting started](https://docs.customer.io/messaging/send/transactional/api/) section to learn more about transactional concepts and how our transactional API works.

## Before you begin

Before you can send transactional emails, you need to:

*   Confirm your registration email and [verify your account](https://docs.customer.io/accounts/account-verification/).
*   [Authenticate your sending domain](https://docs.customer.io/messaging/channels/email/deliverability/authentication/). If you configured a [custom SMTP server](https://docs.customer.io/messaging/channels/email/deliverability/custom-smtp/use-your-smtp-server/), [contact us](https://docs.customer.io/support/) to manually authenticate your sending domain.
*   Create a [private key](https://fly.customer.io/settings/api_credentials). This is the bearer token that you’ll use when calling the transactional API. Customer.io does not store private keys (only a hashed version) and you can restrict private keys to specific IP addresses for extra security. Existing App API keys also work.

**We also recommend that you use a different, specialized domain or subdomain for transactional messages**. A sending domain is the domain of the “From email address” when you send emails, and you can request that we add your transactional domain to our [specialized, transactional IP pool](https://docs.customer.io/messaging/send/transactional/api/#transactional-emails-have-their-own-ip-pool). Email providers like Gmail monitor the sending domain for unusual behavior and spam complaints. Separating your transactional domain from your marketing domain—something like `marketing.example.com` and `transactional.example.com`—prevents your marketing messages from affecting your critical transactional messages. [Learn more about domain reputation](https://docs.customer.io/messaging/channels/email/deliverability/best-practices/#ip-and-domain-reputation).

## Create a transactional email

Try our Postman collection!

You can use our [Postman ↗](https://www.getpostman.com/) collection and associated environment to get started with the Customer.io API. Our environment is based on our US endpoints; if you’re in our EU region, you’ll need to add `-eu` to `track_api_url` and `app_api_url` variables.

1.  Go to the **Transactional** page and click **Send your first message** or **Create message**—depending on whether there are already transactional messages in your workspace.

2.  Name your message and provide a description. These fields help your team members understand what kind of message this is (like “Password Reset Instructions”). You can also use the *Name* of your message instead of the `transactional_message_id` when you send your message.

     ![create_transactional_step1.png](https://docs.customer.io/images/image(552).png)

3.  Click **Add content** and set up your message. You’ll [choose your editor](https://docs.customer.io/messaging/channels/email/editors/choose/) or start from an existing email. When you build your email, you can personalize messages using attributes (`{{customer.<attribute>}}`) or API trigger data (`{{trigger.<data-object-property>}}`) to customize your message.

     ![create_transactional_step2.png](https://docs.customer.io/images/create_transactional_email_step2.png)

4.  Configure your message settings.

    *   **Send to unsubscribed people?** Unsubscribed people probably still want to receive your important transactional messages.

        [The FTC provides guidelines about what qualifies as a transactional message ↗](https://www.ftc.gov/business-guidance/resources/can-spam-act-compliance-guide-business), including what to do for messages that combine transactional and marketing content.

    *   **Enable open and link tracking?** Enable this setting if you need to know if people open or click links in your transactional messages.

    *   **Protect sensitive data by disabling message retention?** This setting prevents Customer.io from retaining your message content in delivery history and associated API calls. You might want to do this to conceal sensitive content, like password reset tokens.

    *   **Queue messages as drafts?** This setting generates a draft for every message you trigger, rather than sending them automatically. You can review these messages under the “Drafts” tab and decide whether to send or delete them.

    *   **Set a Trigger Name**: This is a friendly name for your message that you can use instead of the `transactional_message_id` when you send your message. It may help make your integration more human-readable if you use triggers that represent the kinds of messages you send—like `password reset` or `order confirmation`.

     ![configure your message's settings](https://docs.customer.io/images/transactional-configure-settings.png)

5.  To complete the setup, you need to call the API and trigger a message. If you’re not yet ready to send a message directly from your code, you can use an HTTP client like [Postman ↗](https://getpostman.com/) or send a cURL request from your terminal to test your message and complete the setup process.

 ![image.png](https://docs.customer.io/images/image(559).png)

## Identify recipients

When you send a message, you’ll specify who you’re sending your message to. If the person you want to send a message to doesn’t exist yet, we’ll create them for you. This lets you send transactional messages to people even when they haven’t signed up for your marketing messages.

You can identify recipients by their email address in the `to` field or with an `identifiers` block.

When `to` is a single literal email address, you don’t need to pass an `identifiers` block; we treat the address as the identifier. In every other case—`to` with multiple addresses, using liquid in the `to` field, or omitting `to` so you use your `transactional_message_id`’s templated recipient—you must include `identifiers`.

## Default `from` address

If you omit the `from` field in your request and the template you reference doesn’t have a `from` either, Customer.io falls back to your workspace’s default sender at render time. This requires at least one verified sending domain in your workspace; if your workspace has no verified domains, the request fails with a `400`. [Authenticate a sending domain](https://docs.customer.io/messaging/channels/email/deliverability/authentication/) before relying on this fallback.

## Auto-create transactional message records

If you’re working with [Our CLI tool](https://docs.customer.io/ai/cli/) or otherwise building your message from code, you can include the `auto_create` parameter along with a `transactional_message_id` string the first time you send a message.

Then you’ll include the `transactional_message_id` in subsequent sends to attribute metrics to the same “message” in Customer.io.

If you don’t include a `transactional_message_id` in your request, Customer.io attributes metrics to `"transactional_message_id": 1`. And, if you send different kinds of messages with the same `transactional_message_id`, they’ll all roll up under that single ID in your metrics, making it difficult to see metrics for each type of message.

**Transactional messages created with `auto_create` don’t contain message content.** You’ll pass full message payload (the `body`, `subject`, and `from` fields) with *every* send. If you want to store message content in Customer.io, you’ll need to use our UI or work with [our command line interface (CLI)](https://docs.customer.io/ai/cli/) to populate your template with message content.

## Examples and API parameters

Below is a basic transactional email payload, followed by the full list of parameters. Your payload changes based on whether you reference a `transactional_message_id` (a template) or not. See our [REST API](https://docs.customer.io/integrations/api/app/tag/send-messages/sendEmail/) documentation for the full reference, including code samples in cURL and several languages.

```
{
  "transactional_message_id": 44,
  "to": "cool.person@example.com",
  "subject": "Did you really login from a new location?",
  "identifiers": {
    "email": "cool.person@example.com"
  },
  "message_data": {
    "password_reset_token": "abcde-12345-fghij-d888",
    "account_id": "123dj"
  },
  "send_to_unsubscribed": true,
  "tracked": true,
  "disable_css_preprocessing": true
}
```

*   tostringrequired

    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.

*   attachmentsobject

    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 base64-encoded contents of all your attachments can total up to 2MB.

    *   <file-name>string(base64)

*   auto\_createboolean

    Default: `false`

    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](https://docs.customer.io/journeys/transactional-email/#auto-create-transactional-message-records).

*   bccstring

    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.

*   bodystring

    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\_ampstring

    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](https://docs.customer.io/journeys/channels/email/layouts/amp-for-email/) first.

*   body\_plainstring

    The plaintext body of your message. If you provide `transactional_message_id`, this overrides the template's plaintext body.

*   ccstring

    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.

*   disable\_css\_preprocessingboolean

    Default: `false`

    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.

*   disable\_message\_retentionboolean

    Default: `false`

    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`.

*   fake\_bccboolean

    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).

*   fromstring

    The address your email is from. It must be a [verified sender](https://docs.customer.io/journeys/channels/email/deliverability/authentication/). Quote any display name, like `\"Person\"` . This overrides the template's sender; omit it to use the template or your workspace default.

*   headersobject

    Custom headers to add to the email, as an object of header names and string values. Names can contain only letters, numbers, hyphens, and underscores. You can't overwrite reserved headers.

    *   additional properties \*string

*   identifiersone of

    Identifies the person represented by your transactional message by one of, and only one of, `id`, `email`, or `cio_id`.

    One of:idemailcio\_id

    *   idstringrequired

        The identifier for the person represented by the transactional message. **NOTE**: If your workspace identifies people by email, use the `email` identifier instead.

*   languagestring

    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](https://docs.customer.io/journeys/channels/localization/getting-started/#supported-languages).

*   message\_dataobject

    An object containing the key-value pairs referenced using liquid in your message.

    *   Liquid Data \*any type

        Insert key-values that you want to reference in your message here.

*   preheaderstring

    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.

*   queue\_draftboolean

    Default: `false`

    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.

*   reply\_tostring

    The address that recipients can reply to, if different from the `from` address.

*   send\_atinteger

    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.

*   send\_to\_unsubscribedboolean

    Default: `true`

    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`.

*   subjectstring

    The subject line for your message. If you provide `transactional_message_id`, this overrides the template's subject.

*   trackedboolean

    Default: `true`

    If true, Customer.io tracks opens and link clicks in your message.

*   transactional\_message\_idone of

    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).

    One of:ID (integer)Trigger Name (string)

    The ID of the transactional message you want to send.

    integer

## Update the content of your email

You can update the contents of your message through our user interface or API.

We’ve exposed [an API endpoint](https://docs.customer.io/integrations/api/app/tag/transactional/updateTransactional/) so you can manage your message contents programmatically. This request takes a `body`, which represents the complete HTML content of your message.

You’ll reference the message you want to update by `transactional_id` and `content_id`. You can find both in the URL when you look at the content of a message in the format `https://fly.customer.io/messaging/env/last/composer/transactional/:transactional_message_id/templates/:content_id`. For example, if I look at a transactional message with this URL: `https://fly.customer.io/messaging/env/last/composer/transactional/3/templates/139`, then the `transactional_id` is 3 and the `content_id` is 139.

```
curl --request PUT \
  --url https://api.customer.io/v1/transactional/{transactional_id}/content/{content_id} \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"body":"string"}'
```

Did you just update a snippet?

If you just updated a [snippet](https://docs.customer.io/messaging/liquid/snippets/) used in your messages, make sure you wait a couple of minutes before activating your workflow to ensure all updates appear in your delivered messages.
