# GET /v1/users/{user_id}

> One user: status, profile, memory mode, default deployment, and what they spent today and this month against their caps.

In [Users API](https://vestra.ai/developers/reference/api/users.md): Your users: set one up, read their spend, change their cap, export or erase them.

Send `Authorization: Bearer vk_test_...` on every call.

One user: status, profile, memory mode, default deployment, and what they spent today and this month against their caps.

Your API key, scope `runtime` or `all`. On the card: [`users`](https://vestra.ai/developers/users.md). Every call here is a checked sample.

## Request

Path:

- `user_id` (`string`, required): Your own id for the user, as you named them.

## Answers 200

- `id` (`string`): Your own id for the user. Example: `traveller-42`.
- `object` (`"user"`): Always user.
- `name` (`string | null`): The user's name; null when you gave none.
- `email` (`string | null`): The user's email address; null when you gave none.
- `locale` (`string | null`): The user's language and region (BCP 47); null when you gave none.
- `timezone` (`string | null`): The user's time zone (IANA); null when you gave none, and their routines then run in UTC.
- `metadata` (`map of any`): Your own facts about the user; empty when you gave none.
- `status` (`"active" | "disabled"`): active, or disabled: a disabled user's calls are refused (403 user_disabled) until you turn them back on.
- `spend_cap_usd` (`number | null`): The user's own cap per day, in billed US dollars, never above your company's; null: your company's cap for each user, if any.
- `monthly_cap_usd` (`number | null`): The user's own cap per calendar month (UTC), in billed US dollars; null: your company's cap for each user, if any.
- `default_deployment` (`string | null`): The deployment their conversations use when none is named (dep_...); null: your company's default.
- `memory_mode` (`"vestra" | "customer" | "none"`): Where Bash's memory of this user lives: `vestra`, `customer` (your memory endpoint), or `none`.
- `is_service_user` (`boolean`): true for a user Vestra keeps for itself, such as your company's own Bash; false for your users.
- `created_at` (`string`): When the user was made, as an ISO 8601 time.
- `spend_today_usd` (`number`): What they have spent today (UTC), in billed US dollars. Example: `1.24`.
- `spend_month_usd` (`number`): What they have spent this calendar month (UTC), in billed US dollars. Example: `18.6`.
- `caps_remaining` (`object`): What is left under every cap that applies to them: the smaller of their own and your company's.
  - `day_usd` (`number | null`): What they may still spend today, in US dollars; null when no cap applies.
  - `month_usd` (`number | null`): What they may still spend this month, in US dollars; null when no cap applies.

## Code

**TypeScript**

```ts
const traveller = await vestra.user('traveller-42').get();
```

**Python**

```python
traveller = vestra.user("traveller-42").get()
```

**CLI**

```bash
vestra users traveller-42
```

**HTTP**

```bash
# 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"
```

**MCP**

```json
{
  "method": "tools/call",
  "params": {
    "name": "users_get",
    "arguments": { "user": "traveller-42" }
  }
}
```
