API documentation
API reference
The complete CloakCTL API v2 reference: authentication, response format, limits, error codes and every route with parameters, request bodies and response examples. The page is assembled from the machine description spec/endpoints.json, so examples are re-validated on every build.
Authentication
The token is passed in a header. Three forms are supported; when several are present, the first by priority wins:
| Header | Priority | Description |
|---|---|---|
X-Octo-Api-Token: <token> | 1 | Primary header. It is checked first for Octo Browser compatibility: a script that already sends this header keeps working unchanged. |
Authorization: Bearer <token> | 2 | Conventional HTTP authentication, convenient when a shared auth layer injects the token. |
X-CloakCTL-Api-Token: <token> | 3 | CloakCTL-specific header, checked last. |
A token secret is cc_ plus 43 characters. The server stores only its SHA-256, so the full secret cannot be shown again. Lists show the prefix and the last four characters.
Note
In v1 token scopes are a flat set of flags. There is no per-profile access: a token with read access sees every profile of the account. Scope filtering by tag is planned later.
Response format
The cloud API answers with one envelope.
A successful cloud response uses an Octo-like envelope. total_count and page appear only on list responses. code is null on success; msg may be empty or human-readable, but do not branch on it — branch on code.
{
"success": true,
"msg": "",
"code": null,
"data": [
{
"uuid": "prof_35ef8623"
}
],
"total_count": 25,
"page": 0
}Errors keep the shape; success, code and msg change:
A cloud error uses the same envelope with success: false. data is empty, code is the machine-readable code from the table below and msg is human text.
{
"success": false,
"msg": "Profile not found",
"code": "not_found",
"data": ""
}Parsing rules:
- Branch on
codeand the HTTP status.msgis human text and may change. - List responses carry
total_countandpageat the top level. datais polymorphic: an object, an array, a string ornulldepending on the route. Do not assume a specific type for mutations.
The local API is different: flat JSON without an envelope. Success is an object or an array:
The local API answers with flat JSON and no envelope: either a message object or result fields. Lists are returned as a bare array.
{
"msg": "Profile stopped"
}An error carries code, error and a numeric error_code:
A local API error: code (machine-readable), error (text) and error_code (a number). Branch on the HTTP status and code. The number reuses Octo Browser launch error codes where one exists (for example 1 for a wrong password, 6 for an unknown profile) and otherwise equals the HTTP status.
{
"code": "unauthorized",
"error": "api token required",
"error_code": 401
}Rate limits
Windows are sliding: an event lives for 60 or 3600 seconds from the moment of the request. One shared counter per account: all tokens share one limit. The limiter lives in orchestrator process memory, so a restart resets the current window.
| Plan | Tokens | RPM | RPH |
|---|---|---|---|
start | 1 | 30 | 600 |
solo (aliases: legacy) | 1 | 60 | 1200 |
team (aliases: working) | 3 | 120 | 3000 |
scale (aliases: advanced) | 5 | 240 | 6000 |
An unknown plan gets the solo limits. The plan comes from the account licence; the numbers can be changed by the ORCHESTRATOR_API_PLAN_LIMITS setting without a code deploy, in which case this file and the docs are rebuilt.
State headers are returned on every response:
| Header | Description |
|---|---|
X-Ratelimit-Limit | Requests-per-minute limit of the account plan (RPM). |
X-Ratelimit-Limit-Hour | Requests-per-hour limit of the account plan (RPH). |
X-Ratelimit-Remaining | Requests left in the current minute window, including the request that produced this response. |
X-Ratelimit-Remaining-Hour | Requests left in the current hour window. |
X-Ratelimit-Reset | Unix timestamp (UTC, seconds) when a minute-window slot frees up. |
Retry-After | Only on a 429 response: seconds to wait until the current window ends. Do not retry earlier. |
Request costs:
| Request | Cost (RPM / RPH) | Description |
|---|---|---|
| Any cloud API request, default | 1 / 1 | The cost unit is a request, not a profile. |
| Response with status 400, 409 or 422 | 6 / 1 | Validation errors and conflicts cost more so that retry storms are not free. |
| Response with status 401, 403 or 429 | 0 / 0 | A refusal returned by the server itself costs nothing. |
| DELETE /profiles and POST /profiles/trash_bin/restore | 1 / 1 | A batch of up to 100 profiles costs one request, not one hundred. |
On 429 rate_limited the server returns Retry-After — seconds until the end of the window. Do not retry earlier: the restriction may be extended.
Error codes
| HTTP | Code | When |
|---|---|---|
400 | bad_request | Wrong shape, type or value bounds. |
401 | unauthorized | Token missing, unknown or revoked. |
403 | no_permission | The token lacks the scope the route requires. |
403 | account_suspended | The account is disabled. |
403 | account_required | The device is not attached to an account. |
403 | license_missing | The account has no licence. |
403 | license_expired | The licence has expired; `data.not_after` carries the end time in ISO format. |
403 | license_revoked | The licence has been revoked. |
403 | license_not_started | The licence period has not started yet. |
404 | not_found | Profile, tag or proxy not found. |
409 | profile_exists | The profile title is already taken. |
409 | profile_in_use | The profile has a live lease. |
409 | profile_deleted | The profile is in the trash bin. |
409 | trash_expired | The trash retention period has expired. |
409 | api_tokens.limit_reached | The plan token cap is reached (relevant to token management). |
409 | conflict | Other state conflicts. |
422 | bad_request | Schema validation error, repackaged by the server into the common envelope. |
429 | rate_limited | The rate limit is exhausted; wait for `Retry-After`. |
503 | unavailable | The database or the server is unavailable. |
401 and 403 are returned before the request body is checked; 422 is produced after schema validation and repackaged into the common envelope with code: "bad_request".
Cloud routes
All paths below are relative to the base URL https://api.cloakctl.com/api/v2/automation.
Subscription and limits
Plan and current rate-limit state. The monitoring entry point: a script that wants to know its limits reads them here.
Get subscription
GET/subscription#
Plan, expiry, RPM/RPH/token limits and current usage.
No scope is required: any active account token can read the subscription. Call it once at the start of a script run — it also reports how many tokens the account may still create.
Example call
curl -sS "https://api.cloakctl.com/api/v2/automation/subscription" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Response
{
"success": true,
"msg": "",
"code": null,
"data": {
"plan": "solo",
"expires_at": 1767225600,
"limits": {
"rpm": 60,
"rph": 1200,
"tokens": 1
},
"usage": {
"tokens_used": 1,
"rpm_remaining": 59,
"rph_remaining": 1199,
"window_reset": 1764163800
}
}
}Notes
expires_atis the licence end in Unix seconds, or null when the licence does not expire.window_resetis the Unix time when the minute window frees up; the hour window is reported in theX-Ratelimit-Limit-Hourheader.- An unknown plan is served with the
sololimits.
Error codes: unauthorized account_suspended license_expired license_revoked unavailable
Profiles
Create, read, update, delete and restore profiles, plus forced stop. The profile identifier is our `prof_xxxxxxxx`, not a 32-character Octo hex id.
List profiles
GET/profiles#
Scope: profiles_read
Paginated list of account profiles with search and filters.
Example call
curl -sS "https://api.cloakctl.com/api/v2/automation/profiles?page=0&page_len=100&search=alpha" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
page (query) | integer | no | 0 | Zero-based page number. |
page_len (query) | integer | no | 100 | Page size, from 1 to 1000. |
search (query) | string | no | Case-insensitive substring in the title or description. | |
tag (query) | string | no | Tag **name**, case-insensitive (not `uuid`). | |
status (query) | string | no | `0` stopped, `1` running (live lease), `2` error (never produced in v1). | |
fields (query) | string | no | Comma-separated projection: `uuid,title,description,status,tags,proxy,fingerprint,created_at,last_opened_at,launch_count,state_version,storage_mode`. | |
ordering (query) | string | no | `active` — most recently opened first; `created_at` — by creation time (default). |
Response
{
"success": true,
"msg": "",
"code": null,
"data": [
{
"uuid": "prof_1a2b3c4d",
"title": "alpha",
"description": "заметка",
"status": 1,
"tags": [
{
"uuid": "7",
"name": "Работа",
"color": "blue"
}
],
"proxy": {
"uuid": "prx_1a2b3c4d",
"title": "proxy-one",
"type": "socks5",
"host": "1.2.3.4",
"port": 1080,
"change_ip_url": "",
"profiles_count": 1
},
"fingerprint": {
"os": "win",
"os_version": "11",
"os_arch": "x86",
"screen": "1920x1080",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
"renderer": "NVIDIA GeForce GTX 660",
"cpu": 8,
"ram": 16,
"languages": "en-US",
"timezone": "Europe/Moscow",
"geolocation": {
"latitude": 55.75,
"longitude": 37.61,
"accuracy": 100
},
"webrtc": {
"type": "ip"
},
"noise": null
},
"created_at": 1720000000,
"last_opened_at": 1720003600,
"launch_count": 12,
"state_version": 3,
"storage_mode": "legacy"
},
{
"uuid": "prof_2b3c4d5e",
"title": "beta",
"description": "",
"status": 0,
"tags": [],
"proxy": null,
"fingerprint": {
"os": "mac",
"os_version": "14",
"os_arch": "arm",
"screen": "2560x1440",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
"renderer": "Apple M2 Pro",
"cpu": 8,
"ram": 16,
"languages": "en-US",
"timezone": "Europe/Berlin",
"geolocation": null,
"webrtc": {
"type": "disabled"
},
"noise": null
},
"created_at": 1720081800,
"last_opened_at": null,
"launch_count": 0,
"state_version": 0,
"storage_mode": "legacy"
}
],
"total_count": 2,
"page": 0
}Notes
- The trash bin is not included; use
GET /profiles/trash_binfor it. status: 0 stopped, 1 running (live non-expired lease), 2 error; value 2 never appears in v1.tagfilters by tag name, case-insensitively, not byuuid.proxyisnullor a catalog record without credentials; a manually entered proxy hasuuid: nullandtitle: "".created_atandlast_opened_atare Unix seconds (the latter may benull).storage_mode(legacy/sealed_v1) is our extension; v2 handles both formats transparently.noisein a fingerprint is alwaysnull: noise is derived by the node fromseedand not stored per profile.
Error codes: unauthorized no_permission bad_request rate_limited unavailable
Create profile
POST/profiles#
Scope: profiles_create
Creates a profile with fingerprint, tags and proxy in one request.
Example call
curl -sS -X POST "https://api.cloakctl.com/api/v2/automation/profiles" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"alpha","description":"Клиент A","tags":["Работа"],"proxy":{"uuid":"prx_5cfc3b13"},"fingerprint":{"os":"win","os_version":"11","os_arch":"x86","screen":"1920x1080","timezone":"Europe/Berlin","cpu":8,"ram":16}}'{
"title": "alpha",
"description": "заметка",
"tags": [
"Работа",
"Клиент"
],
"proxy": {
"uuid": "prx_1a2b3c4d"
},
"fingerprint": {
"os": "win",
"os_version": "11",
"os_arch": "x86",
"screen": "1920x1080",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
"renderer": "NVIDIA GeForce GTX 660",
"cpu": 8,
"ram": 16,
"languages": "en-US",
"timezone": "Europe/Moscow",
"geolocation": {
"latitude": 55.75,
"longitude": 37.61,
"accuracy": 100
},
"webrtc": {
"type": "ip"
},
"noise": {
"webgl": true,
"canvas": true,
"audio": true,
"client_rects": false
}
}
}Body fields
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
title | string | yes | Profile title, 1..64 characters. Globally unique among live profiles: a taken title returns 409 `profile_exists`. | |
description | string | no | Free-form note up to 4096 characters. | |
tags | array<string> | no | Up to 20 tag **names**; missing catalog tags are created by the server. | |
proxy | object | no | `null`/absent, `{"uuid":"prx_..."}` for an existing record, or `{type,host,port,login,password,title?}` to create or reuse a record. Inline `type` is `http` or `socks5` (alias `socks`); the core does not support `https` or `ssh` — 400. | |
fingerprint | object | no | Optional; defaults to `win`/`11`, 8 CPU, 16 GB RAM, no screen. `os`: `win`|`mac`|`linux`|`android` (synonyms `windows`, `macos`); `os_version`: win `10`/`11`, mac `13`/`14`/`15`/`26`, linux `""`, android `""`/`12`..`15`; `os_arch`: win `x86`, mac `x86`/`arm`, linux `x86`, android `arm`; `screen` is `WIDTHxHEIGHT` with sides 800..8192; `user_agent` <=512; `renderer` <=256; `cpu` 1..128; `ram` 1..256; `languages` is a string or `{"type":"ip"}` -> `en-US`; `timezone` is a string or `{"type":"ip"}`; `geolocation` is an object or `{"type":"ip"}`; `webrtc` is `{"type":"ip"}` or `{"type":"disabled"}`; `noise` is accepted, validated and **not stored**. |
Response
{
"success": true,
"msg": "",
"code": null,
"data": {
"uuid": "prof_1a2b3c4d",
"title": "alpha",
"description": "заметка",
"status": 0,
"tags": [
{
"uuid": "7",
"name": "Работа",
"color": "blue"
},
{
"uuid": "8",
"name": "Клиент",
"color": "green"
}
],
"proxy": {
"uuid": "prx_1a2b3c4d",
"title": "proxy-one",
"type": "socks5",
"host": "1.2.3.4",
"port": 1080,
"change_ip_url": "",
"profiles_count": 1
},
"fingerprint": {
"os": "win",
"os_version": "11",
"os_arch": "x86",
"screen": "1920x1080",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
"renderer": "NVIDIA GeForce GTX 660",
"cpu": 8,
"ram": 16,
"languages": "en-US",
"timezone": "Europe/Moscow",
"geolocation": {
"latitude": 55.75,
"longitude": 37.61,
"accuracy": 100
},
"webrtc": {
"type": "ip"
},
"noise": null
},
"created_at": 1720000000,
"last_opened_at": null,
"launch_count": 0,
"state_version": 0,
"storage_mode": "legacy"
}
}Notes
- An unknown field returns 400
bad_requestnaming the field instead of being silently dropped. - Bounds:
title1..64,description<=4096, at most 20 tags,user_agent<=512,renderer<=256,cpu1..128,ram1..256,screen800..8192 per side. - An unsupported
os/os_arch/os_versioncombination returns 400 naming the field. noiseis accepted and not stored: fingerprint noise is derived by the node fromseed.- A proxy in inline form is added to the account catalog and can be reused by other profiles;
https/sshare not supported in inline form.
Error codes: bad_request profile_exists no_permission unauthorized rate_limited unavailable
Get profile
GET/profiles/{uuid}#
Scope: profiles_read
Full profile record by identifier.
Example call
curl -sS "https://api.cloakctl.com/api/v2/automation/profiles/prof_35ef8623" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
uuid (path) | string | yes | Profile identifier like `prof_xxxxxxxx`. |
Response
{
"success": true,
"msg": "",
"code": null,
"data": {
"uuid": "prof_1a2b3c4d",
"title": "alpha",
"description": "заметка",
"status": 0,
"tags": [
{
"uuid": "7",
"name": "Работа",
"color": "blue"
}
],
"proxy": null,
"fingerprint": {
"os": "win",
"os_version": "11",
"os_arch": "x86",
"screen": "1920x1080",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
"renderer": "NVIDIA GeForce GTX 660",
"cpu": 8,
"ram": 16,
"languages": "en-US",
"timezone": "Europe/Moscow",
"geolocation": {
"latitude": 55.75,
"longitude": 37.61,
"accuracy": 100
},
"webrtc": {
"type": "ip"
},
"noise": null
},
"created_at": 1720000000,
"last_opened_at": null,
"launch_count": 1,
"state_version": 3,
"storage_mode": "legacy"
}
}Notes
- A profile in the trash bin is not returned here: 409
profile_deleted. - A foreign or unknown identifier returns 404
not_found: a foreign profile is indistinguishable from a missing one.
Error codes: not_found profile_deleted no_permission unauthorized rate_limited unavailable
Update profile
PATCH/profiles/{uuid}#
Scope: profiles_edit
Partial update: only the fields sent are changed.
Example call
curl -sS -X PATCH "https://api.cloakctl.com/api/v2/automation/profiles/prof_35ef8623" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"alpha-2","tags":["Работа","Клиент"],"fingerprint":{"timezone":"Europe/Moscow"}}'{
"title": "alpha-2",
"tags": [
"Работа",
"Клиент"
],
"fingerprint": {
"cpu": 6
}
}Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
uuid (path) | string | yes | Profile identifier. |
Response
{
"success": true,
"msg": "",
"code": null,
"data": {
"uuid": "prof_1a2b3c4d",
"title": "alpha-2",
"description": "заметка",
"status": 0,
"tags": [
{
"uuid": "7",
"name": "Работа",
"color": "blue"
},
{
"uuid": "8",
"name": "Клиент",
"color": "green"
}
],
"proxy": null,
"fingerprint": {
"os": "win",
"os_version": "11",
"os_arch": "x86",
"screen": "1920x1080",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
"renderer": "NVIDIA GeForce GTX 660",
"cpu": 8,
"ram": 16,
"languages": "en-US",
"timezone": "Europe/Moscow",
"geolocation": {
"latitude": 55.75,
"longitude": 37.61,
"accuracy": 100
},
"webrtc": {
"type": "ip"
},
"noise": null
},
"created_at": 1720000000,
"last_opened_at": null,
"launch_count": 1,
"state_version": 4,
"storage_mode": "legacy"
}
}Notes
- The response is the full profile after the update; no second
GETis needed. fingerprintis partial:{"fingerprint":{"cpu":6}}changes onlycpu. Changingos/os_version/os_archrecomputes preset fields; an unsupported combination returns 400 naming the field."proxy": nullclears the proxy.tagsis a full set: the profile ends up with exactly the listed tags and the rest are removed.- An unknown field returns 400
bad_request; renaming to a taken title returns 409profile_exists.
Error codes: bad_request profile_exists profile_deleted not_found no_permission unauthorized rate_limited unavailable
Delete profiles (batch)
DELETE/profiles#
Scope: profiles_delete
Moves 1..100 profiles to the trash bin or deletes them immediately.
Example call
curl -sS -X DELETE "https://api.cloakctl.com/api/v2/automation/profiles" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"uuids":["prof_35ef8623"],"skip_trash_bin":false}'{
"uuids": [
"prof_35ef8623"
],
"skip_trash_bin": false
}Body fields
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
uuids | array<string> | yes | One to one hundred profile identifiers. | |
skip_trash_bin | boolean | no | false | `true` deletes immediately, skipping the trash bin. |
Response
{
"success": true,
"msg": "Profiles moved to the trash bin",
"code": null,
"data": {
"deleted": [],
"trashed": [
"prof_35ef8623"
],
"failed": []
}
}Notes
- The response is always 200 even when some profiles were not deleted: per-record refusals are listed in
data.failedas{uuid, code}. A client must inspect that list, not just the HTTP status. skip_trash_bindefaults to false: the profile goes to the trash bin and can be restored for 72 hours. Octo defaults the other way — a deliberate safety difference.- The cost is one request per batch, not per profile. A trashed profile is kept for 72 hours (259200 s); after that the record answers 409
trash_expired. - A live lease prevents deletion: the record's entry in
failedgetscode: "profile_in_use".
Error codes: bad_request no_permission unauthorized rate_limited unavailable
Trash bin
GET/profiles/trash_bin#
Scope: profiles_delete
Deleted profiles that can still be restored.
Example call
curl -sS "https://api.cloakctl.com/api/v2/automation/profiles/trash_bin?page=0&page_len=100&search=alpha" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
page (query) | integer | no | 0 | Zero-based page number. |
page_len (query) | integer | no | 100 | Page size, from 1 to 1000. |
search (query) | string | no | Case-insensitive substring in the profile title. |
Response
{
"success": true,
"msg": "",
"code": null,
"data": [
{
"uuid": "prof_2",
"title": "old",
"deleted_at": "2026-11-26T05:00:00Z",
"deleted_by": "PC-1",
"by_automation_api": false,
"restore": {
"paid": false,
"price": "0",
"free_at": null
},
"purge_after": "2026-11-29T05:00:00Z"
}
],
"total_count": 1,
"page": 0
}Notes
deleted_atandpurge_afterare Unix seconds; the difference is exactly 259200 s (72 hours).- The response carries no keys, proxies or snapshot content.
- Scope
profiles_delete: the trash bin belongs to the delete permission, as in Octo.
Error codes: unauthorized no_permission bad_request rate_limited unavailable
Restore profiles
POST/profiles/trash_bin/restore#
Scope: profiles_delete
Returns 1..100 profiles from the trash bin.
Example call
curl -sS -X POST "https://api.cloakctl.com/api/v2/automation/profiles/trash_bin/restore" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"uuids":["prof_35ef8623"]}'{
"uuids": [
"prof_35ef8623"
]
}Response
{
"success": true,
"msg": "",
"code": null,
"data": {
"restored_uuids": [
"prof_35ef8623"
],
"not_found_uuids": [],
"payment_required_uuids": [],
"failed_uuids": []
}
}Notes
- Batch 1..100, cost one request per batch. The response is always 200; partial refusals appear in the lists, not in the HTTP status.
not_found_uuidsare records missing from the trash bin;failed_uuidsare conflicts, each as{uuid, code}.- Paid restores do not exist in v1:
payment_required_uuidsis always empty. - After 72 hours a restore does not succeed; the retention deadline is enforced when it is checked, so the record answers 409
trash_expireduntil it is purged.
Error codes: bad_request no_permission unauthorized rate_limited unavailable
Force stop profile
POST/profiles/{uuid}/force_stop#
Scope: profiles_edit
Releases the live lease without waiting for synchronisation.
Example call
curl -sS -X POST "https://api.cloakctl.com/api/v2/automation/profiles/prof_35ef8623/force_stop" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
uuid (path) | string | yes | Profile identifier. |
Response
{
"success": true,
"msg": "Profile stopped",
"code": null,
"data": {
"uuid": "prof_35ef8623",
"stopped": true,
"had_lease": true
}
}Notes
- A cloud force stop does not close the browser on the operator machine: the window keeps running until it is closed, and unsynced data may be lost. This matches Octo ('marks a running profile as stopped without syncing').
- The request body is optional. Octo's
versionfield is accepted and not checked: our model has no session version. - Without a live lease the response is still 200 with
had_lease: false: the operation is idempotent. - For a graceful stop that syncs, use the local
POST /api/profiles/stop.
Error codes: profile_deleted not_found no_permission unauthorized rate_limited unavailable
Force stop a batch of profiles
POST/profiles/force_stop#
Scope: profiles_edit
The same for a list of 1..100 identifiers.
Example call
curl -sS -X POST "https://api.cloakctl.com/api/v2/automation/profiles/force_stop" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"uuids":["prof_35ef8623","prof_7c1d92ab"]}'{
"uuids": [
"prof_35ef8623",
"prof_7c1d92ab"
]
}Response
{
"success": true,
"msg": "Profiles stopped successfully",
"code": null,
"data": {
"stopped_uuids": [
"prof_35ef8623",
"prof_7c1d92ab"
],
"failed_uuids": []
}
}{
"success": true,
"msg": "Profiles stopped successfully",
"code": null,
"data": {
"stopped_uuids": [
"prof_35ef8623"
],
"failed_uuids": [
{
"uuid": "prof_7c1d92ab",
"code": "not_found"
}
]
}
}{
"success": false,
"msg": "no profiles were stopped",
"code": "bad_request",
"data": {
"stopped_uuids": [],
"failed_uuids": [
{
"uuid": "prof_7c1d92ab",
"code": "profile_deleted"
}
]
}
}Notes
- Three outcomes for one request: all released — 200; some — 207 Multi-Status; none — 400 with
code: "bad_request". - A client must inspect
failed_uuids(items{uuid, code}), not only the HTTP status: on partial success a library may not treat 207 as success. - Batch 1..100, cost one request per batch.
- Same semantics as the single force stop: browsers on operator machines are not closed.
Error codes: bad_request no_permission unauthorized rate_limited unavailable
Tags
Tags are account catalog records, not labels on a single profile: renaming is visible to every account profile. A tag `uuid` is the catalog row id as a string (for example "42").
List tags
GET/tags#
Scope: profiles_read
Account tag catalog with the profile count of each tag.
Example call
curl -sS "https://api.cloakctl.com/api/v2/automation/tags" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Response
{
"success": true,
"msg": "",
"code": null,
"data": [
{
"uuid": "42",
"name": "Работа",
"color": "blue",
"profiles": 7
},
{
"uuid": "43",
"name": "Клиент",
"color": "",
"profiles": 0
}
]
}Notes
coloris a palette name (red,orange,amber,lime,green,teal,cyan,blue,indigo,violet,magenta,rose) or an empty string when no colour was chosen. Octo aliases are accepted:grey/gray-> no colour,yellow->amber,purple->violet.uuidis the catalog row id as a string; PATCH and DELETE address tags by it.- A tag name is at most 32 characters; duplicate names are rejected case-insensitively.
- A tag may exist without being attached to any profile (
profiles: 0).
Error codes: unauthorized no_permission rate_limited unavailable
Create tag
POST/tags#
Scope: tags_edit
Creates a tag ahead of assigning it to profiles.
Example call
curl -sS -X POST "https://api.cloakctl.com/api/v2/automation/tags" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Клиент","color":"green"}'{
"name": "Клиент",
"color": "green"
}Response
{
"success": true,
"msg": "",
"code": null,
"data": {
"uuid": "8",
"name": "Клиент",
"color": "green"
}
}Notes
- An empty name returns 400
bad_request; a duplicate name (case-insensitive) returns 409conflict. - The
tags_editscope belongs to the token's administrative permission group.
Error codes: bad_request conflict no_permission unauthorized rate_limited unavailable
Update tag
PATCH/tags/{uuid}#
Scope: tags_edit
Rename a tag and/or change its colour.
Example call
curl -sS -X PATCH "https://api.cloakctl.com/api/v2/automation/tags/42" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Клиенты","color":"lime"}'{
"name": "Клиенты",
"color": "lime"
}Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
uuid (path) | string | yes | The tag `uuid` — the catalog row id as a string. |
Response
{
"success": true,
"msg": "",
"code": null,
"data": {
"uuid": "42",
"name": "Клиенты",
"color": "lime"
}
}Notes
- Send at least one field; both are optional.
- Renaming to a taken name returns 409
conflict; an unknown tag returns 404not_found.
Error codes: bad_request conflict not_found no_permission unauthorized rate_limited unavailable
Delete tag
DELETE/tags/{uuid}#
Scope: tags_edit
Deletes the tag; profiles remain, just without it.
Example call
curl -sS -X DELETE "https://api.cloakctl.com/api/v2/automation/tags/42" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
uuid (path) | string | yes | The tag `uuid`. |
Response
{
"success": true,
"msg": "Tag deleted",
"code": null,
"data": ""
}Notes
- Deleting a tag never deletes profiles — only the link.
- An unknown tag returns 404
not_found.
Error codes: not_found no_permission unauthorized rate_limited unavailable
Proxies
Account proxy catalog: one record can be used by any number of profiles. `GET /proxies` includes login and password — a deliberate compatibility compromise shared with Octo.
List proxies
GET/proxies#
Scope: proxies_read
The account catalog including credentials.
Example call
curl -sS "https://api.cloakctl.com/api/v2/automation/proxies" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Response
{
"success": true,
"msg": "",
"code": null,
"data": [
{
"uuid": "prx_1a2b3c4d",
"title": "proxy-one",
"type": "socks5",
"host": "1.2.3.4",
"port": 1080,
"login": "user",
"password": "secret",
"change_ip_url": "",
"profiles_count": 1
}
]
}Notes
- The response contains a secret. If a script does not need full proxy access, grant only
proxies_readand narrow the other scopes. - No
timezonefield is returned in v1 and the cloud does not check proxies: use the localPOST /api/proxies/check. - Only
httpandsocks5are supported; there are no VPN proxies in v1;httpsandsshare not implemented — a core limitation, see the not-implemented list.
Error codes: unauthorized no_permission rate_limited unavailable
Create proxy
POST/proxies#
Scope: proxies_create
Adds a record to the account catalog.
Example call
curl -sS -X POST "https://api.cloakctl.com/api/v2/automation/proxies" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"Frankfurt 1","type":"socks5","host":"gw.example.net","port":1080,"login":"user","password":"secret"}'{
"type": "socks5",
"title": "proxy-one",
"host": "1.2.3.4",
"port": 1080,
"login": "user",
"password": "secret"
}Body fields
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | yes | `http` or `socks5` (alias `socks`). `https` and `ssh` are not supported by the core — 400 `bad_request`. | |
title | string | yes | Record name, 1..255 characters (`name` is an alias). | |
host | string | yes | IPv4, IPv6 or a domain name, up to 255 characters. | |
port | integer | yes | Port, 1..65535. | |
login | string | no | Login, up to 255 characters. An empty string clears it on PATCH. | |
password | string | no | Password, up to 255 characters. An empty string clears it on PATCH. | |
change_ip_url | string | no | Provider IP rotation URL, http/https (`rotate_url` is an alias). | |
external_id | string | no | Accepted for compatibility and **not stored**. |
Response
{
"success": true,
"msg": "",
"code": null,
"data": {
"uuid": "prx_1a2b3c4d",
"title": "proxy-one",
"type": "socks5",
"host": "1.2.3.4",
"port": 1080,
"login": "user",
"password": "secret",
"change_ip_url": "",
"profiles_count": 0
}
}Notes
typeishttporsocks5(socksis an alias);https/sshreturn 400bad_request.- A record with the same host, port and login is reused, so duplicates are not created.
external_idis accepted and not stored: the catalog has no such column.
Error codes: bad_request no_permission unauthorized rate_limited unavailable
Update proxy
PATCH/proxies/{uuid}#
Scope: proxies_edit
Partial record update; changes propagate to the profiles that use the record.
Example call
curl -sS -X PATCH "https://api.cloakctl.com/api/v2/automation/proxies/prx_5cfc3b13" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"login":"user","password":"new-secret"}'{
"login": "user",
"password": "new-secret"
}Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
uuid (path) | string | yes | Record identifier like `prx_xxxxxxxx`. |
Body fields
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | no | `http` or `socks5` (alias `socks`). `https` and `ssh` are not supported by the core — 400 `bad_request`. | |
title | string | no | Record name, 1..255 characters (`name` is an alias). | |
host | string | no | IPv4, IPv6 or a domain name, up to 255 characters. | |
port | integer | no | Port, 1..65535. | |
login | string | no | Login, up to 255 characters. An empty string clears it on PATCH. | |
password | string | no | Password, up to 255 characters. An empty string clears it on PATCH. | |
change_ip_url | string | no | Provider IP rotation URL, http/https (`rotate_url` is an alias). | |
external_id | string | no | Accepted for compatibility and **not stored**. |
Response
{
"success": true,
"msg": "",
"code": null,
"data": {
"uuid": "prx_1a2b3c4d",
"title": "proxy-one",
"type": "socks5",
"host": "1.2.3.4",
"port": 1080,
"change_ip_url": "",
"profiles_count": 1
}
}Notes
- Any subset of fields; an empty string in
login/passwordclears the value. - Login and password share one envelope: changing one without the other keeps the previous other value.
- The response has no credentials: read the secret in
GET /proxieswith scopeproxies_read.
Error codes: bad_request not_found no_permission unauthorized rate_limited unavailable
Delete proxy
DELETE/proxies/{uuid}#
Scope: proxies_delete
Deletes the catalog record; profiles keep their current settings.
Example call
curl -sS -X DELETE "https://api.cloakctl.com/api/v2/automation/proxies/prx_5cfc3b13" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
uuid (path) | string | yes | Record identifier. |
Response
{
"success": true,
"msg": "Proxy deleted",
"code": null,
"data": ""
}Notes
- Deleting a record does not disarm profiles: they keep their current proxy data and only lose the catalog link.
proxies_deletebelongs to the token's administrative permission group.
Error codes: not_found no_permission unauthorized rate_limited unavailable
Fingerprints
Reference values for fingerprint fields. All four routes require no scope: they expose no account data.
Platforms
GET/fingerprint/platforms#
Allowed `os`, `os_arch` and `os_version` values.
Example call
curl -sS "https://api.cloakctl.com/api/v2/automation/fingerprint/platforms" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Response
{
"success": true,
"msg": "",
"code": null,
"data": [
{
"os": "win",
"archs": [
{
"arch": "x86",
"os_versions": [
"10",
"11"
]
}
]
},
{
"os": "mac",
"archs": [
{
"arch": "x86",
"os_versions": [
"13",
"14",
"15",
"26"
]
},
{
"arch": "arm",
"os_versions": [
"13",
"14",
"15",
"26"
]
}
]
},
{
"os": "linux",
"archs": [
{
"arch": "x86",
"os_versions": []
}
]
},
{
"os": "android",
"archs": [
{
"arch": "arm",
"os_versions": [
"12",
"13",
"14",
"15"
]
}
]
}
]
}Notes
- Values can be put straight into
fingerprint.os,fingerprint.os_archandfingerprint.os_version; an unsupported combination returns 400 naming the field. osaccepts the synonymswindows/macos, but responses always use the canonicalwin/mac.
Error codes: unauthorized rate_limited unavailable
Screens
GET/fingerprint/screens#
Screen sizes for the `fingerprint.screen` field.
Example call
curl -sS "https://api.cloakctl.com/api/v2/automation/fingerprint/screens" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
os (query) | string | no | Filter by platform: `win`, `mac`, `linux`, `android`. | |
os_arch (query) | string | no | Filter by architecture: `x86` or `arm`. |
Response
{
"success": true,
"msg": "",
"code": null,
"data": [
{
"value": "1920x1080",
"platform": "win",
"archs": [
"x86"
]
},
{
"value": "2560x1440",
"platform": "win",
"archs": [
"x86"
]
}
]
}Notes
- Besides the values above, the server accepts a
WxHstring with both sides within 800..8192. - No pagination: the response is the full list of matching sizes.
- An unknown
os/os_archreturns 400bad_request.
Error codes: bad_request unauthorized rate_limited unavailable
Device models
GET/fingerprint/device_models#
Android device models for mobile fingerprints.
Example call
curl -sS "https://api.cloakctl.com/api/v2/automation/fingerprint/device_models" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
device_type (query) | string | no | `phone` or `tablet`; any other value returns 400. |
Response
{
"success": true,
"msg": "",
"code": null,
"data": [
{
"value": "M2102J20SG",
"os": "android",
"os_versions": [
"12"
],
"archs": [
"arm"
],
"device_type": "phone"
},
{
"value": "21051182G",
"os": "android",
"os_versions": [
"13"
],
"archs": [
"arm"
],
"device_type": "tablet"
}
]
}Notes
- A model only makes sense together with
os: android; desktop fingerprints do not use it. - No pagination; an unknown
device_typereturns 400bad_request.
Error codes: bad_request unauthorized rate_limited unavailable
GPU renderers
GET/fingerprint/renderers#
GPU/renderer values for a fingerprint.
Example call
curl -sS "https://api.cloakctl.com/api/v2/automation/fingerprint/renderers?os=win&os_arch=x86" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
os (query) | string | no | Filter by platform. | |
os_arch (query) | string | no | Filter by architecture. | |
page (query) | integer | no | 0 | Zero-based page number. |
page_len (query) | integer | no | 100 | Page size, from 1 to 1000. |
Response
{
"success": true,
"msg": "",
"code": null,
"data": [
{
"value": "NVIDIA GeForce GTX 660",
"platform": "win",
"archs": [
"x86"
]
},
{
"value": "Apple M2 Pro",
"platform": "mac",
"archs": [
"arm"
]
}
],
"total_count": 250,
"page": 0
}Notes
- The only fingerprint catalogue with pagination:
total_countandpageat the top level. - Without parameters all renderers are returned; filters only shorten the response. An unknown
os/os_archreturns 400bad_request.
Error codes: bad_request unauthorized rate_limited unavailable
Extensions
Account extension catalog — read-only in v1.
List extensions
GET/teams/extensions#
Scope: profiles_read
Extensions installed in at least one account profile.
Example call
curl -sS "https://api.cloakctl.com/api/v2/automation/teams/extensions" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
start (query) | integer | no | 0 | Offset from the start of the list. |
limit (query) | integer | no | 25 | Chunk size, from 1 to 200. |
Response
{
"success": true,
"msg": "",
"code": null,
"data": [
{
"uuid": "ext_1a2b3c4d@1.0",
"id": "ext_1a2b3c4d",
"name": "AdBlock",
"version": "1.0",
"icon": null,
"size": 10,
"checksum": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
"enabled_profiles": 1
}
]
}Notes
uuidis the<id>@<version>composite, as in Octo; the route has nototal_count.- Extensions are read-only through v2: install, enablement and deletion happen in the client.
- Scope
profiles_read; there is no separate extension permission.
Error codes: unauthorized no_permission rate_limited unavailable
Meta
Machine description of the cloud API v2.
OpenAPI document
GET/openapi.json#
OpenAPI description of v2 routes only; no authentication required.
The document is generated from the running application and filtered: only `/api/v2/automation/*` paths are included. There are no internal `/v1` routes and no secrets, so no token is needed.
Example call
curl -sS "https://api.cloakctl.com/api/v2/automation/openapi.json"Response
{
"openapi": "3.1.0",
"info": {
"title": "CloakCTL Automation API",
"version": "2.0.0",
"description": "Public automation API of CloakCTL (v2). Authentication: X-Octo-Api-Token header."
},
"servers": [
{
"url": "https://api.cloakctl.com/api/v2/automation"
}
],
"paths": {
"/api/v2/automation/profiles": {
"get": {},
"post": {}
},
"/api/v2/automation/subscription": {
"get": {}
}
}
}Notes
- Handy for client generation, though the source of truth is this page and
API_V2.md. - No authentication is required for this route: the document contains nothing but public v2 shapes.
- The schema is generated server-side from the real handlers and filtered by the
/api/v2/automationprefix.
Error codes: unavailable
Local API
The local API is a second HTTP server inside the CloakCTL client. It listens on the loopback address only (default http://127.0.0.1:48900/api) and works with sessions of this process: it cannot start a profile on another machine.
Port 48900 is used because 58888 is occupied by Octo Browser's local API. Port and enablement live in ~/.cloakctl/api-settings.json:
{"format_version": 1, "port": 48900, "enabled": true}The CLOAKCTL_LOCAL_API_PORT environment variable overrides the port for scenarios (1024..65534 allowed). A busy port is not a panel failure: the listener simply does not start, the panel keeps working and the settings screen shows "Port is busy — choose another one". There is no automatic port fallback: the address must stay predictable for scripts.
The token is verified on the server through the machine introspect route and cached: 60 seconds for a positive verdict, 5 seconds for a negative one. Without connectivity the answer is 503 api.unavailable, with no fallback to local checks.
Token scopes are checked per route: profiles_read for the active list, profiles_edit for start, stop and force stop, profile_passwords for passwords, proxies_read for proxy checks. Without the scope the answer is 403 no_permission.
Only the client itself can start and stop profiles: a lease without a live session does not count as a running profile, and GET /profiles/active shows only sessions of this process.
Local error codes
| HTTP | Code | error_code | When |
|---|---|---|---|
400 | bad_request | 400 | The body cannot be parsed, an unknown field or a wrong type. |
400 | profiles.not_found | 6 | No profile with that `uuid` (Octo launch code 6). |
400 | profiles.invalid_password | 1 | Wrong profile password (Octo launch code 1). |
400 | profiles.start_failed | 3 | The profile failed to start for a reason other than proxy or password. |
400 | profiles.proxy_error | 4 | The profile proxy data could not be read (Octo launch code 4). |
400 | profiles.invalid_proxy | 5 | The profile proxy data is invalid (Octo launch code 5). |
400 | profiles.no_subscription | 7 | No active subscription for launching the profile (Octo launch code 7). |
400 | profiles.outdated_version | 8 | The core or client is outdated for this profile (Octo launch code 8). |
400 | profiles.version_mismatch | 9 | The profile version parts are inconsistent (Octo launch code 9). |
400 | debug_port.not_supported | 8 | A fixed numeric `debug_port` is not supported; the error text is `fixed debug port is not supported; use debug_port=true and connect to ws_endpoint`. |
400 | auth.managed_by_api_token | 400 | `auth/login` or `auth/logout` was called; both are rejected in token mode. |
400 | proxies.proxy_connection_error | -1 | The proxy is unreachable, rejected the connection or the catalog record is missing; the reason is in `error`. |
413 | bad_request | 413 | The request body exceeds 64 KiB (`request body is too large`). |
401 | unauthorized | 401 | The token is missing (`api token required`), unknown or revoked (`invalid api token`). |
403 | no_permission | 403 | The token lacks the scope the route requires (`profiles_read`, `profiles_edit`, `profile_passwords`, `proxies_read`). |
403 | account_suspended | license_expired | license_revoked | 403 | The server refused the account or licence; the exact code arrives in `code` and the text in `error`. |
404 | not_found | 404 | Unknown route. |
405 | method_not_allowed | 405 | The method is not supported by a known route. |
409 | profiles.already_started | 2 | The profile is already running (Octo launch code 2). |
409 | profiles.not_started | 409 | A stop was requested for a profile that is not running (including an unknown `uuid`). |
409 | profiles.still_closing | 409 | The forced stop did not observe the actual close within 15 seconds; the close was not interrupted and is still running. |
409 | client.update_failed | 409 | No update is available: `Update is not triggered. No available version`. |
500 | internal | 500 | An unexpected client error. |
503 | api.unavailable | 503 | No connectivity to the server: the token cannot be verified and the account login cannot be read. |
503 | profiles.password_change_failed | 1 | The profile password could not be changed or cleared. |
Local API routes
All paths below are relative to the base URL http://127.0.0.1:48900/api.
Profiles on this machine
Start and stop profiles in the local client. Only sessions of this process are visible: a lease without a live session does not count as running.
List active profiles
GET/profiles/active#
Scope: profiles_read
Profiles currently running in this client.
Example call
curl -sS "http://127.0.0.1:48900/api/profiles/active" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Response
[
{
"uuid": "prof_35ef8623",
"state": "STARTED",
"headless": true,
"start_time": 1764163200,
"ws_endpoint": "ws://127.0.0.1:55834/devtools/browser/a26c9612-6479-43f1-87ef-34590321a99a",
"debug_port": "55834",
"browser_pid": 26616,
"hidden": false,
"phase": "running",
"one_time": false
}
]Notes
state:STARTEDis running,CLOSINGis shutting down;CLOSINGentries carry no ws fields.phaseisstarting,runningorclosing.ws_endpoint,debug_portandbrowser_pidappear only onSTARTEDentries;debug_portis a string andstart_timeis Unix seconds.- The list reflects sessions in process memory: restarting the client empties it.
- Even a headed profile has
ws_endpoint: the client already speaks CDP to it.
Error codes: unauthorized api.unavailable
Start profile
POST/profiles/start#
Scope: profiles_edit
Starts a profile and returns the CDP endpoint for automation.
Example call
curl -sS -X POST "http://127.0.0.1:48900/api/profiles/start" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"uuid":"prof_35ef8623","headless":true,"debug_port":true,"timeout":120,"flags":[]}'{
"uuid": "prof_35ef8623",
"headless": true,
"debug_port": true,
"timeout": 120,
"flags": []
}Body fields
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
uuid | string | yes | Identifier of a profile created through the cloud API. | |
headless | boolean | no | false | `true` runs without a window; `false` shows the browser. |
debug_port | boolean | no | true | `true` enables the debugging port on a free port; `false` (or 0) omits the ws fields. Any positive number is rejected: 400 `debug_port.not_supported`. |
timeout | integer | no | 120 | Seconds to wait for readiness, from 1 to 300. |
flags | array<string> | no | Extra core arguments. Arguments that break the launch are rejected: `--user-data-dir`, `--remote-debugging-port*`, `--headless*`. | |
password | string | no | Profile password when the profile is protected. |
Response
{
"uuid": "prof_35ef8623",
"state": "STARTED",
"headless": true,
"start_time": 1764163200,
"ws_endpoint": "ws://127.0.0.1:54739/devtools/browser/4d05ab38-20bf-45e6-b463-6bc643028107",
"debug_port": "54739",
"browser_pid": 10108,
"hidden": false,
"phase": "running",
"one_time": false,
"connection_data": {
"ip": null,
"country": null
}
}Notes
- For a password-protected profile call
POST /api/profiles/passwordfirst, thenstart(or passpasswordin the body). The password is 4 to 255 characters. uuidmust look likeprof_xxxxxxxx. An unknown field in the body returns 400bad_requestinstead of being silently dropped.timeoutis whole seconds from 1 to 300.flagsis an array of at most 64 strings of up to 512 characters without control characters;--user-data-dir*,--remote-debugging-port*and--headless*are rejected (otherwise 400bad_request).passwordon an unprotected profile is accepted and ignored: there is nothing to unlock. A protected profile opens as in the UI — unlock with the password first, then start.only_localis accepted and ignored: Octo sends this field but its documentation does not define the semantics, so rejecting it would break existing scripts. Any other unknown field returns 400bad_request.- A fixed debugging port is not supported: the sealed-profile guard requires the literal
--remote-debugging-port=0, so the client always picks a free port (R1). A positive number indebug_portreturns 400debug_port.not_supported. ws_endpointis present for a headed profile too: automation works the same way. The field may benullif the browser did not report an address.connection_datais kept for Octo shape compatibility, butipandcountryare alwaysnull: the local API does not report proxy geo; use/api/proxies/checkfor that.- Starting an already running profile returns 409
profiles.already_started; an unknown profile returns 400profiles.not_found; a proxy failure returns 400profiles.proxy_errororprofiles.invalid_proxy; any other launch failure returns 400profiles.start_failed; a licence refusal returns 403 with the licence code. - The route requires scope
profiles_edit; without it the answer is 403no_permission.
Error codes: bad_request profiles.not_found profiles.invalid_password profiles.start_failed profiles.proxy_error profiles.invalid_proxy profiles.already_started debug_port.not_supported no_permission license_expired unauthorized api.unavailable
Stop profile
POST/profiles/stop#
Scope: profiles_edit
Graceful stop that syncs profile data.
Example call
curl -sS -X POST "http://127.0.0.1:48900/api/profiles/stop" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"uuid":"prof_35ef8623"}'{
"uuid": "prof_35ef8623"
}Response
{
"msg": "Profile stopped"
}Notes
- The answer means the close has been accepted, not that the browser is already closed: the profile may still appear in
GET /api/profiles/activewithstate: "CLOSING"while synchronisation runs. - Stopping nothing (including an unknown
uuid) returns 409profiles.not_started: the route does not check profile existence separately. - When speed matters, use
force_stop. - The route requires scope
profiles_edit; without it the answer is 403no_permission.
Error codes: bad_request profiles.not_started no_permission unauthorized api.unavailable
Force stop profile
POST/profiles/force_stop#
Scope: profiles_edit
Stops immediately without waiting for synchronisation.
Example call
curl -sS -X POST "http://127.0.0.1:48900/api/profiles/force_stop" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"uuid":"prof_35ef8623"}'{
"uuid": "prof_35ef8623"
}Response
{
"msg": "Profile stopped successfully"
}Notes
- A forced stop is accelerated but does not bypass sealing or publishing: the client performs an accelerated close and returns 200 only once the session has actually closed (the wait is capped at 15 seconds).
- There is no unsynced-data guarantee here either: the close is accelerated. Synchronisation runs, but this route does not promise that no data is lost.
- If the close did not finish in time the answer is 409
profiles.still_closing: the close was not interrupted, but 'stopped' has not happened yet. Do not report it as success. - Repeating a force stop on an already stopped profile returns 200, idempotently; an unknown profile returns 400
profiles.not_found. - The cloud force stop only releases the lease while the browser window lives on; here the session itself is closed.
- The route requires scope
profiles_edit; without it the answer is 403no_permission.
Error codes: bad_request profiles.not_found profiles.still_closing no_permission unauthorized api.unavailable
Profile passwords
The password protects local opening of the profile. Both operations run before launch.
Set profile password
POST/profiles/password#
Scope: profile_passwords
Sets the profile password on this machine.
Example call
curl -sS -X POST "http://127.0.0.1:48900/api/profiles/password" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"uuid":"prof_35ef8623","password":"strong-password"}'{
"uuid": "prof_35ef8623",
"password": "strong-password"
}Response
{
"msg": "Profile password has been set"
}Notes
- The password is 4 to 255 characters: shorter or longer returns 400
bad_request. - After setting a password,
startrequirespasswordin the body (or an unlock in the UI). - An unknown profile returns 400
profiles.not_found; a change failure returns 503profiles.password_change_failed. - An unknown field in the body returns 400
bad_request; the route requires scopeprofile_passwords, otherwise 403no_permission. - For a protected profile the password is part of data protection, so removal is only through
DELETE /profiles/password.
Error codes: bad_request profiles.not_found no_permission unauthorized api.unavailable profiles.password_change_failed
Clear profile password
DELETE/profiles/password#
Scope: profile_passwords
Removes the profile password; the body is required even on DELETE.
Example call
curl -sS -X DELETE "http://127.0.0.1:48900/api/profiles/password" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"uuid":"prof_35ef8623","password":"strong-password"}'{
"uuid": "prof_35ef8623",
"password": "strong-password"
}Response
{
"msg": "Profile password has been cleared"
}Notes
- Send the current password: a wrong one returns 400
profiles.invalid_password, and clearing without it is rejected. - An unknown profile returns 400
profiles.not_found; a failure returns 503profiles.password_change_failed. - The route requires scope
profile_passwords; without it the answer is 403no_permission. - A body on DELETE is unusual but matches Octo: some HTTP clients require explicitly enabling it.
Error codes: bad_request profiles.not_found profiles.invalid_password no_permission unauthorized api.unavailable profiles.password_change_failed
Proxy check
The check runs from the operator machine, the same path the profile traffic takes.
Check proxy
POST/proxies/check#
Scope: proxies_read
Checks a saved proxy or the passed proxy data.
Example call
curl -sS -X POST "http://127.0.0.1:48900/api/proxies/check" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"socks5","host":"gw.example.net","port":1080,"login":"user","password":"secret"}'{
"type": "socks5",
"host": "gw.example.net",
"port": 1080,
"login": "user",
"password": "secret"
}Body fields
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
uuid | string | no | Check an account catalog record by its `uuid` (`prx_...`). | |
type | string | no | `http`, `https`, `socks5` (alias `socks`) when checking passed data. The local API does not check `ssh`: it returns 400 `bad_request` with an explanation. | |
host | string | no | Proxy host. | |
port | integer | no | Proxy port. | |
login | string | no | Login when required. | |
password | string | no | Password with the login. |
Response
{
"ip": "203.0.113.10",
"country": "Germany",
"timezone": "Europe/Berlin",
"latency_ms": 84,
"real_ip": "203.0.113.10",
"country_full_name": "Germany",
"city_name": "Frankfurt am Main",
"isp": "Example ISP",
"connection_type": "Corporate"
}Notes
- The response is flat: fields sit directly in the object with no
datawrapper — this differs from Octo, whosePOST /api/proxies/checkwraps the result in{"data": {...}}. - The guaranteed fields are
ip,country,timezoneandlatency_ms;real_ip,country_full_name,city_name,ispandconnection_typeadd detail and may benullwhen the provider does not report them. - Only
http,httpsandsocks5(plus thesocksalias) can be checked; the local client does not checkssh— it returns 400bad_requestlisting the supported types. - An unreachable or unknown proxy returns 400
proxies.proxy_connection_error(error_code-1) with the reason inerror. An unknown catalog record yields the same code with the textsaved proxy not found. - The route requires scope
proxies_read; without it the answer is 403no_permission.
Error codes: bad_request proxies.proxy_connection_error no_permission unauthorized api.unavailable
Client
Client version information and update triggering.
Client versions
GET/update#
Current and latest client versions.
Example call
curl -sS "http://127.0.0.1:48900/api/update" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Response
{
"current": "2.4.1",
"latest": "2.4.1",
"update_required": false
}Notes
update_required: truemeans a newer client build is available and updating is recommended. There is no separate 'critical update' notion as in Octo: the flag does not claim the current version stopped working.currentis the installed version andlatestthe newest available; when there is nothing to update,POST /api/updatereturns 409client.update_failed.
Error codes: unauthorized api.unavailable
Trigger update
POST/update#
Asks the client to update.
Example call
curl -sS -X POST "http://127.0.0.1:48900/api/update" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Response
{
"msg": "update triggered"
}Notes
- When no update is available the response is 409
client.update_failedwith the textUpdate is not triggered. No available version; checkGET /api/updatefirst. - A new version downloads in the background;
msgonly confirms the trigger.
Error codes: client.update_failed unauthorized api.unavailable
Account username
GET/username#
Account login the client is attached to.
Example call
curl -sS "http://127.0.0.1:48900/api/username" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Response
{
"username": "operator@example.com"
}Notes
- The client asks the server for the login: without connectivity it returns 503
api.unavailable(R5).
Error codes: unauthorized api.unavailable
Client version
GET/version#
Client version string (an addition to Octo).
Example call
curl -sS "http://127.0.0.1:48900/api/version" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Response
{
"version": "2.4.1"
}Notes
- Octo has no such route — it is added for support diagnostics.
Error codes: unauthorized api.unavailable
Account authentication
The local API runs under an API token, so interactive login and logout are disabled — as in Octo when started with `OCTO_API_TOKEN`.
Login
POST/auth/login#
Always 400: login is managed by the API token.
Example call
curl -sS -X POST "http://127.0.0.1:48900/api/auth/login" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{}Response
{
"code": "auth.managed_by_api_token",
"error": "login and logout are managed by the api token; the local client API has no interactive session",
"error_code": 400
}Notes
- The request body is ignored. The only access method is the token header.
- The error is always returned, even with a valid token: the local API has no interactive session.
Error codes: auth.managed_by_api_token
Logout
POST/auth/logout#
Always 400: logout is managed by the API token.
Example call
curl -sS -X POST "http://127.0.0.1:48900/api/auth/logout" \
-H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"Response
{
"code": "auth.managed_by_api_token",
"error": "login and logout are managed by the api token; the local client API has no interactive session",
"error_code": 400
}Notes
- To end access, revoke the token in the client — that disables the script immediately.
- Like login, logout always returns this error: there is no session to end.
Error codes: auth.managed_by_api_token
Next steps
- Guide — quick start, examples and error handling.
- Octo compatibility — shape and identifier differences.
- Changelog — what appeared and when.