API errors

Every error is application/problem+json. The `type` URL of each response points at its row below, `code` is stable, and `detail` is safe to show to a user.

Back to the API reference. Note that this API never answers 403: permission failures are 400 with code forbidden, because the CDN in front of it rewrites 403 responses.

CodeStatusMeaning
invalid_request400Invalid request. The input failed validation. `issues[]` lists the offending paths.
invalid_cursor400Invalid cursor. The cursor belongs to a different operation or is malformed. Restart the listing.
invalid_origin400Invalid origin. A dashboard-session call arrived without an allowed Origin header. Server clients use an API credential instead.
forbidden400Forbidden. The caller's role or the credential's scopes do not include the permission, or the operation is dashboard-session only. Sent as 400 because the edge cannot carry a 403 body.
unauthenticated401Unauthenticated. No bearer token was sent.
invalid_token401Invalid token. The bearer is expired, revoked, or not one we issued.
delegate_access_revoked401Delegate access revoked. The delegate behind this credential no longer has access to the channel.
plan_limit_reached402Plan limit reached. A plan limit blocks the action; `detail` says which and the dashboard billing page can lift it.
not_found404Not found. No such resource in this channel, or the path matches no operation.
method_not_allowed405Method not allowed. The path exists but not for this HTTP method; `Allow` lists the valid ones.
conflict409Conflict. The resource changed underneath the request: a queue row already decided, a manual-reply race, or an in-progress idempotent request.
rate_limited429Too many requests. Too many requests for the profile or the credential. Honour `Retry-After`.
upstream_error502Upstream error. YouTube or the reply generator failed. Safe to retry with the same Idempotency-Key.
youtube_quota503YouTube quota exceeded. YouTube API quota is being protected. Retry after the `Retry-After` window.
internal_error500Internal error. Unexpected failure; the `requestId` identifies it in our logs.

Example body:

{
  "type": "https://www.commentshark.com/docs/api/errors#invalid_request",
  "title": "Invalid request",
  "status": 400,
  "code": "invalid_request",
  "detail": "Invalid request.",
  "requestId": "…"
}