Courier Send API
The Send API from Courier — 1 operation(s) for send.
The Send API from Courier — 1 operation(s) for send.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/courier-send-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Courier Audiences Send API
description: The Courier REST API.
version: '1.0'
servers:
- url: https://api.courier.com
description: Production
tags:
- name: Send
paths:
/send:
post:
description: Send a message to one or more recipients.
operationId: send
tags:
- Send
parameters: []
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SendMessageResponse'
examples:
Example1:
value:
requestId: 1-65f240a0-47a6a120c8374de9bcf9f22a
summary: Send a message
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
message:
$ref: '#/components/schemas/Message'
description: Defines the message to be delivered
required:
- message
examples:
Example1:
summary: Send message with UserRecipient
description: Default example using UserRecipient type
value:
message:
to:
user_id: user_id
template: template_id
data:
foo: bar
Example2:
value:
message:
to:
email: user@example.com
template: template_id
data:
foo: bar
Example3:
value:
message:
to:
phone_number: '+1234567890'
template: template_id
data:
foo: bar
Example4:
value:
message:
to:
list_id: example_list
template: template_id
data:
foo: bar
Example5:
value:
message:
to:
user_id: example_user
content:
title: Hello {name}
body: How are you?
data:
name: Ben
routing:
method: single
channels:
- email
components:
schemas:
WebhookMethod:
title: WebhookMethod
type: string
enum:
- POST
- PUT
AudienceRecipient:
title: Audience Recipient
description: Send to all users in an audience
type: object
properties:
audience_id:
type: string
description: A unique identifier associated with an Audience. A message will be sent to each user in the audience.
data:
$ref: '#/components/schemas/MessageData'
filters:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/AudienceFilter'
required:
- audience_id
MessageRouting:
title: MessageRouting
type: object
properties:
method:
$ref: '#/components/schemas/MessageRoutingMethod'
channels:
type: array
items:
$ref: '#/components/schemas/MessageRoutingChannel'
required:
- method
- channels
BaseMessage:
title: BaseMessage
type: object
properties:
template:
type:
- string
- 'null'
data:
$ref: '#/components/schemas/MessageData'
brand_id:
type:
- string
- 'null'
channels:
$ref: '#/components/schemas/MessageChannels'
description: 'Define run-time configuration for channels. Valid ChannelId''s: email, sms, push, inbox, direct_message, banner, webhook.'
context:
$ref: '#/components/schemas/MessageContext'
metadata:
$ref: '#/components/schemas/MessageMetadata'
preferences:
$ref: '#/components/schemas/MessagePreferences'
providers:
$ref: '#/components/schemas/MessageProviders'
routing:
$ref: '#/components/schemas/Routing'
timeout:
$ref: '#/components/schemas/Timeout'
delay:
$ref: '#/components/schemas/Delay'
expiry:
$ref: '#/components/schemas/Expiry'
ElementalContent:
title: ElementalContent
type: object
properties:
version:
type: string
description: For example, "2022-01-01"
elements:
type: array
items:
$ref: '#/components/schemas/ElementalNode'
required:
- version
- elements
ElementalTextNode:
title: ElementalTextNode
type: object
description: Represents a body of text to be rendered inside of the notification.
properties:
content:
type: string
description: 'The text content displayed in the notification. Either this
field must be specified, or the elements field'
align:
$ref: '#/components/schemas/TextAlign'
description: Text alignment.
text_style:
$ref: '#/components/schemas/TextStyle'
description: Allows the text to be rendered as a heading level.
color:
type:
- string
- 'null'
description: Specifies the color of text. Can be any valid css color value
bold:
type:
- string
- 'null'
description: Apply bold to the text
italic:
type:
- string
- 'null'
description: Apply italics to the text
strikethrough:
type:
- string
- 'null'
description: Apply a strike through the text
underline:
type:
- string
- 'null'
description: Apply an underline to the text
locales:
$ref: '#/components/schemas/Locales'
description: Region specific content. See [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/) for more details.
format:
type:
- string
- 'null'
enum:
- markdown
required:
- content
- align
allOf:
- $ref: '#/components/schemas/ElementalBaseNode'
ElementalHtmlNode:
title: ElementalHtmlNode
type: object
description: Raw HTML string inside an Elemental document. When rendering a message, this node is turned into output only for the email channel; for other channels it produces no blocks.
properties:
content:
type: string
description: Raw HTML string to render inside the notification.
locales:
$ref: '#/components/schemas/Locales'
description: Region-specific `content` overrides. See [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/) for more details.
required:
- content
allOf:
- $ref: '#/components/schemas/ElementalBaseNode'
Delay:
title: Delay
type: object
properties:
duration:
type:
- integer
- 'null'
description: The duration of the delay in milliseconds.
until:
type:
- string
- 'null'
description: ISO 8601 timestamp or opening_hours-like format.
timezone:
type:
- string
- 'null'
description: IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Used when resolving opening hours expressions. Takes precedence over user profile timezone settings.
Slack:
title: Slack
oneOf:
- $ref: '#/components/schemas/SendToSlackChannel'
- $ref: '#/components/schemas/SendToSlackEmail'
- $ref: '#/components/schemas/SendToSlackUserId'
PagerdutyRecipient:
title: PagerDuty Recipient
description: Send via PagerDuty
type: object
properties:
pagerduty:
$ref: '#/components/schemas/Pagerduty'
required:
- pagerduty
SendMessageResponse:
title: SendMessageResponse
type: object
properties:
requestId:
type: string
description: 'A successful call to `POST /send` returns a `202` status code along with a `requestId` in the response body.
For single-recipient requests, the `requestId` is the derived message_id. For multiple recipients, Courier assigns a unique message_id to each derived message.'
example: 1-65f240a0-47a6a120c8374de9bcf9f22c
required:
- requestId
ElementalQuoteNode:
title: ElementalQuoteNode
type: object
description: Renders a quote block.
properties:
content:
type: string
description: The text value of the quote.
align:
$ref: '#/components/schemas/IAlignment'
description: Alignment of the quote.
borderColor:
type:
- string
- 'null'
description: CSS border color property. For example, `#fff`
text_style:
$ref: '#/components/schemas/TextStyle'
locales:
$ref: '#/components/schemas/Locales'
description: Region specific content. See [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/) for more details.
required:
- content
- text_style
- locales
allOf:
- $ref: '#/components/schemas/ElementalBaseNode'
SendToMsTeamsConversationId:
title: SendToMsTeamsConversationId
type: object
properties:
tenant_id:
type: string
service_url:
type: string
conversation_id:
type: string
required:
- tenant_id
- service_url
- conversation_id
SlackRecipient:
title: Slack Recipient
description: Send via Slack (channel, email, or user_id)
type: object
properties:
slack:
$ref: '#/components/schemas/Slack'
required:
- slack
ListFilter:
title: ListFilter
type: object
properties:
operator:
type: string
enum:
- MEMBER_OF
description: Send to users only if they are member of the account
path:
type: string
enum:
- account_id
value:
type: string
required:
- operator
- path
- value
ElementalNode:
title: ElementalNode
oneOf:
- type: object
allOf:
- type: object
properties:
type:
type: string
enum:
- text
- $ref: '#/components/schemas/ElementalTextNode'
required:
- type
- type: object
allOf:
- type: object
properties:
type:
type: string
enum:
- meta
- $ref: '#/components/schemas/ElementalMetaNode'
required:
- type
- type: object
allOf:
- type: object
properties:
type:
type: string
enum:
- channel
- $ref: '#/components/schemas/ElementalChannelNode'
required:
- type
- channel
- type: object
allOf:
- type: object
properties:
type:
type: string
enum:
- image
- $ref: '#/components/schemas/ElementalImageNode'
required:
- type
- type: object
allOf:
- type: object
properties:
type:
type: string
enum:
- action
- $ref: '#/components/schemas/ElementalActionNode'
required:
- type
- type: object
allOf:
- type: object
properties:
type:
type: string
enum:
- divider
- $ref: '#/components/schemas/ElementalDividerNode'
required:
- type
- type: object
allOf:
- type: object
properties:
type:
type: string
enum:
- quote
- $ref: '#/components/schemas/ElementalQuoteNode'
required:
- type
- type: object
allOf:
- type: object
properties:
type:
type: string
enum:
- html
- $ref: '#/components/schemas/ElementalHtmlNode'
required:
- type
ElementalChannelNode:
title: ElementalChannelNode
type: object
description: "The channel element allows a notification to be customized based on which channel it is sent through. \nFor example, you may want to display a detailed message when the notification is sent through email, \nand a more concise message in a push notification. Channel elements are only valid as top-level \nelements; you cannot nest channel elements. If there is a channel element specified at the top-level \nof the document, all sibling elements must be channel elements.\nNote: As an alternative, most elements support a `channel` property. Which allows you to selectively \ndisplay an individual element on a per channel basis. See the \n[control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/) for more details."
properties:
channel:
type: string
example: email
description: 'The channel the contents of this element should be applied to. Can be `email`,
`push`, `direct_message`, `sms` or a provider such as slack'
raw:
type:
- object
- 'null'
additionalProperties: true
description: Raw data to apply to the channel. If `elements` has not been specified, `raw` is required.
allOf:
- $ref: '#/components/schemas/ElementalBaseNode'
ChannelPreference:
title: ChannelPreference
type: object
properties:
channel:
$ref: '#/components/schemas/ChannelClassification'
required:
- channel
SendToMsTeamsUserId:
title: SendToMsTeamsUserId
type: object
properties:
tenant_id:
type: string
service_url:
type: string
user_id:
type: string
required:
- tenant_id
- service_url
- user_id
Message:
title: Message
oneOf:
- $ref: '#/components/schemas/ContentMessage'
ProfilePreferences:
title: ProfilePreferences
type: object
properties:
categories:
$ref: '#/components/schemas/Preferences'
notifications:
$ref: '#/components/schemas/Preferences'
templateId:
type:
- string
- 'null'
required:
- notifications
MsTeamsRecipient:
title: MS Teams Recipient
description: Send via Microsoft Teams
type: object
properties:
ms_teams:
$ref: '#/components/schemas/MsTeams'
required:
- ms_teams
ElementalBaseNode:
title: ElementalBaseNode
type: object
properties:
channels:
type:
- array
- 'null'
items:
type: string
ref:
type:
- string
- 'null'
if:
type:
- string
- 'null'
loop:
type:
- string
- 'null'
Content:
title: Content
oneOf:
- $ref: '#/components/schemas/ElementalContentSugar'
- $ref: '#/components/schemas/ElementalContent'
SendToMsTeamsChannelId:
title: SendToMsTeamsChannelId
type: object
properties:
tenant_id:
type: string
service_url:
type: string
channel_id:
type: string
required:
- tenant_id
- service_url
- channel_id
Timeout:
title: Timeout
type: object
properties:
provider:
type:
- object
- 'null'
additionalProperties:
type: integer
channel:
type:
- object
- 'null'
additionalProperties:
type: integer
message:
type:
- integer
- 'null'
escalation:
type:
- integer
- 'null'
criteria:
$ref: '#/components/schemas/Criteria'
MessageRoutingChannel:
title: MessageRoutingChannel
oneOf:
- type: string
- $ref: '#/components/schemas/MessageRouting'
UTM:
title: UTM
type: object
properties:
source:
type:
- string
- 'null'
medium:
type:
- string
- 'null'
campaign:
type:
- string
- 'null'
term:
type:
- string
- 'null'
content:
type:
- string
- 'null'
MessageContext:
title: MessageContext
type: object
properties:
tenant_id:
type:
- string
- 'null'
description: Tenant id used to load brand/default preferences/context.
TextStyle:
title: TextStyle
type: string
enum:
- text
- h1
- h2
- subtext
SendToSlackEmail:
title: SendToSlackEmail
type: object
properties:
access_token:
type: string
email:
type: string
required:
- access_token
- email
Preferences:
title: Preferences
type: object
additionalProperties:
$ref: '#/components/schemas/Preference'
SendToSlackChannel:
title: SendToSlackChannel
type: object
properties:
access_token:
type: string
channel:
type: string
required:
- access_token
- channel
Locales:
title: Locales
type:
- object
- 'null'
additionalProperties:
$ref: '#/components/schemas/Locale'
Pagerduty:
title: Pagerduty
type: object
properties:
routing_key:
type:
- string
- 'null'
event_action:
type:
- string
- 'null'
severity:
type:
- string
- 'null'
source:
type:
- string
- 'null'
Recipient:
title: Recipient
description: 'A single recipient of the message. Choose one of the following types based on how you want to identify the recipient: - **User**: Send to a specific user by user_id, email, or phone number - **Audience**: Send to all users in an audience - **List**: Send to all users in a list - **List Pattern**: Send to users in lists matching a pattern - **Slack**: Send via Slack (channel, email, or user_id) - **MS Teams**: Send via Microsoft Teams - **PagerDuty**: Send via PagerDuty - **Webhook**: Send via webhook'
oneOf:
- $ref: '#/components/schemas/UserRecipient'
- $ref: '#/components/schemas/AudienceRecipient'
- $ref: '#/components/schemas/ListRecipient'
- $ref: '#/components/schemas/ListPatternRecipient'
- $ref: '#/components/schemas/SlackRecipient'
- $ref: '#/components/schemas/MsTeamsRecipient'
- $ref: '#/components/schemas/PagerdutyRecipient'
- $ref: '#/components/schemas/WebhookRecipient'
discriminator:
propertyName: _type
mapping:
user: '#/components/schemas/UserRecipient'
audience: '#/components/schemas/AudienceRecipient'
list: '#/components/schemas/ListRecipient'
list_pattern: '#/components/schemas/ListPatternRecipient'
slack: '#/components/schemas/SlackRecipient'
ms_teams: '#/components/schemas/MsTeamsRecipient'
pagerduty: '#/components/schemas/PagerdutyRecipient'
webhook: '#/components/schemas/WebhookRecipient'
MessageChannels:
title: MessageChannels
type: object
additionalProperties:
$ref: '#/components/schemas/Channel'
Routing:
title: Routing
type: object
description: Customize which channels/providers Courier may deliver the message through.
properties:
method:
$ref: '#/components/schemas/RoutingMethod'
channels:
type: array
items:
$ref: '#/components/schemas/MessageRoutingChannel'
description: A list of channels or providers (or nested routing rules).
required:
- method
- channels
MsTeams:
title: MsTeams
oneOf:
- $ref: '#/components/schemas/SendToMsTeamsUserId'
- $ref: '#/components/schemas/SendToMsTeamsEmail'
- $ref: '#/components/schemas/SendToMsTeamsChannelId'
- $ref: '#/components/schemas/SendToMsTeamsConversationId'
- $ref: '#/components/schemas/SendToMsTeamsChannelName'
SendToSlackUserId:
title: SendToSlackUserId
type: object
properties:
access_token:
type: string
user_id:
type: string
required:
- access_token
- user_id
BaseMessageSendTo:
title: BaseMessageSendTo
type: object
properties:
to:
$ref: '#/components/schemas/MessageRecipient'
description: The recipient or a list of recipients of the message
ExpiresInType:
title: ExpiresInType
oneOf:
- type: string
- type: integer
WebhookProfile:
title: WebhookProfile
type: object
properties:
url:
type: string
description: The URL to send the webhook request to.
method:
$ref: '#/components/schemas/WebhookMethod'
description: The HTTP method to use for the webhook request. Defaults to POST if not specified.
headers:
type:
- object
- 'null'
additionalProperties:
type: string
description: Custom headers to include in the webhook request.
authentication:
$ref: '#/components/schemas/WebhookAuthentication'
description: Authentication configuration for the webhook request.
profile:
$ref: '#/components/schemas/WebhookProfileType'
description: Specifies what profile information is included in the request payload. Defaults to 'limited' if not specified.
required:
- url
Preference:
title: Preference
type: object
properties:
status:
$ref: '#/components/schemas/PreferenceStatus'
rules:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/Rule'
channel_preferences:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/ChannelPreference'
source:
$ref: '#/components/schemas/ChannelSource'
required:
- status
ElementalImageNode:
title: ElementalImageNode
type: object
description: Used to embed an image into the notification.
properties:
src:
type: string
description: The source of the image.
href:
type:
- string
- 'null'
description: A URL to link to when the image is clicked.
align:
$ref: '#/components/schemas/IAlignment'
description: The alignment of the image.
altText:
type:
- string
- 'null'
description: Alternate text for the image.
width:
type:
- string
- 'null'
description: CSS width properties to apply to the image. For example, 50px
required:
- src
allOf:
- $ref: '#/components/schemas/ElementalBaseNode'
Expiry:
title: Expiry
type: object
properties:
expires_at:
type:
- string
- 'null'
description: Epoch or ISO8601 timestamp with timezone.
expires_in:
$ref: '#/components/schemas/ExpiresInType'
description: Duration in ms or ISO8601 duration (e.g. P1DT4H).
required:
- expires_in
WebhookRecipient:
title: Webhook Recipient
description: Send via webhook
type: object
properties:
webhook:
$ref: '#/components/schemas/WebhookProfile'
required:
- webhook
TextAlign:
title: TextAlign
type: string
enum:
- left
- center
- right
ElementalMetaNode:
title: ElementalMetaNode
type: object
description: "The meta element contains information describing the notification that may \nbe used by a particular channel or provider. One important field is the title \nfield which will be used as the title for channels that support it."
properties:
title:
type:
- string
- 'null'
description: The title to be displayed by supported channels. For example, the email subject.
allOf:
- $ref: '#/components/schemas/ElementalBaseNode'
Metadata:
title: Metadata
type: object
properties:
utm:
$ref: '#/components/schemas/UTM'
x-stainless-naming:
csharp:
type_name: ProviderMetadata
RoutingMethod:
title: RoutingMethod
type: string
enum:
- all
- single
WebhookProfileType:
title: WebhookProfileType
type: string
enum:
- limited
- expanded
AudienceFilter:
title: AudienceFilter
type: object
properties:
operator:
type: string
enum:
- MEMBER_OF
description: Send to users only if they are member of the account
path:
type: string
enum:
- account_id
value:
type: string
required:
- operator
- path
- value
Channel:
title: Channel
type: object
properties:
brand_id:
type:
- string
- 'null'
description: Brand id used for rendering.
providers:
type:
- array
- 'null'
items:
type: string
description: Providers enabled for this channel.
routing_method:
$ref: '#/components/schemas/RoutingMethod'
description: Defaults to `single`.
if:
type:
- string
- 'null'
description: JS conditional with access to data/profile.
timeouts:
$ref: '#/components/schemas/Timeouts'
override:
type:
- object
- 'null'
additionalProperties: true
description: Channel specific overrides.
metadata:
$ref: '#/components/schemas/ChannelMetadata'
x-stainless-naming:
csharp:
type_name: MessageChannel
WebhookAuthMode:
title: WebhookAuthMode
type: string
enum:
- none
- basic
- bearer
MessageRoutingMethod:
title: MessageRoutingMethod
type: string
enum:
- all
- single
IActionButtonStyle:
title: IActionButtonStyle
type: string
enum:
- button
- link
ListPatternRecipient:
title: List Pattern Recipient
description: Send to users in lists matching a pattern
type: object
properties:
list_pattern:
type:
- string
- 'null'
data:
$ref: '#/components/schemas/MessageData'
UserRecipient:
title: User Recipient
description: Send to a specific user by user_id, email, phone_number, or list_id
type: object
properties:
user_id:
type:
- string
- 'null'
description: The user's unique identifier. Typically, this will match the user id of a user in your system.
account_id:
type:
- string
- 'null'
description: Deprecated - Use `tenant_id` instead.
context:
$ref: '#/components/schemas/MessageContext'
description: Context such as tenant_id to send the notification with.
data:
$ref: '#/components/schemas/MessageData'
email:
type:
- string
- 'null'
description: The user's email address.
locale:
type:
- string
- 'null'
description: The user's preferred ISO 639-1 language code.
phone_number:
type:
- string
- 'null'
description: The user's phone number.
list_id:
type:
- string
- 'null'
description: The id of the list to send the message to.
preferences:
$ref: '#/components/schemas/ProfilePreferences'
tenant_id:
type:
- string
- 'null'
description: The id of the tenant the user is associated with.
allOf:
- $ref: '#/components/schemas/UserRecipientType'
PreferenceStatus:
title: PreferenceStatus
type: string
enum:
- OPTED_IN
- OPTED_OUT
- REQUIRED
Timeouts:
title: Timeouts
type: object
properties:
provider:
type:
- integer
- 'null'
channel:
type:
- integer
- 'null'
x-stainless-naming:
csharp:
type_name: ChannelTimeouts
MessagePreferences:
title: MessagePreferences
type: object
properties:
subscription_topic_id:
type: string
description: The subscription topic to apply to the message.
required:
- subscription_topic_id
ChannelMetadata:
title: ChannelMetadata
type: object
properties:
utm:
$ref: '#/components/schemas/UTM'
MessageProviders:
title: MessageProviders
type: object
additionalProperties:
$ref: '#/components/schemas/MessageProvidersType'
ChannelClassification:
title: ChannelClassification
type: string
enum:
- direct_message
- email
- push
- sms
- webhook
- inbox
ContentMessage:
title: ContentMessage
type: object
description: The message property has the following primary top-level properties. They define the destination and content of the message.
properties:
content:
$ref: '#/components/schemas/Content'
description: Describes content that will work for email, inbox, push, chat, or any channel id.
allOf:
- $ref: '#/components/schemas/BaseMessage'
- $ref: '#/components/schemas/BaseMessageSendTo'
UserRecipientType:
title: UserRecipientType
type: object
properties: {}
ChannelSource:
title: ChannelSource
type: string
enum:
- subscription
- list
- recipient
MessageMetadata:
title: MessageMetadata
type: object
properties:
event:
type:
- string
- 'null'
tags:
type:
- array
- 'null'
items:
type: string
utm:
$ref: '#/components/schemas/UTM'
trace_id:
type:
- string
- 'null'
MessageProvidersType:
title: MessageProvidersType
type: object
properties:
override:
type:
- object
- 'null'
additionalProperties: true
description: Provider-specific overrides.
if:
type:
- string
- 'null'
description: JS conditional with access to data/profile.
timeouts:
type:
- integer
- 'null'
metadata:
$ref: '#/components/schemas/Metadata'
ListRecipient:
title: List
# --- truncated at 32 KB (36 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/courier/refs/heads/main/openapi/courier-send-api-openapi.yml