Rate limits

The Akiles API limits how many requests a client can make. The limits keep the platform fast for everyone, and stop a client with a bug (for example, a loop) from causing problems.

A well-built integration does not get near the limits. If you get a 429 response, it usually means that the integration does much more work than it needs. See How to stay under the limits.

How the limits work

Each limit is a bucket of requests:

For example, “3600, then 6 per second” means: 3600 requests at once, and after that 6 requests per second on average. A client that makes 6 requests per second or less never gets a 429.

API requests

Each OAuth application can make 3600 requests at once, then 6 per second, for each organization.

If your application is connected to many organizations, each organization has its own bucket. The requests that you make for one organization do not use the bucket of another organization.

A WebSocket connection to /v2/ws counts as one request when it opens. The events that it receives do not count.

Access tokens

You can refresh an access token (POST https://auth.akiles.app/oauth2/token with grant_type=refresh_token) 20 times at once, then 1 time every 10 minutes, for each organization.

An access token is valid for 1 hour (see Token types). You need about 1 new token per hour for each organization. Do not get a new access token for each API call:

Invitation emails

When you add an email to a member (POST /members/{id}/emails), Akiles sends an invitation email to that address. One address gets at most 3 invitations per day from one organization.

Above this limit, Akiles does not send the invitation email. The API call still succeeds, and the email is added to the member. There is no 429 for this limit.

Add the email address of the person who uses the access, for example the guest of a reservation. If you do not have it, give the member a PIN or a magic link (see Credentials).

Reveals

Each reveal of a PIN, a magic link or a member token (POST .../reveal) is recorded as an event in the organization’s log. Each OAuth application can reveal 500 at once, then 1 every 10 minutes, for each organization.

You almost never need to reveal:

Reveal only the PINs, magic links and member tokens that someone else created, for example an administrator in the admin panel, and only once.

The 429 response

When a request is above a limit, the API returns HTTP status 429 Too Many Requests and a Retry-After header. Retry-After is the number of seconds to wait before you try again.

HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Retry-After: 12

{
    "type": "rate_limited",
    "message": "Too many attempts, try again later",
    "args": {
        "retry_after": 12
    }
}

The token endpoint uses the OAuth 2.0 error format:

HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Retry-After: 300

{
    "error": "rate_limited",
    "error_description": "Too many access tokens requested. An access token is valid for an hour: use it until it expires",
    "error_hint": "Retry in 300 seconds."
}

A request that gets a 429 was not done. Send it again after Retry-After seconds.

How to stay under the limits

If your integration needs more than these limits, contact us at support@akiles.app. Tell us what the integration does and how many requests it needs.