Skip to main content

Error Schema

We use standard HTTP response codes for success and failure notifications.
For validation errors (400), details contains an array of field-specific errors. For all other errors, details is a string error code.

validation_error

  • Status: 400
  • Message: Invalid request parameters.
  • Suggested action: Check the details array for specific field errors. Ensure all required fields are included and properly formatted.

missing_api_key

  • Status: 401
  • Message: Authentication required.
  • Suggested action: Include the Authorization header: Authorization: Bearer leo_xxxxxxxxx

invalid_api_key

  • Status: 403
  • Message: Insufficient permissions.
  • Suggested action: Verify your API key has the required permissions for this endpoint.

not_found

  • Status: 404
  • Message: Resource not found.
  • Suggested action: Verify the resource UUID is correct and the resource exists.

duplicate_resource

  • Status: 409
  • Message: Resource already exists.
  • Suggested action: Check for existing resources before creating duplicates.

rate_limit_exceeded

  • Status: 429
  • Message: Rate limit exceeded.
  • Suggested action: Reduce request frequency. Implement exponential backoff. Contact support if you need higher limits.

internal_server_error

  • Status: 500
  • Message: Internal server error.
  • Suggested action: Retry the request after a brief delay. If the error persists, contact support.