Skip to content

Errors and limitsPro

An error comes back with a status code and a JSON body. Most say why in reason, which is safe to check in code; message is for reading.

{
"message": "Only organisation admins can do that.",
"reason": "not_org_admin"
}
Status reason What it means
401 api_key_required, or none The key is missing, mistyped, revoked or expired.
402 Your organisation’s subscription has lapsed.
403 not_org_admin The admin who made the key isn’t an admin any more. Create a new key.
403 feature_unavailable Your organisation isn’t on the Pro plan.
403 api_key_not_allowed That address isn’t part of the API. Keys only reach the ones in this guide.
404 There’s nothing at that address. Check the path.
422 An option isn’t right. errors says which, and why.
429 Too many requests. Wait a minute and try again.

A 422 looks like this:

{
"message": "Ask for a year or less at a time.",
"errors": { "to": ["Ask for a year or less at a time."] }
}

Each key can make 60 requests a minute. That’s plenty for syncing leave every few minutes; if you need more, ask for a whole range with leave rather than one day at a time.

When you go over, you get a 429 with a Retry-After header saying how many seconds to wait.

Still stuck? Email hey@myfolke.com.