Skip to main content
The Aiven API uses conventional HTTP status codes to indicate the success or failure of requests. Error responses include detailed information to help diagnose and resolve issues.

HTTP status codes

The API returns standard HTTP status codes:

Success codes (2xx)

200 OK
success
The request succeeded. The response body contains the requested data.
201 Created
success
A resource was successfully created. The response includes the new resource details.
202 Accepted
success
The request has been accepted for processing but is not yet complete. Common for long-running operations.
204 No Content
success
The request succeeded but there’s no content to return. Common for DELETE operations.

Client error codes (4xx)

400 Bad Request
error
The request is malformed or contains invalid parameters. Check your request body and query parameters.
401 Unauthorized
error
Authentication failed or no authentication token was provided. Verify your token is valid and properly formatted.
403 Forbidden
error
The authenticated user doesn’t have permission to access this resource. Check your organization and project permissions.
404 Not Found
error
The requested resource doesn’t exist. Verify the resource name or ID.
409 Conflict
error
The request conflicts with the current state of the resource. For example, trying to create a resource that already exists.
429 Too Many Requests
error
You’ve exceeded the API rate limit. Implement exponential backoff and retry logic.

Server error codes (5xx)

500 Internal Server Error
error
An unexpected error occurred on the server. Retry the request, and contact support if the issue persists.
503 Service Unavailable
error
The API is temporarily unavailable. Retry the request after a brief delay.

Error response format

Error responses follow a consistent JSON structure:
errors
array
Array of error objects with detailed information
message
string
Top-level error message summarizing the issue

Common error scenarios

Authentication errors

Validation errors

Resource errors

Rate limiting

429 - Too many requests

Error handling best practices

Implement exponential backoff for retrying failed requests, especially for 429 (rate limit) and 5xx (server error) responses.
Validate request parameters client-side before making API calls to avoid unnecessary round trips and rate limit consumption.
Log complete error responses including status codes, messages, and affected fields for easier troubleshooting.
Provide meaningful error messages to end users while logging technical details for debugging.
When encountering persistent 5xx errors, check the Aiven status page for ongoing incidents.
For critical operations, implement idempotency to safely retry requests without duplicating resources.

Rate limiting details

The Aiven API implements rate limiting to ensure fair usage:
  • Rate limits are applied per authentication token
  • Different endpoints may have different rate limits
  • When rate limited, wait for the time specified in the error message
  • Implement exponential backoff starting with a 1-second delay

Getting help

If you encounter persistent errors or unexpected behavior:
  1. Check the full API documentation for endpoint-specific details
  2. Review the Aiven status page for service incidents
  3. Search the Aiven community forum for similar issues
  4. Contact Aiven support with error details and request IDs