Control-plane ProtocolMessages exchanged on the WebSocket connection
itself (not scoped to a channel). Carries CONNECT, CONNECTED, HEARTBEAT,
DISCONNECT, DISCONNECTED, CLOSE, CLOSED, ERROR, and AUTH actions.
Client sends CLOSE to gracefully terminate the connection.
Messages
connected
Server confirmation that the realtime connection is established.
Content-Type:
heartbeat
Keep-alive ping. Ably sends heartbeats every 15s by default.
Content-Type:
disconnect
DISCONNECT
Content-Type:
disconnected
Connection has dropped. SDK will attempt to reconnect.
Content-Type:
close
Client request to gracefully close the connection.
Content-Type:
closed
CLOSED
Content-Type:
error
Protocol-level or channel-scoped error.
Content-Type:
auth
Mid-connection auth refresh (token reauth).
Content-Type:
About AsyncAPI
The AsyncAPI specification describes event-driven APIs the way OpenAPI describes request/response APIs. A channel is the named pipe — a webhook URL, a Kafka topic, a WebSocket route, an MQTT subject — that producers and consumers publish or subscribe to. Each channel carries one or more messages with structured payloads, and an operation declares whether a given party sends or receives on that channel.