Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Errors

Understand how Coop responds to API requests and errors.

HTTP status codes

StatusMeaning
200 OKRequest succeeded; response body contains data
202 AcceptedItem submission received and queued for async processing
204 No ContentRequest succeeded; no response body (e.g. report and appeal submissions)
400 Bad RequestInvalid request: malformed JSON, missing required fields, or schema mismatch (e.g. a report referencing a non-existent item). See error body for details.
401 or 403Authentication failure: API key is missing, invalid, or expired
429 Too Many RequestsRate limit exceeded
500 or 503Internal server error. Typically transient; safe to retry
502 or 504Gateway or dependency error: an upstream service is unavailable; retry

Error response format

All 4xx errors return a JSON body in this format:

{
  "errors": [
    {
      "status": 400,
      "type": ["/errors/invalid-user-input"],
      "title": "Short error description",
      "detail": "Detailed explanation of the problem (optional)",
      "pointer": "/path/to/problematic/field (optional)",
      "requestId": "correlation-id (optional)"
    }
  ]
}
FieldDescription
statusHTTP status code
typeArray of error type identifiers
titleShort human-readable summary
detailAdditional context about the error, if available
pointerJSON pointer to the field that caused the error, if applicable
requestIdCorrelation ID for tracing