Skip to main content

POST /lists/:list_id/subscriptions

POSThttps://api.courier.com/lists/:list_id/subscriptions
Subscribes additional recipients to the list (note: if the list does not exist, it will be automatically created).
PATH PARAMS
list_idstringrequired
A unique identifier associated with the list you wish to retrieve.
BODY PARAM
recipientsarray
An array of list subscriptions
Responses
AUTH TOKEN
curl --request POST \
--url https://api.courier.com/lists/example.list.id/subscriptions \
--header 'Accept: application/json'
Response Example
Empty

Example

Method: POST

URL: https://api.courier.com/lists/abcdefgh12345678/subscriptions

Body: ​

{
"recipientId": "0460766e-8463-4905-ae98-b72c7aef41d6",
"preferences": {
"notifications": {
"abcdefgh12345678": {
"channel_preferences": [
{
"channel": "direct_message"
}
],
"rules": [
{
"type": "snooze"
}
],
"status": "OPTED_IN"
}
},
"categories": {
"cooking": {
"channel_preferences": [
{
"channel": "direct_message"
}
],
"rules": [
{
"type": "snooze"
}
],
"status": "OPTED_IN"
}
}
}
}