detail field describing what went wrong.
Error envelope
detail wording may change between releases — match on status codes in your error handling, not on the string.
Status code matrix
Any credential problem is a
401: no header, an expired token, a malformed one, or a token whose account no longer exists. Refresh on 401 and retry once.The API returned 403 for expired tokens until July 2026. If your client still keys on 403, update it.Retrying
Retry429, 500, 502, 503, and 504 with exponential backoff:
The API already retries the upstream engine up to four times before it gives up, so a
503 means several attempts have failed. Wait longer than you would for a 500.Common error scenarios
Classification returns 400
The most likely cause is an empty request body. You must supply eitherText or Website (not both):
Text is capped at 1,000 characters and Website at 500 characters. Exceeding either limit returns 422.
Classification returns 402
Your free-tier quota is exhausted. The free tier does not reset — contact support@thedatacity.com for a paid plan.Classification returns 502 or 503
The upstream classification engine is temporarily unavailable. This is usually transient. Wait 30 seconds and retry. A timeout also arrives as503, because the API wraps timeouts in its own retry handling before returning. Don’t wait for a 504.