Chat API
Send messages to your chat and moderate it.
On this page
Authenticate with a personal token as Authorization: Bearer pxp_...; the operations are also MCP tools unless noted. The full machine-readable definition is in the OpenAPI specification.
| Operation | Method and path | Scope |
|---|---|---|
| Get chat capabilities | GET /overlays/{overlayId}/chat | overlays:read |
| Send chat message | POST /overlays/{overlayId}/chat/messages | chat:write |
| Moderate chat | POST /overlays/{overlayId}/chat/moderation | chat:moderate |
| Get chat mode | GET /overlays/{overlayId}/chat/mode | overlays:read |
| Set chat mode | PUT /overlays/{overlayId}/chat/mode | chat:moderate |
Operations
Get chat capabilities
/api/v1/overlays/{overlayId}/chatReturns for Twitch, Kick and YouTube whether the overlay owner's chat is connected and whether you can send messages, moderate and change chat modes there (null = only the platform knows).
Scope: overlays:read (Read overlays) · MCP tool: get_chat_capabilities · Notes: read only
| Name | In | Type | Required | Description |
|---|---|---|---|---|
overlayId | path | string | required | Overlay id (from list_overlays); its owner's channels are the chat. Up to 64 characters |
curl -X GET "https://pxstudio.cloud/api/v1/overlays/<overlayId>/chat" \
-H "Authorization: Bearer $PX_TOKEN"const overlayId = '<overlayId>';
const res = await fetch(`https://pxstudio.cloud/api/v1/overlays/${overlayId}/chat`, {
headers: {
Authorization: `Bearer ${process.env.PX_TOKEN}`,
},
});
if (!res.ok) throw new Error(`PX Studio API: ${res.status}`);
const data = await res.json();Send chat message
/api/v1/overlays/{overlayId}/chat/messagesPUBLIC: posts a message as your own account in the overlay owner's chat on Twitch, Kick and/or YouTube (all platforms where you can send when platforms is left out; YouTube only while the stream is live). Viewers see it right away.
Scope: chat:write (Send chat messages) · MCP tool: send_chat_message · Notes: needs confirmation in MCP
| Name | In | Type | Required | Description |
|---|---|---|---|---|
overlayId | path | string | required | Overlay id (from list_overlays); its owner's channels are the chat. Up to 64 characters |
text | body | string | required | Up to 500 characters |
platforms | body | array of twitch, kick, youtube | optional | Up to 3 items |
curl -X POST "https://pxstudio.cloud/api/v1/overlays/<overlayId>/chat/messages" \
-H "Authorization: Bearer $PX_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "text": "..." }'const overlayId = '<overlayId>';
const res = await fetch(`https://pxstudio.cloud/api/v1/overlays/${overlayId}/chat/messages`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PX_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ text: "..." }),
});
if (!res.ok) throw new Error(`PX Studio API: ${res.status}`);
const data = await res.json();Moderate chat
/api/v1/overlays/{overlayId}/chat/moderationMODERATION: deletes a chat message, times out, bans or unbans a viewer in the overlay owner's chat, with your own moderator rights there. delete needs msgId; timeout, ban and unban need targetUserId (both come from the chat panel).
Scope: chat:moderate (Moderate chat) · MCP tool: moderate_chat · Notes: destructive, needs confirmation in MCP
| Name | In | Type | Required | Description |
|---|---|---|---|---|
overlayId | path | string | required | Overlay id (from list_overlays); its owner's channels are the chat. Up to 64 characters |
platform | body | twitch, kick, youtube | required | |
action | body | delete, timeout, ban, unban | required | |
msgId | body | string | optional | Up to 64 characters |
targetUserId | body | string | optional | Up to 64 characters |
targetName | body | string | optional | Up to 40 characters |
durationS | body | integer | optional | 1 to 1209600 |
reason | body | string | optional | Up to 100 characters |
curl -X POST "https://pxstudio.cloud/api/v1/overlays/<overlayId>/chat/moderation" \
-H "Authorization: Bearer $PX_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "platform": "twitch", "action": "delete" }'const overlayId = '<overlayId>';
const res = await fetch(`https://pxstudio.cloud/api/v1/overlays/${overlayId}/chat/moderation`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PX_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ platform: "twitch", action: "delete" }),
});
if (!res.ok) throw new Error(`PX Studio API: ${res.status}`);
const data = await res.json();Get chat mode
/api/v1/overlays/{overlayId}/chat/modeReturns the chat modes of the overlay owner's Twitch chat: slow mode seconds, followers only (minutes or null), subscribers only, emote only and unique chat.
Scope: overlays:read (Read overlays) · MCP tool: get_chat_mode · Notes: read only
| Name | In | Type | Required | Description |
|---|---|---|---|---|
overlayId | path | string | required | Overlay id (from list_overlays); its owner's channels are the chat. Up to 64 characters |
platform | query | twitch | optional |
curl -X GET "https://pxstudio.cloud/api/v1/overlays/<overlayId>/chat/mode" \
-H "Authorization: Bearer $PX_TOKEN"const overlayId = '<overlayId>';
const res = await fetch(`https://pxstudio.cloud/api/v1/overlays/${overlayId}/chat/mode`, {
headers: {
Authorization: `Bearer ${process.env.PX_TOKEN}`,
},
});
if (!res.ok) throw new Error(`PX Studio API: ${res.status}`);
const data = await res.json();Set chat mode
/api/v1/overlays/{overlayId}/chat/modeMODERATION: changes chat modes of the overlay owner's Twitch chat right away (send only what changes): slowModeS (0 = off, 3 to 120), followersOnlyMin (null = off, minutes followed), subscribersOnly, emoteOnly, uniqueChat (no repeated messages).
Scope: chat:moderate (Moderate chat) · MCP tool: set_chat_mode · Notes: destructive, needs confirmation in MCP
| Name | In | Type | Required | Description |
|---|---|---|---|---|
overlayId | path | string | required | Overlay id (from list_overlays); its owner's channels are the chat. Up to 64 characters |
platform | body | twitch | required | |
settings | body | object | required |
curl -X PUT "https://pxstudio.cloud/api/v1/overlays/<overlayId>/chat/mode" \
-H "Authorization: Bearer $PX_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "platform": "twitch", "settings": {} }'const overlayId = '<overlayId>';
const res = await fetch(`https://pxstudio.cloud/api/v1/overlays/${overlayId}/chat/mode`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.PX_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ platform: "twitch", settings: {} }),
});
if (!res.ok) throw new Error(`PX Studio API: ${res.status}`);
const data = await res.json();Was this page helpful?