import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
await client.lists.subscriptions.unsubscribeUser('user_id', { list_id: 'list_id' });{
"message": "<string>",
"type": "invalid_request_error"
}Delete a subscription to a list by list ID and user ID.
import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
await client.lists.subscriptions.unsubscribeUser('user_id', { list_id: 'list_id' });{
"message": "<string>",
"type": "invalid_request_error"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A unique identifier representing the list you wish to retrieve.
A unique identifier representing the recipient associated with the list