{
  "openapi": "3.1.0",
  "info": {
    "title": "Donut Browser Local REST API",
    "summary": "Programmatic control of Donut Browser profiles, proxies, VPNs and browser binaries.",
    "description": "Donut Browser runs a REST API on the machine it is installed on. It manages isolated browser\nprofiles, their proxies and VPNs, and the browser binaries behind them, and it is how\nPuppeteer, Playwright and Selenium scripts get a Chrome DevTools Protocol port to attach to.\n\nThe server listens on http://127.0.0.1:10108 and is off until you enable it in the desktop app under\nIntegrations → Local API (sidebar, Cmd/Ctrl+I). That tab also holds the bearer token every request\nmust carry.\n\nEndpoints that launch or drive a browser need Pro, Team or Enterprise. Cookie Bot and cloud-sync\nendpoints need a paid plan with those features. The rest work on the free plan, which needs no account.\n\nThis document covers the local REST API only. The remote MCP endpoint at\nhttps://api.donutbrowser.com/api/mcp is JSON-RPC over streamable HTTP with a per-user\ncredential, described at https://donutbrowser.com/docs/remote-mcp; the local MCP server has been removed.",
    "version": "1.0.0",
    "contact": {
      "name": "Donut Browser support",
      "email": "contact@donutbrowser.com",
      "url": "https://donutbrowser.com/contact/"
    },
    "license": {
      "name": "AGPL-3.0-only",
      "url": "https://github.com/donutbrowser/donutbrowser/blob/main/LICENSE"
    }
  },
  "externalDocs": {
    "description": "Full REST API reference, with curl, Node.js, Python and PowerShell samples.",
    "url": "https://donutbrowser.com/docs/rest-api/"
  },
  "servers": [
    {
      "url": "http://127.0.0.1:10108",
      "description": "The API built into the desktop app. It listens on loopback and is reachable only from the machine Donut Browser is installed on; there is no hosted equivalent to call instead."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "The token from Integrations → Local API (sidebar, Cmd/Ctrl+I) in the desktop app. Sent as `Authorization: Bearer <token>`."
      }
    }
  },
  "tags": [
    {
      "name": "profiles",
      "description": "Create, read, change and delete profiles; launch and stop them; edit many at once; import from other browsers."
    },
    {
      "name": "cookies",
      "description": "Import cookies, and move Local Storage, cookies and IndexedDB in and out as a Playwright storageState."
    },
    {
      "name": "remote",
      "description": "Run a profile on a machine in Donut's fleet, drive it over CDP through the app, and read the remote-hour budget."
    },
    {
      "name": "agent",
      "description": "Read the page of a running profile and act on elements by role and name: the same engine the MCP browser tools use."
    },
    {
      "name": "groups",
      "description": "Named groups of profiles."
    },
    {
      "name": "statuses",
      "description": "Labels for where each profile's account stands."
    },
    {
      "name": "templates",
      "description": "Saved profile settings, and many profiles made from them in one call."
    },
    {
      "name": "tags",
      "description": "Every tag used on your profiles."
    },
    {
      "name": "proxies",
      "description": "Stored proxies of every supported type. Attach one to a profile with `proxy_id`."
    },
    {
      "name": "vpns",
      "description": "WireGuard configurations. Attach one to a profile with `vpn_id`."
    },
    {
      "name": "extensions",
      "description": "Extensions and extension groups. Attach a group to a profile with `extension_group_id`."
    },
    {
      "name": "cookie-bot",
      "description": "Schedules, runs and remote-hour spend of the Cookie Bot, which warms profiles on remote machines."
    },
    {
      "name": "browsers",
      "description": "Download Wayfern versions and check which ones are installed."
    }
  ],
  "paths": {
    "/v1/profiles": {
      "get": {
        "operationId": "listProfiles",
        "summary": "List profiles",
        "description": "Returns every profile in the local install, with `total`. `fingerprint_os` is the operating system the profile shows to sites (`null` when it matches `host_os`, the computer it was made on).",
        "tags": [
          "profiles"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profiles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "browser": {
                            "type": "string"
                          },
                          "version": {
                            "type": "string"
                          },
                          "release_type": {
                            "type": "string"
                          },
                          "group_id": {
                            "type": "string"
                          },
                          "proxy_id": {
                            "type": "string"
                          },
                          "vpn_id": {
                            "type": "null"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "status_id": {
                            "type": "string"
                          },
                          "extension_group_id": {
                            "type": "null"
                          },
                          "dns_server": {
                            "type": "null"
                          },
                          "start_urls": {
                            "type": "array",
                            "items": {}
                          },
                          "is_running": {
                            "type": "boolean"
                          },
                          "process_id": {
                            "type": "null"
                          },
                          "last_launch": {
                            "type": "integer"
                          },
                          "launch_hook": {
                            "type": "null"
                          },
                          "proxy_bypass_rules": {
                            "type": "array",
                            "items": {}
                          },
                          "ephemeral": {
                            "type": "boolean"
                          },
                          "temporary": {
                            "type": "boolean"
                          },
                          "clear_on_close": {
                            "type": "boolean"
                          },
                          "sync_mode": {
                            "type": "string"
                          },
                          "cloud_sync_enabled": {
                            "type": "boolean"
                          },
                          "host_os": {
                            "type": "string"
                          },
                          "is_cross_os": {
                            "type": "boolean"
                          },
                          "fingerprint_os": {
                            "type": "null"
                          }
                        }
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "profiles": [
                    {
                      "id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                      "name": "Work",
                      "browser": "wayfern",
                      "version": "152.0.7845.96",
                      "release_type": "stable",
                      "group_id": "75f2b42f-8c94-4291-8af7-7a3d79122507",
                      "proxy_id": "c5617755-0709-4820-832a-6b97a0a24f3c",
                      "vpn_id": null,
                      "tags": [
                        "client-1"
                      ],
                      "status_id": "8f1c2d3e-4b5a-4c6d-9e7f-0a1b2c3d4e5f",
                      "extension_group_id": null,
                      "dns_server": null,
                      "start_urls": [],
                      "is_running": false,
                      "process_id": null,
                      "last_launch": 1779106515,
                      "launch_hook": null,
                      "proxy_bypass_rules": [],
                      "ephemeral": false,
                      "temporary": false,
                      "clear_on_close": false,
                      "sync_mode": "Disabled",
                      "cloud_sync_enabled": false,
                      "host_os": "macos",
                      "is_cross_os": false,
                      "fingerprint_os": null
                    }
                  ],
                  "total": 1
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      },
      "post": {
        "operationId": "createProfile",
        "summary": "Create a profile",
        "description": "`browser` must be `\"wayfern\"`. `version` accepts `\"latest\"`: the newest build already downloaded; this route does not download one. Set only one of `proxy_id` and `vpn_id`. `wayfern_config.os` picks the fingerprint operating system (`windows`, `macos`, `linux`, `android` or `ios`); any system other than this computer's needs Pro. `ephemeral: true` keeps browsing data in memory; `temporary: true` makes a profile for one automation run that is deleted when its browser stops. `dns_server` takes `https://` (DNS over HTTPS), `tls://` (DNS over TLS), `tcp://` (plain) or a bare address. `start_urls` takes up to 20 http(s) URLs.\n\nHTTP 402 when the fingerprint OS or launch arguments need Pro. HTTP 429 when the hourly limit on new fingerprints is reached; the body carries `retryAfterSeconds`.",
        "tags": [
          "profiles"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "browser": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  },
                  "proxy_id": {
                    "type": "string"
                  },
                  "group_id": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "status_id": {
                    "type": "string"
                  },
                  "dns_server": {
                    "type": "string"
                  },
                  "start_urls": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "wayfern_config": {
                    "type": "object",
                    "properties": {
                      "os": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "example": {
                "name": "client-1",
                "browser": "wayfern",
                "version": "latest",
                "proxy_id": "c5617755-0709-4820-832a-6b97a0a24f3c",
                "group_id": "75f2b42f-8c94-4291-8af7-7a3d79122507",
                "tags": [
                  "client-1"
                ],
                "status_id": "8f1c2d3e-4b5a-4c6d-9e7f-0a1b2c3d4e5f",
                "dns_server": "https://dns.quad9.net/dns-query",
                "start_urls": [
                  "https://mail.example.com"
                ],
                "wayfern_config": {
                  "os": "windows"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profile": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "browser": {
                          "type": "string"
                        },
                        "version": {
                          "type": "string"
                        },
                        "release_type": {
                          "type": "string"
                        },
                        "group_id": {
                          "type": "string"
                        },
                        "proxy_id": {
                          "type": "string"
                        },
                        "vpn_id": {
                          "type": "null"
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "status_id": {
                          "type": "string"
                        },
                        "extension_group_id": {
                          "type": "null"
                        },
                        "dns_server": {
                          "type": "string"
                        },
                        "start_urls": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "is_running": {
                          "type": "boolean"
                        },
                        "process_id": {
                          "type": "null"
                        },
                        "last_launch": {
                          "type": "null"
                        },
                        "launch_hook": {
                          "type": "null"
                        },
                        "proxy_bypass_rules": {
                          "type": "array",
                          "items": {}
                        },
                        "ephemeral": {
                          "type": "boolean"
                        },
                        "temporary": {
                          "type": "boolean"
                        },
                        "clear_on_close": {
                          "type": "boolean"
                        },
                        "sync_mode": {
                          "type": "string"
                        },
                        "cloud_sync_enabled": {
                          "type": "boolean"
                        },
                        "host_os": {
                          "type": "string"
                        },
                        "is_cross_os": {
                          "type": "boolean"
                        },
                        "fingerprint_os": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "profile": {
                    "id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                    "name": "client-1",
                    "browser": "wayfern",
                    "version": "152.0.7845.96",
                    "release_type": "stable",
                    "group_id": "75f2b42f-8c94-4291-8af7-7a3d79122507",
                    "proxy_id": "c5617755-0709-4820-832a-6b97a0a24f3c",
                    "vpn_id": null,
                    "tags": [
                      "client-1"
                    ],
                    "status_id": "8f1c2d3e-4b5a-4c6d-9e7f-0a1b2c3d4e5f",
                    "extension_group_id": null,
                    "dns_server": "https://dns.quad9.net/dns-query",
                    "start_urls": [
                      "https://mail.example.com"
                    ],
                    "is_running": false,
                    "process_id": null,
                    "last_launch": null,
                    "launch_hook": null,
                    "proxy_bypass_rules": [],
                    "ephemeral": false,
                    "temporary": false,
                    "clear_on_close": false,
                    "sync_mode": "Disabled",
                    "cloud_sync_enabled": false,
                    "host_os": "macos",
                    "is_cross_os": true,
                    "fingerprint_os": "windows"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/profiles/{id}": {
      "get": {
        "operationId": "getProfile",
        "summary": "Read one profile",
        "description": "Fetches one profile by ID.",
        "tags": [
          "profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profile": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "browser": {
                          "type": "string"
                        },
                        "version": {
                          "type": "string"
                        },
                        "release_type": {
                          "type": "string"
                        },
                        "group_id": {
                          "type": "string"
                        },
                        "proxy_id": {
                          "type": "string"
                        },
                        "vpn_id": {
                          "type": "null"
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "status_id": {
                          "type": "string"
                        },
                        "extension_group_id": {
                          "type": "null"
                        },
                        "dns_server": {
                          "type": "null"
                        },
                        "start_urls": {
                          "type": "array",
                          "items": {}
                        },
                        "is_running": {
                          "type": "boolean"
                        },
                        "process_id": {
                          "type": "null"
                        },
                        "last_launch": {
                          "type": "integer"
                        },
                        "launch_hook": {
                          "type": "null"
                        },
                        "proxy_bypass_rules": {
                          "type": "array",
                          "items": {}
                        },
                        "ephemeral": {
                          "type": "boolean"
                        },
                        "temporary": {
                          "type": "boolean"
                        },
                        "clear_on_close": {
                          "type": "boolean"
                        },
                        "sync_mode": {
                          "type": "string"
                        },
                        "cloud_sync_enabled": {
                          "type": "boolean"
                        },
                        "host_os": {
                          "type": "string"
                        },
                        "is_cross_os": {
                          "type": "boolean"
                        },
                        "fingerprint_os": {
                          "type": "null"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "profile": {
                    "id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                    "name": "Work",
                    "browser": "wayfern",
                    "version": "152.0.7845.96",
                    "release_type": "stable",
                    "group_id": "75f2b42f-8c94-4291-8af7-7a3d79122507",
                    "proxy_id": "c5617755-0709-4820-832a-6b97a0a24f3c",
                    "vpn_id": null,
                    "tags": [
                      "client-1"
                    ],
                    "status_id": "8f1c2d3e-4b5a-4c6d-9e7f-0a1b2c3d4e5f",
                    "extension_group_id": null,
                    "dns_server": null,
                    "start_urls": [],
                    "is_running": false,
                    "process_id": null,
                    "last_launch": 1779106515,
                    "launch_hook": null,
                    "proxy_bypass_rules": [],
                    "ephemeral": false,
                    "temporary": false,
                    "clear_on_close": false,
                    "sync_mode": "Disabled",
                    "cloud_sync_enabled": false,
                    "host_os": "macos",
                    "is_cross_os": false,
                    "fingerprint_os": null
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "put": {
        "operationId": "updateProfile",
        "summary": "Update a profile",
        "description": "Send only the fields to change; the rest keep their values. An empty string for `proxy_id` or `vpn_id` detaches it, and setting one clears the other. `clear_on_close: true` wipes browsing data (not extensions or bookmarks) when the browser closes; it is refused for ephemeral and password-protected profiles. The engine and the fingerprint operating system cannot change here.",
        "tags": [
          "profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "proxy_id": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "clear_on_close": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "name": "Work (renamed)",
                "proxy_id": "7b0e3c1a-5d8f-4e62-9a17-3c4d2e1f0a9b",
                "tags": [
                  "client-1",
                  "prod"
                ],
                "clear_on_close": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profile": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "browser": {
                          "type": "string"
                        },
                        "version": {
                          "type": "string"
                        },
                        "release_type": {
                          "type": "string"
                        },
                        "group_id": {
                          "type": "string"
                        },
                        "proxy_id": {
                          "type": "string"
                        },
                        "vpn_id": {
                          "type": "null"
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "status_id": {
                          "type": "string"
                        },
                        "extension_group_id": {
                          "type": "null"
                        },
                        "dns_server": {
                          "type": "null"
                        },
                        "start_urls": {
                          "type": "array",
                          "items": {}
                        },
                        "is_running": {
                          "type": "boolean"
                        },
                        "process_id": {
                          "type": "null"
                        },
                        "last_launch": {
                          "type": "integer"
                        },
                        "launch_hook": {
                          "type": "null"
                        },
                        "proxy_bypass_rules": {
                          "type": "array",
                          "items": {}
                        },
                        "ephemeral": {
                          "type": "boolean"
                        },
                        "temporary": {
                          "type": "boolean"
                        },
                        "clear_on_close": {
                          "type": "boolean"
                        },
                        "sync_mode": {
                          "type": "string"
                        },
                        "cloud_sync_enabled": {
                          "type": "boolean"
                        },
                        "host_os": {
                          "type": "string"
                        },
                        "is_cross_os": {
                          "type": "boolean"
                        },
                        "fingerprint_os": {
                          "type": "null"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "profile": {
                    "id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                    "name": "Work (renamed)",
                    "browser": "wayfern",
                    "version": "152.0.7845.96",
                    "release_type": "stable",
                    "group_id": "75f2b42f-8c94-4291-8af7-7a3d79122507",
                    "proxy_id": "7b0e3c1a-5d8f-4e62-9a17-3c4d2e1f0a9b",
                    "vpn_id": null,
                    "tags": [
                      "client-1",
                      "prod"
                    ],
                    "status_id": "8f1c2d3e-4b5a-4c6d-9e7f-0a1b2c3d4e5f",
                    "extension_group_id": null,
                    "dns_server": null,
                    "start_urls": [],
                    "is_running": false,
                    "process_id": null,
                    "last_launch": 1779106515,
                    "launch_hook": null,
                    "proxy_bypass_rules": [],
                    "ephemeral": false,
                    "temporary": false,
                    "clear_on_close": true,
                    "sync_mode": "Disabled",
                    "cloud_sync_enabled": false,
                    "host_os": "macos",
                    "is_cross_os": false,
                    "fingerprint_os": null
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "delete": {
        "operationId": "deleteProfile",
        "summary": "Delete a profile",
        "description": "Moves the profile to the trash, where it can be restored in the app until it expires.",
        "tags": [
          "profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "204 No Content"
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/profiles/{id}/fingerprint": {
      "get": {
        "operationId": "getProfileFingerprint",
        "summary": "Read a profile's fingerprint",
        "description": "The device the profile shows to sites, as the JSON string the engine uses. `null` before the first launch of a profile whose device is made at launch.\n\nHTTP 402 when the profile's fingerprint OS is not this computer's and the plan does not include cross-OS fingerprints.",
        "tags": [
          "profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fingerprint": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "fingerprint": "{\"userAgent\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) …\",\"platform\":\"Win32\",\"hardwareConcurrency\":8,\"timezone\":\"Europe/Berlin\",\"…\":\"…\"}"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/profiles/{id}/run": {
      "post": {
        "operationId": "runProfile",
        "summary": "Launch a profile",
        "description": "Starts the browser and returns its DevTools (CDP) port, a free port on `127.0.0.1` chosen at each launch. `url` opens a page (`http`, `https` or `about:blank` only); `headless` starts without a window. If the profile already runs, the call returns its current port with `attached: true` and does not restart it.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required. HTTP 409 when another team member holds the profile. Counts against the hourly automation limit (HTTP 429 with Retry-After).",
        "tags": [
          "profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "headless": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "url": "https://example.com",
                "headless": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profile_id": {
                      "type": "string"
                    },
                    "remote_debugging_port": {
                      "type": "integer"
                    },
                    "headless": {
                      "type": "boolean"
                    },
                    "attached": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                  "remote_debugging_port": 53127,
                  "headless": false,
                  "attached": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/profiles/{id}/kill": {
      "post": {
        "operationId": "killProfile",
        "summary": "Stop a running profile",
        "description": "Stops the profile's browser, on this computer or in its remote session.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required.",
        "tags": [
          "profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "204 No Content"
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/profiles/{id}/open-url": {
      "post": {
        "operationId": "openUrl",
        "summary": "Open a URL in a running profile",
        "description": "Opens the URL in a new tab of a running profile, on this computer or in its remote session. Only `http`, `https` and `about:blank` are accepted.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required.",
        "tags": [
          "profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "url": "https://example.com/inbox"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "200 OK"
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/profiles/batch/run": {
      "post": {
        "operationId": "batchRunProfiles",
        "summary": "Launch profiles in bulk",
        "description": "Launches many profiles in one call. Each one is tried on its own and reported in `results`; one failure never stops the batch.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required.",
        "tags": [
          "profiles"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "profile_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "url": {
                    "type": "string"
                  },
                  "headless": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "profile_ids": [
                  "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                  "c20221fa-be36-485d-a4e1-5537254fa863"
                ],
                "url": "https://example.com",
                "headless": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "profile_id": {
                            "type": "string"
                          },
                          "ok": {
                            "type": "boolean"
                          },
                          "remote_debugging_port": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "error": {
                            "type": [
                              "null",
                              "string"
                            ]
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "results": [
                    {
                      "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                      "ok": true,
                      "remote_debugging_port": 53127,
                      "error": null
                    },
                    {
                      "profile_id": "c20221fa-be36-485d-a4e1-5537254fa863",
                      "ok": false,
                      "remote_debugging_port": null,
                      "error": "profile not found"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/profiles/batch/stop": {
      "post": {
        "operationId": "batchStopProfiles",
        "summary": "Stop profiles in bulk",
        "description": "Stops many running profiles in one call. Each one is reported in `results`.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required.",
        "tags": [
          "profiles"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "profile_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "example": {
                "profile_ids": [
                  "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                  "c20221fa-be36-485d-a4e1-5537254fa863"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "profile_id": {
                            "type": "string"
                          },
                          "ok": {
                            "type": "boolean"
                          },
                          "error": {
                            "type": [
                              "null",
                              "string"
                            ]
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "results": [
                    {
                      "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                      "ok": true,
                      "error": null
                    },
                    {
                      "profile_id": "c20221fa-be36-485d-a4e1-5537254fa863",
                      "ok": false,
                      "error": "profile not found"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/profiles/bulk-edit": {
      "post": {
        "operationId": "bulkEditProfiles",
        "summary": "Edit many profiles",
        "description": "Applies one `patch` to every listed profile. Every value is checked first: when one is invalid, nothing changes. Patch fields: `tags_add`, `tags_remove`, `note`, `status_id`, `group_id`, `extension_group_id`, `dns_blocklist`, `dns_server`, `proxy_bypass_rules`, `start_urls`, `launch_hook`, `clear_on_close`, `randomize_fingerprint_on_launch`, `webrtc_mode` (`auto`, `tcp_only` or `block`), `block_images`, `block_webgl`, `restore_session`, and `new_device: true` to give each profile a new device at its next launch. `null` clears a value.",
        "tags": [
          "profiles"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "profile_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "patch": {
                    "type": "object",
                    "properties": {
                      "tags_add": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "status_id": {
                        "type": "string"
                      },
                      "webrtc_mode": {
                        "type": "string"
                      },
                      "new_device": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              },
              "example": {
                "profile_ids": [
                  "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                  "c20221fa-be36-485d-a4e1-5537254fa863"
                ],
                "patch": {
                  "tags_add": [
                    "warmed"
                  ],
                  "status_id": "8f1c2d3e-4b5a-4c6d-9e7f-0a1b2c3d4e5f",
                  "webrtc_mode": "tcp_only",
                  "new_device": false
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "changed": 2
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/profiles/distribute-proxies": {
      "post": {
        "operationId": "distributeProxies",
        "summary": "Assign proxies to profiles",
        "description": "Applies explicit profile-to-proxy pairs, one profile at a time. A profile that cannot change (for example, it is running) is reported and never stops the rest.",
        "tags": [
          "profiles"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pairs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "profile_id": {
                          "type": "string"
                        },
                        "proxy_id": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "pairs": [
                  {
                    "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                    "proxy_id": "c5617755-0709-4820-832a-6b97a0a24f3c"
                  },
                  {
                    "profile_id": "c20221fa-be36-485d-a4e1-5537254fa863",
                    "proxy_id": "7b0e3c1a-5d8f-4e62-9a17-3c4d2e1f0a9b"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "profile_id": {
                            "type": "string"
                          },
                          "proxy_id": {
                            "type": "string"
                          },
                          "ok": {
                            "type": "boolean"
                          },
                          "error": {
                            "type": [
                              "null",
                              "string"
                            ]
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "results": [
                    {
                      "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                      "proxy_id": "c5617755-0709-4820-832a-6b97a0a24f3c",
                      "ok": true,
                      "error": null
                    },
                    {
                      "profile_id": "c20221fa-be36-485d-a4e1-5537254fa863",
                      "proxy_id": "7b0e3c1a-5d8f-4e62-9a17-3c4d2e1f0a9b",
                      "ok": false,
                      "error": "{\"code\":\"PROFILE_RUNNING\"}"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/profiles/{id}/cloud-sync": {
      "post": {
        "operationId": "setCloudSync",
        "summary": "Set a profile's sync mode",
        "description": "`mode` is `Disabled`, `Regular` or `Encrypted`. The answer says if the profile can now run on a remote machine: an `Encrypted` profile syncs but cannot run remotely, because the remote host cannot decrypt it.\n\nNeeds a plan with cloud backup (Solo, Pro, Team or Enterprise): HTTP 402 otherwise. HTTP 409 while the profile runs.",
        "tags": [
          "profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "mode": "Regular"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profile_id": {
                      "type": "string"
                    },
                    "mode": {
                      "type": "string"
                    },
                    "remote_launchable": {
                      "type": "boolean"
                    },
                    "remote_blocked_reason": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                  "mode": "Regular",
                  "remote_launchable": true,
                  "remote_blocked_reason": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/profiles/import/detect": {
      "get": {
        "operationId": "detectImportProfiles",
        "summary": "Detect importable profiles",
        "description": "Lists the profiles in the default folders of Chrome, Edge, Brave, Opera, Vivaldi, Arc, Yandex and the other Chromium browsers. Pass `?folder=/path` to scan one location instead: a profile folder, a browser user-data folder, or a folder of exported profiles.\n\nHTTP 404 when `folder` does not exist.",
        "tags": [
          "profiles"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profiles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "browser": {
                            "type": "string"
                          },
                          "mapped_browser": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "profiles": [
                    {
                      "browser": "chromium",
                      "mapped_browser": "wayfern",
                      "name": "Chrome/Chromium - Default Profile",
                      "path": "/Users/me/Library/Application Support/Google/Chrome/Default",
                      "description": "Default profile"
                    }
                  ],
                  "total": 1
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/profiles/import": {
      "post": {
        "operationId": "importProfiles",
        "summary": "Import profiles in bulk",
        "description": "Imports browser profiles from folders (for example the paths from the detect route) as Wayfern profiles, with their cookies and passwords when the system unlocks the source browser's key. Each item is independent. `group_id` puts every imported profile in a group; `duplicate_strategy` is `\"rename\"` (default) or `\"skip\"`. Each profile gets a new fingerprint.\n\nFree on every plan. A fingerprint `os` in `wayfern_config` other than this computer's needs Pro (HTTP 402). A Wayfern version must already be downloaded.",
        "tags": [
          "profiles"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "source_path": {
                          "type": "string"
                        },
                        "new_profile_name": {
                          "type": "string"
                        },
                        "proxy_id": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "group_id": {
                    "type": "string"
                  },
                  "duplicate_strategy": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "items": [
                  {
                    "source_path": "/Users/me/Library/Application Support/Google/Chrome/Default",
                    "new_profile_name": "Old Chrome",
                    "proxy_id": "c5617755-0709-4820-832a-6b97a0a24f3c"
                  }
                ],
                "group_id": "75f2b42f-8c94-4291-8af7-7a3d79122507",
                "duplicate_strategy": "rename"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "imported_count": {
                      "type": "integer"
                    },
                    "skipped_count": {
                      "type": "integer"
                    },
                    "failed_count": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "source_path": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "profile_id": {
                            "type": "string"
                          },
                          "error": {
                            "type": "null"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "imported_count": 1,
                  "skipped_count": 0,
                  "failed_count": 0,
                  "results": [
                    {
                      "name": "Old Chrome",
                      "source_path": "/Users/me/Library/Application Support/Google/Chrome/Default",
                      "status": "imported",
                      "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                      "error": null
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/profiles/{id}/cookies/import": {
      "post": {
        "operationId": "importCookies",
        "summary": "Import cookies",
        "description": "Writes cookies into a profile. `content` is a JSON array (Puppeteer or browser-extension style) or a Netscape `cookies.txt`; the format is detected. A cookie with the same name, domain and path replaces the stored one. Close the profile's browser first.",
        "tags": [
          "cookies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "content": "[{\"name\":\"sid\",\"value\":\"…\",\"domain\":\".example.com\",\"path\":\"/\",\"secure\":true,\"httpOnly\":true,\"expires\":1798761600}]"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cookies_imported": {
                      "type": "integer"
                    },
                    "cookies_replaced": {
                      "type": "integer"
                    },
                    "errors": {
                      "type": "array",
                      "items": {}
                    }
                  }
                },
                "example": {
                  "cookies_imported": 1,
                  "cookies_replaced": 0,
                  "errors": []
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/profiles/{id}/storage-state": {
      "get": {
        "operationId": "exportStorageState",
        "summary": "Export storage state",
        "description": "Returns a Playwright `storageState` with each origin's Local Storage. Add `?include_cookies=true` for the cookies and `?indexed_db=true` for IndexedDB. IndexedDB needs the profile closed: it opens headless for a moment and no request leaves the computer.",
        "tags": [
          "cookies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cookies": {
                      "type": "array",
                      "items": {}
                    },
                    "origins": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "origin": {
                            "type": "string"
                          },
                          "localStorage": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "cookies": [],
                  "origins": [
                    {
                      "origin": "https://app.example.com",
                      "localStorage": [
                        {
                          "name": "theme",
                          "value": "dark"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "post": {
        "operationId": "importStorageState",
        "summary": "Import storage state",
        "description": "Takes a Playwright `storageState`. An item replaces the one of the same name in its origin; other items stay. Close the profile's browser first.",
        "tags": [
          "cookies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cookies": {
                    "type": "array",
                    "items": {}
                  },
                  "origins": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "origin": {
                          "type": "string"
                        },
                        "localStorage": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "cookies": [],
                "origins": [
                  {
                    "origin": "https://app.example.com",
                    "localStorage": [
                      {
                        "name": "theme",
                        "value": "dark"
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "origins": {
                      "type": "integer"
                    },
                    "items": {
                      "type": "integer"
                    },
                    "cookies_imported": {
                      "type": "integer"
                    },
                    "cookies_replaced": {
                      "type": "integer"
                    },
                    "cookie_errors": {
                      "type": "array",
                      "items": {}
                    },
                    "indexed_db_records": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "origins": 1,
                  "items": 1,
                  "cookies_imported": 0,
                  "cookies_replaced": 0,
                  "cookie_errors": [],
                  "indexed_db_records": 0
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/profiles/{id}/run-remote": {
      "post": {
        "operationId": "runProfileRemote",
        "summary": "Launch a profile on a remote machine",
        "description": "Starts the profile on a machine of its own operating system in Donut's fleet and returns a session ID. The session starts as `provisioning`; poll it until `cdp_ready` is true. The profile needs `Regular` cloud sync. `url` must be `http`, `https` or `about:blank`.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required. HTTP 400 when the profile does not sync, 409 when another session holds it, 503 when no machine of that system is free. Spends remote hours.",
        "tags": [
          "remote"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "url": "https://example.com"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profile_id": {
                      "type": "string"
                    },
                    "session_id": {
                      "type": "string"
                    },
                    "platform": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                  "session_id": "rs_7c1e9a40",
                  "platform": "windows",
                  "status": "provisioning"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/remote-sessions": {
      "get": {
        "operationId": "listRemoteSessions",
        "summary": "List remote sessions",
        "description": "Every remote session of the signed-in account.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required. HTTP 403 when this app is not signed in.",
        "tags": [
          "remote"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sessions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "session_id": {
                            "type": "string"
                          },
                          "profile_id": {
                            "type": "string"
                          },
                          "platform": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "cdp_ready": {
                            "type": "boolean"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "started_at": {
                            "type": "string"
                          },
                          "ended_at": {
                            "type": "null"
                          },
                          "billed_seconds": {
                            "type": "null"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "sessions": [
                    {
                      "session_id": "rs_7c1e9a40",
                      "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                      "platform": "windows",
                      "state": "live",
                      "cdp_ready": true,
                      "kind": "interactive",
                      "started_at": "2026-10-14T10:02:11Z",
                      "ended_at": null,
                      "billed_seconds": null
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/remote-sessions/{id}": {
      "get": {
        "operationId": "getRemoteSession",
        "summary": "Read a remote session",
        "description": "The current state of one session.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required.",
        "tags": [
          "remote"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session_id": {
                      "type": "string"
                    },
                    "profile_id": {
                      "type": "string"
                    },
                    "platform": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    },
                    "cdp_ready": {
                      "type": "boolean"
                    },
                    "started_at": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "session_id": "rs_7c1e9a40",
                  "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                  "platform": "windows",
                  "state": "live",
                  "cdp_ready": true,
                  "started_at": "2026-10-14T10:02:11Z"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "delete": {
        "operationId": "stopRemoteSession",
        "summary": "Stop a remote session",
        "description": "Ends the session. The remote machine uploads the profile's changes, and this computer downloads them before the profile opens here again.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required.",
        "tags": [
          "remote"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session_id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "billed_seconds": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "session_id": "rs_7c1e9a40",
                  "status": "closed",
                  "billed_seconds": 1840
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/remote-sessions/{id}/cdp": {
      "get": {
        "operationId": "remoteSessionCdp",
        "summary": "Connect to a remote session over CDP",
        "description": "A WebSocket upgrade. The app relays the remote browser's DevTools protocol, so a client connects with the local API token and never needs the account credential: `chromium.connectOverCDP({ endpointURL: \"ws://127.0.0.1:10108/v1/remote-sessions/<id>/cdp\", headers: { Authorization: \"Bearer …\" } })`.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required.",
        "tags": [
          "remote"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "101 Switching Protocols"
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/remote-hours": {
      "get": {
        "operationId": "remoteHours",
        "summary": "Read the remote-hour budget",
        "description": "The hours granted, used and left in this billing period. On a team, the pool is shared: `seats` times `per_seat_hours`.",
        "tags": [
          "remote"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "granted_hours": {
                      "type": "integer"
                    },
                    "used_hours": {
                      "type": "number"
                    },
                    "remaining_hours": {
                      "type": "number"
                    },
                    "period_start": {
                      "type": "string"
                    },
                    "period_end": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "string"
                    },
                    "seats": {
                      "type": "integer"
                    },
                    "per_seat_hours": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "granted_hours": 200,
                  "used_hours": 37.5,
                  "remaining_hours": 162.5,
                  "period_start": "2026-10-01T00:00:00Z",
                  "period_end": "2026-11-01T00:00:00Z",
                  "scope": "user",
                  "seats": 1,
                  "per_seat_hours": 200
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/profiles/{id}/agent/perceive": {
      "post": {
        "operationId": "agentPerceive",
        "summary": "Read the page",
        "description": "Returns the page of a running profile as an agent needs it: visible elements with role, accessible name, text, value, state and bounds, plus the readable text. On Wayfern 152 and later it injects no script into the page; `engine` says which path answered. Limits: `max_bytes`, `max_nodes`, `budget_ms`; `viewport_only`, `include_text`; pass the returned `cursor` to read the next part.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required.",
        "tags": [
          "agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "viewport_only": {
                    "type": "boolean"
                  },
                  "include_text": {
                    "type": "boolean"
                  },
                  "max_nodes": {
                    "type": "integer"
                  }
                }
              },
              "example": {
                "viewport_only": false,
                "include_text": true,
                "max_nodes": 400
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "snapshotId": {
                      "type": "string"
                    },
                    "nodes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "frameId": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          },
                          "x": {
                            "type": "integer"
                          },
                          "y": {
                            "type": "integer"
                          },
                          "width": {
                            "type": "integer"
                          },
                          "height": {
                            "type": "integer"
                          },
                          "inViewport": {
                            "type": "boolean"
                          },
                          "visible": {
                            "type": "boolean"
                          },
                          "focused": {
                            "type": "boolean"
                          },
                          "disabled": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "frames": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "text": {
                      "type": "string"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "stats": {
                      "type": "object",
                      "properties": {
                        "totalNodes": {
                          "type": "integer"
                        },
                        "returnedNodes": {
                          "type": "integer"
                        },
                        "bytes": {
                          "type": "integer"
                        },
                        "elapsedMs": {
                          "type": "integer"
                        }
                      }
                    },
                    "cursor": {
                      "type": "null"
                    },
                    "engine": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "snapshotId": "snap_91c2",
                  "nodes": [
                    {
                      "id": "n12",
                      "frameId": "main",
                      "role": "button",
                      "name": "Sign in",
                      "text": "Sign in",
                      "x": 1040,
                      "y": 24,
                      "width": 88,
                      "height": 36,
                      "inViewport": true,
                      "visible": true,
                      "focused": false,
                      "disabled": false
                    }
                  ],
                  "frames": [
                    {
                      "id": "main",
                      "url": "https://app.example.com/login"
                    }
                  ],
                  "text": "Sign in to continue …",
                  "truncated": false,
                  "stats": {
                    "totalNodes": 214,
                    "returnedNodes": 214,
                    "bytes": 18342,
                    "elapsedMs": 38
                  },
                  "cursor": null,
                  "engine": "wayfern"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/profiles/{id}/agent/resolve-locator": {
      "post": {
        "operationId": "agentResolveLocator",
        "summary": "Find one element",
        "description": "Resolves a locator (`role`, `name`, `nameContains`, `text`, `textContains`, `attributes`) to exactly one element. More than one match is an error that lists up to `candidate_limit` candidates.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required.",
        "tags": [
          "agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locator": {
                    "type": "object",
                    "properties": {
                      "role": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "example": {
                "locator": {
                  "role": "button",
                  "name": "Sign in"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "backendNodeId": {
                      "type": "integer"
                    },
                    "matchCount": {
                      "type": "integer"
                    },
                    "match": {
                      "type": "object",
                      "properties": {
                        "backendNodeId": {
                          "type": "integer"
                        },
                        "role": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "text": {
                          "type": "string"
                        },
                        "signature": {
                          "type": "string"
                        },
                        "attributes": {
                          "type": "array",
                          "items": {}
                        },
                        "bounds": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "integer"
                            },
                            "y": {
                              "type": "integer"
                            },
                            "width": {
                              "type": "integer"
                            },
                            "height": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    },
                    "locator": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    },
                    "engine": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "backendNodeId": 412,
                  "matchCount": 1,
                  "match": {
                    "backendNodeId": 412,
                    "role": "button",
                    "name": "Sign in",
                    "text": "Sign in",
                    "signature": "button|Sign in",
                    "attributes": [],
                    "bounds": {
                      "x": 1040,
                      "y": 24,
                      "width": 88,
                      "height": 36
                    }
                  },
                  "locator": {
                    "role": "button",
                    "name": "Sign in"
                  },
                  "engine": "wayfern"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/profiles/{id}/agent/click": {
      "post": {
        "operationId": "agentClick",
        "summary": "Click an element",
        "description": "Clicks the element a locator resolves to. `button` is `left` (default), `middle`, `right`, `back` or `forward`; `click_count` 2 or 3 for double and triple clicks. `navigated` says if a page load followed.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required.",
        "tags": [
          "agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locator": {
                    "type": "object",
                    "properties": {
                      "role": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  },
                  "button": {
                    "type": "string"
                  },
                  "click_count": {
                    "type": "integer"
                  }
                }
              },
              "example": {
                "locator": {
                  "role": "button",
                  "name": "Sign in"
                },
                "button": "left",
                "click_count": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "clicked": {
                      "type": "boolean"
                    },
                    "match": {
                      "type": "object",
                      "properties": {
                        "backendNodeId": {
                          "type": "integer"
                        },
                        "role": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "text": {
                          "type": "string"
                        },
                        "signature": {
                          "type": "string"
                        },
                        "attributes": {
                          "type": "array",
                          "items": {}
                        },
                        "bounds": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "integer"
                            },
                            "y": {
                              "type": "integer"
                            },
                            "width": {
                              "type": "integer"
                            },
                            "height": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    },
                    "engine": {
                      "type": "string"
                    },
                    "navigated": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "clicked": true,
                  "match": {
                    "backendNodeId": 412,
                    "role": "button",
                    "name": "Sign in",
                    "text": "Sign in",
                    "signature": "button|Sign in",
                    "attributes": [],
                    "bounds": {
                      "x": 1040,
                      "y": 24,
                      "width": 88,
                      "height": 36
                    }
                  },
                  "engine": "wayfern",
                  "navigated": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/profiles/{id}/agent/type": {
      "post": {
        "operationId": "agentType",
        "summary": "Type into an element",
        "description": "Focuses the field with a real click and types one key at a time. On Wayfern 152 the keys follow the profile's own typing rhythm, with a few typos corrected when `typos` is true (default). `clear_first` empties the field first (default true). `wpm` applies on older engines only.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required.",
        "tags": [
          "agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locator": {
                    "type": "object",
                    "properties": {
                      "role": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  },
                  "text": {
                    "type": "string"
                  },
                  "clear_first": {
                    "type": "boolean"
                  },
                  "typos": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "locator": {
                  "role": "textbox",
                  "name": "Email"
                },
                "text": "alice@example.com",
                "clear_first": true,
                "typos": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "typed": {
                      "type": "boolean"
                    },
                    "characters": {
                      "type": "integer"
                    },
                    "corrections": {
                      "type": "integer"
                    },
                    "duration_ms": {
                      "type": "integer"
                    },
                    "engine": {
                      "type": "string"
                    },
                    "match": {
                      "type": "object",
                      "properties": {
                        "backendNodeId": {
                          "type": "integer"
                        },
                        "role": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "text": {
                          "type": "string"
                        },
                        "signature": {
                          "type": "string"
                        },
                        "attributes": {
                          "type": "array",
                          "items": {}
                        },
                        "bounds": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "integer"
                            },
                            "y": {
                              "type": "integer"
                            },
                            "width": {
                              "type": "integer"
                            },
                            "height": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "typed": true,
                  "characters": 17,
                  "corrections": 1,
                  "duration_ms": 4210,
                  "engine": "wayfern",
                  "match": {
                    "backendNodeId": 412,
                    "role": "textbox",
                    "name": "Email",
                    "text": "",
                    "signature": "button|Sign in",
                    "attributes": [],
                    "bounds": {
                      "x": 1040,
                      "y": 24,
                      "width": 88,
                      "height": 36
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/profiles/{id}/agent/extract": {
      "post": {
        "operationId": "agentExtract",
        "summary": "Extract rows",
        "description": "Reads rows off the page without injecting a script: `container` matches each row, each field's locator is read inside the row (`source` is `text`, `attribute` or `link`), and an optional `next_page` locator is clicked to go on. A missing container is a result with `stopReason` `no-container`, not an error.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required.",
        "tags": [
          "agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "container": {
                    "type": "object",
                    "properties": {
                      "role": {
                        "type": "string"
                      }
                    }
                  },
                  "field_map": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "locator": {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string"
                            }
                          }
                        },
                        "source": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "next_page": {
                    "type": "object",
                    "properties": {
                      "role": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  },
                  "max_pages": {
                    "type": "integer"
                  }
                }
              },
              "example": {
                "container": {
                  "role": "row"
                },
                "field_map": [
                  {
                    "key": "name",
                    "locator": {
                      "role": "cell"
                    },
                    "source": "text"
                  },
                  {
                    "key": "profile",
                    "locator": {
                      "role": "link"
                    },
                    "source": "link"
                  }
                ],
                "next_page": {
                  "role": "button",
                  "name": "Next"
                },
                "max_pages": 3
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "index": {
                            "type": "integer"
                          },
                          "page": {
                            "type": "integer"
                          },
                          "values": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "profile": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "rowCount": {
                      "type": "integer"
                    },
                    "pageCount": {
                      "type": "integer"
                    },
                    "byteSize": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "stopReason": {
                      "type": "string"
                    },
                    "engine": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "rows": [
                    {
                      "index": 0,
                      "page": 0,
                      "values": {
                        "name": "Ada Lovelace",
                        "profile": "https://example.com/u/ada"
                      }
                    }
                  ],
                  "rowCount": 1,
                  "pageCount": 1,
                  "byteSize": 64,
                  "truncated": false,
                  "stopReason": "complete",
                  "engine": "wayfern"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/profiles/{id}/agent/pick": {
      "post": {
        "operationId": "agentPick",
        "summary": "Let a person pick an element",
        "description": "Arms the element picker in the browser and waits for a person to click an element (`timeout_ms`, default 60000, at most 300000). Returns the smallest locator that resolves to it. Escape cancels.\n\nNeeds Pro, Team or Enterprise. Other plans get HTTP 402 Payment Required.",
        "tags": [
          "agent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "timeout_ms": {
                    "type": "integer"
                  }
                }
              },
              "example": {
                "timeout_ms": 60000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "backendNodeId": {
                      "type": "integer"
                    },
                    "locator": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    },
                    "matchCount": {
                      "type": "integer"
                    },
                    "node": {
                      "type": "object",
                      "properties": {
                        "backendNodeId": {
                          "type": "integer"
                        },
                        "role": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "text": {
                          "type": "string"
                        },
                        "signature": {
                          "type": "string"
                        },
                        "attributes": {
                          "type": "array",
                          "items": {}
                        },
                        "bounds": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "integer"
                            },
                            "y": {
                              "type": "integer"
                            },
                            "width": {
                              "type": "integer"
                            },
                            "height": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    },
                    "engine": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "backendNodeId": 412,
                  "locator": {
                    "role": "button",
                    "name": "Sign in"
                  },
                  "matchCount": 1,
                  "node": {
                    "backendNodeId": 412,
                    "role": "button",
                    "name": "Sign in",
                    "text": "Sign in",
                    "signature": "button|Sign in",
                    "attributes": [],
                    "bounds": {
                      "x": 1040,
                      "y": 24,
                      "width": 88,
                      "height": 36
                    }
                  },
                  "engine": "wayfern"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/groups": {
      "get": {
        "operationId": "listGroups",
        "summary": "List groups",
        "description": "Every group, with its profile count.",
        "tags": [
          "groups"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "profile_count": {
                        "type": "integer"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "id": "75f2b42f-8c94-4291-8af7-7a3d79122507",
                    "name": "Work",
                    "profile_count": 12
                  },
                  {
                    "id": "bfda155d-0c04-4fc2-ab62-30651557a510",
                    "name": "Personal",
                    "profile_count": 3
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      },
      "post": {
        "operationId": "createGroup",
        "summary": "Create a group",
        "description": "Creates a named group for profiles.",
        "tags": [
          "groups"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "name": "Client Acme"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "profile_count": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "id": "bfda155d-0c04-4fc2-ab62-30651557a510",
                  "name": "Client Acme",
                  "profile_count": 0
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/groups/{id}": {
      "get": {
        "operationId": "getGroup",
        "summary": "Read one group",
        "description": "Fetches one group by ID.",
        "tags": [
          "groups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "profile_count": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "id": "bfda155d-0c04-4fc2-ab62-30651557a510",
                  "name": "Personal",
                  "profile_count": 3
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "put": {
        "operationId": "updateGroup",
        "summary": "Rename a group",
        "description": "Changes the group's name.",
        "tags": [
          "groups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "name": "Client Acme 2026"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "profile_count": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "id": "bfda155d-0c04-4fc2-ab62-30651557a510",
                  "name": "Client Acme 2026",
                  "profile_count": 8
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "delete": {
        "operationId": "deleteGroup",
        "summary": "Delete a group",
        "description": "Deletes the group. Its profiles stay, with no group.",
        "tags": [
          "groups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "204 No Content"
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/statuses": {
      "get": {
        "operationId": "listStatuses",
        "summary": "List statuses",
        "description": "Every profile status, in their order.",
        "tags": [
          "statuses"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "color": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "id": "8f1c2d3e-4b5a-4c6d-9e7f-0a1b2c3d4e5f",
                    "name": "Active",
                    "color": "#22c55e"
                  },
                  {
                    "id": "a2b3c4d5-e6f7-4a8b-9c0d-1e2f3a4b5c6d",
                    "name": "Banned",
                    "color": "#ef4444"
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      },
      "post": {
        "operationId": "createStatus",
        "summary": "Create a status",
        "description": "Adds a status with a name and a hex color. Names must be unique; an account holds at most 100 statuses.",
        "tags": [
          "statuses"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "name": "Warming up",
                "color": "#f59e0b"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "8f1c2d3e-4b5a-4c6d-9e7f-0a1b2c3d4e5f",
                  "name": "Warming up",
                  "color": "#f59e0b"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/statuses/{id}": {
      "put": {
        "operationId": "updateStatus",
        "summary": "Update a status",
        "description": "Replaces the status's name and color.",
        "tags": [
          "statuses"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "name": "Needs review",
                "color": "#3b82f6"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "color": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "8f1c2d3e-4b5a-4c6d-9e7f-0a1b2c3d4e5f",
                  "name": "Needs review",
                  "color": "#3b82f6"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "delete": {
        "operationId": "deleteStatus",
        "summary": "Delete a status",
        "description": "Deletes the status and takes it off every profile that had it.",
        "tags": [
          "statuses"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "204 No Content"
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/templates": {
      "get": {
        "operationId": "listTemplates",
        "summary": "List templates",
        "description": "Every profile template, in their order.",
        "tags": [
          "templates"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "settings": {
                        "type": "object",
                        "properties": {
                          "name_prefix": {
                            "type": "string"
                          },
                          "proxy_ids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "group_id": {
                            "type": "string"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "dns_blocklist": {
                            "type": "string"
                          }
                        }
                      },
                      "position": {
                        "type": "integer"
                      },
                      "updated_at": {
                        "type": "integer"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "id": "3a9d7c21-6e4b-4f0a-8c5d-1b2e3f4a5b6c",
                    "name": "US shop accounts",
                    "settings": {
                      "name_prefix": "US shop",
                      "proxy_ids": [
                        "c5617755-0709-4820-832a-6b97a0a24f3c",
                        "7b0e3c1a-5d8f-4e62-9a17-3c4d2e1f0a9b"
                      ],
                      "group_id": "75f2b42f-8c94-4291-8af7-7a3d79122507",
                      "tags": [
                        "shop"
                      ],
                      "dns_blocklist": "normal"
                    },
                    "position": 0,
                    "updated_at": 1779106515
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      },
      "post": {
        "operationId": "createTemplate",
        "summary": "Create a template",
        "description": "Saves profile settings for reuse: name prefix, proxy or a list of proxies to spread in turn, VPN, group, tags, status, note, extension group, DNS, bypass rules, start pages, launch hook, ephemeral, clear-on-close, and `wayfern_config` without device fields. Every profile made from it gets its own device.",
        "tags": [
          "templates"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "name_prefix": {
                        "type": "string"
                      },
                      "proxy_ids": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "group_id": {
                        "type": "string"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "dns_blocklist": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "example": {
                "name": "US shop accounts",
                "settings": {
                  "name_prefix": "US shop",
                  "proxy_ids": [
                    "c5617755-0709-4820-832a-6b97a0a24f3c",
                    "7b0e3c1a-5d8f-4e62-9a17-3c4d2e1f0a9b"
                  ],
                  "group_id": "75f2b42f-8c94-4291-8af7-7a3d79122507",
                  "tags": [
                    "shop"
                  ],
                  "dns_blocklist": "normal"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "settings": {
                      "type": "object",
                      "properties": {
                        "name_prefix": {
                          "type": "string"
                        },
                        "proxy_ids": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "group_id": {
                          "type": "string"
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "dns_blocklist": {
                          "type": "string"
                        }
                      }
                    },
                    "position": {
                      "type": "integer"
                    },
                    "updated_at": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "id": "3a9d7c21-6e4b-4f0a-8c5d-1b2e3f4a5b6c",
                  "name": "US shop accounts",
                  "settings": {
                    "name_prefix": "US shop",
                    "proxy_ids": [
                      "c5617755-0709-4820-832a-6b97a0a24f3c",
                      "7b0e3c1a-5d8f-4e62-9a17-3c4d2e1f0a9b"
                    ],
                    "group_id": "75f2b42f-8c94-4291-8af7-7a3d79122507",
                    "tags": [
                      "shop"
                    ],
                    "dns_blocklist": "normal"
                  },
                  "position": 0,
                  "updated_at": 1779106515
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/templates/{id}": {
      "put": {
        "operationId": "updateTemplate",
        "summary": "Replace a template",
        "description": "Replaces the template's name and settings.",
        "tags": [
          "templates"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "name": "US shop accounts",
                "settings": {
                  "tags": [
                    "shop",
                    "us"
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "settings": {
                      "type": "object",
                      "properties": {
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "position": {
                      "type": "integer"
                    },
                    "updated_at": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "id": "3a9d7c21-6e4b-4f0a-8c5d-1b2e3f4a5b6c",
                  "name": "US shop accounts",
                  "settings": {
                    "tags": [
                      "shop",
                      "us"
                    ]
                  },
                  "position": 0,
                  "updated_at": 1779193000
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "delete": {
        "operationId": "deleteTemplate",
        "summary": "Delete a template",
        "description": "Deletes the template. Profiles made from it keep their settings.",
        "tags": [
          "templates"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "204 No Content"
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/templates/{id}/profiles": {
      "post": {
        "operationId": "createFromTemplate",
        "summary": "Create profiles from a template",
        "description": "Makes `count` profiles (at most 100) with the newest downloaded Wayfern, each with its own device, named after `name` or the template's prefix with a number. When `error` is set, creation stopped early (for example at the hourly limit) and `profiles` lists what was made.",
        "tags": [
          "templates"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "count": 3,
                "name": "US shop"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profiles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "browser": {
                            "type": "string"
                          },
                          "version": {
                            "type": "string"
                          },
                          "release_type": {
                            "type": "string"
                          },
                          "group_id": {
                            "type": "string"
                          },
                          "proxy_id": {
                            "type": "string"
                          },
                          "vpn_id": {
                            "type": "null"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "status_id": {
                            "type": "string"
                          },
                          "extension_group_id": {
                            "type": "null"
                          },
                          "dns_server": {
                            "type": "null"
                          },
                          "start_urls": {
                            "type": "array",
                            "items": {}
                          },
                          "is_running": {
                            "type": "boolean"
                          },
                          "process_id": {
                            "type": "null"
                          },
                          "last_launch": {
                            "type": "integer"
                          },
                          "launch_hook": {
                            "type": "null"
                          },
                          "proxy_bypass_rules": {
                            "type": "array",
                            "items": {}
                          },
                          "ephemeral": {
                            "type": "boolean"
                          },
                          "temporary": {
                            "type": "boolean"
                          },
                          "clear_on_close": {
                            "type": "boolean"
                          },
                          "sync_mode": {
                            "type": "string"
                          },
                          "cloud_sync_enabled": {
                            "type": "boolean"
                          },
                          "host_os": {
                            "type": "string"
                          },
                          "is_cross_os": {
                            "type": "boolean"
                          },
                          "fingerprint_os": {
                            "type": "null"
                          }
                        }
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "profiles": [
                    {
                      "id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                      "name": "US shop 1",
                      "browser": "wayfern",
                      "version": "152.0.7845.96",
                      "release_type": "stable",
                      "group_id": "75f2b42f-8c94-4291-8af7-7a3d79122507",
                      "proxy_id": "c5617755-0709-4820-832a-6b97a0a24f3c",
                      "vpn_id": null,
                      "tags": [
                        "shop"
                      ],
                      "status_id": "8f1c2d3e-4b5a-4c6d-9e7f-0a1b2c3d4e5f",
                      "extension_group_id": null,
                      "dns_server": null,
                      "start_urls": [],
                      "is_running": false,
                      "process_id": null,
                      "last_launch": 1779106515,
                      "launch_hook": null,
                      "proxy_bypass_rules": [],
                      "ephemeral": false,
                      "temporary": false,
                      "clear_on_close": false,
                      "sync_mode": "Disabled",
                      "cloud_sync_enabled": false,
                      "host_os": "macos",
                      "is_cross_os": false,
                      "fingerprint_os": null
                    }
                  ],
                  "error": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/tags": {
      "get": {
        "operationId": "listTags",
        "summary": "List tags",
        "description": "Every tag used on your profiles, without duplicates.",
        "tags": [
          "tags"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "example": [
                  "client-1",
                  "prod",
                  "personal"
                ]
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/proxies": {
      "get": {
        "operationId": "listProxies",
        "summary": "List proxies",
        "description": "Every stored proxy.",
        "tags": [
          "proxies"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "proxy_settings": {
                        "type": "object",
                        "properties": {
                          "proxy_type": {
                            "type": "string"
                          },
                          "host": {
                            "type": "string"
                          },
                          "port": {
                            "type": "integer"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        }
                      },
                      "rotation_url": {
                        "type": "null"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "id": "c5617755-0709-4820-832a-6b97a0a24f3c",
                    "name": "us-residential",
                    "proxy_settings": {
                      "proxy_type": "socks5",
                      "host": "proxy.example.com",
                      "port": 1080,
                      "username": "user",
                      "password": "secret"
                    },
                    "rotation_url": null
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      },
      "post": {
        "operationId": "createProxy",
        "summary": "Create a proxy",
        "description": "`proxy_type` is `http`, `https`, `httpstls` (HTTP over TLS), `socks4`, `socks5`, `ss` (Shadowsocks: the cipher goes in `username`), `vless`, `vmess`, `trojan` or `hysteria2`. For the last four, send the provider's share link in `vless_uri`. `rotation_url` is an optional link that gives the proxy a new IP.",
        "tags": [
          "proxies"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "proxy_settings": {
                    "type": "object",
                    "properties": {
                      "proxy_type": {
                        "type": "string"
                      },
                      "host": {
                        "type": "string"
                      },
                      "port": {
                        "type": "integer"
                      },
                      "username": {
                        "type": "string"
                      },
                      "password": {
                        "type": "string"
                      }
                    }
                  },
                  "rotation_url": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "name": "us-residential",
                "proxy_settings": {
                  "proxy_type": "socks5",
                  "host": "proxy.example.com",
                  "port": 1080,
                  "username": "user",
                  "password": "secret"
                },
                "rotation_url": "https://provider.example/change-ip?key=…"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "proxy_settings": {
                      "type": "object",
                      "properties": {
                        "proxy_type": {
                          "type": "string"
                        },
                        "host": {
                          "type": "string"
                        },
                        "port": {
                          "type": "integer"
                        },
                        "username": {
                          "type": "string"
                        },
                        "password": {
                          "type": "string"
                        }
                      }
                    },
                    "rotation_url": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "c5617755-0709-4820-832a-6b97a0a24f3c",
                  "name": "us-residential",
                  "proxy_settings": {
                    "proxy_type": "socks5",
                    "host": "proxy.example.com",
                    "port": 1080,
                    "username": "user",
                    "password": "secret"
                  },
                  "rotation_url": "https://provider.example/change-ip?key=…"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/proxies/import": {
      "post": {
        "operationId": "importProxies",
        "summary": "Import proxies in bulk",
        "description": "`format: \"txt\"` takes one proxy per line: `host:port`, `host:port:user:pass`, `user:pass@host:port` or a URL such as `socks5://user:pass@host:port`. Proxies are named \"{name_prefix} Proxy {n}\". `format: \"json\"` takes a Donut proxy export. Duplicates are skipped.\n\nHTTP 400 when the content holds no proxy or the format is unknown.",
        "tags": [
          "proxies"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "format": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string"
                  },
                  "name_prefix": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "format": "txt",
                "content": "proxy1.example.com:8080:user:pass\nsocks5://user:pass@proxy2.example.com:1080",
                "name_prefix": "Migration"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "imported_count": {
                      "type": "integer"
                    },
                    "skipped_count": {
                      "type": "integer"
                    },
                    "errors": {
                      "type": "array",
                      "items": {}
                    },
                    "proxies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "proxy_settings": {
                            "type": "object",
                            "properties": {
                              "proxy_type": {
                                "type": "string"
                              },
                              "host": {
                                "type": "string"
                              },
                              "port": {
                                "type": "integer"
                              },
                              "username": {
                                "type": "string"
                              },
                              "password": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "imported_count": 2,
                  "skipped_count": 0,
                  "errors": [],
                  "proxies": [
                    {
                      "id": "c5617755-0709-4820-832a-6b97a0a24f3c",
                      "name": "Migration Proxy 1",
                      "proxy_settings": {
                        "proxy_type": "http",
                        "host": "proxy1.example.com",
                        "port": 8080,
                        "username": "user",
                        "password": "pass"
                      }
                    },
                    {
                      "id": "7b0e3c1a-5d8f-4e62-9a17-3c4d2e1f0a9b",
                      "name": "Migration Proxy 2",
                      "proxy_settings": {
                        "proxy_type": "socks5",
                        "host": "proxy2.example.com",
                        "port": 1080,
                        "username": "user",
                        "password": "pass"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/proxies/{id}": {
      "get": {
        "operationId": "getProxy",
        "summary": "Read one proxy",
        "description": "Returns one stored proxy.",
        "tags": [
          "proxies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "proxy_settings": {
                      "type": "object",
                      "properties": {
                        "proxy_type": {
                          "type": "string"
                        },
                        "host": {
                          "type": "string"
                        },
                        "port": {
                          "type": "integer"
                        },
                        "username": {
                          "type": "string"
                        },
                        "password": {
                          "type": "string"
                        }
                      }
                    },
                    "rotation_url": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "c5617755-0709-4820-832a-6b97a0a24f3c",
                  "name": "us-residential",
                  "proxy_settings": {
                    "proxy_type": "socks5",
                    "host": "proxy.example.com",
                    "port": 1080,
                    "username": "user",
                    "password": "secret"
                  },
                  "rotation_url": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "put": {
        "operationId": "updateProxy",
        "summary": "Update a proxy",
        "description": "Send a new `name`, new `proxy_settings`, or both.",
        "tags": [
          "proxies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "proxy_settings": {
                    "type": "object",
                    "properties": {
                      "proxy_type": {
                        "type": "string"
                      },
                      "host": {
                        "type": "string"
                      },
                      "port": {
                        "type": "integer"
                      }
                    }
                  }
                }
              },
              "example": {
                "name": "us-residential-2",
                "proxy_settings": {
                  "proxy_type": "socks5",
                  "host": "rotate.example.com",
                  "port": 1080
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "proxy_settings": {
                      "type": "object",
                      "properties": {
                        "proxy_type": {
                          "type": "string"
                        },
                        "host": {
                          "type": "string"
                        },
                        "port": {
                          "type": "integer"
                        },
                        "username": {
                          "type": "null"
                        },
                        "password": {
                          "type": "null"
                        }
                      }
                    },
                    "rotation_url": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "c5617755-0709-4820-832a-6b97a0a24f3c",
                  "name": "us-residential-2",
                  "proxy_settings": {
                    "proxy_type": "socks5",
                    "host": "rotate.example.com",
                    "port": 1080,
                    "username": null,
                    "password": null
                  },
                  "rotation_url": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "delete": {
        "operationId": "deleteProxy",
        "summary": "Delete a proxy",
        "description": "Deletes the stored proxy. A cloud-managed proxy answers 400.",
        "tags": [
          "proxies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "204 No Content"
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/proxies/{id}/rotate": {
      "post": {
        "operationId": "rotateProxy",
        "summary": "Change a proxy's IP",
        "description": "Calls the proxy's `rotation_url`. When the provider accepts, every profile behind the proxy moves to the new IP.",
        "tags": [
          "proxies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "proxy_id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "elapsed_ms": {
                      "type": "integer"
                    },
                    "error": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "proxy_id": "c5617755-0709-4820-832a-6b97a0a24f3c",
                  "status": 200,
                  "elapsed_ms": 812,
                  "error": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/vpns": {
      "get": {
        "operationId": "listVpns",
        "summary": "List VPNs",
        "description": "Every stored WireGuard configuration, without key material.",
        "tags": [
          "vpns"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "vpn_type": {
                        "type": "string"
                      },
                      "created_at": {
                        "type": "integer"
                      },
                      "last_used": {
                        "type": "null"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "id": "22034ceb-7b76-456e-9cfe-a4b207751f8d",
                    "name": "DE Frankfurt",
                    "vpn_type": "WireGuard",
                    "created_at": 1777203528,
                    "last_used": null
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      },
      "post": {
        "operationId": "createVpn",
        "summary": "Create a VPN",
        "description": "`config_data` is the content of a WireGuard `.conf` file, with its line breaks. WireGuard is the only type.",
        "tags": [
          "vpns"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "vpn_type": {
                    "type": "string"
                  },
                  "config_data": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "name": "DE Frankfurt",
                "vpn_type": "WireGuard",
                "config_data": "[Interface]\nPrivateKey = <base64>\nAddress = 10.0.0.2/32\n\n[Peer]\nPublicKey = <base64>\nEndpoint = de.example.com:51820\nAllowedIPs = 0.0.0.0/0"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "vpn_type": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "integer"
                    },
                    "last_used": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "22034ceb-7b76-456e-9cfe-a4b207751f8d",
                  "name": "DE Frankfurt",
                  "vpn_type": "WireGuard",
                  "created_at": 1779226206,
                  "last_used": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/vpns/import": {
      "post": {
        "operationId": "importVpn",
        "summary": "Import a VPN from a file",
        "description": "Like `POST /v1/vpns`, with the file `content` and its `filename`, which names the VPN when `name` is left out.",
        "tags": [
          "vpns"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "filename": "de-frankfurt.conf",
                "name": "DE Frankfurt",
                "content": "[Interface]\nPrivateKey = <base64>\n…\n[Peer]\nPublicKey = <base64>\nEndpoint = de.example.com:51820"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "vpn_type": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "integer"
                    },
                    "last_used": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "22034ceb-7b76-456e-9cfe-a4b207751f8d",
                  "name": "DE Frankfurt",
                  "vpn_type": "WireGuard",
                  "created_at": 1779226206,
                  "last_used": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/vpns/{id}": {
      "get": {
        "operationId": "getVpn",
        "summary": "Read one VPN",
        "description": "Metadata of one VPN. Key material is not included.",
        "tags": [
          "vpns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "vpn_type": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "integer"
                    },
                    "last_used": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "22034ceb-7b76-456e-9cfe-a4b207751f8d",
                  "name": "DE Frankfurt",
                  "vpn_type": "WireGuard",
                  "created_at": 1777203528,
                  "last_used": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "put": {
        "operationId": "updateVpn",
        "summary": "Rename a VPN",
        "description": "Only the `name` can change.",
        "tags": [
          "vpns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "name": "DE Frankfurt (primary)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "vpn_type": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "integer"
                    },
                    "last_used": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "22034ceb-7b76-456e-9cfe-a4b207751f8d",
                  "name": "DE Frankfurt (primary)",
                  "vpn_type": "WireGuard",
                  "created_at": 1779226206,
                  "last_used": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "delete": {
        "operationId": "deleteVpn",
        "summary": "Delete a VPN",
        "description": "Deletes the stored VPN configuration.",
        "tags": [
          "vpns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "204 No Content"
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/vpns/{id}/export": {
      "get": {
        "operationId": "exportVpn",
        "summary": "Export a VPN",
        "description": "Returns the decrypted WireGuard configuration, keys included. Treat the answer as a secret.",
        "tags": [
          "vpns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "vpn_type": {
                      "type": "string"
                    },
                    "config_data": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "22034ceb-7b76-456e-9cfe-a4b207751f8d",
                  "name": "DE Frankfurt",
                  "vpn_type": "WireGuard",
                  "config_data": "[Interface]\nPrivateKey = <base64>\n…"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/extensions": {
      "get": {
        "operationId": "listExtensions",
        "summary": "List extensions",
        "description": "Every extension Donut manages.",
        "tags": [
          "extensions"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "manifest_name": {
                        "type": "string"
                      },
                      "file_name": {
                        "type": "string"
                      },
                      "file_type": {
                        "type": "string"
                      },
                      "browser_compatibility": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "created_at": {
                        "type": "integer"
                      },
                      "updated_at": {
                        "type": "integer"
                      },
                      "sync_enabled": {
                        "type": "boolean"
                      },
                      "last_sync": {
                        "type": "null"
                      },
                      "version": {
                        "type": "string"
                      },
                      "source_kind": {
                        "type": "string"
                      },
                      "linked_path": {
                        "type": "null"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "id": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
                    "name": "uBlock Origin Lite",
                    "manifest_name": "uBlock Origin Lite",
                    "file_name": "ublock-origin-lite.crx",
                    "file_type": "crx",
                    "browser_compatibility": [
                      "chromium"
                    ],
                    "created_at": 1779106515,
                    "updated_at": 1779106515,
                    "sync_enabled": false,
                    "last_sync": null,
                    "version": "2026.9.29",
                    "source_kind": "archive",
                    "linked_path": null
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      },
      "post": {
        "operationId": "createExtension",
        "summary": "Add an extension",
        "description": "Send the package as `file_data_base64` with its `file_name` (`.crx` or `.zip`), or a folder in `source_path`. With a folder, `link: true` loads it in place at every launch (it never syncs); otherwise the folder is copied. The body may be up to 64 MB.",
        "tags": [
          "extensions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "file_name": {
                    "type": "string"
                  },
                  "file_data_base64": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "name": "uBlock Origin Lite",
                "file_name": "ublock-origin-lite.crx",
                "file_data_base64": "Q3IyNAMAAAA…"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "manifest_name": {
                      "type": "string"
                    },
                    "file_name": {
                      "type": "string"
                    },
                    "file_type": {
                      "type": "string"
                    },
                    "browser_compatibility": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "integer"
                    },
                    "updated_at": {
                      "type": "integer"
                    },
                    "sync_enabled": {
                      "type": "boolean"
                    },
                    "last_sync": {
                      "type": "null"
                    },
                    "version": {
                      "type": "string"
                    },
                    "source_kind": {
                      "type": "string"
                    },
                    "linked_path": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
                  "name": "uBlock Origin Lite",
                  "manifest_name": "uBlock Origin Lite",
                  "file_name": "ublock-origin-lite.crx",
                  "file_type": "crx",
                  "browser_compatibility": [
                    "chromium"
                  ],
                  "created_at": 1779106515,
                  "updated_at": 1779106515,
                  "sync_enabled": false,
                  "last_sync": null,
                  "version": "2026.9.29",
                  "source_kind": "archive",
                  "linked_path": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/extensions/{id}": {
      "get": {
        "operationId": "getExtension",
        "summary": "Read one extension",
        "description": "One extension, with the metadata from its manifest.",
        "tags": [
          "extensions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "manifest_name": {
                      "type": "string"
                    },
                    "file_name": {
                      "type": "string"
                    },
                    "file_type": {
                      "type": "string"
                    },
                    "browser_compatibility": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "integer"
                    },
                    "updated_at": {
                      "type": "integer"
                    },
                    "sync_enabled": {
                      "type": "boolean"
                    },
                    "last_sync": {
                      "type": "null"
                    },
                    "version": {
                      "type": "string"
                    },
                    "source_kind": {
                      "type": "string"
                    },
                    "linked_path": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
                  "name": "uBlock Origin Lite",
                  "manifest_name": "uBlock Origin Lite",
                  "file_name": "ublock-origin-lite.crx",
                  "file_type": "crx",
                  "browser_compatibility": [
                    "chromium"
                  ],
                  "created_at": 1779106515,
                  "updated_at": 1779106515,
                  "sync_enabled": false,
                  "last_sync": null,
                  "version": "2026.9.29",
                  "source_kind": "archive",
                  "linked_path": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "put": {
        "operationId": "updateExtension",
        "summary": "Update an extension",
        "description": "Renames the extension, or replaces its package with the same fields as the create route.",
        "tags": [
          "extensions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "name": "uBlock Origin Lite (team)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "manifest_name": {
                      "type": "string"
                    },
                    "file_name": {
                      "type": "string"
                    },
                    "file_type": {
                      "type": "string"
                    },
                    "browser_compatibility": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "integer"
                    },
                    "updated_at": {
                      "type": "integer"
                    },
                    "sync_enabled": {
                      "type": "boolean"
                    },
                    "last_sync": {
                      "type": "null"
                    },
                    "version": {
                      "type": "string"
                    },
                    "source_kind": {
                      "type": "string"
                    },
                    "linked_path": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
                  "name": "uBlock Origin Lite (team)",
                  "manifest_name": "uBlock Origin Lite",
                  "file_name": "ublock-origin-lite.crx",
                  "file_type": "crx",
                  "browser_compatibility": [
                    "chromium"
                  ],
                  "created_at": 1779106515,
                  "updated_at": 1779106515,
                  "sync_enabled": false,
                  "last_sync": null,
                  "version": "2026.9.29",
                  "source_kind": "archive",
                  "linked_path": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "delete": {
        "operationId": "deleteExtension",
        "summary": "Delete an extension",
        "description": "Deletes the extension and takes it out of every group.",
        "tags": [
          "extensions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "204 No Content"
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/extension-groups": {
      "get": {
        "operationId": "listExtensionGroups",
        "summary": "List extension groups",
        "description": "Every extension group. Assign one to a profile with `extension_group_id` on the profile routes.",
        "tags": [
          "extensions"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "extension_ids": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "created_at": {
                        "type": "integer"
                      },
                      "updated_at": {
                        "type": "integer"
                      },
                      "sync_enabled": {
                        "type": "boolean"
                      },
                      "last_sync": {
                        "type": "null"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "id": "f0e1d2c3-b4a5-4968-8776-655443322110",
                    "name": "Ads off",
                    "extension_ids": [
                      "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b"
                    ],
                    "created_at": 1779106515,
                    "updated_at": 1779106515,
                    "sync_enabled": false,
                    "last_sync": null
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      },
      "post": {
        "operationId": "createExtensionGroup",
        "summary": "Create an extension group",
        "description": "Creates an empty group.",
        "tags": [
          "extensions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "name": "Ads off"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "extension_ids": {
                      "type": "array",
                      "items": {}
                    },
                    "created_at": {
                      "type": "integer"
                    },
                    "updated_at": {
                      "type": "integer"
                    },
                    "sync_enabled": {
                      "type": "boolean"
                    },
                    "last_sync": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "f0e1d2c3-b4a5-4968-8776-655443322110",
                  "name": "Ads off",
                  "extension_ids": [],
                  "created_at": 1779106515,
                  "updated_at": 1779106515,
                  "sync_enabled": false,
                  "last_sync": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/extension-groups/{id}": {
      "get": {
        "operationId": "getExtensionGroup",
        "summary": "Read one extension group",
        "description": "One group and its extension IDs.",
        "tags": [
          "extensions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "extension_ids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "integer"
                    },
                    "updated_at": {
                      "type": "integer"
                    },
                    "sync_enabled": {
                      "type": "boolean"
                    },
                    "last_sync": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "f0e1d2c3-b4a5-4968-8776-655443322110",
                  "name": "Ads off",
                  "extension_ids": [
                    "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b"
                  ],
                  "created_at": 1779106515,
                  "updated_at": 1779106515,
                  "sync_enabled": false,
                  "last_sync": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "put": {
        "operationId": "updateExtensionGroup",
        "summary": "Update an extension group",
        "description": "Renames the group, or replaces its whole membership with `extension_ids`. Leave `extension_ids` out to keep the members.",
        "tags": [
          "extensions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "extension_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "example": {
                "name": "Ads off",
                "extension_ids": [
                  "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "extension_ids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "integer"
                    },
                    "updated_at": {
                      "type": "integer"
                    },
                    "sync_enabled": {
                      "type": "boolean"
                    },
                    "last_sync": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "f0e1d2c3-b4a5-4968-8776-655443322110",
                  "name": "Ads off",
                  "extension_ids": [
                    "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b"
                  ],
                  "created_at": 1779106515,
                  "updated_at": 1779106515,
                  "sync_enabled": false,
                  "last_sync": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "delete": {
        "operationId": "deleteExtensionGroup",
        "summary": "Delete an extension group",
        "description": "Deletes the group. Its extensions stay.",
        "tags": [
          "extensions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "204 No Content"
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/extension-groups/{id}/extensions/{extension_id}": {
      "post": {
        "operationId": "addExtensionToGroup",
        "summary": "Add an extension to a group",
        "description": "Adds one extension and returns the group.",
        "tags": [
          "extensions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "extension_id",
            "in": "path",
            "required": true,
            "description": "The extension id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "extension_ids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "integer"
                    },
                    "updated_at": {
                      "type": "integer"
                    },
                    "sync_enabled": {
                      "type": "boolean"
                    },
                    "last_sync": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "f0e1d2c3-b4a5-4968-8776-655443322110",
                  "name": "Ads off",
                  "extension_ids": [
                    "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b"
                  ],
                  "created_at": 1779106515,
                  "updated_at": 1779106515,
                  "sync_enabled": false,
                  "last_sync": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "delete": {
        "operationId": "removeExtensionFromGroup",
        "summary": "Remove an extension from a group",
        "description": "Removes one extension and returns the group.",
        "tags": [
          "extensions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id of the target resource.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "extension_id",
            "in": "path",
            "required": true,
            "description": "The extension id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "extension_ids": {
                      "type": "array",
                      "items": {}
                    },
                    "created_at": {
                      "type": "integer"
                    },
                    "updated_at": {
                      "type": "integer"
                    },
                    "sync_enabled": {
                      "type": "boolean"
                    },
                    "last_sync": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "f0e1d2c3-b4a5-4968-8776-655443322110",
                  "name": "Ads off",
                  "extension_ids": [],
                  "created_at": 1779106515,
                  "updated_at": 1779106515,
                  "sync_enabled": false,
                  "last_sync": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/cookie-bot/schedules": {
      "get": {
        "operationId": "listCookieBotSchedules",
        "summary": "List Cookie Bot schedules",
        "description": "Enrolled profiles and their schedules. `?scope=team` lists the whole team's.\n\nNeeds a signed-in Solo, Pro, Team or Enterprise plan. Other plans get HTTP 402.",
        "tags": [
          "cookie-bot"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schedules": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "profile_id": {
                            "type": "string"
                          },
                          "profile_name": {
                            "type": "string"
                          },
                          "platform": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "run_at_minute": {
                            "type": "integer"
                          },
                          "days_mask": {
                            "type": "integer"
                          },
                          "slots": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "days_mask": {
                                  "type": "integer"
                                },
                                "run_at_minute": {
                                  "type": "integer"
                                }
                              }
                            }
                          },
                          "timezone": {
                            "type": "string"
                          },
                          "preset": {
                            "type": "string"
                          },
                          "max_minutes": {
                            "type": "integer"
                          },
                          "sites": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "jitter_seconds": {
                            "type": "integer"
                          },
                          "sync_enabled": {
                            "type": "boolean"
                          },
                          "encrypted_sync": {
                            "type": "boolean"
                          },
                          "has_proxy": {
                            "type": "boolean"
                          },
                          "proxy_remote_reachable": {
                            "type": "boolean"
                          },
                          "blocked_by": {
                            "type": "null"
                          },
                          "next_run_at": {
                            "type": "string"
                          },
                          "last_run_at": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "scope": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "schedules": [
                    {
                      "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                      "profile_name": "Work",
                      "platform": "macos",
                      "enabled": true,
                      "run_at_minute": 1380,
                      "days_mask": 31,
                      "slots": [
                        {
                          "days_mask": 31,
                          "run_at_minute": 1380
                        }
                      ],
                      "timezone": "Europe/Berlin",
                      "preset": "balanced",
                      "max_minutes": 45,
                      "sites": [
                        "https://news.example.com",
                        "https://shop.example.com"
                      ],
                      "jitter_seconds": 900,
                      "sync_enabled": true,
                      "encrypted_sync": false,
                      "has_proxy": true,
                      "proxy_remote_reachable": true,
                      "blocked_by": null,
                      "next_run_at": "2026-10-15T21:00:00Z",
                      "last_run_at": "2026-10-14T21:04:12Z"
                    }
                  ],
                  "scope": "mine"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/cookie-bot/schedules/{profile_id}": {
      "get": {
        "operationId": "getCookieBotSchedule",
        "summary": "Read a profile's schedule",
        "description": "One profile's enrolment. `blocked_by` names the reason a run would be refused, such as `sync_disabled`, `encrypted_sync` or `proxy_required`.\n\nNeeds a signed-in Solo, Pro, Team or Enterprise plan. Other plans get HTTP 402.",
        "tags": [
          "cookie-bot"
        ],
        "parameters": [
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "description": "The profile id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profile_id": {
                      "type": "string"
                    },
                    "profile_name": {
                      "type": "string"
                    },
                    "platform": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "run_at_minute": {
                      "type": "integer"
                    },
                    "days_mask": {
                      "type": "integer"
                    },
                    "slots": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "days_mask": {
                            "type": "integer"
                          },
                          "run_at_minute": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "preset": {
                      "type": "string"
                    },
                    "max_minutes": {
                      "type": "integer"
                    },
                    "sites": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "jitter_seconds": {
                      "type": "integer"
                    },
                    "sync_enabled": {
                      "type": "boolean"
                    },
                    "encrypted_sync": {
                      "type": "boolean"
                    },
                    "has_proxy": {
                      "type": "boolean"
                    },
                    "proxy_remote_reachable": {
                      "type": "boolean"
                    },
                    "blocked_by": {
                      "type": "null"
                    },
                    "next_run_at": {
                      "type": "string"
                    },
                    "last_run_at": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                  "profile_name": "Work",
                  "platform": "macos",
                  "enabled": true,
                  "run_at_minute": 1380,
                  "days_mask": 31,
                  "slots": [
                    {
                      "days_mask": 31,
                      "run_at_minute": 1380
                    }
                  ],
                  "timezone": "Europe/Berlin",
                  "preset": "balanced",
                  "max_minutes": 45,
                  "sites": [
                    "https://news.example.com",
                    "https://shop.example.com"
                  ],
                  "jitter_seconds": 900,
                  "sync_enabled": true,
                  "encrypted_sync": false,
                  "has_proxy": true,
                  "proxy_remote_reachable": true,
                  "blocked_by": null,
                  "next_run_at": "2026-10-15T21:00:00Z",
                  "last_run_at": "2026-10-14T21:04:12Z"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "put": {
        "operationId": "setCookieBotSchedule",
        "summary": "Enrol a profile",
        "description": "Creates or replaces the enrolment. `run_at_minute` is minutes past local midnight in `timezone`; `days_mask` has bit 0 for Monday (31 = Monday to Friday). `preset` is `light`, `balanced` or `deep`; `max_minutes` 5 to 120; up to 40 `sites`. Set `acknowledge_conflict: true` to save when a teammate already warms the profile.\n\nNeeds a signed-in Solo, Pro, Team or Enterprise plan. Other plans get HTTP 402.",
        "tags": [
          "cookie-bot"
        ],
        "parameters": [
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "description": "The profile id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "run_at_minute": {
                    "type": "integer"
                  },
                  "days_mask": {
                    "type": "integer"
                  },
                  "timezone": {
                    "type": "string"
                  },
                  "preset": {
                    "type": "string"
                  },
                  "max_minutes": {
                    "type": "integer"
                  },
                  "sites": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "example": {
                "enabled": true,
                "run_at_minute": 1380,
                "days_mask": 31,
                "timezone": "Europe/Berlin",
                "preset": "balanced",
                "max_minutes": 45,
                "sites": [
                  "https://news.example.com",
                  "https://shop.example.com"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schedule": {
                      "type": "object",
                      "properties": {
                        "profile_id": {
                          "type": "string"
                        },
                        "profile_name": {
                          "type": "string"
                        },
                        "platform": {
                          "type": "string"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "run_at_minute": {
                          "type": "integer"
                        },
                        "days_mask": {
                          "type": "integer"
                        },
                        "slots": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "days_mask": {
                                "type": "integer"
                              },
                              "run_at_minute": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "timezone": {
                          "type": "string"
                        },
                        "preset": {
                          "type": "string"
                        },
                        "max_minutes": {
                          "type": "integer"
                        },
                        "sites": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "jitter_seconds": {
                          "type": "integer"
                        },
                        "sync_enabled": {
                          "type": "boolean"
                        },
                        "encrypted_sync": {
                          "type": "boolean"
                        },
                        "has_proxy": {
                          "type": "boolean"
                        },
                        "proxy_remote_reachable": {
                          "type": "boolean"
                        },
                        "blocked_by": {
                          "type": "null"
                        },
                        "next_run_at": {
                          "type": "string"
                        },
                        "last_run_at": {
                          "type": "string"
                        }
                      }
                    },
                    "conflicts": {
                      "type": "array",
                      "items": {}
                    }
                  }
                },
                "example": {
                  "schedule": {
                    "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                    "profile_name": "Work",
                    "platform": "macos",
                    "enabled": true,
                    "run_at_minute": 1380,
                    "days_mask": 31,
                    "slots": [
                      {
                        "days_mask": 31,
                        "run_at_minute": 1380
                      }
                    ],
                    "timezone": "Europe/Berlin",
                    "preset": "balanced",
                    "max_minutes": 45,
                    "sites": [
                      "https://news.example.com",
                      "https://shop.example.com"
                    ],
                    "jitter_seconds": 900,
                    "sync_enabled": true,
                    "encrypted_sync": false,
                    "has_proxy": true,
                    "proxy_remote_reachable": true,
                    "blocked_by": null,
                    "next_run_at": "2026-10-15T21:00:00Z",
                    "last_run_at": "2026-10-14T21:04:12Z"
                  },
                  "conflicts": []
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      },
      "delete": {
        "operationId": "deleteCookieBotSchedule",
        "summary": "Remove a profile from Cookie Bot",
        "description": "Removes the enrolment. Past runs stay.\n\nNeeds a signed-in Solo, Pro, Team or Enterprise plan. Other plans get HTTP 402.",
        "tags": [
          "cookie-bot"
        ],
        "parameters": [
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "description": "The profile id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profile_id": {
                      "type": "string"
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                  "deleted": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/cookie-bot/conflicts": {
      "get": {
        "operationId": "cookieBotConflicts",
        "summary": "Check for schedule conflicts",
        "description": "Lists teammates who already warm the same profile. Query: `profile_id`, and optionally the proposed `run_at_minute`, `timezone` and `days_mask`.\n\nNeeds a signed-in Solo, Pro, Team or Enterprise plan. Other plans get HTTP 402.",
        "tags": [
          "cookie-bot"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profile_id": {
                      "type": "string"
                    },
                    "conflicts": {
                      "type": "array",
                      "items": {}
                    }
                  }
                },
                "example": {
                  "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                  "conflicts": []
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/cookie-bot/runs": {
      "get": {
        "operationId": "listCookieBotRuns",
        "summary": "List Cookie Bot runs",
        "description": "Runs, newest first. Query: `profile_id`, `scope` (`mine` or `team`), `limit` (1 to 100, default 30) and `before` (the `next_before` of the previous page).\n\nNeeds a signed-in Solo, Pro, Team or Enterprise plan. Other plans get HTTP 402.",
        "tags": [
          "cookie-bot"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "profile_id": {
                            "type": "string"
                          },
                          "profile_name": {
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "scheduled_for": {
                            "type": "string"
                          },
                          "started_at": {
                            "type": "string"
                          },
                          "ended_at": {
                            "type": "string"
                          },
                          "max_minutes": {
                            "type": "integer"
                          },
                          "sites_total": {
                            "type": "integer"
                          },
                          "sites_visited": {
                            "type": "integer"
                          },
                          "sites_failed": {
                            "type": "integer"
                          },
                          "billed_seconds": {
                            "type": "integer"
                          },
                          "outcome_code": {
                            "type": "null"
                          }
                        }
                      }
                    },
                    "next_before": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "runs": [
                    {
                      "id": "cbr_2d4f6a80",
                      "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                      "profile_name": "Work",
                      "trigger": "schedule",
                      "status": "completed",
                      "scheduled_for": "2026-10-14T21:00:00Z",
                      "started_at": "2026-10-14T21:04:12Z",
                      "ended_at": "2026-10-14T21:47:30Z",
                      "max_minutes": 45,
                      "sites_total": 12,
                      "sites_visited": 12,
                      "sites_failed": 0,
                      "billed_seconds": 2598,
                      "outcome_code": null
                    }
                  ],
                  "next_before": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      },
      "post": {
        "operationId": "startCookieBotRun",
        "summary": "Start a run now",
        "description": "Starts an extra run for an enrolled profile. The answer comes at once (HTTP 202); the run goes on for minutes after it.\n\nNeeds a signed-in Solo, Pro, Team or Enterprise plan. Other plans get HTTP 402.",
        "tags": [
          "cookie-bot"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "profile_id": {
                    "type": "string"
                  },
                  "max_minutes": {
                    "type": "integer"
                  }
                }
              },
              "example": {
                "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                "max_minutes": 30
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "run": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "profile_id": {
                          "type": "string"
                        },
                        "profile_name": {
                          "type": "string"
                        },
                        "trigger": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "scheduled_for": {
                          "type": "string"
                        },
                        "started_at": {
                          "type": "string"
                        },
                        "ended_at": {
                          "type": "null"
                        },
                        "max_minutes": {
                          "type": "integer"
                        },
                        "sites_total": {
                          "type": "integer"
                        },
                        "sites_visited": {
                          "type": "integer"
                        },
                        "sites_failed": {
                          "type": "integer"
                        },
                        "billed_seconds": {
                          "type": "integer"
                        },
                        "outcome_code": {
                          "type": "null"
                        }
                      }
                    },
                    "session_id": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "run": {
                    "id": "cbr_2d4f6a80",
                    "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                    "profile_name": "Work",
                    "trigger": "manual",
                    "status": "queued",
                    "scheduled_for": "2026-10-14T21:00:00Z",
                    "started_at": "2026-10-14T21:04:12Z",
                    "ended_at": null,
                    "max_minutes": 45,
                    "sites_total": 12,
                    "sites_visited": 12,
                    "sites_failed": 0,
                    "billed_seconds": 2598,
                    "outcome_code": null
                  },
                  "session_id": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/cookie-bot/runs/{run_id}": {
      "delete": {
        "operationId": "cancelCookieBotRun",
        "summary": "Cancel a run",
        "description": "Cancels a queued or live run. A finished run comes back unchanged.\n\nNeeds a signed-in Solo, Pro, Team or Enterprise plan. Other plans get HTTP 402.",
        "tags": [
          "cookie-bot"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "description": "The run id of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "profile_id": {
                      "type": "string"
                    },
                    "profile_name": {
                      "type": "string"
                    },
                    "trigger": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "scheduled_for": {
                      "type": "string"
                    },
                    "started_at": {
                      "type": "string"
                    },
                    "ended_at": {
                      "type": "string"
                    },
                    "max_minutes": {
                      "type": "integer"
                    },
                    "sites_total": {
                      "type": "integer"
                    },
                    "sites_visited": {
                      "type": "integer"
                    },
                    "sites_failed": {
                      "type": "integer"
                    },
                    "billed_seconds": {
                      "type": "integer"
                    },
                    "outcome_code": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "id": "cbr_2d4f6a80",
                  "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                  "profile_name": "Work",
                  "trigger": "schedule",
                  "status": "cancelled",
                  "scheduled_for": "2026-10-14T21:00:00Z",
                  "started_at": "2026-10-14T21:04:12Z",
                  "ended_at": "2026-10-14T21:47:30Z",
                  "max_minutes": 45,
                  "sites_total": 12,
                  "sites_visited": 12,
                  "sites_failed": 0,
                  "billed_seconds": 2598,
                  "outcome_code": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/cookie-bot/presets": {
      "get": {
        "operationId": "cookieBotPresets",
        "summary": "List depth presets and site lists",
        "description": "The depth presets, the curated site lists, your saved lists and the limits (start times, sites, minutes).\n\nNeeds a signed-in Solo, Pro, Team or Enterprise plan. Other plans get HTTP 402.",
        "tags": [
          "cookie-bot"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "presets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "typical_minutes": {
                            "type": "integer"
                          },
                          "recommended": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "default_preset": {
                      "type": "string"
                    },
                    "templates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "site_count": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "limits": {
                      "type": "object",
                      "properties": {
                        "min_minutes": {
                          "type": "integer"
                        },
                        "max_minutes": {
                          "type": "integer"
                        },
                        "max_sites": {
                          "type": "integer"
                        },
                        "max_slots": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "presets": [
                    {
                      "id": "light",
                      "name": "Light",
                      "typical_minutes": 10,
                      "recommended": false
                    },
                    {
                      "id": "balanced",
                      "name": "Balanced",
                      "typical_minutes": 20,
                      "recommended": true
                    },
                    {
                      "id": "deep",
                      "name": "Deep",
                      "typical_minutes": 45,
                      "recommended": false
                    }
                  ],
                  "default_preset": "balanced",
                  "templates": [
                    {
                      "id": "low-intent-purchaser",
                      "name": "Low-intent purchaser",
                      "site_count": 60
                    }
                  ],
                  "limits": {
                    "min_minutes": 5,
                    "max_minutes": 120,
                    "max_sites": 40,
                    "max_slots": 14
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/cookie-bot/usage": {
      "get": {
        "operationId": "cookieBotUsage",
        "summary": "Read remote-hour spend",
        "description": "Hours spent per member and per profile in one month (`?period=YYYY-MM`, default the current UTC month).\n\nNeeds a signed-in Solo, Pro, Team or Enterprise plan. Other plans get HTTP 402.",
        "tags": [
          "cookie-bot"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "string"
                    },
                    "seats": {
                      "type": "integer"
                    },
                    "granted_hours": {
                      "type": "integer"
                    },
                    "used_hours": {
                      "type": "number"
                    },
                    "remaining_hours": {
                      "type": "number"
                    },
                    "members": {
                      "type": "array",
                      "items": {}
                    },
                    "profiles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "profile_id": {
                            "type": "string"
                          },
                          "profile_name": {
                            "type": "string"
                          },
                          "bot_hours": {
                            "type": "number"
                          },
                          "runs": {
                            "type": "integer"
                          },
                          "runs_failed": {
                            "type": "integer"
                          },
                          "last_run_at": {
                            "type": "string"
                          },
                          "last_status": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "period": "2026-10",
                  "seats": 1,
                  "granted_hours": 40,
                  "used_hours": 12.4,
                  "remaining_hours": 27.6,
                  "members": [],
                  "profiles": [
                    {
                      "profile_id": "ce490dd0-02fe-4be5-b91d-fedec7550b28",
                      "profile_name": "Work",
                      "bot_hours": 12.4,
                      "runs": 18,
                      "runs_failed": 1,
                      "last_run_at": "2026-10-14T21:47:30Z",
                      "last_status": "completed"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/browsers/download": {
      "post": {
        "operationId": "downloadBrowser",
        "summary": "Download a browser version",
        "description": "Downloads Wayfern at the given version and answers when it is on disk (or was already). HTTP 409 when the same version is already downloading.",
        "tags": [
          "browsers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "browser": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "browser": "wayfern",
                "version": "152.0.7845.96"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "browser": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "browser": "wayfern",
                  "version": "152.0.7845.96",
                  "status": "downloaded"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          }
        }
      }
    },
    "/v1/browsers/{browser}/versions": {
      "get": {
        "operationId": "listBrowserVersions",
        "summary": "List available versions",
        "description": "Versions you can download, newest first.",
        "tags": [
          "browsers"
        ],
        "parameters": [
          {
            "name": "browser",
            "in": "path",
            "required": true,
            "description": "The browser of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "example": [
                  "152.0.7845.96",
                  "152.0.7845.88"
                ]
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    },
    "/v1/browsers/{browser}/versions/{version}/downloaded": {
      "get": {
        "operationId": "browserDownloaded",
        "summary": "Check if a version is installed",
        "description": "`true` when that version is on disk.",
        "tags": [
          "browsers"
        ],
        "parameters": [
          {
            "name": "browser",
            "in": "path",
            "required": true,
            "description": "The browser of the target resource.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "description": "The version of the target resource.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                },
                "example": true
              }
            }
          },
          "401": {
            "description": "Missing or invalid bearer token."
          },
          "404": {
            "description": "No resource with that id."
          }
        }
      }
    }
  }
}
