Create a newsletter tag
POST
/api/v3/letters/tags
const url = 'https://api.tryletterhead.com/api/v3/letters/tags?api=true';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Product updates"}'};
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/letters/tags?api=true' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Product updates" }'Create a newsletter tag, scoped either to the whole company or to one channel.
Pass channelId to scope the new tag to that channel; omit it (or pass 0) to create a
company-wide tag instead. channelId addresses a channel by its internal numeric identifier
rather than its slug.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” api
required
boolean
When true, tells the endpoint you are authenticating with a company API key (the key you generate under a company’s administrative settings) rather than a logged-in user session. For API integrations you will almost always set this to true.
Request Body required
Section titled “Request Body required ” Media type application/json
object
name
required
The tag’s name (max 60 characters).
string
channelId
(optional) Internal numeric identifier of the channel to scope this tag to. Omit (or pass 0) for a company-wide tag.
integer
Example
{ "name": "Product updates"}Responses
Section titled “ Responses ”Newsletter tag created
Media type application/json
object
items
object
uniqueId
string
name
string
channelId
integer
message
string
total
integer
Example
{ "items": { "uniqueId": "t4kq9x2mle", "name": "Product updates", "channelId": 999999999 }, "message": "", "total": 10}Still can’t find what you need? Contact support.