by Customer.io
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.
Updated Sep 27, 2026
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.
Note: 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)
- 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 anything else, confirm access with the cheapest read-only call, like a list or a search. Never send or change anything to test access.
Rules
- Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
- Never print API keys.