# POST /v1/users/{user_id}/export

> Package everything held for the user into one download, for data-rights requests.

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.

Package everything held for the user into one download, for data-rights requests.

Your API key, scope `admin` or `all`. On the card: [`users`](https://vestra.ai/developers/users.md). Over HTTP it is made from the contract: fill in each {…} and every value.

## Request

Path:

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

## Answers 200

- `object` (`"user_export"`): Always user_export.
- `url` (`string`): A link to everything Vestra holds for the user, as one JSON file: good for 15 minutes.
- `expires_at` (`string`): When the link stops working, as an ISO 8601 time.
- `bytes` (`integer`): The size of the file, in bytes.
- `truncated` (`boolean`): true when the user has more than the 200 tasks it holds: the oldest are left out.

## Code

**TypeScript**

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

**Python**

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

**CLI**

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

**HTTP**

```bash
curl -X POST "$VESTRA_BASE_URL/v1/users/{user_id}/export" \
  -H "Authorization: Bearer $VESTRA_API_KEY"
```

**MCP**: No sample in your language for this route, so here it is over HTTP.
