import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const response = await client.profiles.lists.subscribe('user_id', { lists: [{ listId: 'listId' }] });
console.log(response.status);{
"status": "SUCCESS"
}Subscribes the given user to one or more lists. If the list does not exist, it will be created.
import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const response = await client.profiles.lists.subscribe('user_id', { lists: [{ listId: 'listId' }] });
console.log(response.status);{
"status": "SUCCESS"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A unique identifier representing the user associated with the requested user profile.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
OPTED_IN, OPTED_OUT, REQUIRED Show child attributes
Show child attributes
OPTED_IN, OPTED_OUT, REQUIRED SUCCESS