Skip to main content
The Aiven API provides programmatic access to the Aiven platform, allowing you to automate service management, integrate with existing systems, and build custom workflows.

Use cases

The Aiven API is ideal for:

CI/CD integration

Create test services during CI runs and tear them down automatically

Custom automation

Build custom tools and scripts for your specific workflows

Scheduled operations

Deploy and manage development or demo environments on a schedule

Dynamic scaling

Scale disk space based on metrics or events

Getting started

1

Create an authentication token

Generate a personal token from the Aiven Console:
  1. Click your user icon and select Tokens
  2. Click Generate token
  3. Provide a description and click Generate
  4. Copy the token immediately (it won’t be shown again)
2

Try the API with Postman

Use the Aiven Postman workspace to explore the API:
  1. Fork the Postman collection and environment
  2. Add your token to the authToken variable in the environment
  3. Send requests to explore the API
3

Make your first API call

Test authentication by listing your projects:

Authentication

All API requests require authentication using a bearer token in the Authorization header:

Common API operations

List projects

Retrieve all projects you have access to:

List cloud regions

Get available cloud regions (no authentication required):

Create a service

Create a new PostgreSQL service:

Get service details

Retrieve information about a specific service:

Update a service

Modify service configuration (e.g., scale to a different plan):

Delete a service

Permanently delete a service:
This operation is irreversible. All data will be permanently deleted.

API resources

Projects

GET
List all projects
GET
Get project details

Services

GET
List services in a project
POST
Create a new service
GET
Get service details
PUT
Update service configuration
DELETE
Delete a service

Service-specific operations

GET/POST
Manage databases (PostgreSQL, MySQL)
GET/POST
Manage service users
GET/POST
Manage Kafka topics
GET/POST
Manage Kafka ACLs

Rate limiting

The Aiven API implements rate limiting to ensure fair usage:
  • Rate limits: Vary by endpoint and authentication method
  • Headers: Check X-RateLimit-* headers in responses
  • Best practices: Implement exponential backoff for retries

Error handling

The API returns standard HTTP status codes:
Success
Request completed successfully
Bad Request
Invalid request parameters
Unauthorized
Invalid or missing authentication token
Forbidden
Insufficient permissions
Not Found
Resource not found
Too Many Requests
Rate limit exceeded
Internal Server Error
Server error - retry with exponential backoff
Error responses include details:

Best practices

  • Store tokens in environment variables or secret managers
  • Never commit tokens to version control
  • Rotate tokens regularly
  • Use separate tokens for different applications
  • Implement retry logic with exponential backoff
  • Handle rate limiting gracefully
  • Log errors for debugging
  • Validate responses before processing
  • Cache responses when appropriate
  • Use pagination for large result sets
  • Batch operations when possible
  • Monitor API usage and limits

SDKs and libraries

While the API is RESTful and language-agnostic, several community libraries are available: