Add or update subscriptions in bulk
const url = 'https://api.tryletterhead.com/api/v3/contacts/example/subscriptions/bulk';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"channels":["weekly-digest","breaking-news"],"status":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tryletterhead.com/api/v3/contacts/example/subscriptions/bulk \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "channels": [ "weekly-digest", "breaking-news" ], "status": 1 }'Adds (or updates) several channel subscriptions for a contact in a single call. A new subscription is created for each channel the contact isn’t already subscribed to; for channels they already have, the subscription’s status is updated. The contact is identified by the {email} in the URL.
The same status is applied to every channel in the payload — this mirrors the “one audience status applies to every selected newsletter” rule in the Add-to-Newsletter modal.
Subscription status values
| Value | Status |
|---|---|
| 0 | Not subscribed |
| 1 | Subscribed |
| 2 | Unsubscribed |
| 3 | Cleaned |
| 4 | Subscribed (pending opt-in) |
| 5 | Admin pending opt-in |
| 6 | Pending re-engagement |
| 7 | Disengaged |
Returns the updated contact, including its full subscription list.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The email address of the contact whose subscriptions you’re managing.
Request Body required
Section titled “Request Body required ”object
Channel slugs to subscribe (preferred). 1–200 entries, each unique.
The subscription status to apply to every channel in the payload. See values below.
Example
{ "channels": [ "weekly-digest", "breaking-news" ], "status": 1}Responses
Section titled “ Responses ”Successful response
Still can’t find what you need? Contact support.