Models

AuthOp

FieldTypeDescription
oprequiredobject
tokenrequiredstring

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.

FieldTypeDescription
oprequiredobject
topicrequiredstring

The topic to subscribe to. chat: one channel's live chat; requires channel. user: your own direct messages and friend activity. events: your own channel's event feed.

channelstring

The channel id to subscribe to. Required for chat and ignored for other topics.

UnsubscribeOp

Remove a subscription. Idempotent: unsubscribing from a topic you do not hold still succeeds. Acknowledged with an unsubscribed frame.

FieldTypeDescription
oprequiredobject
topicrequiredstring
channelstring

The channel to leave. Required for chat.

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.

FieldTypeDescription
oprequiredobject
channelrequiredstring
textrequiredstring

The message text. Escape it when rendering as HTML.

reply_parent_msg_idstring <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.

FieldTypeDescription
oprequiredobject

SubscribedFrame

Confirms a subscription is active.

FieldTypeDescription
oprequiredobject
topicrequiredstring
channelstring

Present for chat; absent for user and events.

UnsubscribedFrame

Confirms a subscription was removed.

FieldTypeDescription
oprequiredobject
topicrequiredstring
channelstring

ErrorFrame

Reports a problem. code is stable and safe to branch on; message is human-readable and may change.

FieldTypeDescription
oprequiredobject
coderequiredoneOf

The error identifier. Each value also states whether it closes the connection.

messagerequiredstring
topicstring

The topic the error relates to, when applicable.

channelstring

ChatEnvelope

A chat-topic frame for one channel.

FieldTypeDescription
topicrequiredobject
channelrequiredstring

The channel this frame belongs to.

eventrequiredServerMessage

A chat event, identified by its type.

ServerMessage

A chat event, identified by its type.

oneOf

SM_Message

A chat message posted in the channel.

FieldTypeDescription
typerequiredobject
msg_idrequiredstring <uuid>
broadcast_idstring | null

The broadcast the message was posted during, or null if the channel was offline.

user_idrequiredstring
usernamerequiredstring
display_namerequiredstring

The sender's display name as it was when the message was sent.

textrequiredstring

The message text. Escape it when rendering as HTML.

timestamprequiredstring <date-time>
emote_refsEmoteRefsV2

Resolved emotes found in the message text. Absent when the message contains no usable emote tokens.

replyReplyRef

A snapshot of the message being replied to. Absent for non-replies.

is_ownerboolean

True if the sender owns the channel. Absent when false.

is_moderatorboolean

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.

FieldTypeDescription
typerequiredobject
countrequiredinteger

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.

FieldTypeDescription
typerequiredobject
video_idrequiredstring
position_msrequiredinteger

The current playback position within the item

play_staterequiredstring

The current playback state, normally playing or paused. Treat any other value as not actively playing.

captured_atrequiredinteger

When this update was captured, in milliseconds since the Unix epoch. To compensate for delivery delay, advance position_ms by the time elapsed since captured_at before seeking.

moderequiredoneOf

How playback repeats.

playlist_idstring | null

The playlist being played through, or null for a standalone item.

playlist_indexinteger | 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.

FieldTypeDescription
typerequiredobject
reasonrequiredoneOf

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.

FieldTypeDescription
typerequiredobject
is_liverequiredboolean

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.

FieldTypeDescription
typerequiredobject

SM_EmoteTableChanged

An emote available in this channel changed.

FieldTypeDescription
typerequiredobject
owner_channel_idstring

The channel that owns the changed emote. Absent when the change applies to a global emote available everywhere.

changerequiredoneOf

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.

FieldTypeDescription
typerequiredobject
msg_idrequiredstring <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.

FieldTypeDescription
typerequiredobject
user_idrequiredstring
kindrequiredoneOf

The kind of restriction.

expires_atstring <date-time>

When a timeout ends. Absent for bans.

SM_ChatRestrictionLifted

A ban or timeout was lifted. The affected user may post again.

FieldTypeDescription
typerequiredobject
user_idrequiredstring

EmoteRefsV2

Resolved emotes found in the message text. Absent when the message contains no usable emote tokens.

FieldTypeDescription
vrequiredinteger

The schema version of these references. Always 2.

refsrequiredobject[]

ReplyRef

A snapshot of the message being replied to. Absent for non-replies.

FieldTypeDescription
parent_msg_idrequiredstring <uuid>
parent_user_idrequiredstring
parent_display_namerequiredstring
parent_text_snippetrequiredstring

The start of the parent message text, up to 100 characters.

thread_root_msg_idrequiredstring <uuid>

The first message in the reply thread. Equal to parent_msg_id when replying directly to a top-level message.

UserEnvelope

A user-topic frame carrying a direct message or friend event.

FieldTypeDescription
topicrequiredobject
eventrequiredUserTopicEvent

A direct message or friend event, identified by its type.

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.

FieldTypeDescription
typerequiredobject
messagerequiredDmMessage

UTE_FriendRequest

Another user sent you a friend request.

FieldTypeDescription
typerequiredobject
fromrequiredUserSummary

UTE_FriendAccept

Another user accepted your friend request.

FieldTypeDescription
typerequiredobject
fromrequiredUserSummary

DmMessage

FieldTypeDescription
idrequiredstring
conversation_idrequiredstring
sender_idrequiredstring
bodyrequiredstring

The message text

created_atrequiredstring <date-time>

UserSummary

FieldTypeDescription
user_idrequiredstring
usernamerequiredstring
display_namerequiredstring

EventsEnvelope

An events-topic frame carrying one channel event.

FieldTypeDescription
topicrequiredobject
eventrequiredPlatformEvent

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.

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.

FieldTypeDescription
idrequiredstring

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 GET /users/me/events.

typerequiredoneOf

What happened.

versionrequiredinteger

The schema version of data for this event type, currently 1. A higher number signals a payload shape your client may not recognize.

channel_user_idrequiredstring

The channel the event belongs to.

occurred_atrequiredstring <date-time>
datarequiredobject

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.