Skip to main content
Fields may be added to /v1, but nothing in it will be renamed or removed without a new version. Agents should use the MCP tools. The TypeScript and Python clients send the idempotency keys, wait out the retries and page the lists described below for you. The examples on this page show curl and both clients. The console’s host serves the API, under /v1:
Requests and answers are JSON. Keys are snake_case, and every time is RFC 3339 in UTC (2026-11-14T09:00:00.000Z). The MCP host (https://mcp.hotkey.so) serves MCP only.

Authentication

Send an agent key in the Authorization header:
To make a key in the console, open Settings, then Connect your agent, then Tokens for scripts. You can also make one with POST /v1/agent_keys. The console shows each key once.
  • Production keys start with hk_live_. Keys made on a test hub such as staging start with hk_test_. A key sent to a hub of the other mode gets 401 key_wrong_mode, which names the mode the hub takes.
  • Keys from before November 2026 start with rbt_ and still work.
  • A key belongs to one workspace: your personal one, or a team you belong to. It works on /v1 and on MCP and reaches only that workspace’s browsers. Objects of other workspaces answer as if they don’t exist (404). To make a key for a team, switch to the team in the console first. If you leave the team or are removed from it, its keys stop working.
  • A key can be made for one browser (browser on POST /v1/agent_keys). It is the key to give an agent that works for one of your end users: it sees and reaches that browser alone, on /v1 and on MCP. Every other browser, with its tabs, asks, downloads and events, answers as if it doesn’t exist. It makes no browsers or keys, deletes not even its own browser, changes no workspace setting, and gets 403 key_scoped on /api. Its webhook endpoints get its browser’s events only. When the browser is deleted or moved to another workspace, the key stops working (401 key_revoked). See One browser per end user.
  • Keys that an agent gets by signing in over OAuth (Claude, ChatGPT, Claude Code’s /mcp) work on MCP only (401 key_mcp_only on /v1).
  • A key you revoked, or one that stopped working because its person left the team, answers 401 key_revoked for 90 days.
  • Ten wrong keys in 10 minutes from one address block that address for 10 minutes: every request from it gets 429 too_many_attempts, with good keys too. A revoked key, an expired one and a key of the other mode never count as wrong, so a script that still holds an old key can’t lock its address out.

Ids

Every id names its kind: A tab’s id is the number the agent’s tools use (1001, 1002 …). Routes also take a browser’s id without its brw_. If you send the wrong kind of id, the error says which kind you sent.

Errors

Every answer has a Request-Id header. An error answers with a 4xx or 5xx status and this body:
message is a sentence for people. Branch on code. param names the field at fault, or is null. Quote the request_id when you report a problem. The clients throw these as exceptions by status (NotFoundError, ConflictError, RateLimitError …), each carrying type, code, param, the request id and the whole error body:
A 429 browsers_busy means the call needed a browser to wake, and every browser your plan lets work at once was in use for the 20 seconds it waited (Plans and limits). Nothing ran; send it again after Retry-After (30 seconds). The error’s limit is the plan’s number. A browser gives its place up once nothing has used it for 15 seconds, and one kept awake only by an ask that nobody has open gives it up too. A 503 means the server was short of memory and couldn’t wake the browser in time (server_busy), or Hotkey is restarting for an update (restarting, for a few seconds). Try again after the Retry-After time. Errors that carry Retry-After also have it in the body, as retry_after in seconds.

Rate limits

Each key gets 25 requests a second on /v1, in bursts of up to 100. Past that, the answer is 429 rate_limited with a Retry-After header; wait that many seconds and send it again. Each key counts on its own, and so does the console of each person in each workspace.

Lists

Every list answers in the same shape:
The newest objects come first. limit is 1 to 100, and 20 by default. To get the next page, pass next_cursor back as starting_after. Events are the one exception, described below.
A script may delete what it reads, page by page: a starting_after that names a browser deleted since still gives the page after where it was. In the other lists, a cursor whose object is gone answers 400 parameter_invalid.

Retries

Send an Idempotency-Key header on any POST or PATCH. A key you sent in the last 24 hours with the same request gets the first answer back, with Idempotent-Replayed: true, and nothing runs twice. Use one key per action, for example one UUID per end user you make a browser for.
  • The same request means the same method, path and body, byte for byte. The same key with anything else gets 409 idempotency_key_reused.
  • Keys count per person and workspace: your key for a team and your personal key can use the same Idempotency-Key for two different actions.
  • While the first request still runs, the same key gets 409 idempotency_key_in_use. Try again once it has answered.
  • Only an answer that succeeded is kept. An error isn’t, 4xx or 5xx, so the same key runs the request again: a browsers_busy or browser_exists sent again with its key is tried anew, not answered from before.
  • Answers outlive Hotkey’s restarts and deploys, so a request that timed out during one is safe to send again.
The clients put a new key on every POST and PATCH and send the same one with each retry of it. Pass your own to make an action safe across runs of your code:
They also wait out 429 and 503 answers by their Retry-After, and try a lost connection or a 500, 502 or 504 again when the request is safe to repeat.

Your account

GET /v1/account

waiting is true while the account waits for a seat. While it waits, it can’t make browsers or keys (403 account_waiting). workspace is the workspace the key belongs to, and your role there: owner, admin or member. browsers counts that workspace’s browsers. For a key made for one browser, browser is that browser’s id and browsers is 1.

Workspaces

A workspace holds browsers, agent keys and app sign-ins. Every account has a personal workspace that only its owner uses. A team workspace has members, who all use its browsers and all get its asks on their phones.
  • People make teams, invite members by email and change roles in the console, under Settings, then Workspace. /v1 has no routes for that: a key works inside one workspace and changes none.
  • Owners and admins invite people, remove members, and move or delete the team’s browsers. Members use the browsers and add browsers and keys. Only an owner makes owners and admins.
  • When a member is removed or leaves, the keys and app sign-ins they made for the team stop working (401 key_revoked), and the webhook endpoints they made for it are deleted. The browsers stay with the team.
  • A browser moved to another workspace stops every key made for it alone, and takes its history with it: the new workspace’s GET /v1/events lists what happened in it before the move, and the old workspace’s lists it no more. The old workspace’s webhook endpoints get the browser.moved event, and those of the new one too.

GET /v1/workspace

The workspace the key belongs to (the console: the one in view).
plan is the workspace’s plan (Plans and limits): browsers it keeps and browsers_at_once it may run (null for no limit), and browsers_working now. A job that starts many agents at once can start as many as fit and queue the rest, instead of meeting 429 browsers_busy (a nightly run over every user). A key for one browser reads it too. The rest says why the limits are what they are:
  • status: free, active, trialing, past_due (a renewal that Stripe couldn’t charge: the plan stays while Stripe tries the card again), Stripe’s state of a plan that ended (unpaid, canceled), grace (a workspace from before plans keeps its old limits until grace_until), or before_billing.
  • renews_at, or ends_at for a plan cancelled at the end of its period.
  • payment_failed: at and free_from, the day Free’s limits apply if it still isn’t paid.
  • pending: a smaller plan that starts at the next renewal, and when.
  • awake_hours (Free; named before Free counted minutes): used_minutes, limit_minutes (100) and resets_at, the first of next month. used_minutes counts agent work and watching (what counts).
  • minutes: this month’s minutes by use, on every plan: agent, watched, waiting, other and plan_minutes (what Free counts).
  • captchas: the captchas Hotkey passed for the workspace’s agents in this period (used), the plan’s allowance (limit, null for none), whether it counts by day or month (per), and when it starts again (resets_at).
  • browsers_held: browsers asleep because the workspace has more than its plan keeps (402 browser_over_plan when asked to wake). None is deleted.
  • proxy (paid plans): addresses (its browsers on a fixed residential address), address_price_usd and address_price_per (month or year), and this month’s used_bytes, included_bytes, overage_bytes, overage_usd (billed so far, never past the cap), overage_per_gb_usd, cap_usd and stopped (Proxies).
Webhooks and GET /v1/events tell the backend when any of it changes: workspace.plan_changed, workspace.payment_failed, workspace.hours_used, workspace.proxy_data_low, workspace.proxy_cap_low, workspace.proxy_data_used.

PATCH /v1/workspace

Body: { "phone_alerts": false }, { "embed_origins": ["https://app.acme.com"] }, or both. embed_origins lists the origins whose pages may frame this workspace’s browsers (embeds); GET shows it too. With phone alerts off, nobody in the workspace gets a push for its asks or for its sites’ notifications. Asks still wait in the console’s Needs you and in GET /v1/asks, and webhooks still get ask.created. Turn them off for a product that tells its own end users about each ask: with them on, every member is pushed for every ask. In a team, only owners and admins change it (403 role_too_low); in the console it is under Settings, then Workspace.

Browsers

  • state is one of these:
    • asleep: parked, with nothing running.
    • waking
    • awake
    • napping: paused, and wakes in well under a second.
  • agent is idle, working, waiting (an ask is pending and the agent made no call since) or paused (the person paused the agent).
  • workspace is the workspace it lives in. account is the person whose personal workspace that is, and null for a team’s browser.
  • external_id is your own id for the browser, such as your end user’s id. It is unique in your workspace.
  • metadata holds up to 20 string values. Keys are up to 40 characters and values up to 500. Hotkey stores them and never reads them.
  • proxy never holds the password. It is null when the browser has no proxy.
  • usage is what the browser used this UTC month so far, as GET /v1/usage counts it.

GET /v1/browsers

Your browsers, newest first. Filters, all optional, and all of them must match:
  • external_id=user_829: the browser with that id.
  • q=…: every word in its name, its external_id or a metadata value, in any case, as part of it. A word with a colon (plan:pro) matches that metadata key’s value.
  • metadata[plan]=pro: that metadata key has exactly that value. Several may be given.
  • state=awake: its state now (asleep, waking, awake or napping).
A filtered list pages like any other. A parameter the route doesn’t take answers 400 parameter_unknown.

POST /v1/browsers

Every field is optional. Without a name, the browser is named after its external_id. Answers 201 with the browser.
  • If external_id is taken, the answer is 409 browser_exists, and the error’s browser field holds the existing browser’s id. Together with Idempotency-Key, this makes “one browser per end user” safe to retry.
  • The browser goes into the key’s workspace. How many browsers a workspace keeps is its plan’s (Plans and limits); past it the answer is 409 limit_reached.
  • country makes it go out from a country through one of Hotkey’s proxies, on a fixed residential address of its own, for $5 a month (Proxies): "auto" (the caller’s country as Cloudflare sees it, else the nearest with a free address, else Hotkey’s server), a two-letter code such as "FR", or "server". Paid plans only: on Free it answers 402 plan_has_no_proxies. A country with no free address answers 409 no_free_proxy, and no browser is made. Pass country or proxy, not both.
  • The browser’s egress says where it goes out: mode (pool, own or server), country, city, ip, time_zone, state (ok, down, auth-failed, checking), down_since, replacement_offered (its proxy has been down 10 minutes and the console offers another) automatic, and price on a pool address: amount_usd (5, or 50 on a yearly plan), per (month or year), included_gb (10) and overage_per_gb_usd (3). A browser on a proxy of Hotkey’s has proxy null.

GET /v1/browsers/{id}

PATCH /v1/browsers/{id}

Changes name, external_id, metadata, time_zone, languages, egress or default.
  • default: true makes it its workspace’s default browser, where an agent’s calls go when it never picked one. Only true is taken: to move the default, make another browser the default. A workspace’s first browser is its default, a new browser never takes it, and when the default is deleted or moved the oldest one left takes it. Every browser object has default. A key made for one browser can’t set it (403 key_scoped).
  • metadata merges into what is there. A key set to null is removed, and "metadata": null clears all of them.
  • egress: "server" turns its fixed residential address off (the address goes back, and its $5 stops from the next period), `"auto"` or a two-letter code gives it one ($5 a month, paid plans; 402 plan_has_no_proxies on Free, 409 no_free_proxy when none is free). An awake browser restarts to use it, and the change waits while an ask in it is open (409 ask_waiting).
  • Another country for a browser that already has an address is a new address: $5 on the next invoice, and the current one's $5 for this period is not credited. It answers 409 confirm_charge_required (with amount_usd) and changes nothing until you send "confirm_charge": true with it.
  • A new time zone or new languages apply from the browser’s next start.

DELETE /v1/browsers/{id}

Deletes the browser and everything in it, for good: profile, logins, saved passwords and passkeys, downloads, pictures, activity and backups. From the moment you call, the browser is gone from every list and route, and nothing can wake it.
  • 200 { "id", "object": "browser", "external_id", "deleted": true, "status": "deleted", "details", "pending" } when it was done within a second and a half, which is the usual case for a sleeping browser. pending lists what is still going, such as backup_drive while its backup is being removed.
  • 202 with "status": "deleting" when its browser was still stopping. The deletion goes on, and a browser.deleted event says when it is done.
DELETE /v1/browsers?external_id=user_829 does the same for the browser with that external_id.

POST /v1/browsers/delete

Deletes up to 100 browsers in one request, named by id, by external_id, or both:
Answers 202 with a list of { "id", "object": "browser", "external_id", "deleted": true, "status" }, one for each browser found, and not_found with the ids and external ids that matched no browser in the workspace. A name in not_found doesn’t stop the others, so a retry after a partial run is safe; with the same Idempotency-Key it gets the first answer back. Each browser deleted sends its own browser.deleted.

POST /v1/browsers/{id}/wake and /sleep

Wakes the browser or puts it to sleep, and answers with the browser. Sleep is refused (409 ask_pending) while an ask in it waits.

Tabs

GET /v1/browsers/{id}/tabs

state is active, resting, asleep or discarded. A discarded tab reloads when it is used. While the browser sleeps, the list shows the tabs it saved, which come back when it wakes.

Asks

An ask puts a step in front of a person, the way an agent does with request_human. The person’s phone gets a push, and the step shows in the console’s Needs you.
  • status is pending, done, cancelled, expired or tab_closed.
  • note is what the person wrote when they couldn’t do it.
  • In a team’s browser, member names the person whose agent asked, and answered_by the member who pressed Done or Can’t do it. Every member gets the push, and the first answer ends the ask.
  • link is the hand link. Send it to whoever should do the step. It opens that one tab without a sign-in. A pending ask has a link for its first 30 minutes, then null; the person still finds the ask in the console, where Copy link makes a new one, and POST /v1/asks/{id}/link (below) makes one too. Ended asks show null.
  • return_url is where the link’s page sends the person after they press Done or Can’t do it, or null.
  • save_sign_in says whether the link’s guest is offered to let the browser keep their sign-in (Sign-ins your users let the browser keep).

POST /v1/asks

  • Pass tab (a tab id) to ask in an open tab, or url to open a new tab.
  • reason is the one sentence the person reads.
  • timeout_minutes is 1 to 1440 (24 hours), and 1440 by default. The ask waits in the person’s Needs you that long; its link works for 30 minutes of it.
  • save_sign_in is optional, false by default: true offers the link’s guest, once their sign-in went through, to let the browser sign in to that site by itself next time (details).
  • return_url is optional: your app’s page to send the person back to after Done or Can’t do it. The link’s page says where it returns to, and goes there 2.5 seconds after the answer. It must be https, or http on localhost, 127.0.0.1 or a .localhost name, with no user name or password and at most 2,000 characters (400 parameter_invalid otherwise). Agents pass it to request_human the same way.
The call wakes a sleeping browser and answers 201 with the ask.

GET /v1/asks

Pending asks and those that ended in the last 7 days. Filter with ?browser= and ?status=. GET /v1/browsers/{id}/asks lists one browser’s asks.

GET /v1/asks/{id}

POST /v1/asks/{id}/cancel

Withdraws the ask, which takes it off the person’s phone and the console. Body: { "note": "…" }, optional. An ask that already ended answers 409 ask_resolved.

POST /v1/asks/{id}/link

Makes a new link for a pending ask, as Copy link does in the console, and answers with the ask and its new link. Use it when the link you sent ran out, or to send the step by email or text later than 30 minutes after the ask began.
  • The new link works for 30 minutes, and never past the ask’s end.
  • The link before it stops at once. Whoever opens it later reads that it has ended; the browser’s owner, signed in, goes to the ask in the console.
  • In an ask’s last 2 minutes there is no new link (409 ask_ending): it would stop almost at once. An ask that ended answers 409 ask_resolved.
To learn when the person finished, use the ask.done webhook, or read the ask again.

Saved sign-ins

GET /v1/browsers/{id}/sign_ins

The browser’s saved passwords, never the password itself:
saved_by is person (Save password? in the live view), console (added by hand), or link (the guest of an ask with save_sign_in, whose ask it names). The call wakes a sleeping browser.

DELETE /v1/browsers/{id}/sign_ins/{id}

Forgets one. sign_in then asks for the person again on that site.

1Password

PUT /v1/browsers/{id}/onepassword

Gives the browser a 1Password to sign in from (Sign in with 1Password). Body: token, a service account token (ops_…), or kind: "connect" with url (https) and the Connect server’s token. The browser checks the token by listing the vaults it reaches, and keeps it encrypted; no answer carries it again.
logins counts the logins with a website the vaults hold. 400 parameter_invalid for a malformed token or address, 400 onepassword_refused when 1Password refuses the token, 502 onepassword_unreachable when the browser can’t reach it. The call wakes a sleeping browser.

GET /v1/browsers/{id}/onepassword, DELETE /v1/browsers/{id}/onepassword

GET answers the same object without logins (connected: false when none is set). DELETE forgets the token; 404 onepassword_not_set when there was none.

Embeds

An embed shows one browser’s live view in an iframe on your own site (Embed the live view).

POST /v1/browsers/{id}/embed

Body: mode (view or interact, view by default), origins (some of the workspace’s embed_origins, all of them by default), sites (up to three; the embed keeps to tabs on them), expires_in (30 to 86400 seconds, 900 by default). Answers 201 with the embed, its token and its url, which this answer alone carries. Not kept under an Idempotency-Key: each call mints one. 409 embed_origins_missing when the workspace lists no origin, 400 origin_not_allowed for an origin off its list.

GET /v1/browsers/{id}/embeds, GET /v1/embeds/{id}

status is live, expired or ended, with ended_why (revoked, expired, origins-removed, browser-deleted, browser-moved).

DELETE /v1/embeds/{id}

Revokes it. A view open on it ends at once, and its page tells your page ended.

Downloads

  • state is downloading, done, failed or cancelled.
  • saved_from is site for a file a site sent, or page for a page saved as a PDF.
  • expires is when the file is deleted.
Downloads can be listed and fetched while the browser sleeps.

GET /v1/browsers/{id}/downloads

GET /v1/downloads/{id}

GET /v1/downloads/{id}/content

The file, as an attachment.

DELETE /v1/downloads/{id}

Events

What agents, people and Hotkey did in your browsers. These are the same events that webhooks send.

GET /v1/events

Events come oldest first, so a reader can follow the log.
  • Without starting_after, the answer has the newest limit events, and has_more is false.
  • With starting_after=evt_N, it has the next limit events after that one, and has_more is true when more are already there.
  • next_cursor is the last event’s id, or, on an empty page, where the log stands now. Keep passing it back to follow the log, from your first call on: a reader that starts before any event exists misses none.
  • Event ids only go up, across restarts too, but they skip numbers: compare them, never count on the next one being N + 1.
  • Hotkey keeps the last 1,500 events of each browser. A reader that falls further behind misses the older ones.
Filter with ?browser= and ?type=. A type can be exact (ask.done) or a group (ask.*).

Usage

What each of your browsers used, so you can bill your own users or find the one that takes every place. Counted per UTC day:

GET /v1/usage

  • from and to are dates (2026-11-01) or RFC 3339 times, in whole UTC days: from counts from the start of its day, a date in to is the first day not counted, and a time in to counts its own day. By default the range is this month so far, today included. At most 400 days, and Hotkey keeps 13 months.
  • Every browser in the workspace has a row, with zeros when it did nothing. A browser deleted in the range keeps its row, with browser.deleted true, so the month a user left can still be billed: its id and external_id stay, its name is null. Every row of a deleted workspace or account goes with it.
  • group_by=external_id gives one row per external_id, with the browsers it covers: a user whose browser was deleted and made again is one row. Browsers without an external_id share the row whose external_id is null, which comes last.
  • browser=brw_… and external_id=… keep one browser or one user.
  • Rows come in order of their id (the browser’s, or the external_id), 20 by default and up to 100 with limit, and page with starting_after like any list. total sums every row in the range, not only this page.
  • format=csv, or Accept: text/csv, answers every row as CSV, with no paging.
  • A key for one browser sees that browser’s row only.

Agent keys

oauth_client names the app for a key that an agent got by signing in. browser names the one browser a key reaches, or is null for a key of the whole workspace.

GET /v1/agent_keys

Your own keys in this workspace. ?browser= lists the keys made for one browser.

POST /v1/agent_keys

Body: { "name": "Nightly report" }, or { "name": "Agent for user_829", "browser": "brw_k3m9x2p7qa4t" } for a key that reaches that browser only. Answers 201 with the key and its secret, which is shown only here. The new key belongs to the same workspace as the key that made it, and its browser must be in that workspace.
  • A person keeps at most 50 keys of the whole workspace in each workspace.
  • Keys for one browser don’t count toward the 50; a browser has at most 5 of its own (409 limit_reached).
  • In the console, Tokens for scripts has a menu for the browsers a new token reaches.

DELETE /v1/agent_keys/{id}

Revokes the key at once.

Example

Make one browser per end user, ask the person to sign in, and wait for the answer:

The console’s own routes

The console uses routes under /api for its screens: the fleet, pictures, seats, site permissions, saved sign-ins and certificates. They keep working, but they change with the console. Use /v1 in your own code.