Create a user tag

Create a user tag for a workspace. After creation, the tag can be associated with workspace users.

POST https://api.moi.matrixorigin.cn/v5/user/tag/create

Preparation before calling

Prepare a personal access token with the required permissions for the target workspace and the target workspace ID.

Request parameters

curl -X POST "https://api.moi.matrixorigin.cn/v5/user/tag/create" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "example",
    "description": "Example tag"
  }'

Parameter

Type

Required

Description

name

string

Yes

Tag name.

description

string

No

Tag description, up to 500 characters.

A tag name cannot be empty and can contain at most 200 characters. It cannot contain spaces, tabs, backticks, or quotation marks, and cannot start with { or end with }.

Successful response

On success, returns the new tag ID.

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "id": 12
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.id

integer

New tag ID.

Error response

{
  "code": "INVALID_ARGUMENT",
  "msg": "Invalid request parameters",
  "data": null
}

Field

Type

Description

code

string

Error code.

msg

string

Error message.

data

null

—

Last updated on