For Agents
Publish messages to Ably channels, fetch history, manage tokens, and read application statistics over HTTP. Use it for server-side realtime publishing without a WebSocket connection.
Get started with Ably REST API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"publish a realtime message to a channel"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Ably REST API API.
Publish a message to a named Ably channel
Pull message history for a channel with paging and filters
Read the current presence set on a channel and its presence history
List active channels in the application for monitoring
Get channel metadata and current status
GET STARTED
Use for: I need to publish a notification to a channel, Fetch the last 100 messages on channel 'orders', Check who is currently present on a chat channel, List every active channel in the application
Not supported: Does not handle WebSocket connections, app provisioning, or push-notification delivery — use for HTTP publishing, history, presence, and token issuance only.
Jentic publishes the only available OpenAPI specification for Ably REST API, keeping it validated and agent-ready.
Jentic publishes the only available OpenAPI specification for Ably REST API, keeping it validated and agent-ready. The Ably REST API is the request/response interface to Ably's realtime messaging platform. It covers publishing messages to channels, retrieving message and presence history, listing active channels, requesting tokens for client authentication, and pulling application statistics. The eight endpoints are gated by HTTP Basic auth (with the API key) or a bearer token issued by /keys/{keyName}/requestToken, and complement Ably's realtime SDKs when a server-side workflow is enough.
Request an Ably token for short-lived, scoped client auth
Retrieve application-level statistics (messages, peak connections)
Patterns agents use Ably REST API API for, with concrete tasks.
★ Server-Side Event Publishing
Backend services need to push realtime events (order updates, dashboard refreshes, alerts) without holding a persistent WebSocket. POST /channels/{channelId}/messages publishes from a server process to all connected subscribers, with delivery handled by Ably's global edge network. This is the simplest way to broadcast events from a job queue or webhook handler.
Publish a JSON message {orderId: 'A123', status: 'shipped'} to channel 'orders'
Token-Based Client Auth
Browser and mobile clients should never embed a long-lived Ably API key. POST /keys/{keyName}/requestToken issues short-lived tokens scoped to the operations the client needs, so the front end connects with reduced blast radius if the token leaks. Pair with Ably realtime SDKs for the actual WebSocket connection.
Request an Ably token for keyName 'frontend' with capability {chat: ['publish','subscribe']} and a TTL of 600 seconds
Message History and Auditing
Compliance and audit workflows replay or re-export realtime events. GET /channels/{channelId}/messages returns historical messages with paging, while GET /channels/{channelId}/presence/history reconstructs who was on the channel at any time. Application stats from /stats round out the picture for usage reporting.
Fetch the last 100 messages on channel 'orders' between 09:00 and 10:00 UTC for the audit log
Agent-Driven Realtime Publishing via Jentic
AI agents can drive Ably without standing up SDK plumbing. Through Jentic, an agent searches for the publish intent, loads POST /channels/{channelId}/messages, and executes with the API key from the Jentic vault. The same flow covers token issuance and history retrieval when an agent needs to reason about recent activity.
Search Jentic for 'publish a realtime message', load the Ably schema, and execute the call with channel and message body
8 endpoints — jentic publishes the only available openapi specification for ably rest api, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/channels/{channelId}/messages
Publish a message to a channel
/channels/{channelId}/messages
Get message history for a channel
/channels/{channelId}/presence
Get the current presence set
/channels
List active channels
/keys/{keyName}/requestToken
Request a short-lived Ably token
/stats
Get application statistics
/channels/{channelId}/messages
Publish a message to a channel
/channels/{channelId}/messages
Get message history for a channel
/channels/{channelId}/presence
Get the current presence set
/channels
List active channels
/keys/{keyName}/requestToken
Request a short-lived Ably token
Three things that make agents converge on Jentic-routed access.
Credential isolation
Ably API keys are stored encrypted in the Jentic vault. Agents call operations by ID and Jentic applies HTTP Basic or bearer auth at execution time, so the raw key never enters the agent's context.
Intent-based discovery
Agents search by intent (e.g., 'publish a realtime message') and Jentic returns POST /channels/{channelId}/messages with its input schema.
Time to first call
Direct integration: 1-2 days to wire up auth, retries, and history paging across the eight endpoints. Through Jentic: under an hour — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
Ably Platform API
The broader Ably Platform API including push device registrations and channel subscriptions.
Use the Platform API alongside the REST API when push-notification device registration and subscription management are also in scope.
Ably Control API
Ably's Control API for managing apps, keys, namespaces, queues, and rules.
Pair Control API with REST API when an agent needs to provision keys and rules in addition to publishing messages.
PubNub
PubNub realtime messaging platform with publish, subscribe, presence, and history.
Choose PubNub when an existing PubNub footprint exists; pick Ably for stronger guarantees on global ordering and channel rewind.
Pusher Channels
Pusher Channels API for pub/sub messaging.
Pick Pusher Channels for a simpler pub/sub surface; Ably when presence, history, and capability tokens matter.
Specific to using Ably REST API API through Jentic.
Why is there no official OpenAPI spec for Ably REST API?
Ably publishes reference docs at ably.com/docs/api/rest-api but does not host a single discoverable OpenAPI specification for that surface. Jentic generates and maintains this spec so that AI agents and developers can call Ably REST API via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the Ably REST API use?
The API supports HTTP Basic auth using the Ably API key as the username, or bearer token auth using a token issued by POST /keys/{keyName}/requestToken. Through Jentic, both schemes are stored in the vault and applied at execution time, so neither value enters the agent's context.
Can I publish messages to a channel with the Ably REST API?
Yes. POST /channels/{channelId}/messages publishes one or more messages to the named channel. The body accepts a single message or an array, and Ably distributes the payload to all connected subscribers via its realtime fabric.
How do I fetch channel history through Jentic?
Search Jentic for 'get channel history' to find GET /channels/{channelId}/messages, load the schema, and execute the call with the channel ID and time bounds. The response is paged and returns messages in newest-first order by default.
What are the rate limits for the Ably REST API?
The OpenAPI spec does not encode rate limits; Ably enforces them per account based on the active plan. Read GET /stats for live message counts and check the Ably account dashboard for the current limit. On 429s, back off and retry with jitter.
How do I issue a short-lived token for a browser client?
Call POST /keys/{keyName}/requestToken with the desired capability JSON and TTL. The response is an Ably token request the front end can use to connect via the realtime SDK without ever holding the long-lived API key.
/stats
Get application statistics