Skip to content

CyclesController_applyTemplateUpdate

POST
/api/cycles/streams/{streamId}/cycles/{cycleId}/template-update
curl --request POST \
--url https://api.streams-ai.com/api/cycles/streams/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cycles/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/template-update \
--header 'Content-Type: application/json' \
--data '{ "targetVersion": 1, "expectedUpdatedAt": "2026-04-15T12:00:00Z", "cycle": { "triggerName": "example", "description": "example", "phasesTemplate": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "agentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "goal": "example", "instructions": "example", "autoAdvance": true, "phaseName": "example", "operatorPool": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "assetIds": [], "sourcePhaseId": null } ] } }'
streamId
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
cycleId
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
Media typeapplication/json
object
targetVersion
required
integer
>= 1 <= 9007199254740991
expectedUpdatedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
cycle
required
object
triggerName
required
string
/^[a-z0-9][a-z0-9-]{0,63}$/
description
required
string
nullable <= 5000 characters
phasesTemplate
required
Array<object>
<= 20 items
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
agentId
required
string format: uuid
nullable /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
goal
required
string
<= 2000 characters
instructions
required
string
nullable <= 2000 characters
autoAdvance
required
boolean
phaseName
required
string
nullable <= 80 characters
operatorPool
required
Array<string>
<= 100 items
assetIds
Array<string>
default: <= 10 items
sourcePhaseId
string format: uuid
nullable /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/