Let your AI agent send email, SMS, push, Slack, Teams, and in-app messages with one API or MCP call. Courier handles routing, preferences, and logs.
Updated Nov 6, 2026
Last updated: November 2026
Give your AI agent one tool that sends, and let a messaging platform handle the rest. With Courier, the agent calls one API or MCP tool with a template and a user ID. Courier picks the channel, applies the user's preferences, fails over between providers, and logs every delivery. Courier is the customer messaging platform for humans and AI agents: everything in the UI is available via the API, CLI, and MCP server.
An AI agent is good at deciding who to tell and when. It shouldn't also own how: provider keys, channel fallbacks, unsubscribes, and a record of what went out. A messaging layer gives your agent:
The fastest path. Courier hosts an MCP server at https://mcp.courier.com with 170+ tools across the Courier API. Your agent sends with send_message_template, passing a user_id and a published template.
claude mcp add --transport http courier https://mcp.courier.com --header api_key:YOUR_COURIER_API_KEYThen ask your agent:
With Courier MCP, send my nt_01kx4h2jdafq8bk9aftxak4b40 template to user_123 for build 1.4.2.The agent resolves the recipient, looks up the template, and sends. Courier documents the setup for Claude Code, Cursor, Codex, VS Code, Windsurf, and more. The MCP send tools take a user_id or a list_id, so save the user's profile first. The Send from an AI agent guide walks through it.
For an agent running in production, wrap one send call as a tool. You decide exactly what the agent can do: which templates, which recipients, which data.
import Courier from '@trycourier/courier';
const client = new Courier();
const response = await client.send.message({
message: {
to: { user_id: 'user_123' },
template: 'nt_01kx4h2jdafq8bk9aftxak4b40',
data: { name: 'Sarah Bennett' },
},
});
console.log(response.requestId);The same call in Python:
import os
from courier import Courier
client = Courier(
api_key=os.environ.get("COURIER_API_KEY"),
)
response = client.send.message(
message={
"to": {"user_id": "your_user_id"},
"template": "your_template_id",
"data": {"foo": "bar"},
},
)
print(response.request_id)Register it as a tool in your agent framework and keep template IDs on an allowlist, so the agent only sends messages your team approved. Step-by-step recipes: Claude Agent SDK, OpenAI Agents SDK, and Vercel AI SDK.
When one message isn't enough, the agent starts a journey: a multi-step flow with delays, branches, digests, and throttles, built on a visual canvas or through the API.
import Courier from '@trycourier/courier';
const client = new Courier();
const journeysInvokeResponse = await client.journeys.invoke('welcome-journey', {
user_id: 'user_123',
data: { order_id: 'ORD-9042', order_total: 49.99 },
});Inside a journey, an AI node runs a model as a step. It returns structured output that the next branch or template uses, so a model can score or classify a user before the journey decides what to send. AI nodes are on the Business and Enterprise plans.
Tell Courier which channels to try and in what order. single stops at the first channel that delivers; all sends on every channel in the list. The user's preferences apply on top.
import Courier from '@trycourier/courier';
const client = new Courier();
const { requestId } = await client.send.message({
message: {
to: { user_id: "user_123" },
template: "nt_01kx4h2jdafq8bk9aftxak4b40",
routing: {
method: "single",
channels: ["push", "email"],
},
},
});A user who never turned on push still gets the email.
Some calls shouldn't be automatic. The agent sends an approval request through Courier, and a person answers it where they already work:
Every Courier action button is a link to a URL you choose, or a callback in your app, so the answer comes back to you and your app resumes the agent. In the Inbox, it's one prop:
<CourierInbox
onMessageClick={({ message, index }) => openInApp(message)}
onMessageActionClick={({ message, action, index }) => handleAction(message, action)}
/>THROTTLED in the log instead of delivering.Idempotency-Key header, and a repeated request returns the original response instead of sending again.trace_message with a message ID or your own trace_id, and it gets each message's event history and status reason.See Courier for AI agents for Courier Skills, the CLI, and setup in every coding agent.
Start free with 10,000 sends a month, or run the AI agent quickstart to send your first test email in three steps.
FAQ
Keep exploring
One API, every channel
Courier gives you one API for email, SMS, push, and chat, with templates, routing, retries, and delivery logs built in.
Last updated Nov 6, 2026. Code samples are illustrative; provider APIs and pricing change over time, so check each provider’s docs before relying on them.