Update timer
Change the messages, online interval, chat lines or on/off state of a chat timer.
PATCH https://cotlet.dev/api/v1/streamelements/timers/{timer_id}
write Confirm
Changes only the fields you send. Messages replaces the whole list, and the timer cycles through it. A timer that is on posts in your chat while you are live, so viewers see it. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| timer_id string required | string | Timer ID from list_timers. |
| messages array | array | New list of messages the timer cycles through. |
| online_interval_minutes integer | integer | Minutes between posts while the stream is live. |
| chat_lines integer | integer | Least chat messages in the last 5 minutes before the timer posts. |
| enabled boolean | boolean | false turns the timer off. |
Request
curl -X PATCH https://cotlet.dev/api/v1/streamelements/timers/timer_8c41d2 \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("streamelements", "update_timer", {"timer_id":"timer_8c41d2"}) const result = await cotlet.call('streamelements', 'update_timer', {"timer_id":"timer_8c41d2"}); cotlet call streamelements update_timer --data '{"timer_id":"timer_8c41d2"}' Example response
{
"timer_id": "t_20c7aa",
"name": "Charity stream",
"messages": [
"Charity stream on Saturday! Details in !schedule"
],
"online_interval_minutes": 15,
"chat_lines": 5,
"enabled": false
}