Skip to content
Local APIExtensions

Replace extension profile bindings ​

Version overview
PUT
/api/v1/extensions/{extension_id}/browsers

Replace the complete list of profiles bound to an extension owned by the current user or shared within the current team. Duplicate profile IDs are removed automatically; an empty array unbinds all profiles. Setting specific profile bindings disables global enablement. Bindings for team extensions are shared team resources, so updates affect the extension profile bindings across the entire team. If any profile does not exist or is inaccessible, the entire request returns 404 without calling the backend binding endpoint. This operation does not download extensions or start or stop browsers.

Request parameters

Authorization Bearer Token

Include your API Key as a Bearer token in the Authorization request header.

Authorization: Bearer <api-key>

Path parameters

1
Fields
stringrequired
Unique extension ID
Example"extension_01JABCDEF1234567890"
minLength: 1

Body parameters

requiredapplication/jsonExtensionBindBrowsersRequest
Fields
string[]required
Complete list of profile IDs to bind to this extension. Duplicate values are removed automatically; an empty array unbinds all profiles.
Example

Generated from the schema; not a live response.

{
  "env_ids": [
    "env_01JABCDEF1234567890"
  ]
}

Request code examples

JavaScript / TypeScript: Node.js 18+ with fetch; PHP: cURL extension; Go: 1.16+; Java: JDK 11+. Replace the token and example parameter values before running.

curl -X PUT -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' -d '{
  "env_ids": [
    "env_01JABCDEF1234567890"
  ]
}' 'http://local.zhongyibrowser.com:39025/api/v1/extensions/extension_01JABCDEF1234567890/browsers'

Responses

Success: code = 0. Failure: code > 0. Select a status to view its fields and example. Expand objects to inspect nested fields. Optional fields may be omitted.

Final profile bindings for the extension

Body

application/jsonExtensionBindBrowsersSuccessResponse
Fields
numberrequired
Business status code; always 0 on success
Enum
stringrequired
Business status message; always success on success
Enum
objectrequired
Endpoint business data

Additional fields are not allowed.

Example

Generated from the schema; not a live response.

{
  "code": 0,
  "message": "success",
  "data": {
    "extension_id": "extension_01JABCDEF1234567890",
    "is_global": false,
    "browser_ids": [
      "env_01JABCDEF1234567890"
    ],
    "browser_count": 0
  }
}

View all business error codes and HTTP statuses

ZYBrowser Local API documentation