Browser Window Tags

This document describes the cloud APIs for browser window tags, covering tag list query, creation, editing, deletion, and update of window-tag binding relationships, including request format, authentication method, field aliases, and common error codes.

This document describes the cloud APIs for browser window tags that have been integrated in the first phase.

API Overview

  • All requests use the POST method.
  • Request parameters are passed as JSON body.
  • It is recommended to use Authorization: Bearer {auth} to pass the login state.
  • Tag data is isolated by the currently logged-in user's main_uid.
  • When binding a tag to a window, the resource ownership of both the window and the tag is verified.

Unified request headers:

Content-Type: application/json
Authorization: Bearer {auth}

Unified response:

{
  "data": {},
  "code": 0,
  "msg": "success"
}

Query Window Tag List

POST /browserTag/list

Request Example

{
  "keyword": ""
}

Parameter Details

NameTypeRequiredDescription
keywordstringnoTag name keyword
tagNamestringnoCompatibility field, also used for searching

Permissions

Requires browser:list.

Create Window Tag

POST /browserTag/create

Request Example

{
  "tagName": "Important Account",
  "tagColor": "#ECC2F3"
}

Parameter Details

NameTypeRequiredDescription
tagNamestringyesTag name
tagColorstringnoTag color
sortNumnumbernoSort value

Field aliases:

Recommended FieldCompatibility Field
tagNametag_name
tagColorcolor
sortNumsort_num

Permissions

Requires browser:update:single or browser:update:batch.

Edit Window Tag

POST /browserTag/update

Request Example

{
  "id": 3,
  "tagName": "Important Account - Renamed",
  "tagColor": "#66CCFF"
}

Parameter Details

NameTypeRequiredDescription
idnumber/stringyesTag ID
tagNamestringyesTag name
tagColorstringnoTag color
sortNumnumbernoSort value

Permissions

Requires browser:update:single or browser:update:batch.

Delete Window Tag

POST /browserTag/delete

Request Example

{
  "id": 3
}

Parameter Details

NameTypeRequiredDescription
idnumber/stringnoSingle tag ID
idsarraynoBatch tag IDs; not recommended for Local API based on testing

At least one of id or ids must be provided.

Local API Testing Notes

When deleting a tag via the Local API, passing a single id succeeds; passing batch ids may return:

{
  "code": 211,
  "msg": "Missing ID parameter",
  "data": {}
}

If compatibility with the Local API is required, it is recommended to delete tags one by one using id.

Permissions

Requires browser:update:single or browser:update:batch.

Update Window-Tag Binding Relationship

POST /browserTag/updateRelation

Incrementally add or remove window tags without affecting other tags that are not involved.

Request Example

Cloud API:

{
  "browserId": 101,
  "addTagIds": [3],
  "removeTagIds": [5]
}

Local API recommended:

{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "addTagIds": [3],
  "removeTagIds": [5]
}

Parameter Details

NameTypeRequiredDescription
browserIdnumber/stringyesWindow ID; recommended for cloud API
uuidstringnoWindow UUID; recommended for Local API
addTagIdsarraynoTag IDs to be bound
removeTagIdsarraynoTag IDs to be unbound

For the cloud API, pass browserId, browser_id, or id; for the Local API, you can pass uuid.

Field aliases:

Recommended FieldCompatibility Field
browserIdbrowser_id, id
addTagIdsadd_tag_ids
removeTagIdsremove_tag_ids

Local API Testing Notes

When updating window-tag bindings via the Local API, passing a numeric browserId may return code: 211, msg: "Invalid UUID". For Local API compatibility, it is recommended to pass uuid.

Permissions

Requires browser:update:single or browser:update:batch.

Common Errors

codemsgDescription
211tag name requiredMissing tag name
211id requiredMissing tag ID
211browser id requiredMissing window ID
211Invalid UUIDLocal API failed to query details using numeric window ID or UUID is invalid
403permission deniedCurrent user does not have permission
404tag not foundTag does not exist or does not belong to the current main account
404browser config not foundWindow does not exist or does not belong to the current main account

Last modified: 2026-06-11