# Pagination

`GET /api/v1/vaults`

Endpoints that answer with a list are paginated, and they all page the same way. Pass page to move through the results and per_page to size them, between 1 and 100.

The meta object says which page this is, how many objects a page holds, and how many there are in total, so a caller knows when it has reached the last page.

Two short lists answer whole, with no meta: the notification channels and the fields a life event type asks for.

This endpoint also answers QUERY, with the same parameters sent in the request body. [How QUERY works](https://my.monicahq.com/docs/api/query-method).

## Query parameters

- `page` (integer, optional, defaults to 1): Which page to answer with.
- `per_page` (integer, optional, defaults to 25): How many objects one page holds, between 1 and 100.

## Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in `X-RateLimit-Remaining`.

## Request

```sh
curl https://my.monicahq.com/api/v1/vaults \
  -H "Authorization: Bearer $MONICA_TOKEN"
```

```javascript
const response = await fetch('https://my.monicahq.com/api/v1/vaults', {
  headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
```

```php
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/vaults');
```

## Response

`200`

```json
{
    "data": [],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 0
    }
}
```
