Update command
Change the reply, level, cooldowns, cost, response type or on/off state of a command.
PATCH https://cotlet.dev/api/v1/streamelements/commands/{command_id}
write Confirm
Changes only the fields you send; the rest stays as it is. Returns the command as saved. The new reply goes out in your chat the next time a viewer uses the command. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| command_id string required | string | Command ID from list_commands. |
| reply string | string | New reply text. |
| level enum | enum | Everyone, Subscriber, Regular, VIP, Moderator or Super Moderator. |
| response_type enum | enum | say, mention, reply or whisper. |
| cooldown_global integer | integer | Seconds between any two uses. |
| cooldown_user integer | integer | Seconds the same viewer must wait. |
| cost integer | integer | Loyalty points charged per use. |
| enabled boolean | boolean | false turns the command off. |
Request
curl -X PATCH https://cotlet.dev/api/v1/streamelements/commands/c_4b19e0 \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reply":"Streams this week: Tue and Thu 19:00 CET, Sat 16:00 CET."}' result = client.call("streamelements", "update_command", {"command_id":"c_4b19e0","reply":"Streams this week: Tue and Thu 19:00 CET, Sat 16:00 CET."}) const result = await cotlet.call('streamelements', 'update_command', {"command_id":"c_4b19e0","reply":"Streams this week: Tue and Thu 19:00 CET, Sat 16:00 CET."}); cotlet call streamelements update_command --data '{"command_id":"c_4b19e0","reply":"Streams this week: Tue and Thu 19:00 CET, Sat 16:00 CET."}' Example response
{
"command_id": "c_4b19e0",
"trigger": "!schedule",
"reply": "Streams this week: Tue and Thu 19:00 CET, Sat 16:00 CET.",
"level": "Everyone",
"response_type": "say",
"enabled": true
}