API

Errors

How the Knips Public API reports errors.

Every error uses the same JSON body and a standard HTTP status code, so you can handle them uniformly.

Error shape

{
  "statusCode": 403,
  "timestamp": "2026-06-11T12:00:00.000Z",
  "path": "/feeds",
  "message": "Forbidden resource",
  "traceId": "05936e045971f13204f944f5f9e8c770"
}
  • statusCode — the HTTP status, repeated in the body.
  • timestamp — when the error happened, as an ISO 8601 string.
  • path — the request path that failed.
  • message — a human-readable explanation. May change; don't match on it.
  • traceId — identifies the request in our systems. Include it when contacting support.

Status codes

StatusMeaning
400A query parameter or body failed validation. The message lists the offending fields.
403The API key is missing, invalid, or doesn't have permission for this endpoint.
404No such route or resource.
413The request body exceeds the 2 MB limit.
429Rate limit exceeded. The Retry-After header says how many seconds to wait.
500An unexpected error on our side.
503Key verification was briefly unavailable on our side — retry with backoff.

The list isn't exhaustive — other statuses can show up in rare cases, so branch on ranges (4xx vs 5xx) rather than exact codes. The infrastructure in front of the API can also produce plain 502/504 responses without this JSON body if the service itself is unreachable.

Handling errors

  • Branch on the HTTP statusmessage is for humans and may change.
  • 403 → check that your API key is present, valid, and has the permission the endpoint requires.
  • 429 → you hit a rate limit — keys get 60 requests per minute across all regions, and quick bursts above ~20 requests can be cut off sooner. Wait out the Retry-After header and pace your requests.
  • 5xx → transient and usually not your fault. Retry idempotent requests (like GET) with exponential backoff and jitter. Don't blindly retry requests that create or modify data — the original request may have gone through, so check its effect first.

Keep the traceId from any unexpected error — it lets us trace the exact request through our systems when you contact support.

On this page