Skip to main content

Update an existing tag. The update will be applied wherever this tag is used.

Call signature

TypeScript
update(tag: IUpdateTag): Promise<Tag>;

Parameters

NameTypeDescription
tagIUpdateTagA tag-like object containing the minimum required fields to update a tag (id, groupId, value and one label)

Returns

A Promise that will resolve with the updated Tag

Remarks

Throws any error that is returned by the API for any unsuccessful request echoing the HTTP status returned from the API

Example

Update the value and label of an existing tag

TypeScript
const tag = await client.tags.update({
    id: "109eb3e9-98c9-5ab2-b9df-f1c80af3ac5c",
    groupId: "topics",
    value: "publications",
    label: { "en-GB": "Publications" }
});

console.log(`Successfully updated tag to version ${tag.version.versionNo}`);

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request