Rename a newsletter tag
PATCH
/api/v3/letters/tags/{uniqueId}
const url = 'https://api.tryletterhead.com/api/v3/letters/tags/example?api=true';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Product announcements"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url 'https://api.tryletterhead.com/api/v3/letters/tags/example?api=true' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Product announcements" }'Rename a newsletter tag in place. Letters that already had the tag applied keep it — only its display name changes.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” uniqueId
required
string
The tag’s unique identifier, from List newsletter tags or Create a newsletter tag.
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 new name (max 60 characters).
string
Example
{ "name": "Product announcements"}Responses
Section titled “ Responses ”Newsletter tag renamed
Media type application/json
object
items
object
uniqueId
string
name
string
channelId
integer
message
string
total
integer
Example
{ "items": { "uniqueId": "t4kq9x2mle", "name": "Product announcements", "channelId": 999999999 }, "message": "", "total": 10}Still can’t find what you need? Contact support.