Overview
The Control API enables you to:- Create, update, and delete Ably apps
- Manage API keys and their capabilities
- Configure namespaces and channel rules
- Set up queues and integration rules
- Query account and app statistics
- Automate multi-tenant deployments
When to Use Control API
The Control API is ideal for:- Automating app provisioning and configuration
- Building multi-tenant SaaS applications
- Creating configuration-driven environments
- Programmatic testing and CI/CD pipelines
- Building administrative tools and dashboards
Getting Started
Authentication
The Control API uses Bearer token authentication. First, create an access token in the Ably dashboard:- Select your account from the top menu
- Choose My Access Tokens
- Click Create new access token
- Select the required capabilities
- Copy the generated token
Base URL
All Control API requests use:Core Resources
Apps
Manage Ably applications:API Keys
Manage API keys for your apps:Namespaces
Configure channel rules using namespaces:Queues
Manage message queues:Rules
Configure integration rules:Resource Identifiers
Account ID
Find your account ID in the dashboard:- Select your account from the top menu
- Choose Account settings
- Copy the Account ID
App ID
Find your app ID in the dashboard:- Select your app
- Go to the Settings tab
- Copy the App ID (also the first part of your API key)
Statistics
Query usage statistics:Error Handling
The Control API returns standard HTTP status codes: Common status codes:200- Success201- Created400- Bad Request401- Unauthorized403- Forbidden404- Not Found429- Too Many Requests500- Internal Server Error
Rate Limits
The Control API has rate limits:- Standard operations: 100 requests per minute
- Statistics queries: 20 requests per minute
OpenAPI Specification
The Control API is documented using OpenAPI 3.0. Download the specification from the Ably OpenAPI repository. Use the specification to:- Generate client libraries
- Import into API testing tools (Postman, Insomnia)
- Create mock servers
- Generate documentation
