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.