Skip to content

Add an extension ​

Two ways, pick one: pass a store detail-page URL and let the client download it, or pass an absolute path to a local package the client reads directly. Either way the extension lands in the global extension library, where profiles can enable it.

Definition: POST · Checked on 2026-11-19.

Request ​

http
POST /api/addCrx

Use the base URL and api-key shown on the client API screen. All examples use 9000 only as a placeholder port; see Overview for authentication.

JSON body ​

FieldTypeRequiredDescription
storeUrlstringNoHTTPS detail URL from Chrome Web Store or Edge Add-ons; the extension ID has 32 lowercase a-p characters
filePathstringNoAbsolute path to a local .crx / .zip package; only callable from the local machine (127.0.0.1 / ::1)

When both are sent, filePath wins. Sending neither returns HTTP 400 with Missing required parameter: storeUrl or filePath.

cURL examples ​

Install from a store:

bash
curl --request POST 'http://127.0.0.1:9000/api/addCrx' \
  --header 'api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "storeUrl": "https://chromewebstore.google.com/detail/violentmonkey/jinjaccalgkegednnccohejagnlnfdag"
}'

Install a local package (must run on the machine hosting the client):

bash
curl --request POST 'http://127.0.0.1:9000/api/addCrx' \
  --header 'api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "filePath": "D:/downloads/violentmonkey.crx"
}'

Response ​

json
{
  "success": true
}

Response fields ​

FieldTypeUsage
successbooleanRequest succeeded; does not imply every item was written

Limits for local package installs ​

ItemLimit
PathMust be absolute; UNC (\\server\share) and device paths (\\?\, \\.\) are rejected
Type.crx / .zip only; must be a regular file — no directories, symlinks or shortcuts
SizeSingle file ≤ 200 MB and non-empty
Header.crx must start with Cr24, .zip with PK
ZIP content≤ 5000 entries, ≤ 500 MB unpacked, no .. or absolute entry names

A .zip containing exactly one .crx (the usual shape of a store download) is unpacked automatically and installed as a CRX.

Notes ​

  • Store installs accept only Chrome Web Store or Edge Add-ons HTTPS detail pages with a valid 32-character extension ID. Downloading uses the Electron-bundled Chromium version and still needs network access to the store.
  • Local installs are restricted to loopback callers: the server listens on 0.0.0.0, so non-local requests get HTTP 403, preventing LAN peers from triggering local file reads.
  • Common failures, all HTTP 400 with a display-ready error string: CRX_IMPORT_INVALID_PATH, CRX_IMPORT_UNSUPPORTED_TYPE, CRX_IMPORT_NOT_FOUND, CRX_IMPORT_INVALID_FORMAT, CRX_IMPORT_TOO_LARGE.
  • A failed store download or install step returns HTTP 500 with an error such as 下载失败:… or 安装失败:….

On failure check both the HTTP status and the error message; see Errors.