Skip to content
Menu
SilktideDevelopers

Create one or more tags

POST/v1/tags
View as Markdown

Creates tags. Send one as tag and get it back as tag, or send a list as tags and get a list back. Older documentation only showed tags.

A label must be unique among tags of the same entityType, so "Competitor" can be both a website tag and a task label. A tagId must be unique across the whole account. To put website tags on a website, send their ids as tagIds to Update a website.

A mistake fails with status 400 and type InvalidRequest, and properties.field names the field: a tagId or label already in use, a missing entityType, or a color that is not a hex code such as #4256D6. When you send tags, Silktide checks them all, against the account and against each other, before it creates any. If one is refused, properties.index says which, counting from 0, and none are created.

Request
curl -X POST "https://api.eu.silktide.com/v1/tags" \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "tag": {
    "label": "Pre-production",
    "entityType": "section"
  }
}'
Response: Create one tag for websites
{
  "tag": {
    "tagId": "pre-production",
    "entityType": "section",
    "label": "Pre-production",
    "color": "#D08736",
    "tagGroup": ""
  }
}

Request

Body

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

  • tagobject

    One tag to create. Send this or tags.

    Show 5 fields
    • tagIdstring1 to 32 characters

      An id of your own, unique in the account. Left out, Silktide makes one from the label, such as pre-production. Up to 32 letters, digits, hyphens or underscores; keep to lowercase, as it goes in URLs.

    • labelstringrequired1 to 127 characters

      The tag's name, as people see it.

    • 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

    • colorstringup to 32 characters

      Its color, as a hex code such as #4256D6. Left out, Silktide picks one.

    • tagGroupstringup to 64 characters

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

  • tagslist of objects

    Several tags to create, in order. Send this or tag; when both are sent, only tag is created.

    Show 5 fields
    • tagIdstring1 to 32 characters

      An id of your own, unique in the account. Left out, Silktide makes one from the label, such as pre-production. Up to 32 letters, digits, hyphens or underscores; keep to lowercase, as it goes in URLs.

    • labelstringrequired1 to 127 characters

      The tag's name, as people see it.

    • 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

    • colorstringup to 32 characters

      Its color, as a hex code such as #4256D6. Left out, Silktide picks one.

    • 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.

  • tagobject

    The tag, when you sent tag.

    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.

  • tagslist of objects

    The tags, in the order sent, when you sent tags. Empty when tags was empty or neither was sent.

    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
403AccessDeniedThe API key's user cannot admin the account.
400InvalidRequestA field is missing or not valid: entityType missing or not one of its values, label empty or longer than 127 characters, tagId not up to 32 letters, digits, hyphens or underscores, color not a hex code, or tagGroup longer than 64 characters. Also sent when the tagId is already in use, a tag of the same entityType already has that label, two tags in tags clash, or tag is not an object. properties.field names the field, and for tags properties.index names the item, counting from 0. Nothing is created.
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.