Skip to content
Menu
SilktideDevelopers

Update a tag

PUT/v1/tags/{tagId}
View as Markdown

Changes a tag's label, color or group. Wherever the tag is used, it shows the change at once.

Send the changes inside a tag object. A body without one fails with status 400. tagId and entityType are ignored if you send them: a tag keeps its id and type for good, so a renamed tag keeps its old id.

Like Create a tag, it refuses a label that another tag of the same type already has. Only the fields you change are checked, so a tag saved before a rule existed can be resaved as it is.

Request
curl -X PUT "https://api.eu.silktide.com/v1/tags/pre-production" \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "tag": {
    "label": "Staging",
    "tagGroup": "Environment"
  }
}'
Response: Rename a tag and give it a group
{
  "tag": {
    "tagId": "pre-production",
    "entityType": "section",
    "label": "Staging",
    "color": "#D08736",
    "tagGroup": "Environment"
  }
}

Request

Path parameters

  • tagIdstringrequired1 to 32 characters

    The tag.

Body

JSON, sent with Content-Type: application/json.

  • tagobjectrequired

    What to change. Leave out what should keep its value. tagId and entityType cannot change.

    Show 3 fields
    • labelstring1 to 127 characters

      The tag's name, as people see it.

    • colorstringup to 32 characters

      Its color, as a hex code such as #4256D6, or empty for none.

    • tagGroupstringup to 64 characters

      A group to show it in, such as Region. Tags with the same group are shown together. Empty for none.

Response

200JSON.

  • tagobjectrequired

    The tag, as it is now.

    Show 5 fields
    • tagIdstringrequired1 to 32 characters

      The tag's id. Use it in tagIds, and in the path of Update a tag and Delete a tag.

    • entityTypestringrequired

      What the tag is for: section for websites and their sections, document for documents, task for tasks. Each type has its own tags.

      One ofsectiondocumenttask

    • labelstringrequired

      The tag's name, as people see it.

    • colorstringrequired

      Its color, as a hex code such as #ED4B4B.

    • tagGroupstringrequired

      The group it is shown in, such as Region. Empty when it has none.

Errors

StatusTypeWhen
404ModelNotFoundNo tag with that id exists in the account.
403AccessDeniedThe API key's user cannot admin the account.
400InvalidRequestThe body has no tag object, or a changed field is not valid: label empty, longer than 127 characters or already used by another tag of the same entityType, color not a hex code, or tagGroup longer than 64 characters. properties.field names the field.
401NotLoggedInNo API key was sent, or it is not a key for this region.(any operation)
429TooManyRequestsToo many requests to this path in five seconds. Retry after the number of seconds in the Retry-After header, which properties.retryAfter repeats.(any operation)
503-Silktide is busy. Retry after the number of seconds in the Retry-After header.(any operation)

Every error has the same body. See Errors.

Access

Permission
Can admin this account
Plan feature
None
Edition
Silktide 4 and Silktide 5
Cost
Free
Available since
v1.0.0

Try it

Sends a real request to your account from this browser. Your key stays in this tab and goes only to the Silktide API.

This changes your account. It is not a sandbox.