Skip to content
These docs describe the Veilus release after v0.2.1, coming soon. If you have v0.2.1, some screens and features (Datasets, Trash, the new profile panel, many MCP tools) are not in your version yet.

REST API

Veilus can run a small REST API on your own machine, so other programs you run — scripts, other apps, an LLM agent — can manage profiles and proxy pools, drive a running profile’s page, and run and schedule Veilus Flow scripts.

The API is off by default. Turn it on from the API & MCP page in the app sidebar, which shows the port it’s listening on, lets you mint and revoke named tokens, and gives ready-made connection snippets.

The API only listens on 127.0.0.1 — nothing outside your machine can reach it. It reaches every profile, so it’s gated behind the Pro plan or higher and stays off until you turn it on.

Every request needs a bearer token, minted from the API & MCP page. Each token has a name (so you can tell tools apart) and can be revoked independently — a token’s full value is shown only once, at creation time.

Authorization: Bearer <token>

Each token can make at most 30 expensive calls per 60 seconds: POST to launch a profile, create profiles, create a proxy pool, run a script, run a batch, or run a schedule now. Past that the API answers 429 with a Retry-After header. Reads and cheap calls such as stopping a profile aren’t counted.

The port is chosen when you turn the API on and shown on the API & MCP page. Replace <port> below with that value.

http://127.0.0.1:<port>
Terminal window
curl -X GET \
-H "Authorization: Bearer $VEILUS_API_TOKEN" \
http://127.0.0.1:<port>/v1/profiles

Profiles

List Veilus browser profiles, with their running state

GET /v1/profiles read

List Veilus browser profiles, with their running state; a running profile carries cdpUrl, and headless: true when it runs without a window.

Lists every browser profile on this machine with its live running state, proxy host and port, tags and variable names. Variable values and proxy passwords are never returned. A running profile also carries cdpUrl, the DevTools endpoint any CDP client can drive it through.

Responses

200 Every profile, with its live running state.

array<object>

  • cdpUrl string
  • contentDataset string
  • createdAt string required
  • folder string | null required
  • groups array<string> required
  • headless true
  • id string required
  • identityDataset string
  • lastUsed string | null required
  • name string required
  • os string required
  • proxy object required
    • enabled boolean required
    • host string required
    • port integer required
    • proxyType "http" | "socks5" | "residential" required
    • requiresAuth boolean required
  • proxyPoolId string
  • slug string required
  • status "stopped" | "starting" | "running" | "crashed" required
  • tags array<string> required
  • variableNames array<string> required

Example

[
  {
    "cdpUrl": "http://127.0.0.1:9333",
    "createdAt": "2026-10-01T10:00:00Z",
    "folder": null,
    "groups": [],
    "headless": true,
    "id": "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70",
    "lastUsed": "2026-10-16T08:59:00Z",
    "name": "Shop 1",
    "os": "windows",
    "proxy": {
      "enabled": true,
      "host": "203.0.113.7",
      "port": 8080,
      "proxyType": "http",
      "requiresAuth": true
    },
    "slug": "shop-1",
    "status": "running",
    "tags": [
      "shop"
    ],
    "variableNames": [
      "EMAIL",
      "PASSWORD"
    ]
  }
]
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/profiles' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Launch a profile's browser and wait for it to start

POST /v1/profiles/:id/launch write

Launch a profile's browser and wait for it to start; returns {pid, cdpUrl}, a full pool fails with 409 rather than queuing. Optional body {diagnostic?: bool, headless?: bool, idle_timeout_secs?: integer}: diagnostic opens the profile's proxy without its fingerprint, in a temporary directory; headless runs it without a window; idle_timeout_secs stops it after that long with no API call naming it (0 = never; default 30 min). A profile that is already running is not relaunched (409).

Opens this profile's browser with its fingerprint, proxy, cookies and logins, and waits until it has started. It takes a slot of the browser pool until it is stopped, or until it sits idle past idle_timeout_secs. The returned cdpUrl lets any local process drive the browser while it runs.

Path parameters

  • id string required

    Profile id (uuid), as listed by GET /v1/profiles.

Request body · optional

  • diagnostic boolean

    Diagnostic launch: the profile's proxy, but none of its fingerprint, in a fresh temporary browser directory deleted on stop — no cookies or logins, and nothing is written to the profile. The page sees THIS machine's real values (platform, CPU cores, GPU, screen, timezone, languages): use it to tell whether a site blocks the fingerprint or the IP/proxy, never on an account you care about. The engine's CDP hiding still applies; WebRTC is restricted to the proxy. Default false.

  • headless boolean

    Headless launch: the browser runs without a window (--headless=new). The profile's fingerprint is unchanged, including its screen size, and the engine's CDP hiding still applies. Measured on the macOS engine 154: detector sites score a headless launch like a windowed one — it is NOT a stealth feature and NOT more detectable. A profile that is already running is not relaunched (409): reuse it through the profile list, which reports its cdpUrl and whether it runs headless. Default false.

  • idle_timeout_secs integer

    Stop this browser after this many seconds with no Veilus API/MCP call naming the profile (navigate, click, snapshot, ...). Traffic sent straight to cdpUrl by another client does NOT count: a framework driving the profile over CDP should pass 0, which never stops it. Default: the app setting, 30 minutes unless changed. Profiles opened from the Veilus window are never stopped this way.

Responses

200 The browser started. diagnostic and headless appear only when true.

object

  • cdpUrl string required
  • diagnostic true
  • headless true
  • pid integer required

Example

{
  "cdpUrl": "http://127.0.0.1:9333",
  "pid": 48213
}
400 The id is not a uuid, or the body has an unknown key or a value of the wrong type.

object

  • error string required

Example

{
  "error": "invalid request: launch body {diagnostic?: bool, headless?: bool, idle_timeout_secs?: integer}: unknown field `headles`"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
409 Not launched: the pool is full, the profile is already running or does not exist, or the engine failed to start. Retrying the same call does not help until that changes.

object

  • error string required

Example

{
  "error": "conflict: Too many browsers are already open (4 of 4). Close one and try again."
}
429 Too many expensive calls from this token: launch, script run, batch, run schedule now, create profiles and import proxies count together, 30 per rolling 60 s. The Retry-After header gives the seconds to wait.

object

  • error string required

Example

{
  "error": "rate limited: too many expensive calls in the last minute; retry after 42s"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/profiles/:id/launch' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{}'

Stop a running profile's browser

POST /v1/profiles/:id/stop write

Stop a running profile's browser.

Closes this profile's browser, its proxy bridge and its pool slot. Pages open in it are closed without asking; stopping a profile that is not running succeeds.

Path parameters

  • id string required

    Profile id (uuid), as listed by GET /v1/profiles.

Responses

204 Stopped, or was not running. No body.

null

400 The id is not a uuid.

object

  • error string required

Example

{
  "error": "invalid request: not a uuid: 1234"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/profiles/:id/stop' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Create 1-50 profiles

POST /v1/profiles write

Create 1-50 profiles; with a proxy pool, timezones follow each slot's geo.

Creates 1 to 50 new profiles, each with a freshly generated fingerprint. With a proxy pool, each profile takes a slot and its timezone follows that proxy's measured exit, which sends traffic through the proxies. Datasets given here are assigned to the new profiles.

Request body

  • content_dataset_id string

    Consume dataset for the Content slot

  • count integer required
  • identity_dataset_id string

    Fixed dataset: one unassigned row per new profile

  • name_template string

    {n} becomes 1, 2, ...

  • os "windows" | "macos" | "linux"
  • proxy_pool_id string
  • tags array<string>

Responses

200 The profiles created and, by index, the ones that could not be.

object

  • created array<object> required
    • name string required
    • profile_id string required
    • proxy_slot integer
    • timezone string required
  • failed array<object> required
    • error string required
    • index integer required
  • location_warning string
  • timezone_warning string

Example

{
  "created": [
    {
      "name": "Shop 1",
      "profile_id": "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70",
      "proxy_slot": 0,
      "timezone": "America/New_York"
    }
  ],
  "failed": []
}
400 The body is not valid: count outside 1-50, unknown os, empty tags, a dataset of the wrong mode or with too few rows, or a rotating pool.

object

  • error string required

Example

{
  "error": "invalid request: `count` must be between 1 and 50"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 The proxy pool or a dataset does not exist.

object

  • error string required

Example

{
  "error": "not found: proxy pool 7a1d9e42-0c3b-4d5e-8f6a-9b0c1d2e3f40"
}
409 No profile could be created, or a dataset cannot take these profiles.

object

  • error string required

Example

{
  "error": "conflict: no profile was created: proxy 203.0.113.7:8080 did not answer"
}
429 Too many expensive calls from this token: launch, script run, batch, run schedule now, create profiles and import proxies count together, 30 per rolling 60 s. The Retry-After header gives the seconds to wait.

object

  • error string required

Example

{
  "error": "rate limited: too many expensive calls in the last minute; retry after 42s"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/profiles' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"count":1}'

Show a profile's proxy

GET /v1/profiles/:id/proxy read

Show a profile's proxy: pool, slot, host:port and geo, never the password.

Shows where this profile's traffic goes: its pool and slot, or its own proxy, with the detected country and timezone. The proxy password is never returned, only whether one is set.

Path parameters

  • id string required

    Profile id (uuid), as listed by GET /v1/profiles.

Responses

200 Where the profile's traffic goes: its pool and slot, or its own proxy; null fields when there is none.

object

  • country string | null required
  • pool_id string | null required
  • profile_id string required
  • proxy object | null required
    • enabled boolean required
    • host string required
    • port integer required
    • proxyType "http" | "socks5" | "residential" required
    • requiresAuth boolean required
  • slot integer | null required
  • timezone string | null required

Example

{
  "country": "US",
  "pool_id": "7a1d9e42-0c3b-4d5e-8f6a-9b0c1d2e3f40",
  "profile_id": "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70",
  "proxy": {
    "enabled": true,
    "host": "203.0.113.7",
    "port": 8080,
    "proxyType": "http",
    "requiresAuth": true
  },
  "slot": 0,
  "timezone": "America/New_York"
}
400 The id is not a uuid.

object

  • error string required

Example

{
  "error": "invalid request: not a uuid: 1234"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 No profile with this id.

object

  • error string required

Example

{
  "error": "not found: profile 0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/profiles/:id/proxy' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Replace all stored variables of a profile

POST /v1/profiles/:id/variables write

Replace all stored variables of a profile; returns the variable names only.

Replaces every stored variable of this profile with the ones given; variables not in the body are deleted. Values may be secrets: they are never returned, only the names.

Path parameters

  • id string required

    Profile id (uuid), as listed by GET /v1/profiles.

Request body

  • variables object required

Responses

200 The variable names now stored, sorted. Values are never returned.

object

  • profile_id string required
  • variable_names array<string> required

Example

{
  "profile_id": "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70",
  "variable_names": [
    "EMAIL",
    "PASSWORD"
  ]
}
400 The id is not a uuid, or a name is not UPPER_SNAKE_CASE, a value is over 32 KiB, or there are more than 64.

object

  • error string required

Example

{
  "error": "invalid request: variable name `email` must be UPPER_SNAKE_CASE, matching [A-Z_][A-Z0-9_]* and at most 64 chars"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 No profile with this id.

object

  • error string required

Example

{
  "error": "not found: profile 0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70; call list_profiles for valid ids"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/profiles/:id/variables' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"variables":{}}'

Scripts

Return the JSON schema for the drag-and-drop DSL

GET /v1/dsl/schema read

Return the JSON schema for the drag-and-drop DSL.

Returns the JSON Schema of the Veilus Flow DSL and its version, generated from the app's own types. Read it before writing a DSL script so the script is valid the first time.

Responses

200 The DSL version and its JSON Schema.

object

  • dslVersion string required
  • schema object required

Example

{
  "dslVersion": "1",
  "schema": {
    "title": "VeilusFlowScript",
    "type": "object"
  }
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/dsl/schema' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Compile a drag-and-drop DSL script into runnable code

POST /v1/dsl/compile read

Compile a drag-and-drop DSL script into runnable code.

Compiles a DSL script into Playwright or Puppeteer TypeScript and returns the code with any warnings. Nothing is saved and no browser is opened: it only shows what the script would become.

Request body

  • dsl object required

    DSL script body

  • target string required

Responses

200 The generated TypeScript, with compiler warnings.

object

  • code string required
  • nodeCount integer required
  • target string required
  • warnings array<string> required

Example

{
  "code": "import { chromium } from 'playwright';\n// ...",
  "nodeCount": 3,
  "target": "playwright",
  "warnings": []
}
400 dsl or target is missing, the DSL does not parse, or the target is not playwright or puppeteer.

object

  • error string required

Example

{
  "error": "invalid request: unknown target 'selenium', use 'playwright' or 'puppeteer'"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/dsl/compile' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"dsl":{},"target":""}'

Start a script run on given profiles

POST /v1/scripts/run write

Start a script run on given profiles; returns the run immediately (its id is the run_id).

Starts the script on the given profiles in the background: each profile's browser opens and the script drives it. An unapproved script runs on at most 3 profiles and without the profiles' stored variables. Returns the run at once; read its result with GET /v1/runs/:id.

Request body

  • headless boolean

    Launch the run's profiles headless, without a window — the same launch as launch_profile's headless (see there): the profile's fingerprint is unchanged. Default false.

  • profile_ids array<string>
  • script_id string required
  • variables object

Responses

200 The run as recorded now, still running; poll GET /v1/runs/:id with its id.

object

  • completedAt string | null required
  • error string | null required
  • id string required
  • profileIds array<string> required
  • profilesDone integer required
  • profilesFailed integer required
  • profilesTotal integer required
  • scheduleId string | null required
  • scriptId string | null required
  • source "schedule" | "app" | "agent" | null required
  • startedAt string required
  • status "running" | "completed" | "partial" | "failed" | "skipped" required

Example

{
  "completedAt": null,
  "error": null,
  "id": "6f1c2b9e-3d4a-4e8b-9f0a-1b2c3d4e5f60",
  "profileIds": [
    "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70",
    "1c8f5b63-9d2e-4a4f-b7c0-3e6d9f2a5b81"
  ],
  "profilesDone": 0,
  "profilesFailed": 0,
  "profilesTotal": 2,
  "scheduleId": null,
  "scriptId": "2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92",
  "source": "agent",
  "startedAt": "2026-10-16T09:00:00Z",
  "status": "running"
}
400 script_id or profile_ids is missing, a variable is invalid, the plan lacks Veilus Flow, or an unapproved script targets more than 3 profiles.

object

  • error string required

Example

{
  "error": "invalid request: need at least one `profile_id`"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 No script with this id.

object

  • error string required

Example

{
  "error": "not found: script 2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92"
}
429 Too many expensive calls from this token: launch, script run, batch, run schedule now, create profiles and import proxies count together, 30 per rolling 60 s. The Retry-After header gives the seconds to wait.

object

  • error string required

Example

{
  "error": "rate limited: too many expensive calls in the last minute; retry after 42s"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/scripts/run' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"script_id":"00000000-0000-0000-0000-000000000000"}'

Save an agent-authored Raw script into Veilus Flow

POST /v1/scripts write

Save an agent-authored Raw script into Veilus Flow.

Saves a Raw TypeScript script into Veilus Flow, or replaces one this API saved before. The source is checked against the Raw script contract first; a script stays unapproved until the user approves it in the app.

Request body

  • description string
  • name string required
  • script_id string

    Script to replace; omit to create a new one

  • source string required

    Full TypeScript source

Responses

200 Saved. An agent-written script stays unapproved until the user approves it.

object

  • approved boolean required
  • scriptId string required
  • version string required

Example

{
  "approved": false,
  "scriptId": "2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92",
  "version": "1.0.0"
}
400 Empty name, the plan lacks Veilus Flow, or the source breaks the Raw script contract (one line per violation).

object

  • error string required

Example

{
  "error": "invalid request: line 3 [no-launch] call connectOverCDP, never launch a browser"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 script_id names no script.

object

  • error string required

Example

{
  "error": "not found: script 2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92"
}
409 script_id names a DSL script, or one the user wrote in the app; create a new script instead.

object

  • error string required

Example

{
  "error": "conflict: script 2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92 was written in the app; create a new script instead"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/scripts' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"name":"","source":""}'

List every script without its source

GET /v1/scripts read

List every script without its source: id, name, version, mode (raw or dsl), origin and whether it is approved.

Lists every script in Veilus Flow, most recently changed first, without its source. Use it to find a script's id and whether it is approved before running it.

Responses

200 Every script, without its source.

array<object>

  • approved boolean required
  • description string | null required
  • mode "raw" | "dsl" required
  • name string required
  • origin string required
  • scriptId string required
  • updatedAt string required
  • version string required

Example

[
  {
    "approved": false,
    "description": null,
    "mode": "raw",
    "name": "Check inbox",
    "origin": "mcp",
    "scriptId": "2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92",
    "updatedAt": "2026-10-16T08:30:00Z",
    "version": "1.0.0"
  }
]
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/scripts' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Read a Raw script's source and approval state

GET /v1/scripts/:id read

Read a Raw script's source and approval state.

Returns a Raw script's full source, version and approval state, to edit and save it again. DSL scripts are refused with 409.

Path parameters

  • id string required

    Script id (uuid), as returned by POST /v1/scripts or listed by GET /v1/scripts.

Responses

200 The Raw script's source and approval state.

object

  • approved boolean required
  • description string | null required
  • name string required
  • origin string required
  • scriptId string required
  • source string required
  • version string required

Example

{
  "approved": false,
  "description": null,
  "name": "Check inbox",
  "origin": "mcp",
  "scriptId": "2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92",
  "source": "import { chromium } from 'playwright';\n// ...",
  "version": "1.0.0"
}
400 The id is not a uuid.

object

  • error string required

Example

{
  "error": "invalid request: not a uuid: 1234"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 No script with this id.

object

  • error string required

Example

{
  "error": "not found: script 2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92"
}
409 The script is a DSL script; only Raw scripts can be read back.

object

  • error string required

Example

{
  "error": "conflict: script 2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92 is a DSL script"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/scripts/:id' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Run an approved script on many profiles

POST /v1/scripts/batch write

Run an approved script on many profiles; returns the run immediately.

Runs an approved script on many profiles in the background, concurrency at a time, with the profiles' stored variables. Returns the run at once; read its result with GET /v1/runs/:id.

Request body

  • concurrency integer
  • profile_ids array<string> required
  • script_id string required
  • stagger_ms integer
  • variables object

Responses

200 The run as recorded now, still running; poll GET /v1/runs/:id with its id.

object

  • completedAt string | null required
  • error string | null required
  • id string required
  • profileIds array<string> required
  • profilesDone integer required
  • profilesFailed integer required
  • profilesTotal integer required
  • scheduleId string | null required
  • scriptId string | null required
  • source "schedule" | "app" | "agent" | null required
  • startedAt string required
  • status "running" | "completed" | "partial" | "failed" | "skipped" required

Example

{
  "completedAt": null,
  "error": null,
  "id": "6f1c2b9e-3d4a-4e8b-9f0a-1b2c3d4e5f60",
  "profileIds": [
    "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70",
    "1c8f5b63-9d2e-4a4f-b7c0-3e6d9f2a5b81"
  ],
  "profilesDone": 0,
  "profilesFailed": 0,
  "profilesTotal": 2,
  "scheduleId": null,
  "scriptId": "2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92",
  "source": "agent",
  "startedAt": "2026-10-16T09:00:00Z",
  "status": "running"
}
400 No profile ids, concurrency or stagger_ms out of range, or an invalid variable.

object

  • error string required

Example

{
  "error": "invalid request: `concurrency` must be between 1 and 4"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 No script with this id.

object

  • error string required

Example

{
  "error": "not found: script not found: 2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92; save_script returns valid ids"
}
409 The script is not approved; the user approves it in Veilus Flow.

object

  • error string required

Example

{
  "error": "conflict: script `Check inbox` is not approved — ask the user to approve it in Veilus → Flow, then call this again"
}
429 Too many expensive calls from this token: launch, script run, batch, run schedule now, create profiles and import proxies count together, 30 per rolling 60 s. The Retry-After header gives the seconds to wait.

object

  • error string required

Example

{
  "error": "rate limited: too many expensive calls in the last minute; retry after 42s"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/scripts/batch' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"script_id":"00000000-0000-0000-0000-000000000000","profile_ids":[]}'

Runs

Read a script run's result by run_id

GET /v1/runs/:id read

Read a script run's result by run_id.

Returns a run's state and, per profile, whether it finished, its exit code and the tail of the script's output. Poll it until status is no longer running.

Path parameters

  • id string required

    Run id (uuid): the id returned when the run started, or one listed by GET /v1/runs.

Responses

200 The run and, once each profile finishes, its outcome with the tail of the script's output.

object

  • completedAt string | null required
  • error string | null required
  • id string required
  • profileIds array<string> required
  • profiles array<object> required
    • elapsedMs integer required
    • error string | null required
    • exitCode integer | null required
    • profileId string required
    • status "completed" | "failed" required
    • stderrTail string required
    • stdoutTail string required
  • profilesDone integer required
  • profilesFailed integer required
  • profilesTotal integer required
  • scheduleId string | null required
  • scriptId string | null required
  • source "schedule" | "app" | "agent" | null required
  • startedAt string required
  • status "running" | "completed" | "partial" | "failed" | "skipped" required

Example

{
  "completedAt": "2026-10-16T09:01:10Z",
  "error": null,
  "id": "6f1c2b9e-3d4a-4e8b-9f0a-1b2c3d4e5f60",
  "profileIds": [
    "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70",
    "1c8f5b63-9d2e-4a4f-b7c0-3e6d9f2a5b81"
  ],
  "profiles": [
    {
      "elapsedMs": 35120,
      "error": null,
      "exitCode": 0,
      "profileId": "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70",
      "status": "completed",
      "stderrTail": "",
      "stdoutTail": "done\n"
    }
  ],
  "profilesDone": 2,
  "profilesFailed": 0,
  "profilesTotal": 2,
  "scheduleId": null,
  "scriptId": "2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92",
  "source": "agent",
  "startedAt": "2026-10-16T09:00:00Z",
  "status": "completed"
}
400 The id is not a uuid.

object

  • error string required

Example

{
  "error": "invalid request: not a uuid: 1234"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 No run with this id.

object

  • error string required

Example

{
  "error": "not found: run 6f1c2b9e-3d4a-4e8b-9f0a-1b2c3d4e5f60"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/runs/:id' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

List recent runs, newest first

GET /v1/runs read

List recent runs, newest first; query schedule_id and limit (default 20, max 100).

Lists recent runs from every source, newest first, without their profile ids. Query schedule_id keeps one schedule's runs; limit defaults to 20, at most 100.

Responses

200 Recent runs, newest first, without their profile ids.

array<object>

  • completedAt string | null required
  • error string | null required
  • id string required
  • profilesDone integer required
  • profilesFailed integer required
  • profilesTotal integer required
  • scheduleId string | null required
  • startedAt string required
  • status "running" | "completed" | "partial" | "failed" | "skipped" required

Example

[
  {
    "completedAt": null,
    "error": null,
    "id": "6f1c2b9e-3d4a-4e8b-9f0a-1b2c3d4e5f60",
    "profilesDone": 0,
    "profilesFailed": 0,
    "profilesTotal": 2,
    "scheduleId": null,
    "startedAt": "2026-10-16T09:00:00Z",
    "status": "running"
  }
]
400 Unknown query parameter, schedule_id not a uuid, or limit not a positive integer.

object

  • error string required

Example

{
  "error": "invalid request: unknown query parameter `page=2`; use schedule_id and limit"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 schedule_id names no schedule.

object

  • error string required

Example

{
  "error": "not found: schedule 3e0b7d85-bf40-4c61-99e2-5a8fbb4c7da3; call list_schedules for valid ids"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/runs' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Proxies

List proxy pools with entry counts and detected countries

GET /v1/proxy-pools read

List proxy pools with entry counts and detected countries.

Lists every proxy pool with its number of entries and the countries and timezones detected for its exits. A warning appears when a pool's exits span several UTC offsets or have moved.

Responses

200 Every pool with its entry count and the countries and timezones detected for its exits.

array<object>

  • countries array<string> required
  • entry_count integer required
  • kind "static" | "rotating" required
  • location_warning string
  • name string required
  • pool_id string required
  • timezone_warning string
  • timezones array<string> required

Example

[
  {
    "countries": [
      "US"
    ],
    "entry_count": 10,
    "kind": "static",
    "name": "US residential",
    "pool_id": "7a1d9e42-0c3b-4d5e-8f6a-9b0c1d2e3f40",
    "timezones": [
      "America/New_York"
    ]
  }
]
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/proxy-pools' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Create a static proxy pool from proxy lines

POST /v1/proxy-pools write

Create a static proxy pool from proxy lines; bad lines are reported by number.

Creates a new static proxy pool from up to 1000 proxy lines, credentials included. Lines that do not parse are skipped and reported by number, never by content.

Request body

  • lines array<string> required
  • name string required
  • type "static"

Responses

200 The new pool, how many lines were imported, and the numbers of the lines refused.

object

  • imported integer required
  • pool_id string required
  • rejected array<object> required
    • line integer required
    • reason string required

Example

{
  "imported": 9,
  "pool_id": "7a1d9e42-0c3b-4d5e-8f6a-9b0c1d2e3f40",
  "rejected": [
    {
      "line": 4,
      "reason": "expected host:port, host:port:user:pass or user:pass@host:port, optionally prefixed by http:// or socks5://"
    }
  ]
}
400 Empty name, a type other than static, more than 1000 lines, or no valid line at all.

object

  • error string required

Example

{
  "error": "invalid request: `name` must not be empty"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
429 Too many expensive calls from this token: launch, script run, batch, run schedule now, create profiles and import proxies count together, 30 per rolling 60 s. The Retry-After header gives the seconds to wait.

object

  • error string required

Example

{
  "error": "rate limited: too many expensive calls in the last minute; retry after 42s"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/proxy-pools' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"name":"","lines":[]}'

Assign a proxy pool to profiles

POST /v1/proxy-pools/:id/assign write

Assign a proxy pool to profiles; refuses profiles that already have a proxy unless force.

Points these profiles at the pool, one slot each, replacing how they reach the network from their next launch. Profiles that already have a proxy are refused unless force is true; their timezone is not regenerated.

Path parameters

  • id string required

    Proxy pool id (uuid), as listed by GET /v1/proxy-pools.

Request body

  • force boolean
  • profile_ids array<string> required

Responses

200 Every profile was assigned; each one's slot in the pool.

object

  • assigned array<object> required
    • profile_id string required
    • slot integer required
  • pool_id string required

Example

{
  "assigned": [
    {
      "profile_id": "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70",
      "slot": 0
    }
  ],
  "pool_id": "7a1d9e42-0c3b-4d5e-8f6a-9b0c1d2e3f40"
}
400 The id is not a uuid, or profile_ids is empty or has duplicates.

object

  • error string required

Example

{
  "error": "invalid request: `profile_ids` has duplicates"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 The pool or one of the profiles does not exist.

object

  • error string required

Example

{
  "error": "not found: proxy pool 7a1d9e42-0c3b-4d5e-8f6a-9b0c1d2e3f40"
}
409 Some profiles already have a proxy and force is false; nothing was assigned.

object

  • error string required

Example

{
  "error": "conflict: profiles already have a proxy: 0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70. Nothing was assigned; pass `force: true` to replace their proxy (their timezone is not regenerated)"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/proxy-pools/:id/assign' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"profile_ids":[]}'

Test every proxy in a pool now

POST /v1/proxy-pools/:id/test write

Test every proxy in a pool now: alive, latency, exit IP and geo.

Connects through every proxy in the pool now, measuring whether it answers, its latency, exit IP and geo. This sends real traffic through each proxy and refreshes the pool's stored geo.

Path parameters

  • id string required

    Proxy pool id (uuid), as listed by GET /v1/proxy-pools.

Responses

200 One row per proxy: alive, latency, exit IP and geo. Errors never carry the password.

array<object>

  • alive boolean required
  • country string | null required
  • error string | null required
  • external_ip string | null required
  • latency_ms integer | null required
  • location_unstable string
  • proxy string required
  • timezone string | null required

Example

[
  {
    "alive": true,
    "country": "US",
    "error": null,
    "external_ip": "198.51.100.23",
    "latency_ms": 212,
    "proxy": "203.0.113.7:8080",
    "timezone": "America/New_York"
  }
]
400 The id is not a uuid.

object

  • error string required

Example

{
  "error": "invalid request: not a uuid: 1234"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 No pool with this id.

object

  • error string required

Example

{
  "error": "not found: proxy pool 7a1d9e42-0c3b-4d5e-8f6a-9b0c1d2e3f40"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/proxy-pools/:id/test' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Schedules

List schedules with their script, target profiles, timing and next run

GET /v1/schedules read

List schedules with their script, target profiles, timing and next run.

Lists every schedule, newest first, with its script, target profiles, timing, whether it is on, and its next run. Nothing is changed and no browser is opened. Use it to find a schedule's id before turning it on or off, or running it now.

Responses

200 Every schedule, newest first.

array<object>

  • concurrency integer required
  • createdAt string required
  • cronExpr string | null required
  • dailyHour integer | null required
  • dailyMinute integer | null required
  • enabled boolean required
  • headless boolean required
  • id string required
  • intervalMinutes integer | null required
  • intervalUnit "seconds" | "minutes" required
  • lastRunAt string | null required
  • name string required
  • nextRunAt string | null required
  • profileIds array<string> required
  • runAt string | null required
  • scheduleType "interval" | "daily" | "weekly" | "cron" | "once" required
  • scriptId string | null required
  • staggerMs integer required
  • target object | object required
    • kind "explicit" required
    • value array<string> required
  • updatedAt string required
  • weeklyDay integer | null required

Example

[
  {
    "concurrency": 1,
    "createdAt": "2026-10-16T08:00:00Z",
    "cronExpr": null,
    "dailyHour": 9,
    "dailyMinute": 0,
    "enabled": true,
    "headless": false,
    "id": "3e0b7d85-bf40-4c61-99e2-5a8fbb4c7da3",
    "intervalMinutes": null,
    "intervalUnit": "minutes",
    "lastRunAt": null,
    "name": "Morning check",
    "nextRunAt": "2026-10-17T02:00:00Z",
    "profileIds": [
      "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70"
    ],
    "runAt": null,
    "scheduleType": "daily",
    "scriptId": "2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92",
    "staggerMs": 0,
    "target": {
      "kind": "explicit",
      "value": [
        "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70"
      ]
    },
    "updatedAt": "2026-10-16T08:00:00Z",
    "weeklyDay": null
  }
]
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/schedules' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Create a schedule for an approved script on explicit profiles

POST /v1/schedules write

Create a schedule for an approved script on explicit profiles; a once schedule turns itself off after it runs.

Creates a schedule that runs an approved script on these profiles at the given times, unattended. Every profile and the script must exist; timing that would never fire is refused.

Request body

  • concurrency integer
  • cron_expr string

    5 fields, e.g. "0 * * * *"

  • daily_hour integer
  • daily_minute integer
  • enabled boolean
  • headless boolean

    Launch the run's profiles headless, without a window — the same launch as launch_profile's headless (see there): the profile's fingerprint is unchanged. Default false.

  • interval_minutes integer

    interval: count of interval_unit

  • interval_unit "minutes" | "seconds"
  • name string required
  • profile_ids array<string> required
  • run_at string

    RFC 3339 with offset, e.g. 2026-10-04T09:00:00+07:00; required for once

  • schedule_type "interval" | "daily" | "weekly" | "cron" | "once" required
  • script_id string required

    An approved script

  • stagger_ms integer
  • weekly_day integer

    0 = Sunday

Responses

200 The schedule as stored, with its next run.

object

  • concurrency integer required
  • createdAt string required
  • cronExpr string | null required
  • dailyHour integer | null required
  • dailyMinute integer | null required
  • enabled boolean required
  • headless boolean required
  • id string required
  • intervalMinutes integer | null required
  • intervalUnit "seconds" | "minutes" required
  • lastRunAt string | null required
  • name string required
  • nextRunAt string | null required
  • profileIds array<string> required
  • runAt string | null required
  • scheduleType "interval" | "daily" | "weekly" | "cron" | "once" required
  • scriptId string | null required
  • staggerMs integer required
  • target object | object required
    • kind "explicit" required
    • value array<string> required
  • updatedAt string required
  • weeklyDay integer | null required

Example

{
  "concurrency": 1,
  "createdAt": "2026-10-16T08:00:00Z",
  "cronExpr": null,
  "dailyHour": 9,
  "dailyMinute": 0,
  "enabled": true,
  "headless": false,
  "id": "3e0b7d85-bf40-4c61-99e2-5a8fbb4c7da3",
  "intervalMinutes": null,
  "intervalUnit": "minutes",
  "lastRunAt": null,
  "name": "Morning check",
  "nextRunAt": "2026-10-17T02:00:00Z",
  "profileIds": [
    "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70"
  ],
  "runAt": null,
  "scheduleType": "daily",
  "scriptId": "2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92",
  "staggerMs": 0,
  "target": {
    "kind": "explicit",
    "value": [
      "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70"
    ]
  },
  "updatedAt": "2026-10-16T08:00:00Z",
  "weeklyDay": null
}
400 Empty name or profile list, concurrency or stagger_ms out of range, or timing fields that would never fire.

object

  • error string required

Example

{
  "error": "invalid request: this schedule would never run: interval needs interval_minutes; ..."
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 A profile or the script does not exist.

object

  • error string required

Example

{
  "error": "not found: profiles 0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70 do not exist; call list_profiles for valid ids"
}
409 The script is not approved; the user approves it in Veilus Flow.

object

  • error string required

Example

{
  "error": "conflict: script `Check inbox` is not approved — ask the user to approve it in Veilus → Flow, then call this again"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/schedules' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"name":"","script_id":"00000000-0000-0000-0000-000000000000","profile_ids":[],"schedule_type":"interval"}'

Turn a schedule on or off

POST /v1/schedules/:id/enabled write

Turn a schedule on or off; turning it on recomputes its next run.

Turns the schedule on or off. Turning it on recomputes its next run from now and requires its script to still be approved.

Path parameters

  • id string required

    Schedule id (uuid), as listed by GET /v1/schedules.

Request body

  • enabled boolean required

Responses

200 The schedule after the change; turning it on recomputes nextRunAt from now.

object

  • concurrency integer required
  • createdAt string required
  • cronExpr string | null required
  • dailyHour integer | null required
  • dailyMinute integer | null required
  • enabled boolean required
  • headless boolean required
  • id string required
  • intervalMinutes integer | null required
  • intervalUnit "seconds" | "minutes" required
  • lastRunAt string | null required
  • name string required
  • nextRunAt string | null required
  • profileIds array<string> required
  • runAt string | null required
  • scheduleType "interval" | "daily" | "weekly" | "cron" | "once" required
  • scriptId string | null required
  • staggerMs integer required
  • target object | object required
    • kind "explicit" required
    • value array<string> required
  • updatedAt string required
  • weeklyDay integer | null required

Example

{
  "concurrency": 1,
  "createdAt": "2026-10-16T08:00:00Z",
  "cronExpr": null,
  "dailyHour": 9,
  "dailyMinute": 0,
  "enabled": true,
  "headless": false,
  "id": "3e0b7d85-bf40-4c61-99e2-5a8fbb4c7da3",
  "intervalMinutes": null,
  "intervalUnit": "minutes",
  "lastRunAt": null,
  "name": "Morning check",
  "nextRunAt": "2026-10-17T02:00:00Z",
  "profileIds": [
    "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70"
  ],
  "runAt": null,
  "scheduleType": "daily",
  "scriptId": "2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92",
  "staggerMs": 0,
  "target": {
    "kind": "explicit",
    "value": [
      "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70"
    ]
  },
  "updatedAt": "2026-10-16T08:00:00Z",
  "weeklyDay": null
}
400 The id is not a uuid, the body is not {enabled: boolean}, or a one-time schedule's run_at has passed.

object

  • error string required

Example

{
  "error": "invalid request: body must be JSON {enabled: boolean}"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 No schedule with this id.

object

  • error string required

Example

{
  "error": "not found: schedule 3e0b7d85-bf40-4c61-99e2-5a8fbb4c7da3; call list_schedules for valid ids"
}
409 Turning on a schedule whose script is no longer approved.

object

  • error string required

Example

{
  "error": "conflict: script `Check inbox` is not approved — ask the user to approve it in Veilus → Flow, then call this again"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/schedules/:id/enabled' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"enabled":false}'

Run a schedule once now

POST /v1/schedules/:id/run write

Run a schedule once now; returns the run immediately.

Runs the schedule once now, outside its timing: its profiles open and its script drives them. Refused while the schedule already has a run in progress. Returns the run at once; read its result with GET /v1/runs/:id.

Path parameters

  • id string required

    Schedule id (uuid), as listed by GET /v1/schedules.

Responses

200 The run as recorded now, still running; poll GET /v1/runs/:id with its id.

object

  • completedAt string | null required
  • error string | null required
  • id string required
  • profileIds array<string> required
  • profilesDone integer required
  • profilesFailed integer required
  • profilesTotal integer required
  • scheduleId string | null required
  • scriptId string | null required
  • source "schedule" | "app" | "agent" | null required
  • startedAt string required
  • status "running" | "completed" | "partial" | "failed" | "skipped" required

Example

{
  "completedAt": null,
  "error": null,
  "id": "6f1c2b9e-3d4a-4e8b-9f0a-1b2c3d4e5f60",
  "profileIds": [
    "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70",
    "1c8f5b63-9d2e-4a4f-b7c0-3e6d9f2a5b81"
  ],
  "profilesDone": 0,
  "profilesFailed": 0,
  "profilesTotal": 2,
  "scheduleId": null,
  "scriptId": "2d9a6c74-ae3f-4b50-88d1-4f7eaa3b6c92",
  "source": "agent",
  "startedAt": "2026-10-16T09:00:00Z",
  "status": "running"
}
400 The id is not a uuid.

object

  • error string required

Example

{
  "error": "invalid request: not a uuid: 1234"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 No schedule with this id, or its script is gone.

object

  • error string required

Example

{
  "error": "not found: schedule 3e0b7d85-bf40-4c61-99e2-5a8fbb4c7da3; call list_schedules for valid ids"
}
409 The schedule already has a run in progress, its script is not approved, or no target profile is left.

object

  • error string required

Example

{
  "error": "conflict: schedule already has a run in progress — wait for it to finish (list_runs or get_run_result), then try again"
}
429 Too many expensive calls from this token: launch, script run, batch, run schedule now, create profiles and import proxies count together, 30 per rolling 60 s. The Retry-After header gives the seconds to wait.

object

  • error string required

Example

{
  "error": "rate limited: too many expensive calls in the last minute; retry after 42s"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/schedules/:id/run' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Datasets

List datasets with their columns and row counts by state

GET /v1/datasets read

List datasets with their columns and row counts by state; never row values.

Lists every dataset with its mode, columns, row counts by state and how many profiles use it. No row values are returned.

Responses

200 Every dataset with its columns and row counts by state; no row values.

array<object>

  • columns array<object> required
    • name string required
    • secret boolean required
  • counts object required
    • assigned integer required
    • available integer required
    • reserved integer required
    • total integer required
    • used integer required
  • createdAt string required
  • id string required
  • mode "fixed" | "consume" required
  • name string required
  • profileCount integer required
  • rowsPerRun integer | null required
  • updatedAt string required

Example

[
  {
    "columns": [
      {
        "name": "EMAIL",
        "secret": false
      },
      {
        "name": "PASSWORD",
        "secret": true
      }
    ],
    "counts": {
      "assigned": 3,
      "available": 0,
      "reserved": 0,
      "total": 10,
      "used": 0
    },
    "createdAt": "2026-10-16 08:00:00",
    "id": "5c2e8f17-4a6b-4d9c-b1e3-7f0a2b4c6d81",
    "mode": "fixed",
    "name": "Accounts",
    "profileCount": 3,
    "rowsPerRun": null,
    "updatedAt": "2026-10-16 08:00:00"
  }
]
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/datasets' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Create a fixed or consume dataset from columns and rows

POST /v1/datasets write

Create a fixed or consume dataset from columns and rows; bad rows are reported by number.

Creates a new dataset with these columns and up to 5000 rows. A fixed dataset gives each profile its own row; a consume dataset hands out rows to runs until they are used. Rows that do not fit the columns are skipped and reported by number.

Request body

  • columns array<object> required
    • name string required
    • secret boolean
  • mode "fixed" | "consume" required
  • name string required
  • rows array<object>

    One object per row, keyed by column name; every value must be a string — convert numbers and dates to text before sending

  • rows_per_run integer

Responses

200 The new dataset, how many rows were imported, and the numbers of the rows refused.

object

  • datasetId string required
  • imported integer required
  • rejected array<object> required
    • lineNo integer required
    • reason "fieldCount" | "unclosedQuote" | "unknownColumn" | "emptyRow" required

Example

{
  "datasetId": "5c2e8f17-4a6b-4d9c-b1e3-7f0a2b4c6d81",
  "imported": 9,
  "rejected": [
    {
      "lineNo": 4,
      "reason": "unknownColumn"
    }
  ]
}
400 Bad column names, a reserved column, rows_per_run on a fixed dataset, or more than 5000 rows.

object

  • error string required

Example

{
  "error": "invalid request: invalid dataset: column `email` must match ^[A-Z_][A-Z0-9_]*$"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
409 A dataset with this name already exists.

object

  • error string required

Example

{
  "error": "conflict: a dataset named \"Accounts\" already exists"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/datasets' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"name":"","mode":"fixed","columns":[{"name":""}]}'

Read a dataset's rows by page (query offset, limit)

GET /v1/datasets/:id/rows read

Read a dataset's rows by page (query offset, limit); secret columns are never returned.

Returns one page of the dataset's rows with their state and owning profile; query offset and limit (default 100). Secret columns are left out of every row.

Path parameters

  • id string required

    Dataset id (uuid), as listed by GET /v1/datasets.

Responses

200 One page of rows. Secret columns are absent from values, not empty.

object

  • datasetId string required
  • offset integer required
  • rows array<object> required
    • id string required
    • index integer required
    • profileId string | null required
    • runId string | null required
    • state "available" | "reserved" | "used" | null required
    • usedAt string | null required
    • values object required
  • total integer required

Example

{
  "datasetId": "5c2e8f17-4a6b-4d9c-b1e3-7f0a2b4c6d81",
  "offset": 0,
  "rows": [
    {
      "id": "8e4a1c39-6b2d-4f7e-a0c5-9d3b5e7f1a24",
      "index": 1,
      "profileId": "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70",
      "runId": null,
      "state": null,
      "usedAt": null,
      "values": {
        "EMAIL": "a@example.com"
      }
    }
  ],
  "total": 10
}
400 The id is not a uuid, or a query parameter is unknown or not a non-negative integer.

object

  • error string required

Example

{
  "error": "invalid request: unknown query parameter `page`; use offset and limit"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 No dataset with this id.

object

  • error string required

Example

{
  "error": "not found: dataset 5c2e8f17-4a6b-4d9c-b1e3-7f0a2b4c6d81"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/datasets/:id/rows' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Append rows to a dataset

POST /v1/datasets/:id/rows write

Append rows to a dataset; bad rows are reported by number.

Appends up to 5000 rows to the dataset; existing rows are kept. Rows that do not fit the columns are skipped and reported by number.

Path parameters

  • id string required

    Dataset id (uuid), as listed by GET /v1/datasets.

Request body

  • rows array<object> required

    One object per row, keyed by column name; every value must be a string — convert numbers and dates to text before sending

Responses

200 How many rows were appended, and the numbers of the rows refused.

object

  • imported integer required
  • rejected array<object> required
    • lineNo integer required
    • reason "fieldCount" | "unclosedQuote" | "unknownColumn" | "emptyRow" required

Example

{
  "imported": 5,
  "rejected": []
}
400 The id is not a uuid, the body is not {rows: object[]}, or more than 5000 rows.

object

  • error string required

Example

{
  "error": "invalid request: at most 5000 rows per call"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 No dataset with this id.

object

  • error string required

Example

{
  "error": "not found: dataset 5c2e8f17-4a6b-4d9c-b1e3-7f0a2b4c6d81"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/datasets/:id/rows' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"rows":[]}'

Assign a dataset to profiles, into the slot its mode implies

POST /v1/datasets/:id/assign write

Assign a dataset to profiles, into the slot its mode implies; a taken slot is refused unless force.

Puts the dataset into these profiles' identity slot (fixed) or content slot (consume); a fixed dataset also gives each profile a free row. A slot already holding another dataset is refused unless force is true.

Path parameters

  • id string required

    Dataset id (uuid), as listed by GET /v1/datasets.

Request body

  • force boolean
  • profile_ids array<string> required

Responses

200 The profiles that took the dataset into its slot, and by name those a fixed dataset had no row left for.

object

  • assigned array<string> required
  • datasetId string required
  • slot "identity" | "content" required
  • withoutRow array<object> required
    • name string required
    • profileId string required

Example

{
  "assigned": [
    "0b7e4a52-8c1d-4f3e-a6b9-2d5c8e1f4a70"
  ],
  "datasetId": "5c2e8f17-4a6b-4d9c-b1e3-7f0a2b4c6d81",
  "slot": "identity",
  "withoutRow": []
}
400 The id is not a uuid, or profile_ids is empty or has duplicates.

object

  • error string required

Example

{
  "error": "invalid request: need at least one `profile_id`"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 The dataset or one of the profiles does not exist.

object

  • error string required

Example

{
  "error": "not found: dataset 5c2e8f17-4a6b-4d9c-b1e3-7f0a2b4c6d81"
}
409 A profile already has another dataset in that slot and force is false, or the columns clash with the other slot's dataset.

object

  • error string required

Example

{
  "error": "conflict: profiles already have a different identity dataset: Shop 1. Nothing was assigned; pass `force: true` to replace it"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/datasets/:id/assign' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"profile_ids":[]}'

Remove a dataset from profiles

POST /v1/datasets/:id/unassign write

Remove a dataset from profiles; their fixed rows become unassigned again.

Removes the dataset from these profiles' slot; their fixed rows become free for other profiles. Profiles that were deleted are accepted, to free their rows.

Path parameters

  • id string required

    Dataset id (uuid), as listed by GET /v1/datasets.

Request body

  • profile_ids array<string> required

Responses

200 How many profiles lost the dataset.

object

  • changed integer required

Example

{
  "changed": 1
}
400 The id is not a uuid, or profile_ids is empty or has duplicates.

object

  • error string required

Example

{
  "error": "invalid request: `profile_ids` has duplicates"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 No dataset with this id.

object

  • error string required

Example

{
  "error": "not found: dataset 5c2e8f17-4a6b-4d9c-b1e3-7f0a2b4c6d81"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/datasets/:id/unassign' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"profile_ids":[]}'

Return every used row of a consume dataset to available

POST /v1/datasets/:id/reset write

Return every used row of a consume dataset to available.

Marks every used row of this consume dataset available again, so runs hand them out a second time. Only a consume dataset can be reset; a fixed one is refused, and rows still available are left as they are. The call answers how many rows changed.

Path parameters

  • id string required

    Dataset id (uuid), as listed by GET /v1/datasets.

Responses

200 How many used rows became available again.

object

  • changed integer required

Example

{
  "changed": 12
}
400 The id is not a uuid, or the dataset is not a consume dataset.

object

  • error string required

Example

{
  "error": "invalid request: not a uuid: 1234"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 No dataset with this id.

object

  • error string required

Example

{
  "error": "not found: dataset 5c2e8f17-4a6b-4d9c-b1e3-7f0a2b4c6d81"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/datasets/:id/reset' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Page

Load a URL in a running profile's tab and wait for the load event

POST /v1/profiles/:id/navigate write

Load a URL in a running profile's tab and wait for the load event.

Loads the URL in the running profile's tab, as the profile, with its cookies and logins, and waits up to 15 s for the page to load. The page the tab showed before is left.

Path parameters

  • id string required

    Profile id (uuid), as listed by GET /v1/profiles.

Request body

  • url string required

Responses

200 Navigated. The sentence says when the page was still loading after 15 s.

object

  • result string required

Example

{
  "result": "navigated to https://example.com"
}
400 The id is not a uuid, or the body is missing a field or has a value out of range.

object

  • error string required

Example

{
  "error": "invalid request: body must be JSON {node_id: integer}"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
409 The profile is not running, its tab is gone, or the page did not answer in time.

object

  • error string required

Example

{
  "error": "conflict: profile is not running; call launch_profile first"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/profiles/:id/navigate' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"url":""}'

Accessibility snapshot of a running profile's page, with [id=N] per element

GET /v1/profiles/:id/snapshot read

Accessibility snapshot of a running profile's page, with [id=N] per element.

Reads the running profile's page as an accessibility tree, one element per line with an [id=N] that click, type and set-file take. Nothing on the page changes. Stops at 150 elements or 64 KiB.

Path parameters

  • id string required

    Profile id (uuid), as listed by GET /v1/profiles.

Responses

200 The accessibility tree as text, one element per line with [id=N]; truncated past 150 elements or 64 KiB.

object

  • dialogs array<object>
    • accepted boolean required
    • kind "alert" | "confirm" | "prompt" | "beforeunload" required
    • message string required
  • text string required
  • truncated boolean required

Example

{
  "text": "- heading \"Example Domain\" [id=12]\n- link \"More information...\" [id=15]",
  "truncated": false
}
400 The id is not a uuid.

object

  • error string required

Example

{
  "error": "invalid request: not a uuid: 1234"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
409 The profile is not running, its tab is gone, or the page did not answer in time.

object

  • error string required

Example

{
  "error": "conflict: profile is not running; call launch_profile first"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/profiles/:id/snapshot' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Click the element with a node id from snapshot or wait-for-element, with a real mouse

POST /v1/profiles/:id/click write

Click the element with a node id from snapshot or wait-for-element, with a real mouse; refuses hidden or covered elements.

Moves the mouse to the element and clicks it on the real page, which may submit a form, follow a link or buy something. A JS dialog the click opens is answered (dismissed by default). Hidden or covered elements are refused.

Path parameters

  • id string required

    Profile id (uuid), as listed by GET /v1/profiles.

Request body

  • dialog "dismiss" | "accept"
  • node_id integer required
  • prompt_text string

Responses

200 Clicked. Any JS dialog the click opened is named in the sentence.

object

  • result string required

Example

{
  "result": "Clicked element [id=15]"
}
400 The id is not a uuid, or the body is missing a field or has a value out of range.

object

  • error string required

Example

{
  "error": "invalid request: body must be JSON {node_id: integer}"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 The node id is stale: the page changed since the snapshot. Call snapshot again.

object

  • error string required

Example

{
  "error": "not found: element [id=42] — the page changed since the snapshot; call snapshot for fresh ids, then retry"
}
409 The profile is not running, its tab is gone, or the page did not answer in time.

object

  • error string required

Example

{
  "error": "conflict: profile is not running; call launch_profile first"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/profiles/:id/click' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"node_id":1}'

Focus an element by node id and type text into it

POST /v1/profiles/:id/type write

Focus an element by node id and type text into it.

Focuses the element, clears it, and types the text key by key on the real page. At most 5000 characters per call.

Path parameters

  • id string required

    Profile id (uuid), as listed by GET /v1/profiles.

Request body

  • node_id integer required
  • text string required

Responses

200 Typed. The sentence notes a field that could not be cleared or did not change.

object

  • result string required

Example

{
  "result": "Typed 11 chars into element [id=21]"
}
400 The id is not a uuid, or the body is missing a field or has a value out of range.

object

  • error string required

Example

{
  "error": "invalid request: body must be JSON {node_id: integer}"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 The node id is stale: the page changed since the snapshot. Call snapshot again.

object

  • error string required

Example

{
  "error": "not found: element [id=42] — the page changed since the snapshot; call snapshot for fresh ids, then retry"
}
409 The profile is not running, its tab is gone, or the page did not answer in time.

object

  • error string required

Example

{
  "error": "conflict: profile is not running; call launch_profile first"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/profiles/:id/type' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"node_id":1,"text":""}'

Press one named key (Enter, Tab, Escape, arrows, Backspace, Delete, Space)

POST /v1/profiles/:id/press-key write

Press one named key (Enter, Tab, Escape, arrows, Backspace, Delete, Space).

Presses one named key on the real page, where focus is now; Enter may submit a form. A JS dialog the key opens is answered (dismissed by default).

Path parameters

  • id string required

    Profile id (uuid), as listed by GET /v1/profiles.

Request body

  • dialog "dismiss" | "accept"
  • key "Enter" | "Tab" | "Escape" | "ArrowDown" | "ArrowUp" | "ArrowLeft" | "ArrowRight" | "Backspace" | "Delete" | "Space" required
  • prompt_text string

Responses

200 Pressed. Any JS dialog the key opened is named in the sentence.

object

  • result string required

Example

{
  "result": "Pressed key: Enter"
}
400 The id is not a uuid, or the body is missing a field or has a value out of range.

object

  • error string required

Example

{
  "error": "invalid request: body must be JSON {node_id: integer}"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
409 The profile is not running, its tab is gone, or the page did not answer in time.

object

  • error string required

Example

{
  "error": "conflict: profile is not running; call launch_profile first"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/profiles/:id/press-key' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"key":"Enter"}'

Scroll a running profile's page by about a number of pixels in one direction, with mouse-wheel steps at the pointer

POST /v1/profiles/:id/scroll write

Scroll a running profile's page by about a number of pixels in one direction, with mouse-wheel steps at the pointer; reports the pixels scrolled.

Scrolls the real page with mouse-wheel steps at the pointer, styled after the profile's OS. Pages that load more content on scroll will load it.

Path parameters

  • id string required

    Profile id (uuid), as listed by GET /v1/profiles.

Request body

  • amount integer required
  • direction "up" | "down" | "left" | "right" required

Responses

200 Scrolled; the sentence gives the direction and pixels.

object

  • result string required

Example

{
  "result": "Scrolled down by 600px"
}
400 The id is not a uuid, or the body is missing a field or has a value out of range.

object

  • error string required

Example

{
  "error": "invalid request: body must be JSON {node_id: integer}"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
409 The profile is not running, its tab is gone, or the page did not answer in time.

object

  • error string required

Example

{
  "error": "conflict: profile is not running; call launch_profile first"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/profiles/:id/scroll' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"direction":"up","amount":1}'

Run JavaScript in a running profile's page

POST /v1/profiles/:id/evaluate write

Run JavaScript in a running profile's page; 64 KiB result cap, 10 s timeout.

Runs the JavaScript expression inside the running profile's page, with the page's own access to its cookies, storage and logged-in session. It can change or submit anything the page can. The result is cut at 64 KiB; the call gives up after 10 s.

Path parameters

  • id string required

    Profile id (uuid), as listed by GET /v1/profiles.

Request body

  • dialog "dismiss" | "accept"
  • expression string required
  • prompt_text string

Responses

200 The expression's value as text, cut at 64 KiB, with any JS dialog it opened.

object

  • dialogs array<object>
    • accepted boolean required
    • kind "alert" | "confirm" | "prompt" | "beforeunload" required
    • message string required
  • text string required
  • truncated boolean required

Example

{
  "text": "\"Example Domain\"",
  "truncated": false
}
400 The id is not a uuid, or the body is missing a field or has a value out of range.

object

  • error string required

Example

{
  "error": "invalid request: body must be JSON {node_id: integer}"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
409 The profile is not running, its tab is gone, or the page did not answer in time.

object

  • error string required

Example

{
  "error": "conflict: profile is not running; call launch_profile first"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/profiles/:id/evaluate' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"expression":""}'

Wait until a CSS selector matches and return the element's node id

POST /v1/profiles/:id/wait-for-element write

Wait until a CSS selector matches and return the element's node id.

Waits until the CSS selector matches an element on the running profile's page, up to timeout_ms (default 5 s, at most 30 s), and returns its node id for click, type or set-file to act on. Nothing on the page is changed; if the selector never matches, the call fails with 409 after the timeout.

Path parameters

  • id string required

    Profile id (uuid), as listed by GET /v1/profiles.

Request body

  • selector string required
  • timeout_ms integer

Responses

200 The node id of the first element the selector matched.

object

  • node_id integer required

Example

{
  "node_id": 21
}
400 The id is not a uuid, or the body is missing a field or has a value out of range.

object

  • error string required

Example

{
  "error": "invalid request: body must be JSON {node_id: integer}"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
409 The profile is not running, its tab is gone, or the page did not answer in time.

object

  • error string required

Example

{
  "error": "conflict: profile is not running; call launch_profile first"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/profiles/:id/wait-for-element' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"selector":""}'

Attach a file from the app's uploads folder to a file input by node id

POST /v1/profiles/:id/set-file write

Attach a file from the app's uploads folder to a file input by node id.

Attaches a file to a file input on the real page; the page can then upload it. Only files inside the app's uploads folder are accepted.

Path parameters

  • id string required

    Profile id (uuid), as listed by GET /v1/profiles.

Request body

  • node_id integer required
  • path string required

Responses

200 The file is attached to the input.

object

  • result string required

Example

{
  "result": "file set on node 30"
}
400 The id is not a uuid, or path is not a file inside the uploads folder.

object

  • error string required

Example

{
  "error": "invalid request: `path` must be a file inside the uploads folder ~/.veilus/uploads; copy the file there first"
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
404 The node id is stale: the page changed since the snapshot. Call snapshot again.

object

  • error string required

Example

{
  "error": "not found: element [id=42] — the page changed since the snapshot; call snapshot for fresh ids, then retry"
}
409 The profile is not running, its tab is gone, or the page did not answer in time.

object

  • error string required

Example

{
  "error": "conflict: profile is not running; call launch_profile first"
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request POST 'http://127.0.0.1:<port>/v1/profiles/:id/set-file' \
--header "Authorization: Bearer $VEILUS_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"node_id":1,"path":""}'

System

Return the current browser pool capacity and usage

GET /v1/capacity read

Return the current browser pool capacity and usage.

How many browsers may run at once on this plan and machine, and how many run now. A launch beyond max fails with 409 instead of queuing.

Responses

200 Pool capacity and current usage.

object

  • active integer required
  • max integer required
  • queued integer required

Example

{
  "active": 1,
  "max": 4,
  "queued": 0
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/capacity' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

Return the OpenAPI 3.1 document describing this REST API

GET /v1/openapi.json read

Return the OpenAPI 3.1 document describing this REST API.

Returns the OpenAPI 3.1 document of this API, built from the same catalog as this list. It describes every route's parameters, request body and each status it answers, with a real example. Nothing on this machine is read or changed.

Responses

200 The OpenAPI 3.1 document of this API.

object

  • components object required
  • info object required
  • openapi "3.1.0" required
  • paths object required
  • security array required
  • servers array required

Example

{
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "title": "Veilus local API",
    "version": "0.2.9"
  },
  "openapi": "3.1.0",
  "paths": {},
  "security": [
    {
      "bearer": []
    }
  ],
  "servers": [
    {
      "url": "http://127.0.0.1:{port}"
    }
  ]
}
401 No bearer token, or not a token this app issued. The body is empty: it never says which.

null

403 Refused by the plan: it no longer includes the local API (checked on every request), or it does not allow this action (profile or schedule limit, parallel runs). A request whose Host header is not loopback is also 403, with an empty body.

object | null

  • error string required

Example

{
  "error": "API access requires a paid plan."
}
500 Veilus failed: storage could not be read or written, or a task panicked. The message says what failed; retrying rarely helps.

object

  • error string required

Example

{
  "error": "internal error: list profiles: database is locked"
}

Code samples

Terminal window
curl --request GET 'http://127.0.0.1:<port>/v1/openapi.json' \
--header "Authorization: Bearer $VEILUS_API_TOKEN"

GET /v1/openapi.json returns the OpenAPI 3.1 document for this API (requires a token like any other route). The API & MCP page also has a Copy OpenAPI JSON button if you’d rather not curl it yourself.

The same document, built from the reference above, is also published here: download openapi.json.