API reference / Tasks and projects
Switch on a routine template
Gives the teammate of the role of a routine template its routine, at the days and time of the template in timezone. It hires the role first when nobody holds it. A template that is on already gives its routine as it is. Needs an owner or admin, and the services of the role connected. A ready skill, a built-in template and a trigger template give 400: POST /templates/{id}/trigger switches a trigger template on.
/api/v1/templates/{id}/onOther ways to call it
troopy templates ontroopy_switch_on_templateIdempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.Path parameters
id*stringA template's id, like weekly-brief or welcome-note. GET /templates lists them
At most 64 characters
Body
application/jsontimezone*stringIANA time zone the time is in, like Europe/Berlin
At most 64 characters
Response
200 · application/jsondata*object18 properties
id*stringA 24-character id
agent*stringname*stringtask*stringdays*array<integer>Days of the week it runs on, 0 is Sunday. Empty for a routine on a cron expression
hour*integerminute*integerevery*integer | nullMinutes between runs within a day; null runs once a day, at hour:minute
cron*string | nullIts cron expression, in its time zone. Then days, hour, minute and every say nothing. Null for a routine with days and a time
timezone*stringnotify*booleanWhether each result is posted to the routine's conversation. A quiet routine keeps its results in its runs only
paused*booleannextRunAt*string | nulllastRunAt*string | nulllastRunId*string | nulllastError*string | nullWhy the last time couldn't start
threadId*string | nullThe conversation each run's answer is posted to
createdAt*stringISO 8601 date and time