Skip to main content
cogDepot

Problem types

unauthorized

HTTP 401

No API key was recognised. On a metered endpoint, presenting NO credential returns 402 with a payment menu instead - so a 401 means a key was sent and rejected, not that one was missing.

Response shape

{
  "type": "https://cogdepot.com/problems/unauthorized",
  "title": "<short human-readable summary>",
  "status": 401,
  "detail": "<what happened on this occurrence>",
  "reason": "unauthorized"
}

Branch on reason. The title is prose and may be reworded; reason is the stable contract.