All tools

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.

View on GitHub
Updated Sep 27, 2026Available asCLIAPI

Description

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.

send-transactional-email.md

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.

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)

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.

Built from these files in the repository

The layout and the rules come from lib/catalog/render-markdown.ts, the set-up wording from lib/catalog/render-access.ts.

Ways in

RouteSourceCallRequiredDocs
CLIOfficialcio send emailAPI key in $CIO_TOKENDocs
APIOfficialPOST /v1/send/emailAPI key in $CUSTOMERIO_API_KEYDocs

Workflows using Send a transactional email

No workflows yet
No published workflow uses Send a transactional email yet.