Tag
Last updated: June 22, 2026
A Tag is a short label that classifies Content or Media. Take a clothing store as an example: labels like "Bestsellers" and "New arrivals" are Tags. If you attach the same Tag to several Content or Media, you can later read or pick them out grouped by that label.
A Tag itself is a label that has only a name (name), and it is a settings resource with no publishing concept. Attaching it to something is not done by editing the Tag directly. Instead, you put this Tag's Refer into the metadata.tags of a Content or Media (see Attaching tags to Content and Media below). In CMA, a Tag is a sub-resource of Space, and its path is based on /spaces/{spaceId}/tags.
Resource structure
The following is the single-read response for the Tag "Bestsellers". It has sys (system properties) and the body property name.
{
"sys": {
"id": "3trmXRM3RqbgSnifyg7PLeuQQPP9Oe",
"type": "Tag",
"space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
"createdBy": { "sys": { "id": "3p4tcFbQRwz503VXdtHXNI5dZH5TVB", "type": "Refer", "targetType": "User" } },
"createdAt": "2026-06-16T01:46:07.426Z",
"updatedBy": { "sys": { "id": "3p4tcFbQRwz503VXdtHXNI5dZH5TVB", "type": "Refer", "targetType": "User" } },
"updatedAt": "2026-06-16T01:46:07.426Z",
"version": 1
},
"name": "Bestsellers"
}Key properties:
sys.id: The unique identifier of the Tag. It goes into{tagId}in the single-read, update, and delete paths, and it is also used as theRefertarget id when you attach the tag viametadata.tags.name: The name of the Tag (1-16 characters). It is the label itself that appears in content classification.
System properties (sys)
Every Tag carries common system properties in the sys object. space, createdBy, and updatedBy are in the Refer shape ({ "sys": { "id", "type": "Refer", "targetType" } }).
| Property | Type | Description |
|---|---|---|
id | string | Unique resource identifier. |
type | string | Resource kind. For a Tag this is always "Tag". |
space | Refer<Space> | The Space this Tag belongs to. |
createdBy | Refer<User> | The user who created it. |
createdAt | string (date-time) | Creation time. |
updatedBy | Refer<User> | The user who last updated it. |
updatedAt | string (date-time) | Last update time. |
version | integer (≥1) | Resource version. It increases by 1 with every change. |
Body property:
| Property | Type | Description |
|---|---|---|
name | string (1-16) | The Tag name. Specified on create and update. |
A Tag is a settings resource with no publishing concept. So unlike Content and Media, its sys has no publish, archive, or status, only version. The version increases each time you update the Tag.
Attaching tags to Content and Media
Attaching a Tag takes two steps.
- Create the Tag (the Create Tag endpoint below). Keep the
sys.idfrom the response. - When you create or edit a Content or Media, put this Tag's
Referinto themetadata.tagsarray of its body.
The shape of the Refer you put into metadata.tags is as follows. Into id you put the sys.id of the Tag you obtained in step 1.
"metadata": {
"tags": [
{ "sys": { "id": "3trmXRM3RqbgSnifyg7PLeuQQPP9Oe", "type": "Refer", "targetType": "Tag" } }
]
}To attach several Tags, put multiple of these Refer objects in the array. To remove a tag, drop the matching entry from the array and update the Content or Media again. For the detailed way to author Content and Media body data, see the Content and Media documents.
API
The base URL for all endpoints below is https://cma.weegloo.com/v1, and a Bearer token that authenticates against CMA is required in the Authorization header. Update and partial update must also send the X-Weegloo-Version header (the current resource's sys.version) for optimistic concurrency control. Create and delete do not have this header.
