canonical: https://jentic.com/apis/ably.net/ably-control

# Ably Control API v1

The Ably Control API is the management plane for an Ably account. It exposes 22 endpoints for managing apps, API keys, namespaces, queues, integration rules, and APNs configuration. Authentication uses bearer tokens issued from the Ably dashboard. The spec is published in Ably's open-specs repository, so the schema tracks the live platform. Use it when an agent or platform team needs to provision Ably resources programmatically rather than through the dashboard.

## For AI agents

Provision and manage Ably apps, keys, namespaces, queues, and integration rules via a bearer-authenticated REST API. Use it for account-level configuration, not for publishing messages.

## Scope

Does not handle message publishing, presence, or push delivery - use Ably's Platform or REST API for those, and Control API for account-level provisioning only.

## Capabilities

- List and create apps under an Ably account
- Update an app's configuration or delete it
- Upload an APNs .p12 certificate to an app
- Create, list, update, and revoke app API keys
- Manage namespaces that group channels and apply policies
- Provision and delete queues that fan out from channels
- Create and update integration rules (webhooks, AMQP, Kinesis, etc.)

## Use cases

### Multi-Tenant App Provisioning

Platforms running Ably for many customers create one app per tenant to keep traffic and limits isolated. POST /accounts/{account_id}/apps creates the app, POST /apps/{app_id}/keys provisions the key the tenant uses, and POST /apps/{app_id}/rules wires up integrations such as webhooks. The full provisioning sequence runs from a backend script without manual dashboard work.

Example prompt: Create a new Ably app called 'tenant-acme', provision a publish-only key, and add a webhook rule pointing to https://acme.example.com/ably-events

### Key Rotation and Revocation

Security workflows rotate API keys on a schedule or revoke them on suspected compromise. The Control API exposes POST /apps/{app_id}/keys to issue replacements, PATCH /apps/{app_id}/keys/{key_id} to update capabilities, and POST /apps/{app_id}/keys/{key_id}/revoke to invalidate the old key. This keeps key hygiene under script-level control.

Example prompt: Revoke key ID 'k-987' on app 'tenant-acme' and create a fresh key with the same capabilities

### Integration Rule Management

Platforms wire Ably channels to webhooks, AMQP, and stream destinations via integration rules. POST /apps/{app_id}/rules creates a rule, GET /apps/{app_id}/rules/{rule_id} reads it, and PATCH on the same path updates target URLs or filters. This lets infrastructure-as-code pipelines treat Ably integrations like any other resource.

Example prompt: Create a webhook rule on app 'tenant-acme' that forwards messages on namespace 'audit' to https://acme.example.com/ably-events

### Agent-Driven Account Provisioning via Jentic

Platform engineering agents that bootstrap new tenants want to provision Ably resources as a tool call. Through Jentic, an agent searches by intent, loads the Control API operation (e.g., create app, create key), and executes with the bearer token from your Jentic One instance. Multiple operations chain into a clean tenant-bootstrap workflow.

Example prompt: Search Jentic for 'create an Ably app', load the Control API schema, and execute create-app then create-key in sequence

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /accounts/{account_id}/apps | Create an app under an account |
| POST | /apps/{app_id}/keys | Create an API key |
| POST | /apps/{app_id}/keys/{key_id}/revoke | Revoke an API key |
| POST | /apps/{app_id}/namespaces | Create a namespace |
| POST | /apps/{app_id}/rules | Create an integration rule |
| POST | /apps/{app_id}/queues | Create a queue |

## Key resources

- **Apps** — Create, update, and delete apps under an Ably account
- **Keys** — Provision, update, and revoke API keys per app
- **Namespaces** — Manage namespaces used to group channels and apply policies
- **Queues** — Create and delete queues that consume from channels
- **Rules** — Configure integration rules (webhooks, AMQP, Kinesis, etc.)
- **APNs Configuration** — Upload .p12 certificates for iOS push integration

## Why Jentic

- **Setup:** Wiring the Control API v1 by hand means managing its bearer token, targeting the control.ably.net v1 base, and shaping app, key, and namespace provisioning payloads yourself. Through Jentic you install once, import the Control API v1 from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** The Control API puts the app id in the URL path (/apps/{app_id}/keys, /apps/{app_id}/namespaces), so a rule can pin your agent to one app: it can create namespaces and rules for that app and nothing else. You choose the operations it may call, so key revocation is not included unless you add it.
- **Credential handling:** Your Ably Control API bearer token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create an Ably app' or 'add a rule to an app', and Jentic returns the matching Control API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Ably REST API** — Ably's data-plane REST surface for publishing messages and pulling history.
- **Ably Platform API** — Broader Ably data-plane API including push device registrations and subscriptions.
- **PubNub** — Realtime messaging platform with its own management surface.

## FAQ

### What authentication does the Ably Control API use?

The Control API uses HTTP bearer tokens issued from the Ably account dashboard. Pass the token as Authorization: Bearer <token>. Through Jentic, the token is stored in your Jentic One instance and injected at execution time, so the agent never holds the raw value.

### Can I provision API keys through the Ably Control API?

Yes. POST /apps/{app_id}/keys creates a key with the requested capability JSON, PATCH /apps/{app_id}/keys/{key_id} updates capability or name, and POST /apps/{app_id}/keys/{key_id}/revoke invalidates a key when it must be retired.

### How do I create an integration rule through Jentic?

Search Jentic for 'create an Ably integration rule' to find POST /apps/{app_id}/rules, load the schema, and execute the call with the rule type (webhook, AMQP, etc.) and target. Jentic adds the bearer token from the vault and returns the created rule definition.

### What are the rate limits for the Ably Control API?

The OpenAPI spec does not document explicit rate limits for Control. Treat Control as low-volume management traffic: serialize bursts and back off on 429 or 5xx responses. For high-throughput operations, use Ably's data plane (Platform/REST API) instead.

### How do I configure iOS push for an Ably app?

Upload the APNs .p12 file via POST /apps/{id}/pkcs12 with the certificate file in the body. Ably stores the credential against the app so subsequent push publishes via the Platform API can deliver to APNs.

### Can I delete unused namespaces and queues with the Control API?

Yes. DELETE /apps/{app_id}/namespaces/{namespace_id} removes a namespace and DELETE /apps/{app_id}/queues/{queue_id} removes a queue. List the resources first via the corresponding GET endpoints to confirm the IDs before destructive calls.

### Can I limit what my agent is allowed to do with the Ably Control API?

Yes. Because you run Jentic One yourself, your own rules decide which Control API operations and credentials the agent may use. The Control API puts the app id in the URL path, such as /apps/{app_id}/keys and /apps/{app_id}/namespaces, so you can pin the agent to a single app and let it create namespaces and rules there and nothing else. You also choose exactly which operations it may call, so a destructive action like POST /apps/{app_id}/keys/{key_id}/revoke stays out of reach unless you explicitly allow it.
