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:

HeaderPriorityDescription
X-Octo-Api-Token: <token>1Primary header. It is checked first for Octo Browser compatibility: a script that already sends this header keeps working unchanged.
Authorization: Bearer <token>2Conventional HTTP authentication, convenient when a shared auth layer injects the token.
X-CloakCTL-Api-Token: <token>3CloakCTL-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.

json
{
  "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.

json
{
  "success": false,
  "msg": "Profile not found",
  "code": "not_found",
  "data": ""
}

Parsing rules:

  1. Branch on code and the HTTP status. msg is human text and may change.
  2. List responses carry total_count and page at the top level.
  3. data is polymorphic: an object, an array, a string or null depending 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.

json
{
  "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.

json
{
  "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.

PlanTokensRPMRPH
start 130600
solo (aliases: legacy)1601200
team (aliases: working)31203000
scale (aliases: advanced)52406000

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:

HeaderDescription
X-Ratelimit-LimitRequests-per-minute limit of the account plan (RPM).
X-Ratelimit-Limit-HourRequests-per-hour limit of the account plan (RPH).
X-Ratelimit-RemainingRequests left in the current minute window, including the request that produced this response.
X-Ratelimit-Remaining-HourRequests left in the current hour window.
X-Ratelimit-ResetUnix timestamp (UTC, seconds) when a minute-window slot frees up.
Retry-AfterOnly on a 429 response: seconds to wait until the current window ends. Do not retry earlier.

Request costs:

RequestCost (RPM / RPH)Description
Any cloud API request, default1 / 1The cost unit is a request, not a profile.
Response with status 400, 409 or 4226 / 1Validation errors and conflicts cost more so that retry storms are not free.
Response with status 401, 403 or 4290 / 0A refusal returned by the server itself costs nothing.
DELETE /profiles and POST /profiles/trash_bin/restore1 / 1A 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

HTTPCodeWhen
400bad_requestWrong shape, type or value bounds.
401unauthorizedToken missing, unknown or revoked.
403no_permissionThe token lacks the scope the route requires.
403account_suspendedThe account is disabled.
403account_requiredThe device is not attached to an account.
403license_missingThe account has no licence.
403license_expiredThe licence has expired; `data.not_after` carries the end time in ISO format.
403license_revokedThe licence has been revoked.
403license_not_startedThe licence period has not started yet.
404not_foundProfile, tag or proxy not found.
409profile_existsThe profile title is already taken.
409profile_in_useThe profile has a live lease.
409profile_deletedThe profile is in the trash bin.
409trash_expiredThe trash retention period has expired.
409api_tokens.limit_reachedThe plan token cap is reached (relevant to token management).
409conflictOther state conflicts.
422bad_requestSchema validation error, repackaged by the server into the common envelope.
429rate_limitedThe rate limit is exhausted; wait for `Retry-After`.
503unavailableThe 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

bash
curl -sS "https://api.cloakctl.com/api/v2/automation/subscription" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Response

HTTP 200 — Plan, licence expiry, limits and remaining window quotas.json
{
  "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_at is the licence end in Unix seconds, or null when the licence does not expire.
  • window_reset is the Unix time when the minute window frees up; the hour window is reported in the X-Ratelimit-Limit-Hour header.
  • An unknown plan is served with the solo limits.

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

bash
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

NameTypeRequiredDefaultDescription
page (query)integerno0Zero-based page number.
page_len (query)integerno100Page size, from 1 to 1000.
search (query)stringnoCase-insensitive substring in the title or description.
tag (query)stringnoTag **name**, case-insensitive (not `uuid`).
status (query)stringno`0` stopped, `1` running (live lease), `2` error (never produced in v1).
fields (query)stringnoComma-separated projection: `uuid,title,description,status,tags,proxy,fingerprint,created_at,last_opened_at,launch_count,state_version,storage_mode`.
ordering (query)stringno`active` — most recently opened first; `created_at` — by creation time (default).

Response

HTTP 200 — A page of profiles and the total record count.json
{
  "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_bin for it.
  • status: 0 stopped, 1 running (live non-expired lease), 2 error; value 2 never appears in v1.
  • tag filters by tag name, case-insensitively, not by uuid.
  • proxy is null or a catalog record without credentials; a manually entered proxy has uuid: null and title: "".
  • created_at and last_opened_at are Unix seconds (the latter may be null). storage_mode (legacy/sealed_v1) is our extension; v2 handles both formats transparently.
  • noise in a fingerprint is always null: noise is derived by the node from seed and 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

bash
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}}'
json
{
  "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

NameTypeRequiredDefaultDescription
titlestringyesProfile title, 1..64 characters. Globally unique among live profiles: a taken title returns 409 `profile_exists`.
descriptionstringnoFree-form note up to 4096 characters.
tagsarray<string>noUp to 20 tag **names**; missing catalog tags are created by the server.
proxyobjectno`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.
fingerprintobjectnoOptional; 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

HTTP 201 — The created profile in the same shape as in the list.json
{
  "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_request naming the field instead of being silently dropped.
  • Bounds: title 1..64, description <=4096, at most 20 tags, user_agent <=512, renderer <=256, cpu 1..128, ram 1..256, screen 800..8192 per side.
  • An unsupported os/os_arch/os_version combination returns 400 naming the field.
  • noise is accepted and not stored: fingerprint noise is derived by the node from seed.
  • A proxy in inline form is added to the account catalog and can be reused by other profiles; https/ssh are 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

bash
curl -sS "https://api.cloakctl.com/api/v2/automation/profiles/prof_35ef8623" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Parameters

NameTypeRequiredDefaultDescription
uuid (path)stringyesProfile identifier like `prof_xxxxxxxx`.

Response

HTTP 200 — The whole profile.json
{
  "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

bash
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"}}'
json
{
  "title": "alpha-2",
  "tags": [
    "Работа",
    "Клиент"
  ],
  "fingerprint": {
    "cpu": 6
  }
}

Parameters

NameTypeRequiredDefaultDescription
uuid (path)stringyesProfile identifier.

Response

HTTP 200 — The updated profile.json
{
  "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 GET is needed.
  • fingerprint is partial: {"fingerprint":{"cpu":6}} changes only cpu. Changing os/os_version/os_arch recomputes preset fields; an unsupported combination returns 400 naming the field.
  • "proxy": null clears the proxy.
  • tags is 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 409 profile_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

bash
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}'
json
{
  "uuids": [
    "prof_35ef8623"
  ],
  "skip_trash_bin": false
}

Body fields

NameTypeRequiredDefaultDescription
uuidsarray<string>yesOne to one hundred profile identifiers.
skip_trash_binbooleannofalse`true` deletes immediately, skipping the trash bin.

Response

HTTP 200 — Batch outcome: what was deleted, what was trashed and what failed.json
{
  "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.failed as {uuid, code}. A client must inspect that list, not just the HTTP status.
  • skip_trash_bin defaults 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 failed gets code: "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

bash
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

NameTypeRequiredDefaultDescription
page (query)integerno0Zero-based page number.
page_len (query)integerno100Page size, from 1 to 1000.
search (query)stringnoCase-insensitive substring in the profile title.

Response

HTTP 200 — Trash records with deletion time and purge deadline.json
{
  "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_at and purge_after are 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

bash
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"]}'
json
{
  "uuids": [
    "prof_35ef8623"
  ]
}

Response

HTTP 200 — Per-identifier outcome: restored, not found and failed.json
{
  "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_uuids are records missing from the trash bin; failed_uuids are conflicts, each as {uuid, code}.
  • Paid restores do not exist in v1: payment_required_uuids is 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_expired until 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

bash
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

NameTypeRequiredDefaultDescription
uuid (path)stringyesProfile identifier.

Response

HTTP 200 — The lease is released; `had_lease` reports whether there was one.json
{
  "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 version field 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

bash
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"]}'
json
{
  "uuids": [
    "prof_35ef8623",
    "prof_7c1d92ab"
  ]
}

Response

HTTP 200 — All leases have been released.json
{
  "success": true,
  "msg": "Profiles stopped successfully",
  "code": null,
  "data": {
    "stopped_uuids": [
      "prof_35ef8623",
      "prof_7c1d92ab"
    ],
    "failed_uuids": []
  }
}
HTTP 207 — Some profiles stopped, some did not: inspect `failed_uuids`.json
{
  "success": true,
  "msg": "Profiles stopped successfully",
  "code": null,
  "data": {
    "stopped_uuids": [
      "prof_35ef8623"
    ],
    "failed_uuids": [
      {
        "uuid": "prof_7c1d92ab",
        "code": "not_found"
      }
    ]
  }
}
HTTP 400 — No profile was stopped: `code: bad_request`.json
{
  "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

bash
curl -sS "https://api.cloakctl.com/api/v2/automation/tags" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Response

HTTP 200 — Account tags.json
{
  "success": true,
  "msg": "",
  "code": null,
  "data": [
    {
      "uuid": "42",
      "name": "Работа",
      "color": "blue",
      "profiles": 7
    },
    {
      "uuid": "43",
      "name": "Клиент",
      "color": "",
      "profiles": 0
    }
  ]
}

Notes

  • color is 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.
  • uuid is 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

bash
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"}'
json
{
  "name": "Клиент",
  "color": "green"
}

Response

HTTP 201 — The created tag.json
{
  "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 409 conflict.
  • The tags_edit scope 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

bash
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"}'
json
{
  "name": "Клиенты",
  "color": "lime"
}

Parameters

NameTypeRequiredDefaultDescription
uuid (path)stringyesThe tag `uuid` — the catalog row id as a string.

Response

HTTP 200 — The updated tag; profile links are preserved.json
{
  "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 404 not_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

bash
curl -sS -X DELETE "https://api.cloakctl.com/api/v2/automation/tags/42" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Parameters

NameTypeRequiredDefaultDescription
uuid (path)stringyesThe tag `uuid`.

Response

HTTP 200 — The tag is deleted; profiles remain and only lose the link.json
{
  "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

bash
curl -sS "https://api.cloakctl.com/api/v2/automation/proxies" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Response

HTTP 200 — Catalog records.json
{
  "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_read and narrow the other scopes.
  • No timezone field is returned in v1 and the cloud does not check proxies: use the local POST /api/proxies/check.
  • Only http and socks5 are supported; there are no VPN proxies in v1; https and ssh are 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

bash
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"}'
json
{
  "type": "socks5",
  "title": "proxy-one",
  "host": "1.2.3.4",
  "port": 1080,
  "login": "user",
  "password": "secret"
}

Body fields

NameTypeRequiredDefaultDescription
typestringyes`http` or `socks5` (alias `socks`). `https` and `ssh` are not supported by the core — 400 `bad_request`.
titlestringyesRecord name, 1..255 characters (`name` is an alias).
hoststringyesIPv4, IPv6 or a domain name, up to 255 characters.
portintegeryesPort, 1..65535.
loginstringnoLogin, up to 255 characters. An empty string clears it on PATCH.
passwordstringnoPassword, up to 255 characters. An empty string clears it on PATCH.
change_ip_urlstringnoProvider IP rotation URL, http/https (`rotate_url` is an alias).
external_idstringnoAccepted for compatibility and **not stored**.

Response

HTTP 201 — The created record without the secret in the response.json
{
  "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

  • type is http or socks5 (socks is an alias); https/ssh return 400 bad_request.
  • A record with the same host, port and login is reused, so duplicates are not created.
  • external_id is 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

bash
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"}'
json
{
  "login": "user",
  "password": "new-secret"
}

Parameters

NameTypeRequiredDefaultDescription
uuid (path)stringyesRecord identifier like `prx_xxxxxxxx`.

Body fields

NameTypeRequiredDefaultDescription
typestringno`http` or `socks5` (alias `socks`). `https` and `ssh` are not supported by the core — 400 `bad_request`.
titlestringnoRecord name, 1..255 characters (`name` is an alias).
hoststringnoIPv4, IPv6 or a domain name, up to 255 characters.
portintegernoPort, 1..65535.
loginstringnoLogin, up to 255 characters. An empty string clears it on PATCH.
passwordstringnoPassword, up to 255 characters. An empty string clears it on PATCH.
change_ip_urlstringnoProvider IP rotation URL, http/https (`rotate_url` is an alias).
external_idstringnoAccepted for compatibility and **not stored**.

Response

HTTP 200 — The updated record.json
{
  "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/password clears 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 /proxies with scope proxies_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

bash
curl -sS -X DELETE "https://api.cloakctl.com/api/v2/automation/proxies/prx_5cfc3b13" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Parameters

NameTypeRequiredDefaultDescription
uuid (path)stringyesRecord identifier.

Response

HTTP 200 — The record is deleted.json
{
  "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_delete belongs 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

bash
curl -sS "https://api.cloakctl.com/api/v2/automation/fingerprint/platforms" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Response

HTTP 200 — Operating systems, architectures and versions.json
{
  "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_arch and fingerprint.os_version; an unsupported combination returns 400 naming the field.
  • os accepts the synonyms windows/macos, but responses always use the canonical win/mac.

Error codes: unauthorized rate_limited unavailable

Screens

GET/fingerprint/screens#

Screen sizes for the `fingerprint.screen` field.

Example call

bash
curl -sS "https://api.cloakctl.com/api/v2/automation/fingerprint/screens" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Parameters

NameTypeRequiredDefaultDescription
os (query)stringnoFilter by platform: `win`, `mac`, `linux`, `android`.
os_arch (query)stringnoFilter by architecture: `x86` or `arm`.

Response

HTTP 200 — Allowed sizes.json
{
  "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 WxH string with both sides within 800..8192.
  • No pagination: the response is the full list of matching sizes.
  • An unknown os/os_arch returns 400 bad_request.

Error codes: bad_request unauthorized rate_limited unavailable

Device models

GET/fingerprint/device_models#

Android device models for mobile fingerprints.

Example call

bash
curl -sS "https://api.cloakctl.com/api/v2/automation/fingerprint/device_models" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Parameters

NameTypeRequiredDefaultDescription
device_type (query)stringno`phone` or `tablet`; any other value returns 400.

Response

HTTP 200 — Models and their platform.json
{
  "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_type returns 400 bad_request.

Error codes: bad_request unauthorized rate_limited unavailable

GPU renderers

GET/fingerprint/renderers#

GPU/renderer values for a fingerprint.

Example call

bash
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

NameTypeRequiredDefaultDescription
os (query)stringnoFilter by platform.
os_arch (query)stringnoFilter by architecture.
page (query)integerno0Zero-based page number.
page_len (query)integerno100Page size, from 1 to 1000.

Response

HTTP 200 — Renderer list.json
{
  "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_count and page at the top level.
  • Without parameters all renderers are returned; filters only shorten the response. An unknown os/os_arch returns 400 bad_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

bash
curl -sS "https://api.cloakctl.com/api/v2/automation/teams/extensions" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Parameters

NameTypeRequiredDefaultDescription
start (query)integerno0Offset from the start of the list.
limit (query)integerno25Chunk size, from 1 to 200.

Response

HTTP 200 — The extension catalog.json
{
  "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

  • uuid is the <id>@<version> composite, as in Octo; the route has no total_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

bash
curl -sS "https://api.cloakctl.com/api/v2/automation/openapi.json"

Response

HTTP 200 — The OpenAPI document itself, without an envelope.json
{
  "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/automation prefix.

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:

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

HTTPCodeerror_codeWhen
400bad_request400The body cannot be parsed, an unknown field or a wrong type.
400profiles.not_found6No profile with that `uuid` (Octo launch code 6).
400profiles.invalid_password1Wrong profile password (Octo launch code 1).
400profiles.start_failed3The profile failed to start for a reason other than proxy or password.
400profiles.proxy_error4The profile proxy data could not be read (Octo launch code 4).
400profiles.invalid_proxy5The profile proxy data is invalid (Octo launch code 5).
400profiles.no_subscription7No active subscription for launching the profile (Octo launch code 7).
400profiles.outdated_version8The core or client is outdated for this profile (Octo launch code 8).
400profiles.version_mismatch9The profile version parts are inconsistent (Octo launch code 9).
400debug_port.not_supported8A 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`.
400auth.managed_by_api_token400`auth/login` or `auth/logout` was called; both are rejected in token mode.
400proxies.proxy_connection_error-1The proxy is unreachable, rejected the connection or the catalog record is missing; the reason is in `error`.
413bad_request413The request body exceeds 64 KiB (`request body is too large`).
401unauthorized401The token is missing (`api token required`), unknown or revoked (`invalid api token`).
403no_permission403The token lacks the scope the route requires (`profiles_read`, `profiles_edit`, `profile_passwords`, `proxies_read`).
403account_suspended | license_expired | license_revoked403The server refused the account or licence; the exact code arrives in `code` and the text in `error`.
404not_found404Unknown route.
405method_not_allowed405The method is not supported by a known route.
409profiles.already_started2The profile is already running (Octo launch code 2).
409profiles.not_started409A stop was requested for a profile that is not running (including an unknown `uuid`).
409profiles.still_closing409The forced stop did not observe the actual close within 15 seconds; the close was not interrupted and is still running.
409client.update_failed409No update is available: `Update is not triggered. No available version`.
500internal500An unexpected client error.
503api.unavailable503No connectivity to the server: the token cannot be verified and the account login cannot be read.
503profiles.password_change_failed1The 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

bash
curl -sS "http://127.0.0.1:48900/api/profiles/active" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Response

HTTP 200 — A bare array without an envelope.json
[
  {
    "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: STARTED is running, CLOSING is shutting down; CLOSING entries carry no ws fields.
  • phase is starting, running or closing. ws_endpoint, debug_port and browser_pid appear only on STARTED entries; debug_port is a string and start_time is 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

bash
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":[]}'
json
{
  "uuid": "prof_35ef8623",
  "headless": true,
  "debug_port": true,
  "timeout": 120,
  "flags": []
}

Body fields

NameTypeRequiredDefaultDescription
uuidstringyesIdentifier of a profile created through the cloud API.
headlessbooleannofalse`true` runs without a window; `false` shows the browser.
debug_portbooleannotrue`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`.
timeoutintegerno120Seconds to wait for readiness, from 1 to 300.
flagsarray<string>noExtra core arguments. Arguments that break the launch are rejected: `--user-data-dir`, `--remote-debugging-port*`, `--headless*`.
passwordstringnoProfile password when the profile is protected.

Response

HTTP 200 — The started session with its CDP endpoint.json
{
  "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/password first, then start (or pass password in the body). The password is 4 to 255 characters.
  • uuid must look like prof_xxxxxxxx. An unknown field in the body returns 400 bad_request instead of being silently dropped.
  • timeout is whole seconds from 1 to 300. flags is 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 400 bad_request).
  • password on 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_local is 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 400 bad_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 in debug_port returns 400 debug_port.not_supported.
  • ws_endpoint is present for a headed profile too: automation works the same way. The field may be null if the browser did not report an address.
  • connection_data is kept for Octo shape compatibility, but ip and country are always null: the local API does not report proxy geo; use /api/proxies/check for that.
  • Starting an already running profile returns 409 profiles.already_started; an unknown profile returns 400 profiles.not_found; a proxy failure returns 400 profiles.proxy_error or profiles.invalid_proxy; any other launch failure returns 400 profiles.start_failed; a licence refusal returns 403 with the licence code.
  • The route requires scope profiles_edit; without it the answer is 403 no_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

bash
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"}'
json
{
  "uuid": "prof_35ef8623"
}

Response

HTTP 200 — Stop confirmation.json
{
  "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/active with state: "CLOSING" while synchronisation runs.
  • Stopping nothing (including an unknown uuid) returns 409 profiles.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 403 no_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

bash
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"}'
json
{
  "uuid": "prof_35ef8623"
}

Response

HTTP 200 — Stop confirmation.json
{
  "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 403 no_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

bash
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"}'
json
{
  "uuid": "prof_35ef8623",
  "password": "strong-password"
}

Response

HTTP 200 — The password is set.json
{
  "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, start requires password in the body (or an unlock in the UI).
  • An unknown profile returns 400 profiles.not_found; a change failure returns 503 profiles.password_change_failed.
  • An unknown field in the body returns 400 bad_request; the route requires scope profile_passwords, otherwise 403 no_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

bash
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"}'
json
{
  "uuid": "prof_35ef8623",
  "password": "strong-password"
}

Response

HTTP 200 — The password is cleared.json
{
  "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 503 profiles.password_change_failed.
  • The route requires scope profile_passwords; without it the answer is 403 no_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

bash
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"}'
json
{
  "type": "socks5",
  "host": "gw.example.net",
  "port": 1080,
  "login": "user",
  "password": "secret"
}

Body fields

NameTypeRequiredDefaultDescription
uuidstringnoCheck an account catalog record by its `uuid` (`prx_...`).
typestringno`http`, `https`, `socks5` (alias `socks`) when checking passed data. The local API does not check `ssh`: it returns 400 `bad_request` with an explanation.
hoststringnoProxy host.
portintegernoProxy port.
loginstringnoLogin when required.
passwordstringnoPassword with the login.

Response

HTTP 200 — Exit information and latency.json
{
  "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 data wrapper — this differs from Octo, whose POST /api/proxies/check wraps the result in {"data": {...}}.
  • The guaranteed fields are ip, country, timezone and latency_ms; real_ip, country_full_name, city_name, isp and connection_type add detail and may be null when the provider does not report them.
  • Only http, https and socks5 (plus the socks alias) can be checked; the local client does not check ssh — it returns 400 bad_request listing the supported types.
  • An unreachable or unknown proxy returns 400 proxies.proxy_connection_error (error_code -1) with the reason in error. An unknown catalog record yields the same code with the text saved proxy not found.
  • The route requires scope proxies_read; without it the answer is 403 no_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

bash
curl -sS "http://127.0.0.1:48900/api/update" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Response

HTTP 200 — Versions and the critical-update flag.json
{
  "current": "2.4.1",
  "latest": "2.4.1",
  "update_required": false
}

Notes

  • update_required: true means 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.
  • current is the installed version and latest the newest available; when there is nothing to update, POST /api/update returns 409 client.update_failed.

Error codes: unauthorized api.unavailable

Trigger update

POST/update#

Asks the client to update.

Example call

bash
curl -sS -X POST "http://127.0.0.1:48900/api/update" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Response

HTTP 200 — The update has been triggered.json
{
  "msg": "update triggered"
}

Notes

  • When no update is available the response is 409 client.update_failed with the text Update is not triggered. No available version; check GET /api/update first.
  • A new version downloads in the background; msg only confirms the trigger.

Error codes: client.update_failed unauthorized api.unavailable

Account username

GET/username#

Account login the client is attached to.

Example call

bash
curl -sS "http://127.0.0.1:48900/api/username" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Response

HTTP 200 — The account login.json
{
  "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

bash
curl -sS "http://127.0.0.1:48900/api/version" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Response

HTTP 200 — The client version.json
{
  "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

bash
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 '{}'
json
{}

Response

HTTP 400 — Login is rejected in token mode.json
{
  "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

bash
curl -sS -X POST "http://127.0.0.1:48900/api/auth/logout" \
  -H "X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN"

Response

HTTP 400 — Logout is rejected in token mode.json
{
  "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