Update a subscription
PUT
/api/v3/contacts/{email}/subscriptions/{channelSlug}
const url = 'https://api.tryletterhead.com/api/v3/contacts/example/subscriptions/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"api":true,"status":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.tryletterhead.com/api/v3/contacts/example/subscriptions/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "api": true, "status": 1 }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” email
required
string
The contact’s email address, URL-encoded.
channelSlug
required
string
The newsletter’s channel identifier (slug).
Request Body required
Section titled “Request Body required ” Media type application/json
object
api
Required. Set to true to authenticate with an API key.
boolean
status
integer
Example
{ "api": true, "status": 1}Responses
Section titled “ Responses ”Successful response
Still can’t find what you need? Contact support.