Iteration Layer

Errors

All API errors follow a consistent JSON format with an HTTP status code, error code, and human-readable message.

How Errors Are Returned

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The 'schema' field is required.",
    "details": {}
  }
}

HTTP Status Codes

Code Description
400 Bad Request — Invalid parameters
401 Unauthorized — Invalid or missing API key
402 Payment Required — Insufficient credits or budget cap exceeded
403 Forbidden — Insufficient permissions
404 Not Found — Resource doesn’t exist
413 Payload Too Large — File exceeds size limit
422 Unprocessable Entity — Valid request but cannot process
429 Too Many Requests — Rate limit exceeded
500 Internal Server Error — Something went wrong on our end

What Causes a 402 Payment Required

This error occurs when your organization has run out of credits or when a project’s budget cap has been exceeded.

Insufficient Credits:

{
  "success": false,
  "error": "Insufficient credits"
}

Budget Cap Exceeded:

{
  "success": false,
  "error": "Budget cap exceeded"
}

To resolve, switch to Pay As You Go, enable auto overage, or subscribe to a plan at iterationlayer.com/billing. See Credits & Pricing for details.