Menu
Create Schedule
Create schedule
POST
/schedules/{projectId}/{dataset}Use it in a workflow
- Add a step and choose the Sanity connector.
- Pick the Create Schedule action (under Scheduling).
- Fill in the fields below, then reference the result from later steps as
{{createSchedule.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"documents": [
{
"documentId": "f28fe6ce-0454-42c2-8a9a-c469fbf79281",
"ifRevisionId": "string"
}
],
"name": "December 2077 release",
"executeAt": "2077-12-25T19:45:00.000Z",
"description": "Documents to publish at the end of 2077",
"action": "publish"
}
Response
Returns 200 with an object. Read it in later steps with {{createSchedule.response.data.<field>}}.
{
"id": "sch-28MRSuc1Ij4xtNa1rNbhTlMAszj",
"name": "March update",
"description": "string",
"projectId": "hb6nr9ev",
"dataset": "production",
"author": "poLhU1V3X",
"action": "publish",
"state": "scheduled",
"stateReason": "execution completed",
"documents": [
{
"documentId": "f28fe6ce-0454-42c2-8a9a-c469fbf79281",
"documentType": "article",
"ifRevisionId": "string"
}
],
"createdAt": "2022-04-27T01:54:31.536236Z",
"executeAt": "2022-04-27T01:55:00Z"
}
Need more? See the Sanity guide for connection setup and behaviour shared by every action.
Was this page helpful?