# Rate limits

`POST /api/v1/login`

No token required.

Most endpoints allow sixty requests per minute. Register and log in allow six, because they take a password and a looser limit would make them a way to guess one.

The sixty are counted per user, not per key. Every key you make, and every device syncing over CardDAV, draws on the same budget, so making another key does not raise it.

Every answer carries the budget left in X-RateLimit-Remaining. A request over the limit answers 429 and says in Retry-After how many seconds to wait.

## Rate limit

Six requests per minute, per address. Every answer carries the budget left in `X-RateLimit-Remaining`.

## Request

```sh
curl https://my.monicahq.com/api/v1/login \
  -X POST
```

```javascript
const response = await fetch('https://my.monicahq.com/api/v1/login', {
  method: 'POST',
})
const data = await response.json()
```

```php
$response = Http::post('https://my.monicahq.com/api/v1/login');
```

## Response

`429`

```json
{
    "message": "Too Many Attempts."
}
```
