Loading...
Skip to main content

Create a bulk job

Create a Bulk Job

URL: https://api.courier.com/bulk

Method: POST

Body Parameters

messageobjectrequired
+ Show Properties

Responses

status: 201 CREATED

jobIdstring
A unique identifier associated with the bulk job.

status: 400 Bad Request

messagestring
A message describing the error that occurred.
typestring
[invalid_request_error] The type of error that occurred.

Request Example

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
}
}
}
'

Responses Example

{
"jobId": "1-61e9dd53-b5bb6c863b7ffbe83ad4b28d"
}
{
"message": "Error Message",
"type": "invalid_request_error"
}

Example

Method: POST

URL: https://api.courier.com/bulk

Body: ​

{
"message": {
"event": "abcdefgh12345678",
"brand": "W50NC77P524K14M5300PGPEK4JMJ",
"data": {
"name": "Jane Doe",
"age": 27
},
"routing": {
"method": "single"
},
"template": "NOTIFICATION_TEMPLATE"
}
}