Skip to main content

Errors

The API uses standard HTTP status codes and returns errors in a consistent JSON envelope.

Error Response Format

{
  "ok": false,
  "error": "Invalid or expired JWT."
}
The ok field is always false on error. The error field contains a human-readable description of what went wrong.

Error Codes

CodeMeaningDescription
400Bad RequestThe request is malformed or missing required parameters. Check query parameters and request body.
401UnauthorizedNo valid credentials provided. The JWT is missing, expired, or malformed. Re-authenticate at id.briefedmedia.com.
403ForbiddenThe authenticated user does not have permission to access this resource. The JWT may lack the required products.consumer_signals claim, or the endpoint is restricted to a higher plan tier.
404Not FoundThe requested resource does not exist. Verify the endpoint path and any resource identifiers.
429Too Many RequestsRate limit exceeded on an AI-powered endpoint. Back off and retry after the duration specified in the Retry-After header. See Rate Limits.
502Bad GatewayAn upstream service returned an invalid response. This is typically transient. Retry after a brief delay.
503Service UnavailableThe service is temporarily unavailable due to maintenance or overload. Retry with exponential backoff.
504Gateway TimeoutAn upstream service did not respond in time. This may occur on complex AI-powered requests. Retry after a brief delay.

Example Error Responses

401 Unauthorized

{
  "ok": false,
  "error": "Invalid or expired JWT."
}

403 Forbidden

{
  "ok": false,
  "error": "Insufficient permissions. Your plan does not include access to this endpoint."
}

429 Too Many Requests

{
  "ok": false,
  "error": "Rate limit exceeded. Retry after 45 seconds."
}
The 429 response includes the following headers:
HeaderDescription
Retry-AfterSeconds to wait before retrying.
X-RateLimit-LimitMaximum requests allowed in the window.
X-RateLimit-RemainingRequests remaining in the current window.
X-RateLimit-ResetUnix timestamp when the rate limit window resets.

503 Service Unavailable

{
  "ok": false,
  "error": "Service temporarily unavailable. Please retry shortly."
}