Update a letter's tags
POST
/api/v3/letters/{letterUuid}/tags
const url = 'https://api.tryletterhead.com/api/v3/letters/example/tags';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"tags":["movies","weekend-picks"]}'};
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/example/tags \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "tags": [ "movies", "weekend-picks" ] }'Replace the full set of newsletter tags applied to a letter. This is the narrower alternative
updateALetter points to when you only need to change tags rather than round-tripping the whole
letter.
This is a full replace: pass every tag name the letter should carry, including ones you’re keeping. Send an empty array to clear all tags. Tag names not already in the company’s tag catalog are created as new tags.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” letterUuid
required
string
The letter’s unique identifier — an alphanumeric string around ten characters, e.g. ludctamgd6.
Request Body required
Section titled “Request Body required ” Media type application/json
object
tags
required
The full list of tag names this letter should carry. Send [] to clear all tags.
Array<string>
Example
{ "tags": [ "movies", "weekend-picks" ]}Responses
Section titled “ Responses ”Tags updated
Still can’t find what you need? Contact support.