Skip to main content

Errors

The Licentric API uses standard HTTP status codes and returns a consistent error response format for all error conditions.

Error Response Format

All error responses follow the same structure with a human-readable message, a machine-readable error code, and the HTTP status.

Error Response
{
  "error": "Human-readable description of the error",
  "code": "ERROR_CODE",
  "status": 400
}

Example Errors

Validation Error

400Invalid request body
json
{
  "error": "productId is required",
  "code": "VALIDATION_ERROR",
  "status": 400
}

Authentication Error

401Missing or invalid credentials
json
{
  "error": "Invalid or expired API key",
  "code": "UNAUTHORIZED",
  "status": 401
}

Conflict Error

409Invalid state transition
json
{
  "error": "Cannot suspend a revoked license",
  "code": "CONFLICT",
  "status": 409
}

HTTP Status Codes

StatusTitleDescription
400Bad RequestThe request body failed validation. Check the error message for details on which fields are invalid.
401UnauthorizedMissing or invalid authentication credentials. Verify your API key or license key.
403ForbiddenThe authenticated key lacks the required scopes for this operation.
404Not FoundThe requested resource does not exist or has been soft-deleted.
409ConflictInvalid state transition. For example, attempting to suspend an already-revoked license.
422Unprocessable EntityThe request is syntactically valid but violates a business rule, such as exceeding machine limits.
429Too Many RequestsRate limit exceeded. Check the Retry-After header for when to retry.
500Internal Server ErrorAn unexpected error occurred. If this persists, contact support.