Getting Started

Error Handling

All API errors follow a consistent JSON format with an appropriate HTTP status code.

Error Format

Every error response contains an error field with a human-readable message. Some errors include an optional code field for programmatic handling.

{
  "error": "Human-readable error message",
  "code": "OPTIONAL_ERROR_CODE"
}

HTTP Status Codes

ParameterTypeDescription
200OKRequest succeeded
400Bad RequestMissing or invalid fields in the request body
401UnauthorizedMissing, invalid, or expired API key
403ForbiddenThe resource does not belong to your account
404Not FoundThe requested resource does not exist
413Payload Too LargeFile size or storage quota exceeded
429Too Many RequestsRate limit exceeded — check Retry-After header
500Internal Server ErrorSomething went wrong on our end — retry or contact support

Error Codes

Some errors include a code field for programmatic handling:

ParameterTypeDescription
USER_QUOTA_EXCEEDED413Your brand has exceeded its storage quota. Includes limitMB and usedMB fields.
GLOBAL_QUOTA_EXCEEDED413Platform-wide storage limit reached. Try again later.

Example Error Response

413 — Storage quota exceeded
{
  "error": "Storage quota exceeded. You are using 4800 MB of your 5120 MB limit.",
  "code": "USER_QUOTA_EXCEEDED",
  "limitMB": 5120,
  "usedMB": 4800
}