Computer setup
Wake a user's computer before they need it.
RoutesOpen one for every field it takes and answers.
POST/v1/users/{user_id}/warmWake the user's computer now (for example when they open your app), so their next task starts without waiting.
Answers 200 when it is already up and 202 while it wakes. At most 10 computers wake at once per company (429 warm_limit), and a second call for one user within a minute rides the first. keep_ms keeps it awake that long once it is up, up to two minutes; calling again extends it.
Request2 fields
Path
user_idstringrequiredYour own id for the user, as you named them.
- Type
string
Body, if you send one
keep_msintegerKeep the computer awake this long once it is up, in ms: 1000 to 120000. Absent: it sleeps again soon after if nothing uses it. Calling warm again extends it.
- Limits
- 1000 to 120000.
Answers 200 or 2022 fields
user_idstringYour id for the user whose computer it is.
- Type
string
status"ready" | "waking"ready: the computer is up. waking: a wake started now; their next task starts without waiting once it lands.
- Type
"ready" | "waking"
await vestra.user('traveller-42').warm();vestra.user("traveller-42").warm()vestra users warm traveller-42# Create a user. Do it before their first ask to set their name and time zone. It is safe to repeat with the# same user_id.curl "$VESTRA_BASE_URL/v1/users" \ -H "Authorization: Bearer $VESTRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "user_id": "traveller-42", "name": "Priya Sharma", "timezone": "Asia/Kolkata" }' # Read their spend. Their profile shows what they spent today and this month, against their caps.curl "$VESTRA_BASE_URL/v1/users/traveller-42" \ -H "Authorization: Bearer $VESTRA_API_KEY" # Set a monthly cap. This one is 20 US dollars.curl -X PATCH "$VESTRA_BASE_URL/v1/users/traveller-42" \ -H "Authorization: Bearer $VESTRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "monthly_cap_usd": 20 }' # Wake their computer. Do it before they need it.curl -X POST "$VESTRA_BASE_URL/v1/users/traveller-42/warm" \ -H "Authorization: Bearer $VESTRA_API_KEY" # Open a page in their browser with no model, and keep the page's own data calls. The site must be in their# deployment's browser.allowed_domains.curl -X POST "$VESTRA_BASE_URL/v1/users/traveller-42/browser/fetch" \ -H "Authorization: Bearer $VESTRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://www.ixigo.com/search/result/flight?from=DEL&to=GOI&date=06112026&adults=2&class=e", "capture": [{ "match": "/flights/v2/search/stream" }] }' # Erase a user. It runs as a job: the response is 202 with deleted false and status deleting, and then# user.deleted says it is done.curl -X DELETE "$VESTRA_BASE_URL/v1/users/traveller-42" \ -H "Authorization: Bearer $VESTRA_API_KEY"{ "method": "tools/call", "params": { "name": "users_get", "arguments": { "user": "traveller-42" } }}POST/v1/users/{user_id}/browser/fetchOpen one page in a background tab of the user's own browser, with no model, and get back the bodies of the page's own data calls that match capture.
Only on sites the user's deployment lists in browser.allowed_domains (403 domain_not_allowed), and never on a page in its browser.blocked_paths, such as a payment page (403 page_blocked). Wakes the computer when it sleeps. Answers as soon as every required capture has its responses, with timings; 409 browser_in_use while a person drives the browser, 409 browser_busy past four at once; 504 timeout carries what came back in partial. frames returns small pictures of the tab at each milestone. A page_fetch step calls one of the deployment's sites from inside the page, as the page's own script would; keep_open_ms keeps the tab for the next fetch, which sends no url (409 no_open_tab when none is kept).
GET/v1/users/{user_id}/browser/cookiesWhich cookies of some names the user's browser holds for one site, and until when: names, sites and expiry only, never a value.
Only a site on the deployment's browser.allowed_domains (403 domain_not_allowed). Opens no page and acts on nothing, so it never disturbs a person using the browser: read it every few seconds to see a person finish signing in on a page you handed them (front), as the site's session cookie appears or its expiry moves on. Wakes the computer when it sleeps.
GET/v1/users/{user_id}/browser/watchWatch the browser fetch's tabs live, as text/event-stream.
Read only: allowed sites only, a tab on a blocked path is hidden, and it never wakes the computer.