API reference / Routines and triggers
Change a routine
Changes a routine's instructions or times, pauses or resumes it, or gives it to another teammate (agent). Send any of them. A cron takes the place of the days and the time, and days take the place of a cron. A routine that goes to another teammate starts a new conversation there. When it runs next is worked out again. Needs an owner or admin.
/api/v1/routines/{id}Other ways to call it
troopy routines updatetroopy_update_routineIdempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.Path parameters
id*stringA 24-character id
Body
application/jsonagentstringThe teammate that does the routine from now on
At most 40 characters
namestringAt least 1 characters · At most 60 characters
taskstringWhat to do each time, as you'd tell the teammate
At least 1 characters · At most 1000 characters
daysarray<integer>Days of the week it runs on, 0 is Sunday
At most 7 items
hourintegerAt least 0 · At most 23
minuteintegerAt least 0 · At most 59
everyinteger | nullMinutes between runs, from hour:minute to the end of each of its days (15, 30, 60, 120, 180, 240, 360 or 720). Null runs it once a day, at hour:minute
cronstring | nullA cron expression of five fields (minute, hour, day of the month, month, day of the week), like 0 7 * * 1, in the time zone of the routine. It takes numbers, *, lists, ranges and steps. Send it in the place of days, hour, minute and every. Null for a routine with days and a time
timezonestringIANA time zone the time is in, like Europe/Berlin
At most 64 characters
notifybooleanpausedbooleanResponse
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