Error Codes

The Keymint API employs a structured error-handling approach, combining standard HTTP status codes with custom error codes. This ensures clear and actionable insights for developers. Below is a detailed breakdown of the error responses:


Error Code Reference

HTTP Status CodeError Code (code)DescriptionPossible Causes / Notes
200 OK0Success: Request completed.Operation successful. Check message for details.
400 Bad Request1Malformed Request: Missing/invalid params.Check required fields (productId, licenseKey, etc.) and formatting (expiryDate).
401 Unauthorized1Invalid Token: accessToken missing, invalid, expired, or lacks scope.Verify token validity, expiry, and productId permissions.
403 Forbidden2Operation Restricted: License state prevents action.Examples: Expired, activation limit, inactive, blocked.
404 Not Found1 or 2Resource Not Found: Product, license, customer, or device.Verify IDs (productId, licenseKey, hostId, customerId). code: 2 specific to ‘Customer not found’ in create.
409 Conflict2Resource Conflict: State prevents request.Example: Creating customer (/create-key) with existing email.
429 Too Many Requests3Rate Limit Exceeded.Use exponential backoff. Applies mainly to activation/validation.
500 Internal Server Error1Server Error: Unexpected issue.Server-side problem (DB, code). Check specific message. Contact support if persistent.

Additional Notes

Error Code Context

Rate Limiting (429)

Server Errors (500)

code Field

By understanding these error codes and their meanings, developers can implement robust error handling and improve the resilience of their applications interacting with the Keymint API.