Loading...
Loading...
Use when building notifications with Courier across email, SMS, push, in-app inbox, Slack, Teams, and WhatsApp: sends, templates, Elemental, journeys, preferences, routing, CLI and MCP.
npx skill4agent add trycourier/courier-skills couriersend@trycourier/couriertrycourierclientmessage.to| Form | Sends to |
|---|---|
| A stored user profile. The usual case |
| An inline recipient, no profile required |
| Every subscriber of a list |
| Every list matching the pattern |
| A filter Courier evaluates and keeps current |
| An array of the above | Multiple recipients in one call, with a hard cap of 500 |
to400 message.to has N recipients. Max is 500tenant_idto.tenant_idmessage.context.tenant_id@trycourier/courierimport Courier from "@trycourier/courier";
// Reads process.env.COURIER_API_KEY by default
const client = new Courier();
await client.send.message({
message: {
to: { user_id: "user-123" }, // or { email }, { phone_number }, { list_id }, { audience_id }, etc.
template: "nt_01kmrbq6ypf25tsge12qek41r0", // OR content: { title, body } / { version, elements }
data: { /* merge variables */ },
},
}, {
headers: { "Idempotency-Key": "order-confirmation-12345" },
});trycourierfrom courier import Courier
# Reads COURIER_API_KEY from env by default
client = Courier()
client.send.message(
message={
"to": {"user_id": "user-123"},
"template": "nt_01kmrbq6ypf25tsge12qek41r0",
"data": {},
},
extra_headers={"Idempotency-Key": "order-confirmation-12345"},
)audiences auditEvents auth automations brands
digests inbound journeys lists messages
notifications profiles providers requests routingStrategies
send tenants translations users workspacePreferencesdigests.schedulesjourneys.templatesnotifications.checksproviders.cataloglists.subscriptionsprofiles.liststenants.templatestenants.preferences.itemsusers.preferencesusers.tenantsusers.tokensautomations.invokeworkspacePreferences.topicsauditEventsdigestsinboundrequests| Operation | Method |
|---|---|
| Archive a sent message | |
| Delete a provider | |
| Update a provider | |
| Subscribe a user to a list | |
| Set a user's topic preference | |
| Configure a provider | |
| Call | HTTP | Behavior |
|---|---|---|
| POST | Deep-merge, the everyday write |
| PATCH | JSON Patch (RFC 6902) |
| PUT | Full overwrite; omitted fields are removed |
nt_...nt_...2xxsendrequestIdrequestIdcourier messages list --trace-id "<requestId>"requestIdcourier messages history --message-id "<id>"courier messages content --message-id "<id>"| Status | Means |
|---|---|
| Accepted, not yet handed to a provider |
| Routing decided; ready to hand to a provider (transient) |
| Handed to the provider |
| Provider confirmed delivery |
| Engagement signals. Opens fire from image-proxy prefetch, don't build logic on them |
| Held by a digest, a delay, or a throttle rather than failing |
| The provider rejected or bounced it. Check |
| No channel/provider could accept it, usually missing contact info or provider config |
| The |
CANCELEDFILTEREDSIMULATEDinbox| Source | Use it for | Cost | Caveat |
|---|---|---|---|
Installed SDK types: | Ground truth for what exists in the version this project actually has | Free (local) | None. Most reliable check available. |
Docs page as markdown: append | Reading one specific page you can already name | ~1–2k tokens (98.9% smaller than the HTML) | Returns real |
Docs MCP: | Finding pages when you don't know the path. | search ~20k tokens; filesystem read ~2k | Complete and current, it indexes from nav, so newly shipped pages appear immediately. Prefer the filesystem tool over search once you know the path. |
API MCP ( | The live operation set and parameter shapes | Low | Tools can outlive a removed endpoint, see mcp.md. |
API reference: | Request/response schemas, error codes | Medium | Generated from the OpenAPI spec, so removals show up fast. |
| A cheap map of doc-page URLs by topic, useful to avoid guessing paths | ~16k tokens | Auto-generated from docs navigation, so it's complete, but it's grouped by nav tab and carries no API detail. A page being listed is not proof an endpoint exists. |
| Nothing, for coding work | ~530k tokens | Do not fetch. It's the entire docs corpus concatenated, use |
llms.txt| Working on | Read |
|---|---|
First notification / addressing ( | quickstart.md |
| Transactional: password reset, OTP, orders, receipts, dunning, appointments, security alerts | transactional.md |
| Lifecycle marketing: onboarding, adoption, engagement, win-back, referral, campaigns | lifecycle-marketing.md |
Multi-step sequences: delays, branches, batching, digests, A/B, cancellation. Also covers existing | journeys.md |
| Channel routing, fallbacks, escalation, provider failover | multi-channel.md |
| Idempotency, retries, delivery statuses, webhook verification | reliability.md |
| Preference topics, opt-out, preference centers, workspace preference sections | preferences.md |
| Scheduling a send: delay, exact timestamp, delivery windows (business/quiet hours) | scheduling.md |
Aggregation and digests ( | batching.md |
| Branding: logo, colors, email/in-app theme, attaching a brand to sends/tenants, sending unbranded | brands.md |
| Audiences: dynamic segments, filter rules, sending to a segment | audiences.md |
| Multi-tenant / B2B: tenants, per-tenant brand, preference defaults, tenant templates | tenants.md |
| Frequency caps, quiet hours, fatigue | throttling.md |
| Template CRUD, publishing, versioning, rollback, verify rendered output, locales | templates.md |
| Templates as code: manage templates from a repo, CI/CD, sync/drift detection, template aliases, promote between workspaces | templates-as-code.md |
| Exact SDK method names for an operation | sdk-reference.md, or read the installed package's own types |
| Elemental content format, elements, control flow | elemental.md |
| Localization: per-locale content, and AI Translation in Design Studio (add a language, AI translates every field) | elemental.md |
Routing strategies ( | routing-strategies.md |
| Configuring providers via API, catalog discovery | providers.md |
| Lists and bulk targeting (subscribe, list/pattern sends) | patterns.md |
| Reaching many recipients: list/audience fan-out, the 500 cap | patterns.md |
| Bulk API: jobs for a large ad-hoc recipient set, ingest then run | bulk.md |
| Webhooks both directions: outbound events to your endpoint, inbound events into Courier | webhooks.md |
| Debugging any delivery failure: start here | cli.md ( |
| MCP setup, API server to operate, docs server to look things up | mcp.md |
| Email: deliverability, SPF/DKIM/DMARC, sender config | email.md |
| SMS: 10DLC registration, character limits, sender setup | sms.md |
| Push: APNs/FCM setup, tokens, permission priming | push.md |
| Sending to the in-app inbox, content, actions, inbox+push | inbox.md |
| Rendering the inbox in your app: JWT auth, React / Web Components / React Native / iOS / Android / Flutter, read state, real-time | inbox/rendering.md |
| Slack, Block Kit, OAuth, bot setup | slack.md |
| Microsoft Teams, Adaptive Cards, connector/bot | ms-teams.md |
| WhatsApp, approved templates, 24-hour window | whatsapp.md |
search_courierbaseURLCOURIER_BASE_URL