---
ref: tool:customer-io/send-transactional-email
name: Send a transactional email
company: company:customer-io
workflows: []
access: [cli, api]
tags: [capability:send-email, category:email, has:api, has:cli]
docs: https://docs.customer.io/integrations/api/app/tag/send-messages/sendEmail/
updated: 2026-09-27
---

# Send a transactional email

Sends one transactional email to a person, from a template filled with your message data or from a subject, body and sender you pass, creating the person if needed.

Pass `to`, the person's `identifiers` (one of `id`, `email` or `cio_id`) and a
`transactional_message_id`, the template's ID or trigger name, so metrics roll
up per message; `message_data` fills the template's Liquid. The CLI sends with
a service-account token and needs `--environment-id`, the workspace ID;
production code should send with an App API key.

## Set up

Use the first option your agent supports.

### CLI (official)

Install the command, then confirm it runs.

```sh
npm install -g @customerio/cli
cio --version
```

Run `cio send email`.

Set `$CIO_TOKEN` in your environment first (get a key: https://fly.customer.io/settings/api_credentials?keyType=service_accounts).

### API (official)

- Base URL: https://api.customer.io
- Endpoint: `POST /v1/send/email`
- Auth: send the header `Authorization: Bearer $CUSTOMERIO_API_KEY`
- Get a key: https://fly.customer.io/settings/api_credentials?keyType=app
- Docs: https://docs.customer.io/integrations/api/app/

Before doing anything else, make one read-only call to confirm access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
