Edit a recurring task
Changes a recurring task's name, prompt, schedule, time zone or email setting.
Only the owner can edit it. Fields you leave out stay as they are, and a paused recurring task stays paused. Billing and the GitHub connection are checked again, as for a create. Runs already made keep the prompt and name they had.
/v1/workspaces/{workspaceId}/recurring-tasks/{taskId}A personal access token, which starts with sntr_. Create one on the dashboard's CLI & API page (https://app.sinatra.dev/tokens). It acts as you in every workspace you belong to, with your role in each, and expires after at most 365 days. The CLI's browser sign-in sends an OAuth access token here instead.
In: header
Path Parameters
The workspace's id, from GET /v1/me.
The recurring task's id, from GET /v1/workspaces/{workspaceId}/recurring-tasks. Not the id of a task a run started.
A short name, up to 200 characters. Defaults to the prompt's first line, cut to 200 characters.
What each run asks, as you'd ask a teammate. Each run starts a task whose first message is this prompt under two lines naming the recurring task and the run's time; that message must fit in 100,000 characters.
When runs start. times holds 1 to 4 different 24-hour HH:MM times, local to timezone. Send exactly one of weekdays, days of the week from 0 (Sunday) to 6 (Saturday), or dayOfMonth, a day from 1 to 28. Every weekday at 9:00 is { "times": ["09:00"], "weekdays": [1, 2, 3, 4, 5] }; the first of each month is { "times": ["09:00"], "dayOfMonth": 1 }.
An IANA time zone, such as America/Chicago. The cadence times are local to it.
Whether the owner gets an email when each run's agent finishes or needs a reply. Defaults to true.
Response Body
curl -X PATCH "https://api.sinatra.dev/v1/workspaces/string/recurring-tasks/string" \ -H "Content-Type: application/json" \ -d '{}'{
"task": {
"id": "string",
"workspaceId": "string",
"ownerUserId": "string",
"name": "string",
"prompt": "string",
"cadence": {
"times": [
"string"
],
"weekdays": [
0
],
"dayOfMonth": 1
},
"timezone": "string",
"notifyByEmail": true,
"nextRunAt": "2019-08-24T14:15:22Z",
"pausedAt": "2019-08-24T14:15:22Z",
"pausedReason": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}{
"error": "string",
"reason": "string",
"requestId": "string",
"refusal": "string",
"billingUrl": "string",
"settingsUrl": "string",
"plan": "string",
"running": 0,
"queued": 0,
"taskId": "string",
"messageId": "string"
}