A bidirectional JSON text message channel over a single connection.
New integrations should consistently use `studio-id`; the server currently remains compatible with legacy names such as `X-Studio-Id`, `Studio-Id`, and `studioId`.
The LAN Studio environments may use handshake-header authentication; if Authorization is not provided in the handshake header, the client must send `AuthRequest` withi
Provider:AqaraAsyncAPI: v3.0.0Spec: Studio WebSocket APIOperations: 7Messages: 19
Channel address
studioWebSocket
Operations
send
sendAuthRequest
Used only for the Studio self-domain endpoint and LAN Studio environments; AuthRequest is not used in production or cloud environments.
receive
receiveAuthResponse
send
sendPing
receive
receivePong
send
sendSubscriptionCommand
receive
receiveSubscriptionCommandResponse
When a subscribe or unsubscribe operation fails, the server may return ErrorMessage, or it may return the corresponding business response type with a non-zero code.
The caller should correlate request
receive
receivePushMessage
Messages
AuthRequest
First-message authentication flow for the Studio self-domain endpoint and LAN Studio environments; not used in production or cloud environments.
Content-Type:
AuthResponse
WebSocket authentication response
Content-Type:
ping
Heartbeat request
Content-Type:
pong
Heartbeat response
Content-Type:
SubscribeAllRequest
Subscribe to all or selected devices request
Content-Type:
SubscribeAllResponse
Subscribe to all or selected devices response
Content-Type:
UnsubscribeAllRequest
Unsubscribe from all or selected devices request
Content-Type:
UnsubscribeAllResponse
Unsubscribe from all or selected devices response
Content-Type:
SubscribeTraitValueRequest
Subscribe to specified Trait values request
Content-Type:
SubscribeTraitValueResponse
Subscribe to specified Trait values response
Content-Type:
UnsubscribeTraitValueRequest
Unsubscribe from specified Trait values request
Content-Type:
UnsubscribeTraitValueResponse
Unsubscribe from specified Trait values response
Content-Type:
SubscribeObjectEventRequest
Incrementally adds object-event subscriptions for the current WebSocket session; duplicate subscriptions are idempotent.
Content-Type:
SubscribeObjectEventResponse
Object-event subscription response
Content-Type:
UnsubscribeObjectEventRequest
Removes specified object rules or clears specified event types for the current WebSocket session.
Content-Type:
UnsubscribeObjectEventResponse
Object-event unsubscription response
Content-Type:
TraitValueUpdate
Trait value change push
Content-Type:
objectEvent
Device add/remove events are pushed by default; changes to spaces, automations, and space relationships are delivered according to precise object subscriptions.
Content-Type:
ErrorMessage
Error response
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.
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.