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 the Refer target id when you attach the tag via metadata.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" } }).

PropertyTypeDescription
idstringUnique resource identifier.
typestringResource kind. For a Tag this is always "Tag".
spaceRefer<Space>The Space this Tag belongs to.
createdByRefer<User>The user who created it.
createdAtstring (date-time)Creation time.
updatedByRefer<User>The user who last updated it.
updatedAtstring (date-time)Last update time.
versioninteger (≥1)Resource version. It increases by 1 with every change.

Body property:

PropertyTypeDescription
namestring (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.

  1. Create the Tag (the Create Tag endpoint below). Keep the sys.id from the response.
  2. When you create or edit a Content or Media, put this Tag's Refer into the metadata.tags array 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.

  • Content: The body data where Tags are attached via metadata.tags.
  • Media: The file resource where Tags are attached via metadata.tags.