The JavaScript Chat SDK built for serious scale
Build chat applications with a JavaScript chat SDK your team will love, on a platform you can trust.

<50ms
median roundtrip latency
1B+
connections per month
100%
uptime over 5 years
Realtime chat that just works
Built to serve the world’s most demanding workloads: 1B+ connected devices, with 5+ years of 100% uptime. No outages. Just a seamless chat.
Power more within budget
Don’t stifle innovation for fear of cost. Scale chat, reactions, and features without the overhead. Just pay for what you use, when you use it.
Get building. Not managing realtime
Give your team the tools to rapidly ship exceptional chat experiences. Get users reacting, interacting and engaging like never before.
Keep the conversation flowing
Build any JavaScript chat experience
Ably Chat allows you to build any chat experience at any scale, effortlessly handling your traffic flow and providing essential features right out of the JavaScript Chat SDK box.
Live streaming chat
Enable realtime interaction alongside streaming content. Handle millions of concurrent users chatting and reacting with a simple chat API.
- Unlimited scale
- Cost optimization via message batching
- No peak concurrent connection overages
- Message and room reactions
- Online user status and room occupancy
- Moderation - Hive.ai or BYO
- Message edit and delete

Customer service chat
Streamline live one:one support chat - whether it's customer service, tech support, patient care, or student help. Roll-out globally without fear of service disruption.
- Easy integration into your tech stack
- Multi-region globally distributed infrastructure
- Direct tickets to the next available agent using presence
- Fully features chat API inc: typing indicators, read receipts, message edit and delete

Community in-app chat
Keep users on platform and engaged with in-app messaging. Craft a chat experience that integrates fully with your platform.
- Private and group chat
- Moderation - Hive or BYO
- Presence and online status indicators
- Typing indicators
- Message read receipts
- Message edited and delete
- Enable room and message reactions

Talking your language
Stop problem solving. Start creating.
Ably's JavaScript Chat SDK contains a set of purpose-built APIs that abstract away the complexities involved in how you would architect chat features. It utilizes Ably's platform to benefit from all of the same performance guarantees and scaling potential.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import * as Ably from "ably";
import { ChatClient, MessageEvent } from "@ably/chat";
// Initialize Ably Realtime client
const ablyClient = new Ably.Realtime({
key: "<API_KEY>",
clientId: "ably-chat",
});
// Create an Ably Chat client instance
const chatClient = new ChatClient(ablyClient);
// Get or create a chat room
const room = await chatClient.rooms.get("my-chat-room");
// Subscribe to incoming messages
room.messages.subscribe((event: MessageEvent) => {
console.log("Received message:", event.message.text);
});
// Attach to the room to start receiving messages
await room.attach();
// Send a message
await room.messages.send({ text: "Hello, World!" });
JavaScript chat building blocks
Interactions. Reactions. All in realtime.
The essential feature set for building large scale chat into JavaScript applications.

Send/receive chat messages
Implement 1:1 conversations, group chats and global chat rooms using channels to organize the message traffic.

Edit and delete a chat message
Edit the contents of a chat message, or enable soft and hard delete of the chat message.


Chat room reactions
Ability to react to the entire room, with server-side aggregated counts of those reactions.

Typing indicator
Show when a chat participant starts and stops typing with a typing indicator.

Moderation
Keep your chat safe in minutes using out-of-the-box integrations with AI moderation platforms, or bring your own tools.



Authentication
Manage access controls for participants using authentication tokens and capabilities.
Choose you platform
Ably's Chat SDKs provide a consistent and idiomatic API across a variety of supported platforms. Available in JavaScript, React, Kotlin (Android) and Swift (iOS).
Start building with Ably today
