Skip to Content
HelvetlyDocs

Errors and rate limits

What an error looks like, what each status means and how to retry.

Error body

Every error has the same shape:

{
  "error": {
    "code": "validation_failed",
    "message": "Check the highlighted fields.",
    "details": { "fields": { "email": "Enter a valid email address." } }
  }
}

Branch on code, which is stable; message is for people and may change.

Status codes

StatusCodeMeaning
400invalid_requestThe request could not be read: malformed JSON or an unknown field.
401unauthenticatedNo token, or an unknown, expired or revoked one.
402plan_requiredThe workspace has no active plan: it is read-only until one is chosen.
402limit_reachedThe workspace's plan limit for this kind of record is reached.
403forbiddenYour role or permissions do not allow this.
403token_scopeThe token's scopes do not cover this operation.
403token_not_allowedThis part of the API is only available in the app.
404not_foundThe record does not exist in the token's workspace.
409(varies)The record's state does not allow this, for example issuing an issued invoice.
422validation_failedSome fields are invalid; details.fields names each one.
429rate_limitedToo many requests; wait as Retry-After says.
5xxSomething went wrong on our side; retry later.

Rate limits

Each token may make 600 requests a minute. Beyond that the API answers 429 rate_limited with a Retry-After header in seconds. Wait that long, then continue; spread bulk jobs out rather than retrying in a tight loop.

Retrying safely

  • Retry 429 and 5xx with a growing delay.
  • Do not blindly retry a POST that timed out: the record may have been created. List or get it first.
  • 4xx answers other than 429 will fail again unchanged: fix the request instead.

On this page