Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cs2cap.com/llms.txt

Use this file to discover all available pages before exploring further.

Every error response from the CS2Cap API includes two fields: a stable machine-readable 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

StatusMeaning
400Bad request — the request was malformed or missing required parameters.
401Missing or invalid API key — no Authorization header was sent, or the key is not recognized.
403Insufficient permissions — the key is valid but your tier does not have access to this endpoint or feature.
404Not found — the requested resource does not exist.
409Conflict — the request conflicts with the current state of your account or a resource, for example exceeding portfolio limits.
422Validation error — the request was well-formed but failed semantic validation (for example, an invalid field value).
429Rate limit exceeded — you have hit either the per-minute or monthly request quota for your tier.
500Internal server error — an unexpected error occurred on the CS2Cap side.
503Service temporarily unavailable — the service or a specific data source is temporarily down.

Error payload format

Every error response uses the same JSON structure:
{
  "code": "AUTH_INVALID_API_KEY",
  "detail": "Invalid API key"
}
Use code for programmatic error handling. Use detail for logging or displaying context to users.

Error codes by category

CodeHTTP StatusDescription
AUTH_INVALID_API_KEY401The API key in the Authorization header is not recognized or is malformed. Check that you are sending Authorization: Bearer <your_key>.
AUTH_API_KEY_REVOKED401The API key has been revoked. Issue a new key from your account settings.
AUTH_ACCOUNT_DISABLED401Your account has been disabled. Contact support for assistance.
CodeHTTP StatusDescription
RATE_LIMIT_EXCEEDED429You have exceeded the per-minute request limit for your tier. Check the Retry-After header and wait before retrying.
RATE_LIMIT_MONTHLY_QUOTA_EXCEEDED429You have consumed your monthly request quota. Quota resets at the start of the next billing period or you can upgrade your tier.
When you receive a 429, read the Retry-After header. It contains the number of seconds you must wait before the next request will succeed. Retrying before that time will return another 429.The response also includes X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-RateLimit-Tier headers for monitoring your usage.
CodeHTTP StatusDescription
PRICES_INDEX_UNAVAILABLE503The prices index is temporarily unavailable. This is a transient condition — retry the request after a short delay.
BIDS_INDEX_UNAVAILABLE503The bids index is temporarily unavailable. This is a transient condition — retry the request after a short delay.
Index unavailability errors are temporary. They typically resolve within minutes. Implement an exponential backoff retry strategy with a cap of a few minutes.
CodeHTTP StatusDescription
PORTFOLIO_NOT_FOUND404The requested portfolio does not exist or does not belong to your account.
PORTFOLIO_LIMIT_REACHED409Your account has reached the maximum number of portfolios allowed on your current tier.
PORTFOLIO_ITEM_LIMIT_REACHED409The portfolio has reached its maximum item count. Remove items or upgrade your tier to add more.
CodeHTTP StatusDescription
VALIDATION_ERROR422One or more request parameters failed validation. The detail field describes which parameter is invalid and why.

Retry guidance

For 429 responses: Read the Retry-After response header. It contains the number of seconds to wait before retrying. Do not retry before that window expires.
HTTP/1.1 429 Too Many Requests
Retry-After: 12345
X-RateLimit-Limit: 500000
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 12345
X-RateLimit-Tier: pro
For 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.
Last modified on May 23, 2026