AUDRIEDOCS

Errors

Every status and error code the Audrie API returns, and what to do about each.

Audrie uses conventional HTTP status codes. Codes in the 2xx range indicate success. Codes in the 4xx range indicate a request that failed as sent — a malformed hash, a credential problem, or a rate limit. Codes in the 5xx range indicate a problem on our side, and are rare.

A determinate verification outcome is not an error. A hash with no record returns 200 with a verdict of no_record. Reserve error handling for 4xx and 5xx.

Status codes

StatusNameMeaning
200OKThe request succeeded. On a verification, read verdict.
400Bad RequestThe request is malformed — most often a hash that is not sha256: followed by 64 lowercase hex characters.
401UnauthorizedThe credential you sent is not usable, or the operation requires one and you sent none. Omitting the header on POST /v1/verifications is not an error; it serves the public tier.
402Payment RequiredAPI access is not enabled for the organisation.
403ForbiddenThe credential is valid but not permitted to perform this call.
404Not FoundThe resource does not exist for this organisation and environment.
413Payload Too LargeThe request body is too large.
429Too Many RequestsRate limit exceeded. Back off using Retry-After.
500Internal Server ErrorSomething failed on our side. Retry with backoff.
503Service UnavailableAudrie could not answer the request. Retry with backoff.

Error codes

Branch on error.code. error.message is written for a human and changes without notice.

CodeStatusWhat to do
VALIDATION_FAILED400Read error.details for the offending field and fix the request.
UNAUTHENTICATED401Check the credential, and send exactly one Authorization header. Which of several causes made a supplied credential unusable is not distinguished.
PAYMENT_REQUIRED402Enable API access for the organisation. On POST /v1/verifications you can drop the Authorization header and keep verifying at the public tier.
FORBIDDEN403Grant the key the verifications:read scope, or stop sending an Origin header — call from your server.
NOT_FOUND404Check the id. See the operation's own Errors note for what it does and does not distinguish.
PAYLOAD_TOO_LARGE413Shorten the request. The largest legal body is a 71-character hash and a 128-character reference.
RATE_LIMITED429Wait Retry-After seconds. X-RateLimit-Remaining tells you how much budget is left.
INTERNAL_ERROR500Retry with backoff. No record is modified; see Retries below.
SERVICE_UNAVAILABLE503Retry with backoff. Your credential is still valid — do not rotate it in response to this.

The envelope

Every error shares one shape, across every Audrie API.

{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "Validation failed",
    "details": { "originalDocHash": "must match sha256:<64 hex chars>" }
  }
}

details is present on validation failures and carries one message per offending field.

Rate limits

Anonymous requests are limited per client IP. Credentialed requests are limited per credential and per organisation, so one integration cannot starve another and a shared corporate egress IP is not a shared budget.

A credential raises your limit once your organisation is validated. Until then a key is served at the anonymous limit, like any other public-tier request — see Disclosure tiers.

X-RateLimit-Limit and X-RateLimit-Remaining report the tightest limit that applies, and are present on normal and rate-limited responses alike. Read them when present rather than requiring them. X-RateLimit-Remaining is a budget rather than a guarantee: a 429 is still possible under load. A 429 also carries Retry-After.

Retries

Every operation is safe to retry: none of them modifies a record.

A credentialed POST /v1/verifications is recorded each time it succeeds, under a new verificationId. So a retry after a timeout can produce two rows for one document. Reconcile on verificationId, not on a count of attempts.

A 503 is never a reason to rotate a key

A 401 means stop and fix your credential. A 503 means retry — the credential is still valid and nothing about your organisation has changed. Rotating a key in response to a 503 turns a transient failure into an outage of your own.

On this page