younifyd
Menu

Create Tag

Create a new tag for the project

POST/projects/{projectId}/tags

Use it in a workflow

  1. Add a step and choose the Sanity connector.
  2. Pick the Create Tag action (under Projects).
  3. Fill in the fields below, then reference the result from later steps as {{createTag.response.data}}.

Request

Path parameters

projectIdstringrequired

The unique ID of the project.

Request body

Enter the body as JSON in the step's Body field.

titlestringrequired

The title of the tag.

namestringrequired

The name of the tag. It starts with a lowercase letter or digit, followed by 1 to 20 letters, digits, hyphens, or underscores. You can't rename a tag after you create it.

descriptionstring

The description of the tag.

metadataobject

A set of additional configuration options

tonestring

The color of your tag.

One ofdefaultprimarypositivecautioncriticaltransparent

json
{
  "title": "string",
  "name": "string",
  "description": "string",
  "metadata": {
    "tone": "default"
  }
}

Response

Returns 201 with an object. Read it in later steps with {{createTag.response.data.<field>}}.

namestring
titlestring
descriptionstring
metadataobject
tonestring

One ofdefaultprimarypositivecautioncriticaltransparent

datasetsarray<object>
namestring
aclModestring
json
{
  "name": "string",
  "title": "string",
  "description": "string",
  "metadata": {
    "tone": "default"
  },
  "datasets": [
    {
      "name": "string",
      "aclMode": "string"
    }
  ]
}

Need more? See the Sanity guide for connection setup and behaviour shared by every action.

Was this page helpful?
Create Tag — Sanity — Documentation