Next CapNext Cap

Errors & Rate Limits

HTTP status codes, error response format, and rate-limiting headers.

HTTP Status Codes

200
Success

Request completed successfully.

201
Created

Resource created successfully.

400
Bad Request

Invalid request body or parameters.

401
Unauthorized

Missing or invalid authentication credentials.

403
Forbidden

Valid credentials but insufficient permissions.

404
Not Found

The requested resource does not exist.

429
Too Many Requests

Rate limit exceeded. Retry after the reset window.

SSE
quota_exceeded

Monthly message quota reached. Upgrade your plan.

500
Internal Error

Unexpected server error. Contact support if persistent.

Error Response Format

Error Responsejson
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request body",
"details": [
{
"field": "email",
"message": "Must be a valid email address"
}
]
}
}
Authentication Errorjson
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired access token"
}
}
Rate Limit Errorjson
{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests. Please retry after 42 seconds.",
"retryAfter": 42
}
}

Rate Limits

All API endpoints are rate-limited. Rate limit information is included in every response via headers.

X-RateLimit-Limit

Maximum requests allowed in the current window.

X-RateLimit-Remaining

Number of requests remaining in the current window.

X-RateLimit-Reset

Unix timestamp (seconds) when the rate limit resets.

Default rate limit: 60 requests per minute per API key. Enterprise plans may have higher limits.