Skip to main content

POST /bulk

Bulk processing allows executing multiple job definitions across arbitrarily large set of input.

New to bulk processing? Check this tutorial to start sending bulk notifications in seconds.

POSThttps://api.courier.com/bulk
Create a Bulk Job
BODY PARAM
messageobjectrequired
Message definition for the job
eventstring
A unique identifier that can be mapped to an individual Notification. This could be the "Notification ID” on Notification detail pages (see the Notifications page in the Courier app) or a custom string mapped to the event in settings.
brandstring
A unique identifier that represents the brand that should be used for rendering the notification.
datajson
An object that includes any data you want to pass to a message template. The data will populate the corresponding template variables.
overridejson
An object that is merged into the request sent by Courier to the provider to override properties or to gain access to features in the provider API that are not natively supported by Courier.
templatestring
A notification template id or event mapping from Courier Studio. Either this or content must be specified.
brand_idstring
A unique identifier that represents the brand that should be used for rendering the notification. Note that a brand_id will only be applied to a Template message.
routingobject
Allows you to customize which channel(s) Courier will potentially deliver the message. If no routing key is specified, Courier will use the default routing configured in the Courier Studio UI.
methodstring
The method for selecting channels to send the message with. Value can be either 'single' or 'all'. If not provided will default to 'single'
channelsarray
An array of valid channel identifiers (like email, push, sms, etc.) and additional routing nodes.
channelsrecord
A map of valid channel identifiers (e.g. email, sms, etc.) to channel configuration objects whose properties are below. If you don't specify 'channels', Courier will use the default configuration for each channel as specified in the Courier Studio UI.
providersrecord
The providers object is a map of valid provider identifiers (e.g. twilio, slack, etc.) to provider configuration objects. If you don't specify providers, Courier will use the default configuration for each provider as specified in the Courier Studio UI.
metadataobject
eventstring
An arbitrary string to tracks the event that generated this request (e.g. 'signup').
tagsarray
An array of up to 9 tags you wish to associate with this request (and corresponding messages) for later analysis. Individual tags cannot be more than 30 characters in length.
trace_idstring
A unique ID used to correlate this request to processing on your servers. Courier does not verify the uniqueness of this ID.
utmobject
Identify the campaign that refers traffic to a specific website, and attributes the browser's website session.
campaignstring
contentstring
mediumstring
sourcestring
termstring
Responses
AUTH TOKEN
curl --request POST \
--url https://api.courier.com/bulk \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '
{
"message": {
"event": "EXAMPLE_NOTIFICATION",
"brand": "W50NC77P524K14M5300PGPEK4JMJ",
"data": {
"name": "Jane Doe",
"age": 27
}
}
}
'
Response Example
{
"jobId": "1-61e9dd53-b5bb6c863b7ffbe83ad4b28d"
}