Skip to content
Docs

Automations API

Automation rules: when something happens, do something.

View as Markdown
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.

OperationMethod and pathScope
List automationsGET /automationsautomations:read
Get automation optionsGET /automations/optionsautomations:read
List automation activityGET /automations/activityautomations:read
Create automationPOST /automationsautomations:write
Update automationPATCH /automations/{ruleId}automations:write
Switch automation on or offPUT /automations/{ruleId}/enabledautomations:write
Delete automationDELETE /automations/{ruleId}automations:write
List action webhooksGET /automations/webhooksautomations:read
Delete action webhookDELETE /automations/webhooks/{webhookId}automations:write

Operations

List automations

GET/api/v1/automations

Lists your automation rules ("when X happens, do Y"): trigger, conditions, the action with readable targets (overlay and layer) and whether each rule is on.

Scope: automations:read (Read automations) · MCP tool: list_automations · Notes: read only

Terminal
curl -X GET "https://pxstudio.cloud/api/v1/automations" \
  -H "Authorization: Bearer $PX_TOKEN"

Get automation options

GET/api/v1/automations/options

Returns what an automation rule can use: trigger types, action types, the scene condition and your overlays with scenes, spots, groups and layers (as overlayId and memberId, with the widget commands each layer declares).

Scope: automations:read (Read automations) · MCP tool: get_automation_options · Notes: read only

Terminal
curl -X GET "https://pxstudio.cloud/api/v1/automations/options" \
  -H "Authorization: Bearer $PX_TOKEN"

List automation activity

GET/api/v1/automations/activity

Lists the latest automation runs (rule name, action type, time), newest first.

Scope: automations:read (Read automations) · MCP tool: list_automation_activity · Notes: read only

Terminal
curl -X GET "https://pxstudio.cloud/api/v1/automations/activity" \
  -H "Authorization: Bearer $PX_TOKEN"

Create automation

POST/api/v1/automations

ON AIR: creates an automation rule that from now on runs by itself whenever its trigger happens (show alerts, switch scenes, post in chat, change the stream title). Targets are layers as overlayId and memberId. New Discord rules cannot be created through the API (the webhook URL is a secret).

Scope: automations:write (Change automations) · MCP tool: create_automation · Notes: destructive, needs confirmation in MCP

NameInTypeRequiredDescription
namebodystringrequiredUp to 60 characters
enabledbodybooleanoptionalFalse saves the rule switched off
cooldownSecbodyintegeroptionalSeconds before the rule can fire again (0 = no cooldown). 0 to 86400
triggerbodyobjectrequiredWhen the rule fires. type: follow, sub, subgift, resub, cheer, raid, donation, mod-action (a mod types a command), chat-command (a PXStudioBot command), bot-timer. minAmount: only from this amount (bits, gifted subs, months, tier 1-3, raid viewers, donation amount). command: only for this chat command (chat-command). modCommand: only for this mod command (mod-action)
onlyWhenSceneLivebodyinteger or nulloptionalOptional condition: the rule only fires while this scene is live (sceneId from get_automation_options). null removes the condition. At least 1
actionbodyobjectrequiredWhat the rule does. Fields per type: widget-command {overlayId, memberId, cmd, presetName?} fires a widget command on a layer; scene-golive {overlayId, sceneId} puts a scene on air; set-title {title} and set-category {category} change your Twitch stream; member-to-spot {overlayId, spotId, memberId or groupId} moves a layer to a saved spot; bot-say {text, platforms?} posts in your chat; media-show {overlayId, favoriteId} shows a media favorite; discord-webhook {template} only for an existing Discord rule (its webhook URL is a secret and stays as it is; new Discord rules cannot be set up through the API)
Terminal
curl -X POST "https://pxstudio.cloud/api/v1/automations" \
  -H "Authorization: Bearer $PX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "...", "trigger": {}, "action": {} }'

Update automation

PATCH/api/v1/automations/{ruleId}

ON AIR: changes an automation rule (send only what changes; the rest stays). The changed rule runs by itself from now on. A Discord rule keeps its webhook URL; only its message template can change here.

Scope: automations:write (Change automations) · MCP tool: update_automation · Notes: destructive, needs confirmation in MCP

NameInTypeRequiredDescription
ruleIdpathintegerrequiredAutomation rule id (from list_automations). At least 1
namebodystringoptionalUp to 60 characters
enabledbodybooleanoptionalFalse saves the rule switched off
cooldownSecbodyintegeroptionalSeconds before the rule can fire again (0 = no cooldown). 0 to 86400
triggerbodyobjectoptionalWhen the rule fires. type: follow, sub, subgift, resub, cheer, raid, donation, mod-action (a mod types a command), chat-command (a PXStudioBot command), bot-timer. minAmount: only from this amount (bits, gifted subs, months, tier 1-3, raid viewers, donation amount). command: only for this chat command (chat-command). modCommand: only for this mod command (mod-action)
onlyWhenSceneLivebodyinteger or nulloptionalOptional condition: the rule only fires while this scene is live (sceneId from get_automation_options). null removes the condition. At least 1
actionbodyobjectoptionalWhat the rule does. Fields per type: widget-command {overlayId, memberId, cmd, presetName?} fires a widget command on a layer; scene-golive {overlayId, sceneId} puts a scene on air; set-title {title} and set-category {category} change your Twitch stream; member-to-spot {overlayId, spotId, memberId or groupId} moves a layer to a saved spot; bot-say {text, platforms?} posts in your chat; media-show {overlayId, favoriteId} shows a media favorite; discord-webhook {template} only for an existing Discord rule (its webhook URL is a secret and stays as it is; new Discord rules cannot be set up through the API)
Terminal
curl -X PATCH "https://pxstudio.cloud/api/v1/automations/<ruleId>" \
  -H "Authorization: Bearer $PX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "...", "enabled": true }'

Switch automation on or off

PUT/api/v1/automations/{ruleId}/enabled

ON AIR: switches an automation rule on (it runs by itself from now on) or off.

Scope: automations:write (Change automations) · MCP tool: set_automation_enabled · Notes: destructive, needs confirmation in MCP

NameInTypeRequiredDescription
ruleIdpathintegerrequiredAutomation rule id (from list_automations). At least 1
enabledbodybooleanrequired
Terminal
curl -X PUT "https://pxstudio.cloud/api/v1/automations/<ruleId>/enabled" \
  -H "Authorization: Bearer $PX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": true }'

Delete automation

DELETE/api/v1/automations/{ruleId}

DESTRUCTIVE: deletes an automation rule. Cannot be undone.

Scope: automations:write (Change automations) · MCP tool: delete_automation · Notes: destructive, needs confirmation in MCP

NameInTypeRequiredDescription
ruleIdpathintegerrequiredAutomation rule id (from list_automations). At least 1
Terminal
curl -X DELETE "https://pxstudio.cloud/api/v1/automations/<ruleId>" \
  -H "Authorization: Bearer $PX_TOKEN"

List action webhooks

GET/api/v1/automations/webhooks

Lists your action webhooks (name, action type, created and last used). The webhook links themselves are never shown.

Scope: automations:read (Read automations) · MCP tool: list_action_webhooks · Notes: read only

Terminal
curl -X GET "https://pxstudio.cloud/api/v1/automations/webhooks" \
  -H "Authorization: Bearer $PX_TOKEN"

Delete action webhook

DELETE/api/v1/automations/webhooks/{webhookId}

DESTRUCTIVE: deletes an action webhook. Stream Deck buttons or scripts that call its link stop working. Cannot be undone.

Scope: automations:write (Change automations) · MCP tool: delete_action_webhook · Notes: destructive, needs confirmation in MCP

NameInTypeRequiredDescription
webhookIdpathintegerrequiredWebhook id (from list_action_webhooks). At least 1
Terminal
curl -X DELETE "https://pxstudio.cloud/api/v1/automations/webhooks/<webhookId>" \
  -H "Authorization: Bearer $PX_TOKEN"

Was this page helpful?