Skip to main content

Error Response Format

All APIs return structured JSON error responses with three components:
{
  "error": "VALIDATION_ERROR",
  "message": "The request contains invalid parameters",
  "details": {
    "field": "email",
    "issue": "Must be a valid email address"
  }
}
FieldDescription
errorMachine-readable error code
messageHuman-readable description of the error
detailsAdditional context about which field or parameter caused the issue

HTTP Status Codes

StatusCodeDescription
Unauthorized401Authentication token is missing or has expired — request a new token
Bad Request400The request contains invalid or malformed parameters
Not Found404The requested resource (template, user, presentation, etc.) doesn’t exist
Internal Server Error500An unexpected error occurred on the server — contact the didx:me team

Common Errors

Your access token is missing, expired, or invalid.Fix: Request a new access token from the authentication endpoint. Tokens expire after 300 seconds (5 minutes).
{
  "error": "UNAUTHORIZED",
  "message": "Access token is missing or expired"
}
The request body contains invalid data. Check the details field for which parameter is causing the issue.
{
  "error": "VALIDATION_ERROR",
  "message": "The request contains invalid parameters",
  "details": {
    "field": "email",
    "issue": "Must be a valid email address"
  }
}
The resource you referenced doesn’t exist. This typically means a template ID, user ID, or presentation ID is incorrect or has been deleted.
{
  "error": "NOT_FOUND",
  "message": "Credential template not found"
}
An unexpected error occurred on the server. This is not caused by your request. Retry the request after a short delay — if the issue persists, contact the didx:me team.
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred"
}