Skip to content
Letterhead Letterhead Letterhead Help Center
Admin Tools

Add or update subscriptions in bulk by contact key

POST
/api/v3/contacts/keyed/{contactKey}/subscriptions/bulk
curl --request POST \
--url https://api.tryletterhead.com/api/v3/contacts/keyed/example/subscriptions/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "channels": [ "example" ], "status": 1 }'

Same as Add or update subscriptions in bulk (POST /api/v3/contacts/{email}/subscriptions/bulk), with the contact addressed by its contactKey instead of its email address. 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 same status is applied to every channel in the payload. See the subscription status table on Add or update subscriptions in bulk.

contactKey
required
string

The contact’s opaque 64-character hex key.

Media type application/json
object
channels
required

Channel slugs to subscribe (preferred). 1–200 entries, each unique.

Array<string>
status
required

The subscription status to apply to every channel in the payload.

integer
Example generated
{
"channels": [
"example"
],
"status": 1
}

200 OK. Same shape as GET /api/v3/contacts/{email}.

Media type application/json
object
items

The contact, with its updated subscription list. Full field list under GET /api/v3/contacts/{email}.

object
message
string
total
integer
Example generated
{
"items": {},
"message": "example",
"total": 1
}

Still can’t find what you need? Contact support.