Models
AuthOp
| Field | Type | Description |
|---|---|---|
oprequired | object | |
tokenrequired | string | A session token, guest token, or API key. |
SubscribeOp
Subscribe to a topic. Subscribing is idempotent: subscribing again to a
topic you already hold succeeds and is acknowledged. The server replies
with a subscribed frame on success or an error frame on failure.
| Field | Type | Description |
|---|---|---|
oprequired | object | |
topicrequired | string | The topic to subscribe to.
|
channel | string | The channel id to subscribe to. Required for |
UnsubscribeOp
Remove a subscription. Idempotent: unsubscribing from a topic you do not
hold still succeeds. Acknowledged with an unsubscribed frame.
| Field | Type | Description |
|---|---|---|
oprequired | object | |
topicrequired | string | |
channel | string | The channel to leave. Required for |
ChatSendOp
Send a chat message to a channel you are subscribed to. Only signed-in
users may send; guests receive an auth_required error. Sending to a
channel you have not subscribed to returns not_subscribed. A rejected
message (for example from a ban, timeout, rate limit, or empty body)
returns send_refused. An accepted message is delivered back to you on
the chat topic like any other.
| Field | Type | Description |
|---|---|---|
oprequired | object | |
channelrequired | string | |
textrequired | string | The message text. Escape it when rendering as HTML. |
reply_parent_msg_id | string <uuid> | The message being replied to. Optional. Must belong to the same channel, otherwise the send is rejected. |
ControlFrame
oneOf
AuthedFrame
Confirms authentication succeeded. Sent only when you authenticate with
an auth frame; header authentication produces no authed frame.
| Field | Type | Description |
|---|---|---|
oprequired | object |
SubscribedFrame
Confirms a subscription is active.
| Field | Type | Description |
|---|---|---|
oprequired | object | |
topicrequired | string | |
channel | string | Present for |
UnsubscribedFrame
Confirms a subscription was removed.
| Field | Type | Description |
|---|---|---|
oprequired | object | |
topicrequired | string | |
channel | string |
ErrorFrame
Reports a problem. code is stable and safe to branch on; message is
human-readable and may change.
| Field | Type | Description |
|---|---|---|
oprequired | object | |
coderequired | oneOf | The error identifier. Each value also states whether it closes the connection. |
messagerequired | string | |
topic | string | The topic the error relates to, when applicable. |
channel | string |
ChatEnvelope
A chat-topic frame for one channel.
| Field | Type | Description |
|---|---|---|
topicrequired | object | |
channelrequired | string | The channel this frame belongs to. |
eventrequired | ServerMessage | A chat event, identified by its |
ServerMessage
A chat event, identified by its type.
oneOf
SM_Message
A chat message posted in the channel.
| Field | Type | Description |
|---|---|---|
typerequired | object | |
msg_idrequired | string <uuid> | |
broadcast_id | string | null | The broadcast the message was posted during, or null if the channel was offline. |
user_idrequired | string | |
usernamerequired | string | |
display_namerequired | string | The sender's display name as it was when the message was sent. |
textrequired | string | The message text. Escape it when rendering as HTML. |
timestamprequired | string <date-time> | |
emote_refs | EmoteRefsV2 | Resolved emotes found in the message text. Absent when the message contains no usable emote tokens. |
reply | ReplyRef | A snapshot of the message being replied to. Absent for non-replies. |
is_owner | boolean | True if the sender owns the channel. Absent when false. |
is_moderator | boolean | True if the sender is a moderator of the channel. Absent when false. |
SM_ViewerCount
The channel's current viewer count, including anonymous guests. Sent once when you subscribe and again whenever it changes.
| Field | Type | Description |
|---|---|---|
typerequired | object | |
countrequired | integer |
SM_NowPlaying
A listen-along playback update. Sent on every playback change, periodically as a keepalive, and once when you subscribe if a session is already in progress so you can sync to the current position. The playback fields are flattened onto this object rather than nested under a sub-key.
| Field | Type | Description |
|---|---|---|
typerequired | object | |
video_idrequired | string | |
position_msrequired | integer | The current playback position within the item |
play_staterequired | string | The current playback state, normally |
captured_atrequired | integer | When this update was captured, in milliseconds since the Unix epoch.
To compensate for delivery delay, advance |
moderequired | oneOf | How playback repeats. |
playlist_id | string | null | The playlist being played through, or null for a standalone item. |
playlist_index | integer | null | The zero-based position of the current item within the playlist, or null for a standalone item. |
SM_NowPlayingCleared
The listen-along session ended. Remove any playback display.
| Field | Type | Description |
|---|---|---|
typerequired | object | |
reasonrequired | oneOf | Why the session ended. |
SM_StreamStatus
The channel went live or offline. On receiving this, refetch the channel's stream state and mount or unmount the player accordingly.
| Field | Type | Description |
|---|---|---|
typerequired | object | |
is_liverequired | boolean | True if the channel is now live, false if it is now offline. |
SM_RequestsUpdated
The channel's viewer-request queue changed. This frame carries no detail; refetch the queue to get the current state.
| Field | Type | Description |
|---|---|---|
typerequired | object |
SM_EmoteTableChanged
An emote available in this channel changed.
| Field | Type | Description |
|---|---|---|
typerequired | object | |
owner_channel_id | string | The channel that owns the changed emote. Absent when the change applies to a global emote available everywhere. |
changerequired | oneOf | What changed. |
SM_MessageDeleted
A moderator deleted a message. Replace it in place with a removed-message placeholder rather than removing it, so the message list does not shift.
| Field | Type | Description |
|---|---|---|
typerequired | object | |
msg_idrequired | string <uuid> |
SM_ChatRestricted
A user was banned or timed out in this channel. The affected user should have their composer disabled; other clients may mark or hide that user's recent messages.
| Field | Type | Description |
|---|---|---|
typerequired | object | |
user_idrequired | string | |
kindrequired | oneOf | The kind of restriction. |
expires_at | string <date-time> | When a timeout ends. Absent for bans. |
SM_ChatRestrictionLifted
A ban or timeout was lifted. The affected user may post again.
| Field | Type | Description |
|---|---|---|
typerequired | object | |
user_idrequired | string |
EmoteRefsV2
Resolved emotes found in the message text. Absent when the message contains no usable emote tokens.
| Field | Type | Description |
|---|---|---|
vrequired | integer | The schema version of these references. Always 2. |
refsrequired | object[] |
ReplyRef
A snapshot of the message being replied to. Absent for non-replies.
| Field | Type | Description |
|---|---|---|
parent_msg_idrequired | string <uuid> | |
parent_user_idrequired | string | |
parent_display_namerequired | string | |
parent_text_snippetrequired | string | The start of the parent message text, up to 100 characters. |
thread_root_msg_idrequired | string <uuid> | The first message in the reply thread. Equal to |
UserEnvelope
A user-topic frame carrying a direct message or friend event.
| Field | Type | Description |
|---|---|---|
topicrequired | object | |
eventrequired | UserTopicEvent | A direct message or friend event, identified by its |
UserTopicEvent
A direct message or friend event, identified by its type.
oneOf
UTE_DmMessage
A direct message was sent to you. The full message is included so you can display it without a separate fetch.
| Field | Type | Description |
|---|---|---|
typerequired | object | |
messagerequired | DmMessage |
UTE_FriendRequest
Another user sent you a friend request.
| Field | Type | Description |
|---|---|---|
typerequired | object | |
fromrequired | UserSummary |
UTE_FriendAccept
Another user accepted your friend request.
| Field | Type | Description |
|---|---|---|
typerequired | object | |
fromrequired | UserSummary |
DmMessage
| Field | Type | Description |
|---|---|---|
idrequired | string | |
conversation_idrequired | string | |
sender_idrequired | string | |
bodyrequired | string | The message text |
created_atrequired | string <date-time> |
UserSummary
| Field | Type | Description |
|---|---|---|
user_idrequired | string | |
usernamerequired | string | |
display_namerequired | string |
EventsEnvelope
An events-topic frame carrying one channel event.
| Field | Type | Description |
|---|---|---|
topicrequired | object | |
eventrequired | PlatformEvent | One channel event. The same shape is returned by |
PlatformEvent
One channel event. The same shape is returned by GET /users/me/events,
so live pushes and the REST feed can be merged and deduplicated on id.
| Field | Type | Description |
|---|---|---|
idrequired | string | A stable, unique identifier for the event. Use it both to deduplicate
across live pushes and the REST feed, and as the pagination cursor for
|
typerequired | oneOf | What happened. |
versionrequired | integer | The schema version of |
channel_user_idrequired | string | The channel the event belongs to. |
occurred_atrequired | string <date-time> | |
datarequired | object | A compact, type-specific payload with the identifiers and essentials needed to display the event. Fetch full detail from the REST API when you need more. Properties may be added over time, so ignore any you do not recognize. |