Tags
Tags are a special part of content piece metadata that can be used for labelling, organization and content filtering. The API provides you full control to retrieve and manage tags.
Retrieve Tag
Retrieves details of the tag specified by ID.
ID of the tag
ID of the tag
Label assigned to the tag
Color assigned to the tag
grayredpinkorangeamberpurpleindigobluecyangreenteallimefuchsiaemerald
curl --request GET \
--url "https://api.vrite.io/tags?id={ID}" \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Accept: application/json'
const client = createClient({
token: "<API_TOKEN>",
});
const result = await client.tags.get({
id: "e99b9c3fadd9d6bcfc066627"
});
{
"id": "e99b9c3fadd9d6bcfc066627",
"label": "string",
"color": "gray"
}
List Tags
Lists existing tags. Supports pagination.
The number of tags to return per page
The page number to fetch
ID of the tag
Label assigned to the tag
Color assigned to the tag
grayredpinkorangeamberpurpleindigobluecyangreenteallimefuchsiaemerald
curl --request GET \
--url "https://api.vrite.io/tags/list" \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Accept: application/json'
const client = createClient({
token: "<API_TOKEN>"
});
const result = await client.tags.list({
// Optional
page: 1,
// Optional
perPage: 20,
});
[
{
"id": "f78094391d99f69e2a617086",
"label": "string",
"color": "gray"
}
]
Create Tag
Creates a tag with specified label and color.
Label assigned to the tag
Color assigned to the tag Default: `gray`
grayredpinkorangeamberpurpleindigobluecyangreenteallimefuchsiaemerald
ID of the tag
curl --request POST \
--url "https://api.vrite.io/tags" \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"label": "{LABEL}"
}'
const client = createClient({
token: "<API_TOKEN>",
});
const result = await client.tags.create({
label: "string",
// Optional
color: "orange",
});
{
"id": "2a8ace5b5814e98d68f6b607"
}
Update Tag
Updates the color or label of the tag matched by ID.
ID of the tag
Label assigned to the tag
Color assigned to the tag Default: `gray`
grayredpinkorangeamberpurpleindigobluecyangreenteallimefuchsiaemerald
curl --request PUT \
--url "https://api.vrite.io/tags" \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"id": "{ID}"
}'
const client = createClient({
token: "<API_TOKEN>",
});
await client.tags.update({
id: "89b03aff4112d83c5c080daa",
// Optional
label: "string",
// Optional
color: "gray",
});
Delete Tag
Deletes the tag specified by ID, removing it from all content pieces and variants that it was assigned to.
ID of the tag
curl --request DELETE \
--url "https://api.vrite.io/tags?id={ID}" \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Accept: application/json'
const client = createClient({
token: "<API_TOKEN>",
});
await client.tags.delete({
id: "89b03aff4112d83c5c080daa",
});