Skip to content
Letterhead Letterhead Letterhead Help Center
Admin Tools

Create a subscription by contact key

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

Same as Create a subscription (POST /api/v3/contacts/{email}/subscriptions), with the contact addressed by its contactKey instead of its email address. Requires status and either channel (a channel slug) or channelId (the channel’s numeric id, a legacy alternative — channel takes precedence when both are supplied).

contactKey
required
string

The contact’s opaque 64-character hex key.

Media type application/json
object
api

Required. Set to true to authenticate with an API key.

boolean
channel

A channel slug. Required unless channelId is supplied.

string
channelId

A channel’s numeric id (legacy alternative to channel).

integer
status
required
integer
Example generated
{
"api": true,
"channel": "example",
"channelId": 1,
"status": 1
}

201 Created. 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.