code you can branch on in code, and a human-readable detail string you can surface to users or log for debugging. You never have to parse error message text to determine what went wrong.
HTTP status codes
Error payload format
Every error response uses the same JSON structure:code for programmatic error handling. Use detail for logging or displaying context to users.
Error codes by category
Authentication errors
Authentication errors
Rate limit errors
Rate limit errors
Data index errors
Data index errors
Index unavailability errors are temporary. They typically resolve within minutes. Implement an exponential backoff retry strategy with a cap of a few minutes.
Portfolio errors
Portfolio errors
Validation errors
Validation errors
Retry guidance
For429 responses and bulk-stream 409 conflicts: Read the Retry-After response header. It contains the number of seconds to wait before retrying. Do not retry before that window expires.
503 responses: The service or a specific index is temporarily unavailable. These errors are transient — retry after a short delay using exponential backoff. If the error persists beyond a few minutes, check the CS2Cap status page.