Loading...
Skip to main content

POST /lists/:list_id/subscriptions

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

Method: POST

Path Parameters

list_idstringrequired
A unique identifier associated with the list you wish to retrieve.

Body Parameters

recipientsarray
An array of list subscriptions
+ Show Properties

Responses

status: 204 Successfully subscribed

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/lists/example.list.id/subscriptions \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '
{
"recipients": [
{
"recipientId": "0460766e-8463-4905-ae98-b72c7aef41d6"
}
]
}
'

Responses Example

Empty
{
"message": "Error Message",
"type": "invalid_request_error"
}