users
Manage the people who use your app. Each one is a user, named by your own id, and Vestra creates them the first time you name them. Here you can give a user a name and time zone, cap what they spend, export everything Vestra holds about them, or erase them.
Create a user
Do it before their first ask to set their name and time zone. It is safe to repeat.
await vestra.users.create('traveller-42', { name: 'Priya Sharma', timezone: 'Asia/Kolkata' });Read their spend
Their profile shows what they spent this month, and what is left under their cap.
const traveller = vestra.user('traveller-42');const profile = await traveller.get();console.log(profile.spend_month_usd, profile.caps_remaining.month_usd);Set a monthly cap
Then wake their computer, and export everything Vestra holds about them.
await traveller.update({ monthly_cap_usd: 20 });await traveller.warm(); // wake their computer before they need itconsole.log(await traveller.export());Erase a user
It runs as a job: deleted is false and status is deleting until user.deleted says it is done.
const erasing = await traveller.delete();console.log(erasing.deleted, erasing.status);List your users
const page = await vestra.users.list();console.log(page.data.length);Create a user
Do it before their first ask to set their name and time zone. It is safe to repeat.
vestra.users.create("traveller-42", name="Priya Sharma", timezone="Asia/Kolkata")Read their spend
Their profile shows what they spent this month, and what is left under their cap.
traveller = vestra.user("traveller-42")profile = traveller.get()print(profile.spend_month_usd, profile.caps_remaining.month_usd)Set a monthly cap
Then wake their computer, and export everything Vestra holds about them.
traveller.update(monthly_cap_usd=20)traveller.warm() # wake their computer before they need itprint(traveller.export())Erase a user
It runs as a job: deleted is False and status is deleting until user.deleted says it is done.
erasing = traveller.delete()print(erasing.deleted, erasing.status)List your users
print(len(vestra.users.list().data))List your users
vestra usersRead their spend
You see what one user spent, and what is left this month.
vestra users traveller-42Set a monthly cap
Then export everything Vestra holds about them, and wake their computer.
vestra users traveller-42 --cap 20vestra users export traveller-42vestra users warm traveller-42Erase a user
It runs as a job, and user.deleted says when it is done.
vestra users delete traveller-42 --yesCreate 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" } }}Good to know
User ids
Your id for a user is 1 to 128 characters and starts with a letter or digit. Reading a user never creates one. An unknown id on a read returns 404.
Erasing a user
DELETE /v1/users/{id} returns 202 with deleted: false and status: deleting. Vestra erases their computer, files and memory in the background, and the user.deleted event says when it is done.
Spending
A user's record shows what they spent today and this month, and how much they can still spend under their caps.
The key you need
Exporting or erasing a user needs a key with the admin scope, or all.
A page's own data, with no model
POST /v1/users/{id}/browser/fetch opens one page in a tab of the user's browser, with their sign-ins, and gives back the bodies of the page's own data calls that match capture. It can click, type, scroll and wait first (steps), and call the deployment's sites from inside the page (page_fetch). keep_open_ms keeps the tab, so the next fetch sends no url and runs there at once. It opens only sites in browser.allowed_domains, never a page in browser.blocked_paths such as a payment page (403 page_blocked), yields to a person with 409 browser_in_use, and answers a slow page with 504 timeout and what came in partial. POST /v1/users/{id}/warm with keep_ms keeps the computer awake for the next one.
The routes behind users9 routes, each with every field in the API reference
admin (or all)runtime (or all)admin (or all)admin (or all)admin (or all)runtime (or all)runtime (or all)runtime (or all)