Browser Window Tags

This document describes the cloud interface for browser window tags, covering tag list query, creation, editing, deletion, and updating window-tag binding relationships, including request formats, authentication methods, field aliases, and common error codes.

Tag Local API Documentation

Query Tag List

Title

Query Tag List

Brief Description

Query page of window tag list with support for searching by tag name.

Request URL

http://127.0.0.1:54345/browserTag/list

Request Method

POST

ParameterRequiredExampleDescription
Content-TypeYesapplication/jsonRequest body format
X-Cos-Local-TokenYesYOUR_LOCAL_TOKENLocal access token, viewable in the client under 'Settings - Local API'

Request Body Parameters

ParameterRequiredTypeDescription
pageNonumberPage number, default 1
page_sizeNonumberNumber per page, default 10000, compatible with pageSize
keyword / tag_nameNostringTag name search, compatible with tagName / name

Success Response Example

{
  "code": 0,
  "msg": "success",
  "data": {
    "list": [
      {
        "id": 3001,
        "tag_name": "重点账号",
        "tagName": "重点账号",
        "color": "#409EFF",
        "sort_num": 0
      }
    ],
    "total": 1
  }
}

Success Response Parameters

ParameterTypeDescription
codenumber0 indicates success
msgstringResponse message
data.listarrayTag list
data.list[].idnumber/stringTag ID
data.list[].tag_namestringTag name
data.list[].tagNamestringTag name
data.list[].colorstringTag color
data.list[].sort_numnumberSort value
data.totalnumberTotal count

Notes

The interface only listens on localhost 127.0.0.1. Please open and log in to the client before calling.

Create Tag

Title

Create Tag

Brief Description

Create a new window tag.

Request URL

http://127.0.0.1:54345/browserTag/create

Request Method

POST

Header

ParameterRequiredExampleDescription
Content-TypeYesapplication/jsonRequest body format
X-Cos-Local-TokenYesYOUR_LOCAL_TOKENLocal access token, viewable in the client under 'Settings - Local API'

Request Body Parameters

ParameterRequiredTypeDescription
tag_nameYesstringTag name, compatible with tagName / name
color / tag_colorNostringTag color, e.g. #409EFF
sort_numNonumberSort value, default 0, compatible with sortNum

Success Response Example

{
  "code": 0,
  "msg": "success",
  "data": {
    "id": 3001,
    "tag_name": "重点账号"
  }
}

Success Response Parameters

ParameterTypeDescription
codenumber0 indicates success
msgstringResponse message
data.idnumber/stringNewly created tag ID
data.tag_name / data.tagNamestringTag name

Notes

It is recommended to use hexadecimal color values for tag color, e.g. #409EFF. The immediate response from the create endpoint typically only returns the id and tag name; color and sort order can be queried via /browserTag/list.

Edit Tag

Title

Edit Tag

Brief Description

Modify the name, color, or sort order of a specified tag.

Request URL

http://127.0.0.1:54345/browserTag/update

Request Method

POST

Header

ParameterRequiredExampleDescription
Content-TypeYesapplication/jsonRequest body format
X-Cos-Local-TokenYesYOUR_LOCAL_TOKENLocal access token, viewable in the client under 'Settings - Local API'

Request Body Parameters

ParameterRequiredTypeDescription
idYesnumber/stringTag ID
tag_nameYesstringTag name, compatible with tagName / name
color / tag_colorNostringTag color
sort_numNonumberSort value, default 0, compatible with sortNum

Success Response Example

{
  "code": 0,
  "msg": "success",
  "data": {
    "id": 3001,
    "tag_name": "重点账号"
  }
}

Success Response Parameters

ParameterTypeDescription
codenumber0 indicates success
msgstringResponse message
data.idnumber/stringTag ID
data.tag_name / data.tagNamestringModified tag name

Notes

Before editing a tag, you can call /browserTag/list to obtain the tag ID. The immediate response from the edit endpoint typically only returns the id and tag name; color and sort order can be queried via /browserTag/list.

Delete Tag

Title

Delete Tag

Brief Description

Delete one or multiple window tags.

Request URL

http://127.0.0.1:54345/browserTag/delete

Request Method

POST

Header

ParameterRequiredExampleDescription
Content-TypeYesapplication/jsonRequest body format
X-Cos-Local-TokenYesYOUR_LOCAL_TOKENLocal access token, viewable in the client under 'Settings - Local API'

Request Body Parameters

ParameterRequiredTypeDescription
idYes, choose one with idsnumber/stringSingle tag ID
idsYes, choose one with idarray/stringMultiple tag IDs

Success Response Example

{
  "code": 0,
  "msg": "success",
  "data": {
    "ids": [3001, 3002],
    "results": [
      {
        "code": 0,
        "msg": "success"
      }
    ]
  }
}

Success Response Parameters

ParameterTypeDescription
codenumber0 indicates success
msgstringResponse message
data.idsarrayDeleted tag IDs
data.resultsarrayServer result for each tag deletion request
data.results[].codenumberIndividual deletion result status code
data.results[].msgstringIndividual deletion result message

Notes

When deleting multiple tags, the local API calls the server-side delete interface for each tag one by one; if any single deletion fails, it will directly return the failure result.

Update Window Tag Relationship

Title

Update Window Tag Relationship

Brief Description

Overwrite, add, or remove tag binding relationships for a specified window.

Request URL

http://127.0.0.1:54345/browserTag/updateRelation

Request Method

POST

Header

ParameterRequiredExampleDescription
Content-TypeYesapplication/jsonRequest body format
X-Cos-Local-TokenYesYOUR_LOCAL_TOKENLocal access token, viewable in the client under 'Settings - Local API'

Request Body Parameters

ParameterRequiredTypeDescription
uuidYes, choose one with browser_idstringWindow UUID, can also pass config_uuid. Obtain from the uuid returned by /browser/list
browser_id / idYes, choose one with uuidnumber/stringWindow numeric ID, compatible with browserId. It is recommended to pass uuid first
tag_idsNoarray/stringRecommended usage: directly overwrite the window tag ID list; an empty array means clear all. Compatible with tagIds
actionNostringPassing bind means incrementally bind the tag_ids, passing unbind means incrementally unbind the tag_ids
add_tag_idsNoarray/stringLegacy compatible usage: tag IDs to add bindings, compatible with addTagIds
remove_tag_idsNoarray/stringLegacy compatible usage: tag IDs to remove bindings, compatible with removeTagIds
current_platformNostringCurrent client platform, defaults to current client platform, compatible with currentPlatform

Success Response Example

{
  "code": 0,
  "msg": "success",
  "data": {
    "id": 10001,
    "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "tag_ids": [3001, 3003],
    "tagIds": [3001, 3003]
  }
}

Success Response Parameters

ParameterTypeDescription
codenumber0 indicates success
msgstringResponse message
data.idnumber/stringWindow ID
data.uuidstringWindow UUID
data.tag_ids / data.tagIdsarrayUpdated list of tag IDs

Notes

Before calling, you can obtain the window UUID via /browser/list and obtain tag IDs via /browserTag/list. When directly passing tag_ids, it will overwrite the original tag relationships; when passing action: "bind" / "unbind" or the legacy fields addTagIds / removeTagIds, it will handle them incrementally.

Last modified: 2026-07-01