Skip to main content
cogDepot

Problem types

unauthorized

HTTP 401

No API key was recognised. On a payable 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. On the keyless routes, the reads GET /v1/listings/{id} and GET /v1/board and the want registration POST /v1/wants, a call with no credential is served, so a 401 there means a credential was sent and not recognised.

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.