Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions livestream-api/chat/mute-user.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ Prevents a user from posting chat messages in a broadcaster's chat. Mutes belong

Pass the numeric id of the user to mute as `user_id` in the request body. `user_id` is the only required field.

Without `broadcast_id`, you mute the user in your own chats. You don't need a live broadcast to do this.
Without `host_id` or `broadcast_id`, you mute the user in your own chats. You don't need a live broadcast to do this.

Chat moderators pass `broadcast_id` to mute the user in that broadcast host's chats. The broadcast must be live. See [List Broadcast Moderators](/livestream-api/chat/list-moderators) for how moderators are managed.
Chat moderators pass `host_id`, the numeric id of the broadcaster they moderate for, to mute the user in that host's chats. The host doesn't need to be live. A moderator can instead pass the `broadcast_id` of one of the host's live broadcasts. See [List Broadcast Moderators](/livestream-api/chat/list-moderators) for how moderators are managed.

<Warning>
A request with neither `host_id` nor `broadcast_id` always applies to your own chats, even if you moderate for other broadcasters. To act on another broadcaster's chats, a moderator app that uses its own account must send one of the two on every request.
</Warning>

Send `host_id` or `broadcast_id`, not both. A request with both returns `400`. A `host_id` that is neither your own id nor a broadcaster you moderate for returns `403`.

Pass an optional `message_id` to remove that chat message at the same time. This is useful when muting is in response to a particular message. `message_id` requires `broadcast_id`.

Expand Down
10 changes: 8 additions & 2 deletions livestream-api/chat/unmute-user.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ Allows a muted user to post chat messages in a broadcaster's chat again. The unm

`:user_id` is the numeric id of the user to unmute.

Without the `broadcast_id` query parameter, you unmute the user in your own chats. You don't need a live broadcast to do this.
Without the `host_id` or `broadcast_id` query parameter, you unmute the user in your own chats. You don't need a live broadcast to do this.

Chat moderators pass `broadcast_id` to unmute the user in that broadcast host's chats. The broadcast must be live. See [List Broadcast Moderators](/livestream-api/chat/list-moderators) for how moderators are managed.
Chat moderators pass `host_id`, the numeric id of the broadcaster they moderate for, to unmute the user in that host's chats. The host doesn't need to be live. A moderator can instead pass the `broadcast_id` of one of the host's live broadcasts. See [List Broadcast Moderators](/livestream-api/chat/list-moderators) for how moderators are managed.

<Warning>
A request with neither `host_id` nor `broadcast_id` always applies to your own chats, even if you moderate for other broadcasters. To act on another broadcaster's chats, a moderator app that uses its own account must send one of the two on every request.
</Warning>

Send `host_id` or `broadcast_id`, not both. A request with both returns `400`. A `host_id` that is neither your own id nor a broadcaster you moderate for returns `403`.

<Note>
To mute a user, use [Mute a Chat User](/livestream-api/chat/mute-user). To see who you have muted, use [List Muted Chat Users](/livestream-api/chat/list-muted-chat-users).
Expand Down
4 changes: 2 additions & 2 deletions livestream-api/skill-md.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To use it, save the block below as `SKILL.md` in a folder your agent loads skill
name: x-livestream-api
description: Use when building or migrating an integration with the X Livestream API (https://api.x.com/2): creating and managing RTMP/RTMPS stream sources, going live in one call, ending or deleting broadcasts, scheduling broadcasts, reading and moderating live chat, handling its errors, or moving off the deprecated /2/users/:id/sources and /2/users/:id/broadcasts routes before their January 1, 2027 end of life.
metadata:
version: "1.3"
version: "1.4"
---

# X Livestream API
Expand Down Expand Up @@ -100,7 +100,7 @@ Go live behavior:
### Live chat

- History: `GET /2/broadcasts/:id/chat`. Send: `POST /2/broadcasts/:id/chat`. Remove a message: `DELETE /2/broadcasts/:id/chat/:message_id`.
- Mutes apply across all of the host's broadcasts: `GET`, `POST /2/broadcasts/chat/mutes`, `DELETE /2/broadcasts/chat/mutes/:user_id`.
- Mutes apply across all of the host's broadcasts: `GET`, `POST /2/broadcasts/chat/mutes`, `DELETE /2/broadcasts/chat/mutes/:user_id`. Mute and unmute act on your own chats unless you pass `host_id` (the broadcaster you moderate for, live or not) or the `broadcast_id` of one of their live broadcasts. Both together return `400`; a `host_id` that is neither your own id nor a broadcaster you moderate for returns `403`.
- Moderators: `GET`, `POST /2/broadcasts/chat/moderators`, `DELETE /2/broadcasts/chat/moderators/:user_id`.

## Typical workflow
Expand Down
Loading