Create a tag
Log in to add to favouritesCreate a new tag in a tag group
Call signature
create(tag: ICreateTag): Promise<Tag>;
Parameters
Name | Type | Description |
---|---|---|
tag | ICreateTag | A tag-like object containing the minimum required fields to create a tag (groupId , value and one label ) |
Returns
A Promise that will resolve with a created Tag
Remarks
Throws any error that is returned by the API for any unsuccessful request echoing the HTTP status returned from the API
Example
Create a new tag in a specific group with the minumum required fields
const tag = await client.tags.create({
groupId: "topics",
value: "books",
label: { "en-GB": "Books" }
});
console.log(`Successfully created tag`);