Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Manual tags

Create a new upload tag

Body parameters

type string Required

Must be exactly "upload_tag".

attributes.name string Required

The tag name

Example: "Pictures of me"

Returns

Returns a resource object of type upload_tag.

Examples

POST https://site-api.datocms.com/upload-tags HTTP/1.1
Authorization: Bearer YOUR-API-TOKEN
Accept: application/json
X-Api-Version: 3
Content-Type: application/vnd.api+json
{
"data": {
"type": "upload_tag",
"attributes": {
"name": "Pictures of me"
}
}
}
Terminal window
curl -g 'https://site-api.datocms.com/upload-tags' \
-X POST \
-H "Authorization: Bearer YOUR-API-TOKEN" \
-H "Accept: application/json" \
-H "X-Api-Version: 3" \
-H "Content-Type: application/vnd.api+json" \
--data-binary '{"data":{"type":"upload_tag","attributes":{"name":"Pictures of me"}}}'
await fetch("https://site-api.datocms.com/upload-tags", {
method: "POST",
headers: {
Authorization: "Bearer YOUR-API-TOKEN",
Accept: "application/json",
"X-Api-Version": "3",
"Content-Type": "application/vnd.api+json",
},
body: JSON.stringify({
data: { type: "upload_tag", attributes: { name: "Pictures of me" } },
}),
});
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: cache-control: max-age=0, private, must-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 28
{
"data": {
"type": "upload_tag",
"id": "42",
"attributes": {
"name": "Pictures of me"
}
}
}