code, Request-Id, and traceparent when present. Those details separate a request problem from an account limit or a temporary service problem.
Make one safe reproduction with the same credential context. This checks that the key reaches a machine-authenticated route without exposing it in a URL or request body.
x-api-key; browser account actions use their documented signed-in browser flow.
Choose the next action from the response
Read the HTTP status and machine-readablecode together. The code explains the particular stop; the status tells you whether to correct, wait, or change account state.
For code-specific recovery, see the error code catalog. A successful health check or unrelated endpoint does not prove that a particular issuer, filing, or derived data surface is available.
Resolve account, billing, and quota stops
Use the failing workload’s key for both checks. A different key can have different plan, billing, or quota state.billing_budget_approval_required means a configured approval threshold stopped the request. billing_budget_hard_cap_exceeded means a configured hard cap stopped it. ai_query_quota_exceeded means the applicable AI-query allowance is exhausted. These are control signals, not transient failures: avoid a retry loop until the returned condition changes. See Agent billing, GET /v1/limits, and API keys, usage, and billing.
Investigate a result that is partial or surprising
A response can succeed at the HTTP layer while still carrying a route-specific limitation. Inspect returned capability, warning, provenance, period, freshness, and status-note fields where the route supplies them. Preserve the usable source evidence and show the limitation to your caller; do not silently substitute a different issuer, period, or data surface. For hosted MCP, confirm the client connects tohttps://api.secapi.ai/mcp, sends its configured API key for API-key authentication, and has refreshed its tool catalog. JSON-RPC -32004 indicates a tool execution-budget stop, -32005 an AI-query or MCP quota stop, and -32006 a tool-level protection stop. Narrow the request or wait for the applicable limit instead of issuing identical calls in parallel.
Escalate with a useful diagnostic
Include the method or tool name, a redacted request, UTC timestamp, HTTP status, error code,Request-Id, trace context, relevant response headers, and the outcome of GET /v1/limits with the same credential. For data results, include the returned filing or source identifiers. Exclude API keys, bearer tokens, cookies, and private payloads.
Use Request diagnostics for the exact capture checklist.
