Create one or more tags
/v1/tagsCreates 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.
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"
}
}'{
"tag": {
"tagId": "pre-production",
"entityType": "section",
"label": "Pre-production",
"color": "#D08736",
"tagGroup": ""
}
}Request
Body
JSON, sent with Content-Type: application/json.
tagobjectOne tag to create. Send this or
tags.Show 5 fieldsHide fields
tagIdstring1 to 32 charactersAn 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 charactersThe tag's name, as people see it.
entityTypestringrequiredWhat the tag is for:
sectionfor websites and their sections,documentfor documents,taskfor tasks. Each type has its own tags.One of
sectiondocumenttaskcolorstringup to 32 charactersIts color, as a hex code such as
#4256D6. Left out, Silktide picks one.tagGroupstringup to 64 charactersA group to show it in, such as
Region. Tags with the same group are shown together. Empty for none.
tagslist of objectsSeveral tags to create, in order. Send this or
tag; when both are sent, onlytagis created.Show 5 fieldsHide fields
tagIdstring1 to 32 charactersAn 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 charactersThe tag's name, as people see it.
entityTypestringrequiredWhat the tag is for:
sectionfor websites and their sections,documentfor documents,taskfor tasks. Each type has its own tags.One of
sectiondocumenttaskcolorstringup to 32 charactersIts color, as a hex code such as
#4256D6. Left out, Silktide picks one.tagGroupstringup to 64 charactersA group to show it in, such as
Region. Tags with the same group are shown together. Empty for none.
Response
200JSON.
tagobjectThe tag, when you sent
tag.Show 5 fieldsHide fields
tagIdstringrequired1 to 32 charactersThe tag's id. Use it in
tagIds, and in the path of Update a tag and Delete a tag.entityTypestringrequiredWhat the tag is for:
sectionfor websites and their sections,documentfor documents,taskfor tasks. Each type has its own tags.One of
sectiondocumenttasklabelstringrequiredThe tag's name, as people see it.
colorstringrequiredIts color, as a hex code such as
#ED4B4B.tagGroupstringrequiredThe group it is shown in, such as
Region. Empty when it has none.
tagslist of objectsThe tags, in the order sent, when you sent
tags. Empty whentagswas empty or neither was sent.Show 5 fieldsHide fields
tagIdstringrequired1 to 32 charactersThe tag's id. Use it in
tagIds, and in the path of Update a tag and Delete a tag.entityTypestringrequiredWhat the tag is for:
sectionfor websites and their sections,documentfor documents,taskfor tasks. Each type has its own tags.One of
sectiondocumenttasklabelstringrequiredThe tag's name, as people see it.
colorstringrequiredIts color, as a hex code such as
#ED4B4B.tagGroupstringrequiredThe group it is shown in, such as
Region. Empty when it has none.
Errors
| Status | Type | When |
|---|---|---|
| 403 | AccessDenied | The API key's user cannot admin the account. |
| 400 | InvalidRequest | A 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. |
| 401 | NotLoggedIn | No API key was sent, or it is not a key for this region.(any operation) |
| 429 | TooManyRequests | Too 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.