Unmasking APIsErrors

Unmasking Errors

All error responses and HTTP status codes for the Protecto Unmasking API.

The Unmasking API returns two distinct error response formats depending on the error type:

  • Application errors — return success, data, and error.message
  • Authentication errors — return a detail field

Application error format

{
  "data": null,
  "success": false,
  "error": {
    "message": "Payload is empty"
  }
}

Authentication error format

{
  "detail": "Not authenticated"
}

Error messages by category

HTTP statusError messageWhen it occurs
500Payload is emptyPayload is empty or unmask array contains empty objects
500unmask data missingThe unmask key is missing from the request
500Missing token value fieldtoken_value field is not present in an unmask object
500Missing token valuetoken_value field is present but empty

Retry behavior

HTTP statusScenarioRecommended action
500Payload or operation failureFix the request or retry with backoff
401Authentication or license issueRefresh token or contact help@protecto.ai

Unmasking is deterministic. Retrying the same request with the same token values does not change the stored token state.

Security considerations

  • Log error messages carefully to avoid leaking sensitive information in error outputs
  • Tightly control and audit access to unmasking endpoints
  • 401 errors indicate the token is invalid or expired — rotate tokens promptly