Errors and limits

Error format, response codes and API limits.

Error format

Every error has the same shape:

{
  "error": {
    "code": "INVALID_INPUT",
    "message": "Invalid input for this action.",
    "issues": ["name: Required"]
  }
}

code is stable, so branch on it in your code. message is for people and may change. issues comes only with invalid input.

Response codes

HTTPcodeMeaning
400INVALID_INPUTThe input doesn't match the action's schema, see issues
400INVALID_JSONThe body isn't a JSON object
400IDEMPOTENCY_KEY_INVALIDidempotencyKey isn't 1 to 255 characters long
400an app codeThe action couldn't be done, e.g. API_KEY_LIMIT_REACHED
401UNAUTHORIZEDThe key is missing, invalid, revoked or expired
403INSUFFICIENT_SCOPEA read key tried to write
403FORBIDDEN or an app codeYour role in the app doesn't allow this action
404UNKNOWN_ACTIONThe action doesn't exist or isn't available through the API
404e.g. INVOICE_NOT_FOUNDThe record doesn't exist or you can't access it
409e.g. TAG_NAME_EXISTSThe record already exists or changed in the meantime
409IDEMPOTENCY_KEY_REUSEDThe same idempotencyKey was used with a different input
409IDEMPOTENCY_KEY_PENDINGThe first request with this idempotencyKey hasn't finished
429RATE_LIMITEDToo many requests, see the Retry-After header
500INTERNAL_SERVER_ERRORSomething went wrong on our side

Limits

  • 300 requests a minute per key. Above that you get 429 with a Retry-After header in seconds.
  • One action may run for up to 60 seconds.
  • Uploads: up to 20 files at once, each up to 20 MB.

Retrying

Retry only 429, 5xx and timeouts, waiting longer each time. Retrying a 4xx doesn't help. Send actions that create or send something with an idempotencyKey and reuse the key when you retry: Moniary runs them once (see Actions). Without a key, a repeated request runs again. If IDEMPOTENCY_KEY_PENDING lasts more than a minute, the first request failed unexpectedly: check with a read action whether it went through before sending it with a new key.