{
  "schema_version": 1,
  "api_version": "v2",
  "generated_at": "2026-11-26",
  "authoritative_contract": "goPROMPT/notes/PLAN/api-tokens-and-automation-api.md (sections 4, 5, 8, 10)",
  "service": {
    "name": "CloakCTL Automation API",
    "docs_url": "https://docs.cloakctl.com/",
    "cloud_base_url": "https://api.cloakctl.com/api/v2/automation",
    "local_base_url": "http://127.0.0.1:48900/api"
  },
  "auth": {
    "headers": [
      {
        "name": "X-Octo-Api-Token: <token>",
        "priority": 1,
        "description": {
          "ru": "Основной заголовок. Выбран первым ради совместимости со скриптами Octo Browser: скрипт, который уже посылает этот заголовок, работает без правок.",
          "en": "Primary header. It is checked first for Octo Browser compatibility: a script that already sends this header keeps working unchanged."
        }
      },
      {
        "name": "Authorization: Bearer <token>",
        "priority": 2,
        "description": {
          "ru": "Обычная HTTP-аутентификация. Удобна там, где токен кладут в общий слой авторизации.",
          "en": "Conventional HTTP authentication, convenient when a shared auth layer injects the token."
        }
      },
      {
        "name": "X-CloakCTL-Api-Token: <token>",
        "priority": 3,
        "description": {
          "ru": "Собственный заголовок CloakCTL. Проверяется последним.",
          "en": "CloakCTL-specific header, checked last."
        }
      }
    ],
    "token_format": {
      "prefix": "cc_",
      "length_chars": 46,
      "description": {
        "ru": "Секрет токена — cc_ и 43 символа base64url (32 случайных байта). Полный секрет показывается один раз при создании или перевыпуске; в списке видны только префикс и последние четыре знака. На сервере хранится только SHA-256 секрета.",
        "en": "A token secret is cc_ plus 43 base64url characters (32 random bytes). The full secret is shown once at creation or rotation; lists show only the prefix and the last four characters. The server stores only the SHA-256 hash."
      }
    },
    "local_extra": {
      "ru": "Локальный API по умолчанию слушает 127.0.0.1:48900. Это не 58888, как у Octo Browser: порт 58888 занимает локальный API самого Octo, и на машине с запущенным Octo наш слушатель не поднялся бы никогда. Порт и включение хранятся в `~/.cloakctl/api-settings.json` (`{\"format_version\": 1, \"port\": 48900, \"enabled\": true}`), меняются экраном настроек и переопределяются переменной `CLOAKCTL_LOCAL_API_PORT` (допустимы порты 1024..65534). Слушатель привязан только к `127.0.0.1`; занятый порт — не поломка панели: слушатель просто не поднимается, панель продолжает работать, а настройки показывают «Порт занят — выберите другой». Автоматического перебора портов нет: адрес должен быть предсказуем для скриптов. Он требует тот же токен: клиент проверяет его на сервере через introspect и кэширует ответ (60 с положительный, 5 с отрицательный). Без сети к серверу локальный API отвечает 503 `api.unavailable` — связи с сервером требует и запуск профиля в серверном режиме. Права токена проверяются по маршрутам: `profiles_read` для списка, `profiles_edit` для запуска и остановки, `profile_passwords` для паролей, `proxies_read` для проверки прокси; без права — 403 `no_permission`. Если сервер старой версии не прислал `scopes`, права не блокируются — это совместимость, а не отказ.",
      "en": "By default the local API listens on 127.0.0.1:48900. It is not 58888 as in Octo Browser: port 58888 is occupied by Octo's own local API, so our listener would never come up on a machine running Octo. Port and enablement live in `~/.cloakctl/api-settings.json` (`{\"format_version\": 1, \"port\": 48900, \"enabled\": true}`), change from the settings screen and can be overridden with `CLOAKCTL_LOCAL_API_PORT` (ports 1024..65534). The listener binds to `127.0.0.1` only; 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. It requires the same token: the client verifies it on the server through introspect and caches the verdict (60 s positive, 5 s negative). Without a server connection the local API answers 503 `api.unavailable`, just as starting a profile in server mode requires connectivity. Token scopes are checked per route: `profiles_read` for the list, `profiles_edit` for start and stop, `profile_passwords` for passwords, `proxies_read` for proxy checks; without the scope the answer is 403 `no_permission`. When an older server returns no `scopes` object, nothing is blocked — a compatibility fallback."
    }
  },
  "envelopes": {
    "cloud_success": {
      "description": {
        "ru": "Успешный ответ облачного API — конверт Octo-подобной формы. Поля total_count и page присутствуют только у списков. code равен null на успехе; msg может быть пустым или человекочитаемым, но полагаться на него нельзя — ветвитесь по code.",
        "en": "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."
      },
      "example": {
        "success": true,
        "msg": "",
        "code": null,
        "data": [
          {
            "uuid": "prof_35ef8623"
          }
        ],
        "total_count": 25,
        "page": 0
      }
    },
    "cloud_error": {
      "description": {
        "ru": "Ошибка облачного API — тот же конверт с success: false. Поле data пустое, code — машиночитаемый код из таблицы ниже, msg — текст для человека.",
        "en": "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."
      },
      "example": {
        "success": false,
        "msg": "Profile not found",
        "code": "not_found",
        "data": ""
      }
    },
    "local_success": {
      "description": {
        "ru": "Локальный API отвечает плоским JSON без конверта: либо объект-сообщение, либо поля результата. Списки возвращаются голым массивом.",
        "en": "The local API answers with flat JSON and no envelope: either a message object or result fields. Lists are returned as a bare array."
      },
      "example": {
        "msg": "Profile stopped"
      }
    },
    "local_error": {
      "description": {
        "ru": "Ошибка локального API: code (машиночитаемый), error (текст) и error_code (число). Ветвитесь по HTTP-статусу и code. Число error_code повторяет коды запуска Octo Browser там, где такой код есть (например, 1 — неверный пароль, 6 — профиль не найден), а иначе равно HTTP-статусу.",
        "en": "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."
      },
      "example": {
        "code": "unauthorized",
        "error": "api token required",
        "error_code": 401
      }
    }
  },
  "cloud": {
    "base_url": "https://api.cloakctl.com/api/v2/automation",
    "groups": [
      {
        "id": "subscription",
        "title": {
          "ru": "Подписка и лимиты",
          "en": "Subscription and limits"
        },
        "description": {
          "ru": "Сведения о тарифе кабинета и текущем состоянии лимитов. Точка сверки для мониторинга: если скрипт хочет заранее знать пределы, он читает их здесь.",
          "en": "Plan and current rate-limit state. The monitoring entry point: a script that wants to know its limits reads them here."
        },
        "endpoints": [
          {
            "id": "get-subscription",
            "method": "GET",
            "path": "/subscription",
            "scope": null,
            "title": {
              "ru": "Подписка",
              "en": "Get subscription"
            },
            "summary": {
              "ru": "Тариф, срок действия, лимиты RPM/RPH/токенов и текущее использование.",
              "en": "Plan, expiry, RPM/RPH/token limits and current usage."
            },
            "description": {
              "ru": "Право не требуется: любой действующий токен кабинета видит подписку. Это единственный облачный маршрут, который стоит дёргать в начале каждого запуска скрипта — он же отвечает, сколько токенов ещё можно завести.",
              "en": "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."
            },
            "curl": "curl -sS \"https://api.cloakctl.com/api/v2/automation/subscription\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "response": {
              "status": 200,
              "description": {
                "ru": "Тариф, срок лицензии, лимиты и остатки окон.",
                "en": "Plan, licence expiry, limits and remaining window quotas."
              },
              "example": {
                "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": {
              "ru": [
                "`expires_at` — unix-секунды окончания лицензии или null, если срок не ограничен.",
                "`window_reset` — unix-секунды, когда освободится минутное окно; часовое окно проверяется по заголовку `X-Ratelimit-Limit-Hour`.",
                "Неизвестный тариф получает лимиты `solo`."
              ],
              "en": [
                "`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."
              ]
            },
            "errors": [
              "unauthorized",
              "account_suspended",
              "license_expired",
              "license_revoked",
              "unavailable"
            ]
          }
        ]
      },
      {
        "id": "profiles",
        "title": {
          "ru": "Профили",
          "en": "Profiles"
        },
        "description": {
          "ru": "Создание, чтение, изменение, удаление и корзина профилей, а также жёсткая остановка. Идентификатор профиля — наш `prof_xxxxxxxx`, а не 32-символьный hex Octo.",
          "en": "Create, read, update, delete and restore profiles, plus forced stop. The profile identifier is our `prof_xxxxxxxx`, not a 32-character Octo hex id."
        },
        "endpoints": [
          {
            "id": "list-profiles",
            "method": "GET",
            "path": "/profiles",
            "scope": "profiles_read",
            "title": {
              "ru": "Список профилей",
              "en": "List profiles"
            },
            "summary": {
              "ru": "Постраничный список профилей кабинета с поиском и фильтрами.",
              "en": "Paginated list of account profiles with search and filters."
            },
            "curl": "curl -sS \"https://api.cloakctl.com/api/v2/automation/profiles?page=0&page_len=100&search=alpha\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "params": [
              {
                "name": "page",
                "in": "query",
                "type": "integer",
                "required": false,
                "default": 0,
                "description": {
                  "ru": "Номер страницы с нуля.",
                  "en": "Zero-based page number."
                }
              },
              {
                "name": "page_len",
                "in": "query",
                "type": "integer",
                "required": false,
                "default": 100,
                "description": {
                  "ru": "Размер страницы, от 1 до 1000.",
                  "en": "Page size, from 1 to 1000."
                }
              },
              {
                "name": "search",
                "in": "query",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Подстрока в названии или описании без учёта регистра.",
                  "en": "Case-insensitive substring in the title or description."
                }
              },
              {
                "name": "tag",
                "in": "query",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "**Имя** метки без учёта регистра (не `uuid`).",
                  "en": "Tag **name**, case-insensitive (not `uuid`)."
                }
              },
              {
                "name": "status",
                "in": "query",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "`0` — остановлен, `1` — запущен (живая аренда), `2` — ошибка (в v1 не возникает).",
                  "en": "`0` stopped, `1` running (live lease), `2` error (never produced in v1)."
                }
              },
              {
                "name": "fields",
                "in": "query",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Проекция через запятую: `uuid,title,description,status,tags,proxy,fingerprint,created_at,last_opened_at,launch_count,state_version,storage_mode`.",
                  "en": "Comma-separated projection: `uuid,title,description,status,tags,proxy,fingerprint,created_at,last_opened_at,launch_count,state_version,storage_mode`."
                }
              },
              {
                "name": "ordering",
                "in": "query",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "`active` — сначала недавно открывавшиеся; `created_at` — по времени создания (по умолчанию).",
                  "en": "`active` — most recently opened first; `created_at` — by creation time (default)."
                }
              }
            ],
            "response": {
              "status": 200,
              "description": {
                "ru": "Страница профилей и общее число записей.",
                "en": "A page of profiles and the total record count."
              },
              "example": {
                "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": {
              "ru": [
                "Корзина в список не входит — для неё отдельный маршрут `GET /profiles/trash_bin`.",
                "`status`: 0 — остановлен, 1 — запущен (живая неистёкшая аренда), 2 — ошибка; в v1 значение 2 не возникает.",
                "`tag` фильтрует по **имени** метки без учёта регистра, а не по `uuid`.",
                "`proxy` — `null` или запись каталога без секрета; у прокси, введённого вручную, `uuid: null` и `title: \"\"`.",
                "`created_at` и `last_opened_at` — unix-секунды (второй может быть `null`). `storage_mode` (`legacy`/`sealed_v1`) — наше расширение, v2 работает с обоими форматами прозрачно.",
                "`noise` в отпечатке всегда `null`: шум выводится узлом из `seed` и per-profile не хранится."
              ],
              "en": [
                "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."
              ]
            },
            "errors": [
              "unauthorized",
              "no_permission",
              "bad_request",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "create-profile",
            "method": "POST",
            "path": "/profiles",
            "scope": "profiles_create",
            "title": {
              "ru": "Создать профиль",
              "en": "Create profile"
            },
            "summary": {
              "ru": "Создаёт профиль с отпечатком, метками и прокси за один запрос.",
              "en": "Creates a profile with fingerprint, tags and proxy in one request."
            },
            "curl": "curl -sS -X POST \"https://api.cloakctl.com/api/v2/automation/profiles\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -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}}'",
            "body_fields": [
              {
                "name": "title",
                "type": "string",
                "required": true,
                "description": {
                  "ru": "Имя профиля, 1..64 знака. Глобально уникально среди живых профилей: занятое имя даёт 409 `profile_exists`.",
                  "en": "Profile title, 1..64 characters. Globally unique among live profiles: a taken title returns 409 `profile_exists`."
                }
              },
              {
                "name": "description",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Заметка до 4096 знаков.",
                  "en": "Free-form note up to 4096 characters."
                }
              },
              {
                "name": "tags",
                "type": "array<string>",
                "required": false,
                "description": {
                  "ru": "До 20 **имён** меток; отсутствующие метки каталога сервер заводит сам.",
                  "en": "Up to 20 tag **names**; missing catalog tags are created by the server."
                }
              },
              {
                "name": "proxy",
                "type": "object",
                "required": false,
                "description": {
                  "ru": "`null`/отсутствует, `{\"uuid\":\"prx_…\"}` — существующая запись, либо `{type,host,port,login,password,title?}` — запись будет создана или переиспользована. Для встроенной формы `type`: `http` или `socks5` (псевдоним `socks`); `https` и `ssh` ядром не поддерживаются — 400.",
                  "en": "`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."
                }
              },
              {
                "name": "fingerprint",
                "type": "object",
                "required": false,
                "description": {
                  "ru": "Необязателен; по умолчанию `win`/`11`, 8 CPU, 16 ГБ RAM, экран не задан. `os`: `win`|`mac`|`linux`|`android` (синонимы `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` — `ШИРИНАxВЫСОТА`, стороны 800..8192; `user_agent` ≤512; `renderer` ≤256; `cpu` 1..128; `ram` 1..256; `languages` — строка или `{\"type\":\"ip\"}` → `en-US`; `timezone` — строка или `{\"type\":\"ip\"}`; `geolocation` — объект или `{\"type\":\"ip\"}`; `webrtc` — `{\"type\":\"ip\"}` или `{\"type\":\"disabled\"}`; `noise` принимается, проверяется и **не хранится**.",
                  "en": "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**."
                }
              }
            ],
            "body_example": {
              "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
                }
              }
            },
            "response": {
              "status": 201,
              "description": {
                "ru": "Созданный профиль в том же виде, что и в списке.",
                "en": "The created profile in the same shape as in the list."
              },
              "example": {
                "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": {
              "ru": [
                "Незнакомое поле — 400 `bad_request` с именем поля, а не молчаливый пропуск.",
                "Границы: `title` 1..64, `description` ≤ 4096, меток ≤ 20, `user_agent` ≤ 512, `renderer` ≤ 256, `cpu` 1..128, `ram` 1..256, `screen` 800..8192 по каждой стороне.",
                "Непринимаемое сочетание `os`/`os_arch`/`os_version` даёт 400 с именем поля.",
                "`noise` принимается и не хранится: шум отпечатка выводится узлом из `seed`.",
                "Прокси встроенной формы попадает в справочник кабинета и может использоваться другими профилями; `https`/`ssh` для встроенной формы не поддерживаются."
              ],
              "en": [
                "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."
              ]
            },
            "errors": [
              "bad_request",
              "profile_exists",
              "no_permission",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "get-profile",
            "method": "GET",
            "path": "/profiles/{uuid}",
            "scope": "profiles_read",
            "title": {
              "ru": "Один профиль",
              "en": "Get profile"
            },
            "summary": {
              "ru": "Полная запись профиля по идентификатору.",
              "en": "Full profile record by identifier."
            },
            "curl": "curl -sS \"https://api.cloakctl.com/api/v2/automation/profiles/prof_35ef8623\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "params": [
              {
                "name": "uuid",
                "in": "path",
                "type": "string",
                "required": true,
                "description": {
                  "ru": "Идентификатор профиля вида `prof_xxxxxxxx`.",
                  "en": "Profile identifier like `prof_xxxxxxxx`."
                }
              }
            ],
            "response": {
              "status": 200,
              "description": {
                "ru": "Профиль целиком.",
                "en": "The whole profile."
              },
              "example": {
                "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": {
              "ru": [
                "Профиль в корзине этим маршрутом не отдаётся: 409 `profile_deleted`.",
                "Чужой или несуществующий идентификатор — 404 `not_found`: чужой профиль неотличим от несуществующего."
              ],
              "en": [
                "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."
              ]
            },
            "errors": [
              "not_found",
              "profile_deleted",
              "no_permission",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "update-profile",
            "method": "PATCH",
            "path": "/profiles/{uuid}",
            "scope": "profiles_edit",
            "title": {
              "ru": "Изменить профиль",
              "en": "Update profile"
            },
            "summary": {
              "ru": "Частичное изменение: только переданные поля.",
              "en": "Partial update: only the fields sent are changed."
            },
            "curl": "curl -sS -X PATCH \"https://api.cloakctl.com/api/v2/automation/profiles/prof_35ef8623\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\":\"alpha-2\",\"tags\":[\"Работа\",\"Клиент\"],\"fingerprint\":{\"timezone\":\"Europe/Moscow\"}}'",
            "params": [
              {
                "name": "uuid",
                "in": "path",
                "type": "string",
                "required": true,
                "description": {
                  "ru": "Идентификатор профиля.",
                  "en": "Profile identifier."
                }
              }
            ],
            "body_example": {
              "title": "alpha-2",
              "tags": [
                "Работа",
                "Клиент"
              ],
              "fingerprint": {
                "cpu": 6
              }
            },
            "response": {
              "status": 200,
              "description": {
                "ru": "Обновлённый профиль.",
                "en": "The updated profile."
              },
              "example": {
                "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": {
              "ru": [
                "Ответ — полный объект профиля после правки; повторный `GET` не нужен.",
                "`fingerprint` — частичный: `{\"fingerprint\":{\"cpu\":6}}` меняет только `cpu`. Смена `os`/`os_version`/`os_arch` пересчитывает внутренние поля пресета, недопустимое сочетание — 400 с именем поля.",
                "`\"proxy\": null` снимает прокси.",
                "`tags` задаётся набором целиком: перечисленные метки будут у профиля, остальные сняты.",
                "Незнакомое поле — 400 `bad_request`; смена имени на занятое — 409 `profile_exists`."
              ],
              "en": [
                "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`."
              ]
            },
            "errors": [
              "bad_request",
              "profile_exists",
              "profile_deleted",
              "not_found",
              "no_permission",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "delete-profiles",
            "method": "DELETE",
            "path": "/profiles",
            "scope": "profiles_delete",
            "title": {
              "ru": "Удалить профили (пакет)",
              "en": "Delete profiles (batch)"
            },
            "summary": {
              "ru": "Перемещает 1..100 профилей в корзину или удаляет их сразу.",
              "en": "Moves 1..100 profiles to the trash bin or deletes them immediately."
            },
            "curl": "curl -sS -X DELETE \"https://api.cloakctl.com/api/v2/automation/profiles\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"uuids\":[\"prof_35ef8623\"],\"skip_trash_bin\":false}'",
            "body_fields": [
              {
                "name": "uuids",
                "type": "array<string>",
                "required": true,
                "description": {
                  "ru": "От 1 до 100 идентификаторов профилей.",
                  "en": "One to one hundred profile identifiers."
                }
              },
              {
                "name": "skip_trash_bin",
                "type": "boolean",
                "required": false,
                "default": false,
                "description": {
                  "ru": "`true` — стереть сразу, минуя корзину.",
                  "en": "`true` deletes immediately, skipping the trash bin."
                }
              }
            ],
            "body_example": {
              "uuids": [
                "prof_35ef8623"
              ],
              "skip_trash_bin": false
            },
            "response": {
              "status": 200,
              "description": {
                "ru": "Итог пакета: что удалено, что перемещено в корзину и что не удалось.",
                "en": "Batch outcome: what was deleted, what was trashed and what failed."
              },
              "example": {
                "success": true,
                "msg": "Profiles moved to the trash bin",
                "code": null,
                "data": {
                  "deleted": [],
                  "trashed": [
                    "prof_35ef8623"
                  ],
                  "failed": []
                }
              }
            },
            "notes": {
              "ru": [
                "Ответ всегда 200, даже когда часть профилей не удалена: отказы по отдельным записям лежат в `data.failed` как `{uuid, code}`. Клиент обязан смотреть на этот список, а не только на HTTP-код.",
                "`skip_trash_bin` по умолчанию **false**: профиль уходит в корзину и 72 часа может быть восстановлен. У Octo значение по умолчанию обратное — это осознанное отличие ради безопасности.",
                "Стоимость — 1 запрос на пакет, а не на профиль. В корзине профиль хранится 72 часа (259200 с), затем просроченная запись получает 409 `trash_expired`.",
                "Живая аренда не даёт удалить запись: в `failed` она получит `code: \"profile_in_use\"`."
              ],
              "en": [
                "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\"`."
              ]
            },
            "errors": [
              "bad_request",
              "no_permission",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "get-trash-bin",
            "method": "GET",
            "path": "/profiles/trash_bin",
            "scope": "profiles_delete",
            "title": {
              "ru": "Корзина",
              "en": "Trash bin"
            },
            "summary": {
              "ru": "Удалённые профили, которые ещё можно восстановить.",
              "en": "Deleted profiles that can still be restored."
            },
            "curl": "curl -sS \"https://api.cloakctl.com/api/v2/automation/profiles/trash_bin?page=0&page_len=100&search=alpha\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "params": [
              {
                "name": "page",
                "in": "query",
                "type": "integer",
                "required": false,
                "default": 0,
                "description": {
                  "ru": "Номер страницы с нуля.",
                  "en": "Zero-based page number."
                }
              },
              {
                "name": "page_len",
                "in": "query",
                "type": "integer",
                "required": false,
                "default": 100,
                "description": {
                  "ru": "Размер страницы, от 1 до 1000.",
                  "en": "Page size, from 1 to 1000."
                }
              },
              {
                "name": "search",
                "in": "query",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Подстрока в имени профиля без учёта регистра.",
                  "en": "Case-insensitive substring in the profile title."
                }
              }
            ],
            "response": {
              "status": 200,
              "description": {
                "ru": "Записи корзины с временем удаления и сроком очистки.",
                "en": "Trash records with deletion time and purge deadline."
              },
              "example": {
                "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": {
              "ru": [
                "`deleted_at` и `purge_after` — unix-секунды; разница ровно 259200 с (72 часа).",
                "В ответе нет ключей, прокси и содержимого снимков.",
                "Право `profiles_delete`: корзина — часть права удаления, как у Octo."
              ],
              "en": [
                "`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."
              ]
            },
            "errors": [
              "unauthorized",
              "no_permission",
              "bad_request",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "restore-profiles",
            "method": "POST",
            "path": "/profiles/trash_bin/restore",
            "scope": "profiles_delete",
            "title": {
              "ru": "Восстановить профили",
              "en": "Restore profiles"
            },
            "summary": {
              "ru": "Возвращает 1..100 профилей из корзины.",
              "en": "Returns 1..100 profiles from the trash bin."
            },
            "curl": "curl -sS -X POST \"https://api.cloakctl.com/api/v2/automation/profiles/trash_bin/restore\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"uuids\":[\"prof_35ef8623\"]}'",
            "body_example": {
              "uuids": [
                "prof_35ef8623"
              ]
            },
            "response": {
              "status": 200,
              "description": {
                "ru": "Итог по каждому идентификатору: восстановленные, ненайденные и отказавшие.",
                "en": "Per-identifier outcome: restored, not found and failed."
              },
              "example": {
                "success": true,
                "msg": "",
                "code": null,
                "data": {
                  "restored_uuids": [
                    "prof_35ef8623"
                  ],
                  "not_found_uuids": [],
                  "payment_required_uuids": [],
                  "failed_uuids": []
                }
              }
            },
            "notes": {
              "ru": [
                "Пакет 1..100, стоимость 1 запрос на пакет. Ответ всегда 200; частичные отказы видны в списках, а не в HTTP-коде.",
                "`not_found_uuids` — записи, которых нет в корзине; `failed_uuids` — отказы по причине конфликта, у каждого `{uuid, code}`.",
                "Платных восстановлений в v1 нет: `payment_required_uuids` всегда пуст.",
                "После 72 часов восстановление не проходит, а срок корзины проверяется при удалении: запись отвечает 409 `trash_expired`, пока её не стёрли."
              ],
              "en": [
                "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."
              ]
            },
            "errors": [
              "bad_request",
              "no_permission",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "force-stop-profile",
            "method": "POST",
            "path": "/profiles/{uuid}/force_stop",
            "scope": "profiles_edit",
            "title": {
              "ru": "Жёстко остановить профиль",
              "en": "Force stop profile"
            },
            "summary": {
              "ru": "Снимает живую аренду, не дожидаясь синхронизации.",
              "en": "Releases the live lease without waiting for synchronisation."
            },
            "curl": "curl -sS -X POST \"https://api.cloakctl.com/api/v2/automation/profiles/prof_35ef8623/force_stop\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "params": [
              {
                "name": "uuid",
                "in": "path",
                "type": "string",
                "required": true,
                "description": {
                  "ru": "Идентификатор профиля.",
                  "en": "Profile identifier."
                }
              }
            ],
            "response": {
              "status": 200,
              "description": {
                "ru": "Аренда снята; `had_lease` говорит, была ли она вообще.",
                "en": "The lease is released; `had_lease` reports whether there was one."
              },
              "example": {
                "success": true,
                "msg": "Profile stopped",
                "code": null,
                "data": {
                  "uuid": "prof_35ef8623",
                  "stopped": true,
                  "had_lease": true
                }
              }
            },
            "notes": {
              "ru": [
                "Облачная жёсткая остановка **не** закрывает браузер на машине оператора: окно продолжает работать до своего закрытия, а несохранённые данные могут потеряться. Это совпадает по смыслу с Octo («marks a running profile as stopped without syncing»).",
                "Тело запроса необязательно. Поле `version`, которое присылает Octo, принимается и **не проверяется**: версии сессии в нашей модели нет.",
                "Если живой аренды нет — ответ всё равно 200, `had_lease: false`: операция идемпотентна.",
                "Для аккуратной остановки с синхронизацией используйте локальный `POST /api/profiles/stop`."
              ],
              "en": [
                "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`."
              ]
            },
            "errors": [
              "profile_deleted",
              "not_found",
              "no_permission",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "force-stop-profiles",
            "method": "POST",
            "path": "/profiles/force_stop",
            "scope": "profiles_edit",
            "title": {
              "ru": "Жёстко остановить пакет профилей",
              "en": "Force stop a batch of profiles"
            },
            "summary": {
              "ru": "То же для списка 1..100 идентификаторов.",
              "en": "The same for a list of 1..100 identifiers."
            },
            "curl": "curl -sS -X POST \"https://api.cloakctl.com/api/v2/automation/profiles/force_stop\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"uuids\":[\"prof_35ef8623\",\"prof_7c1d92ab\"]}'",
            "body_example": {
              "uuids": [
                "prof_35ef8623",
                "prof_7c1d92ab"
              ]
            },
            "response": {
              "status": 200,
              "description": {
                "ru": "Все аренды сняты.",
                "en": "All leases have been released."
              },
              "example": {
                "success": true,
                "msg": "Profiles stopped successfully",
                "code": null,
                "data": {
                  "stopped_uuids": [
                    "prof_35ef8623",
                    "prof_7c1d92ab"
                  ],
                  "failed_uuids": []
                }
              }
            },
            "variants": [
              {
                "status": 207,
                "description": {
                  "ru": "Часть профилей остановлена, часть нет: смотрите `failed_uuids`.",
                  "en": "Some profiles stopped, some did not: inspect `failed_uuids`."
                },
                "example": {
                  "success": true,
                  "msg": "Profiles stopped successfully",
                  "code": null,
                  "data": {
                    "stopped_uuids": [
                      "prof_35ef8623"
                    ],
                    "failed_uuids": [
                      {
                        "uuid": "prof_7c1d92ab",
                        "code": "not_found"
                      }
                    ]
                  }
                }
              },
              {
                "status": 400,
                "description": {
                  "ru": "Ни один профиль не остановлен: `code: bad_request`.",
                  "en": "No profile was stopped: `code: bad_request`."
                },
                "example": {
                  "success": false,
                  "msg": "no profiles were stopped",
                  "code": "bad_request",
                  "data": {
                    "stopped_uuids": [],
                    "failed_uuids": [
                      {
                        "uuid": "prof_7c1d92ab",
                        "code": "profile_deleted"
                      }
                    ]
                  }
                }
              }
            ],
            "notes": {
              "ru": [
                "Три исхода одного запроса: все сняты — 200; часть — **207 Multi-Status**; ни одного — 400 с `code: \"bad_request\"`.",
                "Клиент обязан смотреть `failed_uuids` (элементы `{uuid, code}`), а не только на HTTP-код: при частичном успехе код 207 может не распознаваться библиотекой как успех.",
                "Пакет 1..100, стоимость 1 запрос на пакет.",
                "Смысл тот же, что у одиночной жёсткой остановки: браузеры на машинах операторов не закрываются."
              ],
              "en": [
                "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."
              ]
            },
            "errors": [
              "bad_request",
              "no_permission",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          }
        ]
      },
      {
        "id": "tags",
        "title": {
          "ru": "Метки",
          "en": "Tags"
        },
        "description": {
          "ru": "Метки — записи каталога кабинета, а не надписи на одном профиле: переименование видит каждый профиль кабинета. `uuid` метки — строка с номером записи каталога (например, \"42\").",
          "en": "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\")."
        },
        "endpoints": [
          {
            "id": "list-tags",
            "method": "GET",
            "path": "/tags",
            "scope": "profiles_read",
            "title": {
              "ru": "Список меток",
              "en": "List tags"
            },
            "summary": {
              "ru": "Каталог меток кабинета с числом профилей у каждой.",
              "en": "Account tag catalog with the profile count of each tag."
            },
            "curl": "curl -sS \"https://api.cloakctl.com/api/v2/automation/tags\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "response": {
              "status": 200,
              "description": {
                "ru": "Метки кабинета.",
                "en": "Account tags."
              },
              "example": {
                "success": true,
                "msg": "",
                "code": null,
                "data": [
                  {
                    "uuid": "42",
                    "name": "Работа",
                    "color": "blue",
                    "profiles": 7
                  },
                  {
                    "uuid": "43",
                    "name": "Клиент",
                    "color": "",
                    "profiles": 0
                  }
                ]
              }
            },
            "notes": {
              "ru": [
                "`color` — имя из палитры (`red`, `orange`, `amber`, `lime`, `green`, `teal`, `cyan`, `blue`, `indigo`, `violet`, `magenta`, `rose`) или пустая строка, если цвет не выбран. Принимаются и псевдонимы Octo: `grey`/`gray` → без цвета, `yellow` → `amber`, `purple` → `violet`.",
                "`uuid` — строковый номер записи каталога; им адресуются PATCH и DELETE.",
                "Имя метки — до 32 знаков; одинаковые имена без учёта регистра не допускаются.",
                "Метка может существовать, не вися ни на одном профиле (`profiles`: 0)."
              ],
              "en": [
                "`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)."
              ]
            },
            "errors": [
              "unauthorized",
              "no_permission",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "create-tag",
            "method": "POST",
            "path": "/tags",
            "scope": "tags_edit",
            "title": {
              "ru": "Создать метку",
              "en": "Create tag"
            },
            "summary": {
              "ru": "Заводит метку заранее, до назначения профилям.",
              "en": "Creates a tag ahead of assigning it to profiles."
            },
            "curl": "curl -sS -X POST \"https://api.cloakctl.com/api/v2/automation/tags\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"Клиент\",\"color\":\"green\"}'",
            "body_example": {
              "name": "Клиент",
              "color": "green"
            },
            "response": {
              "status": 201,
              "description": {
                "ru": "Созданная метка.",
                "en": "The created tag."
              },
              "example": {
                "success": true,
                "msg": "",
                "code": null,
                "data": {
                  "uuid": "8",
                  "name": "Клиент",
                  "color": "green"
                }
              }
            },
            "notes": {
              "ru": [
                "Пустое имя — 400 `bad_request`; повтор имени без учёта регистра — 409 `conflict`.",
                "Право `tags_edit` относится к административной группе прав токена."
              ],
              "en": [
                "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."
              ]
            },
            "errors": [
              "bad_request",
              "conflict",
              "no_permission",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "update-tag",
            "method": "PATCH",
            "path": "/tags/{uuid}",
            "scope": "tags_edit",
            "title": {
              "ru": "Изменить метку",
              "en": "Update tag"
            },
            "summary": {
              "ru": "Переименовать метку и (или) сменить цвет.",
              "en": "Rename a tag and/or change its colour."
            },
            "curl": "curl -sS -X PATCH \"https://api.cloakctl.com/api/v2/automation/tags/42\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"Клиенты\",\"color\":\"lime\"}'",
            "params": [
              {
                "name": "uuid",
                "in": "path",
                "type": "string",
                "required": true,
                "description": {
                  "ru": "`uuid` метки — строка с номером записи каталога.",
                  "en": "The tag `uuid` — the catalog row id as a string."
                }
              }
            ],
            "body_example": {
              "name": "Клиенты",
              "color": "lime"
            },
            "response": {
              "status": 200,
              "description": {
                "ru": "Обновлённая метка; связи с профилями не рвутся.",
                "en": "The updated tag; profile links are preserved."
              },
              "example": {
                "success": true,
                "msg": "",
                "code": null,
                "data": {
                  "uuid": "42",
                  "name": "Клиенты",
                  "color": "lime"
                }
              }
            },
            "notes": {
              "ru": [
                "Передавайте хотя бы одно поле; оба необязательны.",
                "Переименование в занятое имя — 409 `conflict`; неизвестная метка — 404 `not_found`."
              ],
              "en": [
                "Send at least one field; both are optional.",
                "Renaming to a taken name returns 409 `conflict`; an unknown tag returns 404 `not_found`."
              ]
            },
            "errors": [
              "bad_request",
              "conflict",
              "not_found",
              "no_permission",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "delete-tag",
            "method": "DELETE",
            "path": "/tags/{uuid}",
            "scope": "tags_edit",
            "title": {
              "ru": "Удалить метку",
              "en": "Delete tag"
            },
            "summary": {
              "ru": "Удаляет метку; профили остаются без неё.",
              "en": "Deletes the tag; profiles remain, just without it."
            },
            "curl": "curl -sS -X DELETE \"https://api.cloakctl.com/api/v2/automation/tags/42\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "params": [
              {
                "name": "uuid",
                "in": "path",
                "type": "string",
                "required": true,
                "description": {
                  "ru": "`uuid` метки.",
                  "en": "The tag `uuid`."
                }
              }
            ],
            "response": {
              "status": 200,
              "description": {
                "ru": "Метка удалена; профили сохранились и потеряли только связь.",
                "en": "The tag is deleted; profiles remain and only lose the link."
              },
              "example": {
                "success": true,
                "msg": "Tag deleted",
                "code": null,
                "data": ""
              }
            },
            "notes": {
              "ru": [
                "Удаление метки не удаляет профили — только связь.",
                "Несуществующая метка — 404 `not_found`."
              ],
              "en": [
                "Deleting a tag never deletes profiles — only the link.",
                "An unknown tag returns 404 `not_found`."
              ]
            },
            "errors": [
              "not_found",
              "no_permission",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          }
        ]
      },
      {
        "id": "proxies",
        "title": {
          "ru": "Прокси",
          "en": "Proxies"
        },
        "description": {
          "ru": "Справочник прокси кабинета: одна запись используется любым числом профилей. `GET /proxies` содержит логин и пароль — это сознательный компромисс ради совместимости с Octo.",
          "en": "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."
        },
        "endpoints": [
          {
            "id": "list-proxies",
            "method": "GET",
            "path": "/proxies",
            "scope": "proxies_read",
            "title": {
              "ru": "Список прокси",
              "en": "List proxies"
            },
            "summary": {
              "ru": "Справочник кабинета вместе с учётными данными.",
              "en": "The account catalog including credentials."
            },
            "curl": "curl -sS \"https://api.cloakctl.com/api/v2/automation/proxies\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "response": {
              "status": 200,
              "description": {
                "ru": "Записи справочника.",
                "en": "Catalog records."
              },
              "example": {
                "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": {
              "ru": [
                "**Секрет в ответе.** Если полный доступ к прокси не нужен, дайте токену только `proxies_read` и ограничьте остальные права.",
                "Поле `timezone` в v1 не отдаётся, проверки прокси в облаке нет: проверка — локальный `POST /api/proxies/check`.",
                "Поддерживаются только `http` и `socks5`; VPN-прокси в v1 нет."
              ],
              "en": [
                "**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."
              ]
            },
            "errors": [
              "unauthorized",
              "no_permission",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "create-proxy",
            "method": "POST",
            "path": "/proxies",
            "scope": "proxies_create",
            "title": {
              "ru": "Создать прокси",
              "en": "Create proxy"
            },
            "summary": {
              "ru": "Добавляет запись в справочник кабинета.",
              "en": "Adds a record to the account catalog."
            },
            "curl": "curl -sS -X POST \"https://api.cloakctl.com/api/v2/automation/proxies\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\":\"Frankfurt 1\",\"type\":\"socks5\",\"host\":\"gw.example.net\",\"port\":1080,\"login\":\"user\",\"password\":\"secret\"}'",
            "body_fields": [
              {
                "name": "type",
                "type": "string",
                "required": true,
                "description": {
                  "ru": "`http` или `socks5` (псевдоним `socks`). `https` и `ssh` ядром не поддерживаются — 400 `bad_request`.",
                  "en": "`http` or `socks5` (alias `socks`). `https` and `ssh` are not supported by the core — 400 `bad_request`."
                }
              },
              {
                "name": "title",
                "type": "string",
                "required": true,
                "description": {
                  "ru": "Имя записи, 1..255 знаков (`name` — псевдоним).",
                  "en": "Record name, 1..255 characters (`name` is an alias)."
                }
              },
              {
                "name": "host",
                "type": "string",
                "required": true,
                "description": {
                  "ru": "IPv4, IPv6 или доменное имя, до 255 знаков.",
                  "en": "IPv4, IPv6 or a domain name, up to 255 characters."
                }
              },
              {
                "name": "port",
                "type": "integer",
                "required": true,
                "description": {
                  "ru": "Порт, 1..65535.",
                  "en": "Port, 1..65535."
                }
              },
              {
                "name": "login",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Логин, до 255 знаков. Пустая строка очищает значение при PATCH.",
                  "en": "Login, up to 255 characters. An empty string clears it on PATCH."
                }
              },
              {
                "name": "password",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Пароль, до 255 знаков. Пустая строка очищает значение при PATCH.",
                  "en": "Password, up to 255 characters. An empty string clears it on PATCH."
                }
              },
              {
                "name": "change_ip_url",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Ссылка смены IP у провайдера, http/https (`rotate_url` — псевдоним).",
                  "en": "Provider IP rotation URL, http/https (`rotate_url` is an alias)."
                }
              },
              {
                "name": "external_id",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Принимается для совместимости и **не хранится**.",
                  "en": "Accepted for compatibility and **not stored**."
                }
              }
            ],
            "body_example": {
              "type": "socks5",
              "title": "proxy-one",
              "host": "1.2.3.4",
              "port": 1080,
              "login": "user",
              "password": "secret"
            },
            "response": {
              "status": 201,
              "description": {
                "ru": "Созданная запись без секрета в ответе.",
                "en": "The created record without the secret in the response."
              },
              "example": {
                "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": {
              "ru": [
                "`type`: `http` или `socks5` (`socks` — псевдоним); `https`/`ssh` — 400 `bad_request`.",
                "Запись с такими же адресом, портом и логином переиспользуется, дубликаты не плодятся.",
                "`external_id` принимается и не хранится: колонки в справочнике нет."
              ],
              "en": [
                "`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."
              ]
            },
            "errors": [
              "bad_request",
              "no_permission",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "update-proxy",
            "method": "PATCH",
            "path": "/proxies/{uuid}",
            "scope": "proxies_edit",
            "title": {
              "ru": "Изменить прокси",
              "en": "Update proxy"
            },
            "summary": {
              "ru": "Частичное изменение записи; правка доходит до профилей, которые ею пользуются.",
              "en": "Partial record update; changes propagate to the profiles that use the record."
            },
            "curl": "curl -sS -X PATCH \"https://api.cloakctl.com/api/v2/automation/proxies/prx_5cfc3b13\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"login\":\"user\",\"password\":\"new-secret\"}'",
            "params": [
              {
                "name": "uuid",
                "in": "path",
                "type": "string",
                "required": true,
                "description": {
                  "ru": "Идентификатор записи вида `prx_xxxxxxxx`.",
                  "en": "Record identifier like `prx_xxxxxxxx`."
                }
              }
            ],
            "body_example": {
              "login": "user",
              "password": "new-secret"
            },
            "response": {
              "status": 200,
              "description": {
                "ru": "Обновлённая запись.",
                "en": "The updated record."
              },
              "example": {
                "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": {
              "ru": [
                "Любое подмножество полей; пустая строка в `login`/`password` очищает значение.",
                "Логин и пароль лежат одним конвертом: смена одного без второго сохраняет прежнее второе.",
                "Ответ не содержит учётных данных: секрет читается в `GET /proxies` с правом `proxies_read`."
              ],
              "en": [
                "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`."
              ]
            },
            "errors": [
              "bad_request",
              "not_found",
              "no_permission",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ],
            "body_fields": [
              {
                "name": "type",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "`http` или `socks5` (псевдоним `socks`). `https` и `ssh` ядром не поддерживаются — 400 `bad_request`.",
                  "en": "`http` or `socks5` (alias `socks`). `https` and `ssh` are not supported by the core — 400 `bad_request`."
                }
              },
              {
                "name": "title",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Имя записи, 1..255 знаков (`name` — псевдоним).",
                  "en": "Record name, 1..255 characters (`name` is an alias)."
                }
              },
              {
                "name": "host",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "IPv4, IPv6 или доменное имя, до 255 знаков.",
                  "en": "IPv4, IPv6 or a domain name, up to 255 characters."
                }
              },
              {
                "name": "port",
                "type": "integer",
                "required": false,
                "description": {
                  "ru": "Порт, 1..65535.",
                  "en": "Port, 1..65535."
                }
              },
              {
                "name": "login",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Логин, до 255 знаков. Пустая строка очищает значение при PATCH.",
                  "en": "Login, up to 255 characters. An empty string clears it on PATCH."
                }
              },
              {
                "name": "password",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Пароль, до 255 знаков. Пустая строка очищает значение при PATCH.",
                  "en": "Password, up to 255 characters. An empty string clears it on PATCH."
                }
              },
              {
                "name": "change_ip_url",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Ссылка смены IP у провайдера, http/https (`rotate_url` — псевдоним).",
                  "en": "Provider IP rotation URL, http/https (`rotate_url` is an alias)."
                }
              },
              {
                "name": "external_id",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Принимается для совместимости и **не хранится**.",
                  "en": "Accepted for compatibility and **not stored**."
                }
              }
            ]
          },
          {
            "id": "delete-proxy",
            "method": "DELETE",
            "path": "/proxies/{uuid}",
            "scope": "proxies_delete",
            "title": {
              "ru": "Удалить прокси",
              "en": "Delete proxy"
            },
            "summary": {
              "ru": "Удаляет запись справочника; профили остаются с прежними настройками.",
              "en": "Deletes the catalog record; profiles keep their current settings."
            },
            "curl": "curl -sS -X DELETE \"https://api.cloakctl.com/api/v2/automation/proxies/prx_5cfc3b13\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "params": [
              {
                "name": "uuid",
                "in": "path",
                "type": "string",
                "required": true,
                "description": {
                  "ru": "Идентификатор записи.",
                  "en": "Record identifier."
                }
              }
            ],
            "response": {
              "status": 200,
              "description": {
                "ru": "Запись удалена.",
                "en": "The record is deleted."
              },
              "example": {
                "success": true,
                "msg": "Proxy deleted",
                "code": null,
                "data": ""
              }
            },
            "notes": {
              "ru": [
                "Удаление записи не разоружает профили: они сохраняют действующие данные прокси и теряют только связь со справочником.",
                "Право `proxies_delete` относится к административной группе."
              ],
              "en": [
                "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."
              ]
            },
            "errors": [
              "not_found",
              "no_permission",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          }
        ]
      },
      {
        "id": "fingerprint",
        "title": {
          "ru": "Отпечатки",
          "en": "Fingerprints"
        },
        "description": {
          "ru": "Справочные значения для полей отпечатка. Все четыре маршрута не требуют права: они не раскрывают данные кабинета.",
          "en": "Reference values for fingerprint fields. All four routes require no scope: they expose no account data."
        },
        "endpoints": [
          {
            "id": "fingerprint-platforms",
            "method": "GET",
            "path": "/fingerprint/platforms",
            "scope": null,
            "title": {
              "ru": "Платформы",
              "en": "Platforms"
            },
            "summary": {
              "ru": "Допустимые `os`, `os_arch` и `os_version`.",
              "en": "Allowed `os`, `os_arch` and `os_version` values."
            },
            "curl": "curl -sS \"https://api.cloakctl.com/api/v2/automation/fingerprint/platforms\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "response": {
              "status": 200,
              "description": {
                "ru": "ОС, архитектуры и версии.",
                "en": "Operating systems, architectures and versions."
              },
              "example": {
                "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": {
              "ru": [
                "Значения можно сразу класть в `fingerprint.os`, `fingerprint.os_arch`, `fingerprint.os_version`; недопустимое сочетание сервер отвергает 400 с именем поля.",
                "Поле `os` принимает и синонимы `windows`/`macos`, но в ответах всегда канонические `win`/`mac`."
              ],
              "en": [
                "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`."
              ]
            },
            "errors": [
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          },
          {
            "id": "fingerprint-screens",
            "method": "GET",
            "path": "/fingerprint/screens",
            "scope": null,
            "title": {
              "ru": "Экраны",
              "en": "Screens"
            },
            "summary": {
              "ru": "Размеры экрана для поля `fingerprint.screen`.",
              "en": "Screen sizes for the `fingerprint.screen` field."
            },
            "curl": "curl -sS \"https://api.cloakctl.com/api/v2/automation/fingerprint/screens\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "response": {
              "status": 200,
              "description": {
                "ru": "Допустимые размеры.",
                "en": "Allowed sizes."
              },
              "example": {
                "success": true,
                "msg": "",
                "code": null,
                "data": [
                  {
                    "value": "1920x1080",
                    "platform": "win",
                    "archs": [
                      "x86"
                    ]
                  },
                  {
                    "value": "2560x1440",
                    "platform": "win",
                    "archs": [
                      "x86"
                    ]
                  }
                ]
              }
            },
            "notes": {
              "ru": [
                "Помимо значений из ответа сервер принимает строку `WxH` с шириной и высотой в границах 800..8192.",
                "Пагинации нет: ответ — полный список подходящих размеров.",
                "Неизвестный `os`/`os_arch` — 400 `bad_request`."
              ],
              "en": [
                "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`."
              ]
            },
            "errors": [
              "bad_request",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ],
            "params": [
              {
                "name": "os",
                "in": "query",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Фильтр по платформе: `win`, `mac`, `linux`, `android`.",
                  "en": "Filter by platform: `win`, `mac`, `linux`, `android`."
                }
              },
              {
                "name": "os_arch",
                "in": "query",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Фильтр по архитектуре: `x86` или `arm`.",
                  "en": "Filter by architecture: `x86` or `arm`."
                }
              }
            ]
          },
          {
            "id": "fingerprint-device-models",
            "method": "GET",
            "path": "/fingerprint/device_models",
            "scope": null,
            "title": {
              "ru": "Модели устройств",
              "en": "Device models"
            },
            "summary": {
              "ru": "Модели Android-устройств для мобильных отпечатков.",
              "en": "Android device models for mobile fingerprints."
            },
            "curl": "curl -sS \"https://api.cloakctl.com/api/v2/automation/fingerprint/device_models\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "response": {
              "status": 200,
              "description": {
                "ru": "Модели и их платформа.",
                "en": "Models and their platform."
              },
              "example": {
                "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": {
              "ru": [
                "Модель имеет смысл только вместе с `os: android`; для десктопных отпечатков она не используется.",
                "Пагинации нет; неизвестный `device_type` — 400 `bad_request`."
              ],
              "en": [
                "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`."
              ]
            },
            "errors": [
              "bad_request",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ],
            "params": [
              {
                "name": "device_type",
                "in": "query",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "`phone` или `tablet`; иное значение — 400.",
                  "en": "`phone` or `tablet`; any other value returns 400."
                }
              }
            ]
          },
          {
            "id": "fingerprint-renderers",
            "method": "GET",
            "path": "/fingerprint/renderers",
            "scope": null,
            "title": {
              "ru": "Рендереры GPU",
              "en": "GPU renderers"
            },
            "summary": {
              "ru": "Значения GPU/рендерера для отпечатка.",
              "en": "GPU/renderer values for a fingerprint."
            },
            "curl": "curl -sS \"https://api.cloakctl.com/api/v2/automation/fingerprint/renderers?os=win&os_arch=x86\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "params": [
              {
                "name": "os",
                "in": "query",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Фильтр по платформе.",
                  "en": "Filter by platform."
                }
              },
              {
                "name": "os_arch",
                "in": "query",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Фильтр по архитектуре.",
                  "en": "Filter by architecture."
                }
              },
              {
                "name": "page",
                "in": "query",
                "type": "integer",
                "required": false,
                "default": 0,
                "description": {
                  "ru": "Номер страницы с нуля.",
                  "en": "Zero-based page number."
                }
              },
              {
                "name": "page_len",
                "in": "query",
                "type": "integer",
                "required": false,
                "default": 100,
                "description": {
                  "ru": "Размер страницы, от 1 до 1000.",
                  "en": "Page size, from 1 to 1000."
                }
              }
            ],
            "response": {
              "status": 200,
              "description": {
                "ru": "Список рендереров.",
                "en": "Renderer list."
              },
              "example": {
                "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": {
              "ru": [
                "Единственный справочник отпечатков с пагинацией: `total_count` и `page` на верхнем уровне.",
                "Без параметров отдаются все рендереры; фильтры лишь сокращают ответ. Неизвестный `os`/`os_arch` — 400 `bad_request`."
              ],
              "en": [
                "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`."
              ]
            },
            "errors": [
              "bad_request",
              "unauthorized",
              "rate_limited",
              "unavailable"
            ]
          }
        ]
      },
      {
        "id": "extensions",
        "title": {
          "ru": "Расширения",
          "en": "Extensions"
        },
        "description": {
          "ru": "Каталог расширений кабинета — только чтение в v1.",
          "en": "Account extension catalog — read-only in v1."
        },
        "endpoints": [
          {
            "id": "list-extensions",
            "method": "GET",
            "path": "/teams/extensions",
            "scope": "profiles_read",
            "title": {
              "ru": "Список расширений",
              "en": "List extensions"
            },
            "summary": {
              "ru": "Расширения, установленные хотя бы в одном профиле кабинета.",
              "en": "Extensions installed in at least one account profile."
            },
            "curl": "curl -sS \"https://api.cloakctl.com/api/v2/automation/teams/extensions\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "response": {
              "status": 200,
              "description": {
                "ru": "Каталог расширений.",
                "en": "The extension catalog."
              },
              "example": {
                "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": {
              "ru": [
                "`uuid` — композит `<id>@<version>`, как у Octo; отдельного `total_count` у маршрута нет.",
                "Через v2 расширения только читаются: установка, включение и удаление — в клиенте.",
                "Право `profiles_read` — отдельного «расширенческого» права нет."
              ],
              "en": [
                "`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."
              ]
            },
            "errors": [
              "unauthorized",
              "no_permission",
              "rate_limited",
              "unavailable"
            ],
            "params": [
              {
                "name": "start",
                "in": "query",
                "type": "integer",
                "required": false,
                "default": 0,
                "description": {
                  "ru": "Смещение от начала списка.",
                  "en": "Offset from the start of the list."
                }
              },
              {
                "name": "limit",
                "in": "query",
                "type": "integer",
                "required": false,
                "default": 25,
                "description": {
                  "ru": "Размер порции, от 1 до 200.",
                  "en": "Chunk size, from 1 to 200."
                }
              }
            ]
          }
        ]
      },
      {
        "id": "meta",
        "title": {
          "ru": "Служебное",
          "en": "Meta"
        },
        "description": {
          "ru": "Машинное описание облачного API v2.",
          "en": "Machine description of the cloud API v2."
        },
        "endpoints": [
          {
            "id": "openapi-json",
            "method": "GET",
            "path": "/openapi.json",
            "scope": null,
            "title": {
              "ru": "OpenAPI документ",
              "en": "OpenAPI document"
            },
            "summary": {
              "ru": "OpenAPI-описание только маршрутов v2; аутентификация не требуется.",
              "en": "OpenAPI description of v2 routes only; no authentication required."
            },
            "curl": "curl -sS \"https://api.cloakctl.com/api/v2/automation/openapi.json\"",
            "response": {
              "status": 200,
              "description": {
                "ru": "Сам OpenAPI-документ, без конверта.",
                "en": "The OpenAPI document itself, without an envelope."
              },
              "example": {
                "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": {
              "ru": [
                "Документ удобно использовать для генерации клиента, но источник истины — эта страница и `API_V2.md`.",
                "Аутентификация для этого маршрута не требуется: в документе нет ничего, кроме публичных форм v2.",
                "Схема генерируется на сервере из реальных обработчиков и фильтруется по префиксу `/api/v2/automation`."
              ],
              "en": [
                "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."
              ]
            },
            "errors": [
              "unavailable"
            ],
            "description": {
              "ru": "Документ собирается из живого приложения и фильтруется: в нём только пути `/api/v2/automation/*`. Ни внутренних `/v1`-маршрутов, ни секретов в нём нет, поэтому токен не нужен.",
              "en": "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."
            },
            "token_required": false
          }
        ]
      }
    ],
    "errors": [
      {
        "http": 400,
        "code": "bad_request",
        "when": {
          "ru": "Форма, тип или границы значения неверны.",
          "en": "Wrong shape, type or value bounds."
        }
      },
      {
        "http": 401,
        "code": "unauthorized",
        "when": {
          "ru": "Токен отсутствует, неизвестен или отозван.",
          "en": "Token missing, unknown or revoked."
        }
      },
      {
        "http": 403,
        "code": "no_permission",
        "when": {
          "ru": "У токена нет права, которое требует маршрут.",
          "en": "The token lacks the scope the route requires."
        }
      },
      {
        "http": 403,
        "code": "account_suspended",
        "when": {
          "ru": "Кабинет выключен.",
          "en": "The account is disabled."
        }
      },
      {
        "http": 403,
        "code": "account_required",
        "when": {
          "ru": "Машина не привязана к кабинету.",
          "en": "The device is not attached to an account."
        }
      },
      {
        "http": 403,
        "code": "license_missing",
        "when": {
          "ru": "У кабинета нет лицензии.",
          "en": "The account has no licence."
        }
      },
      {
        "http": 403,
        "code": "license_expired",
        "when": {
          "ru": "Срок лицензии истёк; в `data.not_after` приходит ISO-время окончания.",
          "en": "The licence has expired; `data.not_after` carries the end time in ISO format."
        }
      },
      {
        "http": 403,
        "code": "license_revoked",
        "when": {
          "ru": "Лицензия отозвана.",
          "en": "The licence has been revoked."
        }
      },
      {
        "http": 403,
        "code": "license_not_started",
        "when": {
          "ru": "Срок лицензии ещё не начался.",
          "en": "The licence period has not started yet."
        }
      },
      {
        "http": 404,
        "code": "not_found",
        "when": {
          "ru": "Профиль, метка или прокси не найдены.",
          "en": "Profile, tag or proxy not found."
        }
      },
      {
        "http": 409,
        "code": "profile_exists",
        "when": {
          "ru": "Имя профиля уже занято.",
          "en": "The profile title is already taken."
        }
      },
      {
        "http": 409,
        "code": "profile_in_use",
        "when": {
          "ru": "У профиля живая аренда.",
          "en": "The profile has a live lease."
        }
      },
      {
        "http": 409,
        "code": "profile_deleted",
        "when": {
          "ru": "Профиль находится в корзине.",
          "en": "The profile is in the trash bin."
        }
      },
      {
        "http": 409,
        "code": "trash_expired",
        "when": {
          "ru": "Срок хранения в корзине истёк.",
          "en": "The trash retention period has expired."
        }
      },
      {
        "http": 409,
        "code": "api_tokens.limit_reached",
        "when": {
          "ru": "Исчерпан лимит токенов тарифа (актуально для GUI/управления токенами).",
          "en": "The plan token cap is reached (relevant to token management)."
        }
      },
      {
        "http": 409,
        "code": "conflict",
        "when": {
          "ru": "Прочие конфликты состояния.",
          "en": "Other state conflicts."
        }
      },
      {
        "http": 422,
        "code": "bad_request",
        "when": {
          "ru": "Ошибка схемы; сервер переупаковывает её в общий конверт.",
          "en": "Schema validation error, repackaged by the server into the common envelope."
        }
      },
      {
        "http": 429,
        "code": "rate_limited",
        "when": {
          "ru": "Лимит запросов исчерпан; ждите `Retry-After`.",
          "en": "The rate limit is exhausted; wait for `Retry-After`."
        }
      },
      {
        "http": 503,
        "code": "unavailable",
        "when": {
          "ru": "База данных или сервер недоступны.",
          "en": "The database or the server is unavailable."
        }
      }
    ]
  },
  "local": {
    "base_url": "http://127.0.0.1:48900/api",
    "groups": [
      {
        "id": "profiles",
        "title": {
          "ru": "Профили на этой машине",
          "en": "Profiles on this machine"
        },
        "description": {
          "ru": "Запуск и остановка профилей в локальном клиенте. Работает только с сессиями этого процесса: аренда без живой сессии запущенной не считается.",
          "en": "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."
        },
        "endpoints": [
          {
            "id": "local-list-active",
            "method": "GET",
            "path": "/profiles/active",
            "scope": "profiles_read",
            "title": {
              "ru": "Активные профили",
              "en": "List active profiles"
            },
            "summary": {
              "ru": "Профили, которые прямо сейчас запущены этим клиентом.",
              "en": "Profiles currently running in this client."
            },
            "curl": "curl -sS \"http://127.0.0.1:48900/api/profiles/active\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "response": {
              "status": 200,
              "description": {
                "ru": "Голый массив без конверта.",
                "en": "A bare array without an envelope."
              },
              "example": [
                {
                  "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": {
              "ru": [
                "`state`: `STARTED` — работает, `CLOSING` — закрывается; у `CLOSING` ws-полей нет.",
                "`phase`: `starting`, `running` или `closing`. `ws_endpoint`, `debug_port` и `browser_pid` присутствуют только у `STARTED`; `debug_port` — строка, `start_time` — unix-секунды.",
                "Список обновляется по факту сессий в памяти процесса: перезапуск клиента его очищает.",
                "Даже у профиля с окном (headed) есть `ws_endpoint`: клиент уже говорит с ним по CDP."
              ],
              "en": [
                "`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."
              ]
            },
            "errors": [
              "unauthorized",
              "api.unavailable"
            ]
          },
          {
            "id": "local-start",
            "method": "POST",
            "path": "/profiles/start",
            "scope": "profiles_edit",
            "title": {
              "ru": "Запустить профиль",
              "en": "Start profile"
            },
            "summary": {
              "ru": "Запускает профиль и возвращает CDP-эндпоинт для автоматизации.",
              "en": "Starts a profile and returns the CDP endpoint for automation."
            },
            "curl": "curl -sS -X POST \"http://127.0.0.1:48900/api/profiles/start\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"uuid\":\"prof_35ef8623\",\"headless\":true,\"debug_port\":true,\"timeout\":120,\"flags\":[]}'",
            "body_fields": [
              {
                "name": "uuid",
                "type": "string",
                "required": true,
                "description": {
                  "ru": "Идентификатор профиля, созданного через облачный API.",
                  "en": "Identifier of a profile created through the cloud API."
                }
              },
              {
                "name": "headless",
                "type": "boolean",
                "required": false,
                "default": false,
                "description": {
                  "ru": "`true` — без окна; `false` — показать браузер.",
                  "en": "`true` runs without a window; `false` shows the browser."
                }
              },
              {
                "name": "debug_port",
                "type": "boolean",
                "required": false,
                "default": true,
                "description": {
                  "ru": "`true` — включить отладочный порт и выбрать свободный; `false` (или 0) — не отдавать ws-поля. Любое положительное число отклоняется: 400 `debug_port.not_supported`.",
                  "en": "`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`."
                }
              },
              {
                "name": "timeout",
                "type": "integer",
                "required": false,
                "default": 120,
                "description": {
                  "ru": "Секунды ожидания готовности профиля, от 1 до 300.",
                  "en": "Seconds to wait for readiness, from 1 to 300."
                }
              },
              {
                "name": "flags",
                "type": "array<string>",
                "required": false,
                "description": {
                  "ru": "Дополнительные аргументы ядра. Запрещены аргументы, ломающие запуск: `--user-data-dir`, `--remote-debugging-port*`, `--headless*`.",
                  "en": "Extra core arguments. Arguments that break the launch are rejected: `--user-data-dir`, `--remote-debugging-port*`, `--headless*`."
                }
              },
              {
                "name": "password",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Пароль профиля, если он защищён.",
                  "en": "Profile password when the profile is protected."
                }
              }
            ],
            "body_example": {
              "uuid": "prof_35ef8623",
              "headless": true,
              "debug_port": true,
              "timeout": 120,
              "flags": []
            },
            "response": {
              "status": 200,
              "description": {
                "ru": "Запущенная сессия с CDP-эндпоинтом.",
                "en": "The started session with its CDP endpoint."
              },
              "example": {
                "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": {
              "ru": [
                "Профиль с паролем: сначала `POST /api/profiles/password`, затем `start` (или передайте `password` в теле). Пароль — от 4 до 255 знаков.",
                "`uuid` обязан иметь вид `prof_xxxxxxxx`. Незнакомое поле в теле — 400 `bad_request`, а не молчаливый пропуск.",
                "`timeout` — целые секунды от 1 до 300. `flags` — массив не более 64 строк по 512 знаков без управляющих символов; запрещены `--user-data-dir*`, `--remote-debugging-port*`, `--headless*` (иначе 400 `bad_request`).",
                "`password` для незащищённого профиля принимается и игнорируется: разблокировать нечего. Защищённый профиль открывается как в интерфейсе — сначала разблокировка паролем, затем запуск.",
                "`only_local` принимается и игнорируется: это поле присылает Octo, а смысл в его документации не описан — отказ сломал бы готовые скрипты. Любое другое незнакомое поле — 400 `bad_request`.",
                "Фиксированный отладочный порт не поддерживается: защита защищённого профиля требует литерала `--remote-debugging-port=0`, поэтому клиент всегда выбирает свободный порт (R1). Положительное число в `debug_port` даёт 400 `debug_port.not_supported`.",
                "`ws_endpoint` присутствует и у профиля с окном (headed): автоматизация работает одинаково. Поле может быть `null`, если браузер не сообщил адрес.",
                "`connection_data` сохранена для совместимости формы Octo, но `ip` и `country` всегда `null`: локальный API не выдаёт гео прокси, для этого есть `/api/proxies/check`.",
                "Повторный запуск уже работающего профиля — 409 `profiles.already_started`; неизвестный профиль — 400 `profiles.not_found`; ошибка прокси — 400 `profiles.proxy_error` или `profiles.invalid_proxy`; прочий сбой старта — 400 `profiles.start_failed`; лицензионный отказ — 403 с лицензионным кодом.",
                "Маршрут требует право `profiles_edit`; без него — 403 `no_permission`."
              ],
              "en": [
                "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`."
              ]
            },
            "errors": [
              "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"
            ]
          },
          {
            "id": "local-stop",
            "method": "POST",
            "path": "/profiles/stop",
            "scope": "profiles_edit",
            "title": {
              "ru": "Остановить профиль",
              "en": "Stop profile"
            },
            "summary": {
              "ru": "Аккуратная остановка с синхронизацией данных.",
              "en": "Graceful stop that syncs profile data."
            },
            "curl": "curl -sS -X POST \"http://127.0.0.1:48900/api/profiles/stop\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"uuid\":\"prof_35ef8623\"}'",
            "body_example": {
              "uuid": "prof_35ef8623"
            },
            "response": {
              "status": 200,
              "description": {
                "ru": "Подтверждение остановки.",
                "en": "Stop confirmation."
              },
              "example": {
                "msg": "Profile stopped"
              }
            },
            "notes": {
              "ru": [
                "Ответ означает, что закрытие **принято**, а не что браузер уже закрыт: профиль ещё может висеть в `GET /api/profiles/active` со `state: \"CLOSING\"`, пока идёт синхронизация.",
                "Если остановить нечего (в том числе когда профиля с таким `uuid` нет), ответ — 409 `profiles.not_started`: маршрут не проверяет существование профиля отдельно.",
                "Если нужна максимальная скорость — используйте `force_stop`.",
                "Маршрут требует право `profiles_edit`; без него — 403 `no_permission`."
              ],
              "en": [
                "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`."
              ]
            },
            "errors": [
              "bad_request",
              "profiles.not_started",
              "no_permission",
              "unauthorized",
              "api.unavailable"
            ]
          },
          {
            "id": "local-force-stop",
            "method": "POST",
            "path": "/profiles/force_stop",
            "scope": "profiles_edit",
            "title": {
              "ru": "Жёстко остановить профиль",
              "en": "Force stop profile"
            },
            "summary": {
              "ru": "Останавливает немедленно, без ожидания синхронизации.",
              "en": "Stops immediately without waiting for synchronisation."
            },
            "curl": "curl -sS -X POST \"http://127.0.0.1:48900/api/profiles/force_stop\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"uuid\":\"prof_35ef8623\"}'",
            "body_example": {
              "uuid": "prof_35ef8623"
            },
            "response": {
              "status": 200,
              "description": {
                "ru": "Подтверждение остановки.",
                "en": "Stop confirmation."
              },
              "example": {
                "msg": "Profile stopped successfully"
              }
            },
            "notes": {
              "ru": [
                "Жёсткая остановка ускоренная, но **не** обходит запечатывание и публикацию данных: клиент выполняет ускоренное закрытие и возвращает 200 только когда сессия действительно закрылась (ожидание ограничено 15 секундами).",
                "Гарантии сохранности несинхронизированных данных нет и здесь: закрытие ускоренное. Синхронизация выполняется, но «данные точно не потеряются» этот маршрут не обещает.",
                "Если за это время закрытие не завершилось, ответ — 409 `profiles.still_closing`: закрытие не прервано, но «остановлено» ещё не наступило. Не выдавайте это за успех.",
                "Повторная жёсткая остановка уже остановленного профиля — 200, идемпотентно; неизвестный профиль — 400 `profiles.not_found`.",
                "В облаке одноимённая жёсткая остановка только снимает аренду, а окно браузера продолжает жить; здесь закрывается сама сессия.",
                "Маршрут требует право `profiles_edit`; без него — 403 `no_permission`."
              ],
              "en": [
                "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`."
              ]
            },
            "errors": [
              "bad_request",
              "profiles.not_found",
              "profiles.still_closing",
              "no_permission",
              "unauthorized",
              "api.unavailable"
            ]
          }
        ]
      },
      {
        "id": "passwords",
        "title": {
          "ru": "Пароли профилей",
          "en": "Profile passwords"
        },
        "description": {
          "ru": "Пароль защищает локальное открытие профиля. Обе операции выполняются до запуска.",
          "en": "The password protects local opening of the profile. Both operations run before launch."
        },
        "endpoints": [
          {
            "id": "local-set-password",
            "method": "POST",
            "path": "/profiles/password",
            "scope": "profile_passwords",
            "title": {
              "ru": "Задать пароль",
              "en": "Set profile password"
            },
            "summary": {
              "ru": "Устанавливает пароль профиля на этой машине.",
              "en": "Sets the profile password on this machine."
            },
            "curl": "curl -sS -X POST \"http://127.0.0.1:48900/api/profiles/password\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"uuid\":\"prof_35ef8623\",\"password\":\"strong-password\"}'",
            "body_example": {
              "uuid": "prof_35ef8623",
              "password": "strong-password"
            },
            "response": {
              "status": 200,
              "description": {
                "ru": "Пароль задан.",
                "en": "The password is set."
              },
              "example": {
                "msg": "Profile password has been set"
              }
            },
            "notes": {
              "ru": [
                "Пароль — от 4 до 255 знаков: короче или длиннее — 400 `bad_request`.",
                "После установки пароля `start` требует `password` в теле (или предварительной авторизации в интерфейсе).",
                "Неизвестный профиль — 400 `profiles.not_found`; сбой изменения — 503 `profiles.password_change_failed`.",
                "Незнакомое поле в теле — 400 `bad_request`; маршрут требует право `profile_passwords`, иначе 403 `no_permission`.",
                "Для защищённого профиля пароль участвует в защите данных, поэтому обратная операция — только через `DELETE /profiles/password`."
              ],
              "en": [
                "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`."
              ]
            },
            "errors": [
              "bad_request",
              "profiles.not_found",
              "no_permission",
              "unauthorized",
              "api.unavailable",
              "profiles.password_change_failed"
            ]
          },
          {
            "id": "local-clear-password",
            "method": "DELETE",
            "path": "/profiles/password",
            "scope": "profile_passwords",
            "title": {
              "ru": "Снять пароль",
              "en": "Clear profile password"
            },
            "summary": {
              "ru": "Удаляет пароль профиля; тело обязательно даже у DELETE.",
              "en": "Removes the profile password; the body is required even on DELETE."
            },
            "curl": "curl -sS -X DELETE \"http://127.0.0.1:48900/api/profiles/password\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"uuid\":\"prof_35ef8623\",\"password\":\"strong-password\"}'",
            "body_example": {
              "uuid": "prof_35ef8623",
              "password": "strong-password"
            },
            "response": {
              "status": 200,
              "description": {
                "ru": "Пароль снят.",
                "en": "The password is cleared."
              },
              "example": {
                "msg": "Profile password has been cleared"
              }
            },
            "notes": {
              "ru": [
                "Передайте текущий пароль: неверный даёт 400 `profiles.invalid_password`, а без него снятие отвергается.",
                "Неизвестный профиль — 400 `profiles.not_found`; сбой — 503 `profiles.password_change_failed`.",
                "Маршрут требует право `profile_passwords`; без него — 403 `no_permission`.",
                "Тело у DELETE нестандартно, но так же устроен Octo: некоторые HTTP-клиенты требуют разрешить тело явно."
              ],
              "en": [
                "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."
              ]
            },
            "errors": [
              "bad_request",
              "profiles.not_found",
              "profiles.invalid_password",
              "no_permission",
              "unauthorized",
              "api.unavailable",
              "profiles.password_change_failed"
            ]
          }
        ]
      },
      {
        "id": "local-proxies",
        "title": {
          "ru": "Проверка прокси",
          "en": "Proxy check"
        },
        "description": {
          "ru": "Проверка идёт с машины оператора — тем же путём, каким пойдёт трафик профиля.",
          "en": "The check runs from the operator machine, the same path the profile traffic takes."
        },
        "endpoints": [
          {
            "id": "local-check-proxy",
            "method": "POST",
            "path": "/proxies/check",
            "scope": "proxies_read",
            "title": {
              "ru": "Проверить прокси",
              "en": "Check proxy"
            },
            "summary": {
              "ru": "Проверяет сохранённый прокси или переданные данные.",
              "en": "Checks a saved proxy or the passed proxy data."
            },
            "curl": "curl -sS -X POST \"http://127.0.0.1:48900/api/proxies/check\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"type\":\"socks5\",\"host\":\"gw.example.net\",\"port\":1080,\"login\":\"user\",\"password\":\"secret\"}'",
            "body_fields": [
              {
                "name": "uuid",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Проверить запись справочника кабинета по её `uuid` (`prx_…`).",
                  "en": "Check an account catalog record by its `uuid` (`prx_...`)."
                }
              },
              {
                "name": "type",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "`http`, `https`, `socks5` (псевдоним `socks`) — при проверке переданных данных. `ssh` локальный API не проверяет: 400 `bad_request` с пояснением.",
                  "en": "`http`, `https`, `socks5` (alias `socks`) when checking passed data. The local API does not check `ssh`: it returns 400 `bad_request` with an explanation."
                }
              },
              {
                "name": "host",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Адрес прокси.",
                  "en": "Proxy host."
                }
              },
              {
                "name": "port",
                "type": "integer",
                "required": false,
                "description": {
                  "ru": "Порт прокси.",
                  "en": "Proxy port."
                }
              },
              {
                "name": "login",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Логин, если нужен.",
                  "en": "Login when required."
                }
              },
              {
                "name": "password",
                "type": "string",
                "required": false,
                "description": {
                  "ru": "Пароль вместе с логином.",
                  "en": "Password with the login."
                }
              }
            ],
            "body_example": {
              "type": "socks5",
              "host": "gw.example.net",
              "port": 1080,
              "login": "user",
              "password": "secret"
            },
            "response": {
              "status": 200,
              "description": {
                "ru": "Сведения о выходе и задержка.",
                "en": "Exit information and latency."
              },
              "example": {
                "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": {
              "ru": [
                "Ответ плоский: поля лежат прямо в объекте, без обёртки `data` — это отличие от Octo, у которого `POST /api/proxies/check` кладёт результат в `{\"data\": {...}}`.",
                "Поля `ip`, `country`, `timezone`, `latency_ms` гарантированы; `real_ip`, `country_full_name`, `city_name`, `isp`, `connection_type` дополняют картину и могут быть `null`, если провайдер их не сообщает.",
                "Проверяются только `http`, `https` и `socks5` (плюс псевдоним `socks`); `ssh` локальный клиент не проверяет — 400 `bad_request` с перечнем поддерживаемых типов.",
                "Недоступный или неизвестный прокси — 400 `proxies.proxy_connection_error` (число `-1`), причина в тексте `error`. Неизвестная запись справочника даёт тот же код с текстом `saved proxy not found`.",
                "Маршрут требует право `proxies_read`; без него — 403 `no_permission`."
              ],
              "en": [
                "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`."
              ]
            },
            "errors": [
              "bad_request",
              "proxies.proxy_connection_error",
              "no_permission",
              "unauthorized",
              "api.unavailable"
            ]
          }
        ]
      },
      {
        "id": "client",
        "title": {
          "ru": "Клиент",
          "en": "Client"
        },
        "description": {
          "ru": "Сведения о версии клиента и запуск обновления.",
          "en": "Client version information and update triggering."
        },
        "endpoints": [
          {
            "id": "local-get-update",
            "method": "GET",
            "path": "/update",
            "scope": null,
            "title": {
              "ru": "Версии клиента",
              "en": "Client versions"
            },
            "summary": {
              "ru": "Текущая и последняя версии клиента.",
              "en": "Current and latest client versions."
            },
            "curl": "curl -sS \"http://127.0.0.1:48900/api/update\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "response": {
              "status": 200,
              "description": {
                "ru": "Версии и признак обязательного обновления.",
                "en": "Versions and the critical-update flag."
              },
              "example": {
                "current": "2.4.1",
                "latest": "2.4.1",
                "update_required": false
              }
            },
            "notes": {
              "ru": [
                "`update_required: true` означает, что доступна более новая сборка клиента, — обновление рекомендуется. Отдельного понятия «критическое обновление» у нас нет, в отличие от Octo: флаг не говорит, что текущая версия перестала работать.",
                "`current` — установленная версия, `latest` — последняя доступная; если обновляться не на что, `POST /api/update` вернёт 409 `client.update_failed`."
              ],
              "en": [
                "`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`."
              ]
            },
            "errors": [
              "unauthorized",
              "api.unavailable"
            ]
          },
          {
            "id": "local-post-update",
            "method": "POST",
            "path": "/update",
            "scope": null,
            "title": {
              "ru": "Запустить обновление",
              "en": "Trigger update"
            },
            "summary": {
              "ru": "Просит клиент обновиться.",
              "en": "Asks the client to update."
            },
            "curl": "curl -sS -X POST \"http://127.0.0.1:48900/api/update\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "response": {
              "status": 200,
              "description": {
                "ru": "Обновление запущено.",
                "en": "The update has been triggered."
              },
              "example": {
                "msg": "update triggered"
              }
            },
            "notes": {
              "ru": [
                "Если обновляться не на что, ответ — 409 `client.update_failed` с текстом `Update is not triggered. No available version`; тот же код приходит, если обновление уже запущено. Сначала сверьтесь с `GET /api/update`.",
                "Новая версия скачивается в фоне; `msg` подтверждает только запуск."
              ],
              "en": [
                "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."
              ]
            },
            "errors": [
              "client.update_failed",
              "unauthorized",
              "api.unavailable"
            ]
          },
          {
            "id": "local-username",
            "method": "GET",
            "path": "/username",
            "scope": null,
            "title": {
              "ru": "Логин кабинета",
              "en": "Account username"
            },
            "summary": {
              "ru": "Логин кабинета, к которому привязан клиент.",
              "en": "Account login the client is attached to."
            },
            "curl": "curl -sS \"http://127.0.0.1:48900/api/username\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "response": {
              "status": 200,
              "description": {
                "ru": "Логин кабинета.",
                "en": "The account login."
              },
              "example": {
                "username": "operator@example.com"
              }
            },
            "notes": {
              "ru": [
                "Логин клиент спрашивает у сервера: без сети — 503 `api.unavailable` (R5)."
              ],
              "en": [
                "The client asks the server for the login: without connectivity it returns 503 `api.unavailable` (R5)."
              ]
            },
            "errors": [
              "unauthorized",
              "api.unavailable"
            ]
          },
          {
            "id": "local-version",
            "method": "GET",
            "path": "/version",
            "scope": null,
            "title": {
              "ru": "Версия клиента",
              "en": "Client version"
            },
            "summary": {
              "ru": "Строка версии клиента (дополнение к Octo).",
              "en": "Client version string (an addition to Octo)."
            },
            "curl": "curl -sS \"http://127.0.0.1:48900/api/version\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "response": {
              "status": 200,
              "description": {
                "ru": "Версия клиента.",
                "en": "The client version."
              },
              "example": {
                "version": "2.4.1"
              }
            },
            "notes": {
              "ru": [
                "Этого маршрута нет у Octo — он добавлен для диагностики поддержки."
              ],
              "en": [
                "Octo has no such route — it is added for support diagnostics."
              ]
            },
            "errors": [
              "unauthorized",
              "api.unavailable"
            ]
          }
        ]
      },
      {
        "id": "auth",
        "title": {
          "ru": "Аутентификация кабинета",
          "en": "Account authentication"
        },
        "description": {
          "ru": "Локальный API работает под API-токеном, поэтому интерактивный вход и выход отключены — как у Octo при запуске с `OCTO_API_TOKEN`.",
          "en": "The local API runs under an API token, so interactive login and logout are disabled — as in Octo when started with `OCTO_API_TOKEN`."
        },
        "endpoints": [
          {
            "id": "local-auth-login",
            "method": "POST",
            "path": "/auth/login",
            "scope": null,
            "title": {
              "ru": "Вход",
              "en": "Login"
            },
            "summary": {
              "ru": "Всегда 400: вход управляется токеном.",
              "en": "Always 400: login is managed by the API token."
            },
            "curl": "curl -sS -X POST \"http://127.0.0.1:48900/api/auth/login\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'",
            "body_example": {},
            "response": {
              "status": 400,
              "description": {
                "ru": "Вход запрещён в режиме токена.",
                "en": "Login is rejected in token mode."
              },
              "example": {
                "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": {
              "ru": [
                "Тело запроса игнорируется. Единственный способ доступа — заголовок с токеном.",
                "Ошибка приходит всегда, даже с верным токеном: интерактивной сессии у локального API нет."
              ],
              "en": [
                "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."
              ]
            },
            "errors": [
              "auth.managed_by_api_token"
            ]
          },
          {
            "id": "local-auth-logout",
            "method": "POST",
            "path": "/auth/logout",
            "scope": null,
            "title": {
              "ru": "Выход",
              "en": "Logout"
            },
            "summary": {
              "ru": "Всегда 400: выход управляется токеном.",
              "en": "Always 400: logout is managed by the API token."
            },
            "curl": "curl -sS -X POST \"http://127.0.0.1:48900/api/auth/logout\" \\\n  -H \"X-Octo-Api-Token: cc_REPLACE_WITH_TOKEN\"",
            "response": {
              "status": 400,
              "description": {
                "ru": "Выход запрещён в режиме токена.",
                "en": "Logout is rejected in token mode."
              },
              "example": {
                "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": {
              "ru": [
                "Чтобы завершить доступ, отзовите токен в клиенте — это немедленно отключит скрипт.",
                "Как и вход, выход всегда отвечает этой ошибкой: сессии, которую можно было бы завершить, нет."
              ],
              "en": [
                "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."
              ]
            },
            "errors": [
              "auth.managed_by_api_token"
            ]
          }
        ]
      }
    ],
    "errors": [
      {
        "http": 400,
        "code": "bad_request",
        "error_code": 400,
        "when": {
          "ru": "Тело не разобрано, неизвестное поле или неверный тип.",
          "en": "The body cannot be parsed, an unknown field or a wrong type."
        }
      },
      {
        "http": 400,
        "code": "profiles.not_found",
        "error_code": 6,
        "when": {
          "ru": "Профиль с таким `uuid` не найден (код запуска Octo 6).",
          "en": "No profile with that `uuid` (Octo launch code 6)."
        }
      },
      {
        "http": 400,
        "code": "profiles.invalid_password",
        "error_code": 1,
        "when": {
          "ru": "Неверный пароль профиля (код запуска Octo 1).",
          "en": "Wrong profile password (Octo launch code 1)."
        }
      },
      {
        "http": 400,
        "code": "profiles.start_failed",
        "error_code": 3,
        "when": {
          "ru": "Профиль не удалось запустить по причине, отличной от прокси и пароля.",
          "en": "The profile failed to start for a reason other than proxy or password."
        }
      },
      {
        "http": 400,
        "code": "profiles.proxy_error",
        "error_code": 4,
        "when": {
          "ru": "Не удалось получить данные прокси профиля (код запуска Octo 4).",
          "en": "The profile proxy data could not be read (Octo launch code 4)."
        }
      },
      {
        "http": 400,
        "code": "profiles.invalid_proxy",
        "error_code": 5,
        "when": {
          "ru": "Данные прокси профиля некорректны (код запуска Octo 5).",
          "en": "The profile proxy data is invalid (Octo launch code 5)."
        }
      },
      {
        "http": 400,
        "code": "profiles.no_subscription",
        "error_code": 7,
        "when": {
          "ru": "Нет действующей подписки для запуска профиля (код запуска Octo 7).",
          "en": "No active subscription for launching the profile (Octo launch code 7)."
        }
      },
      {
        "http": 400,
        "code": "profiles.outdated_version",
        "error_code": 8,
        "when": {
          "ru": "Ядро или клиент устарели для этого профиля (код запуска Octo 8).",
          "en": "The core or client is outdated for this profile (Octo launch code 8)."
        }
      },
      {
        "http": 400,
        "code": "profiles.version_mismatch",
        "error_code": 9,
        "when": {
          "ru": "Версии частей профиля не согласованы (код запуска Octo 9).",
          "en": "The profile version parts are inconsistent (Octo launch code 9)."
        }
      },
      {
        "http": 400,
        "code": "debug_port.not_supported",
        "error_code": 8,
        "when": {
          "ru": "Фиксированный `debug_port` числом не поддерживается; текст ошибки: `fixed debug port is not supported; use debug_port=true and connect to ws_endpoint`.",
          "en": "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`."
        }
      },
      {
        "http": 400,
        "code": "auth.managed_by_api_token",
        "error_code": 400,
        "when": {
          "ru": "Вызван `auth/login` или `auth/logout`: в режиме токена они запрещены.",
          "en": "`auth/login` or `auth/logout` was called; both are rejected in token mode."
        }
      },
      {
        "http": 400,
        "code": "proxies.proxy_connection_error",
        "error_code": -1,
        "when": {
          "ru": "Прокси недоступен, отверг соединение или запись справочника не найдена; причина в поле `error`.",
          "en": "The proxy is unreachable, rejected the connection or the catalog record is missing; the reason is in `error`."
        }
      },
      {
        "http": 413,
        "code": "bad_request",
        "error_code": 413,
        "when": {
          "ru": "Тело запроса больше 64 КиБ (`request body is too large`).",
          "en": "The request body exceeds 64 KiB (`request body is too large`)."
        }
      },
      {
        "http": 401,
        "code": "unauthorized",
        "error_code": 401,
        "when": {
          "ru": "Токен отсутствует (`api token required`), неизвестен или отозван (`invalid api token`).",
          "en": "The token is missing (`api token required`), unknown or revoked (`invalid api token`)."
        }
      },
      {
        "http": 403,
        "code": "no_permission",
        "error_code": 403,
        "when": {
          "ru": "У токена нет права, которое требует маршрут (`profiles_read`, `profiles_edit`, `profile_passwords`, `proxies_read`).",
          "en": "The token lacks the scope the route requires (`profiles_read`, `profiles_edit`, `profile_passwords`, `proxies_read`)."
        }
      },
      {
        "http": 403,
        "code": "account_suspended | license_expired | license_revoked",
        "error_code": 403,
        "when": {
          "ru": "Сервер отверг кабинет или лицензию; конкретный код приходит в поле `code`, текст — в `error`.",
          "en": "The server refused the account or licence; the exact code arrives in `code` and the text in `error`."
        }
      },
      {
        "http": 404,
        "code": "not_found",
        "error_code": 404,
        "when": {
          "ru": "Неизвестный маршрут.",
          "en": "Unknown route."
        }
      },
      {
        "http": 405,
        "code": "method_not_allowed",
        "error_code": 405,
        "when": {
          "ru": "Метод не поддерживается известным маршрутом.",
          "en": "The method is not supported by a known route."
        }
      },
      {
        "http": 409,
        "code": "profiles.already_started",
        "error_code": 2,
        "when": {
          "ru": "Профиль уже запущен (код запуска Octo 2).",
          "en": "The profile is already running (Octo launch code 2)."
        }
      },
      {
        "http": 409,
        "code": "profiles.not_started",
        "error_code": 409,
        "when": {
          "ru": "Остановка вызвана для профиля, который не запущен (в том числе для неизвестного `uuid`).",
          "en": "A stop was requested for a profile that is not running (including an unknown `uuid`)."
        }
      },
      {
        "http": 409,
        "code": "profiles.still_closing",
        "error_code": 409,
        "when": {
          "ru": "Жёсткая остановка не дождалась фактического закрытия за 15 секунд; закрытие не прервано и ещё идёт.",
          "en": "The forced stop did not observe the actual close within 15 seconds; the close was not interrupted and is still running."
        }
      },
      {
        "http": 409,
        "code": "client.update_failed",
        "error_code": 409,
        "when": {
          "ru": "Обновляться не на что: `Update is not triggered. No available version`.",
          "en": "No update is available: `Update is not triggered. No available version`."
        }
      },
      {
        "http": 500,
        "code": "internal",
        "error_code": 500,
        "when": {
          "ru": "Непредвиденная ошибка клиента.",
          "en": "An unexpected client error."
        }
      },
      {
        "http": 503,
        "code": "api.unavailable",
        "error_code": 503,
        "when": {
          "ru": "Нет связи с сервером: токен невозможно проверить или получить логин кабинета.",
          "en": "No connectivity to the server: the token cannot be verified and the account login cannot be read."
        }
      },
      {
        "http": 503,
        "code": "profiles.password_change_failed",
        "error_code": 1,
        "when": {
          "ru": "Не удалось изменить или снять пароль профиля.",
          "en": "The profile password could not be changed or cleared."
        }
      }
    ]
  }
}
