Update a Schedule
Parameters
namestring
Optional name for the schedule
scheduledAtstring
Optional ISO 8601 timestamp for when the schedule should execute
endpointstring
Optional URL endpoint to call
datarecord
Optional JSON data to include in the request
tagsstring[]
Optional array of tags for the schedule
Returns
Returns the updated schedule object. Returns error if the schedule fails to update.
PATCH/schedules/{id}
curl -X PATCH https://api.next-cron.com/schedules/49d10214-f4f1-497a-94b7-c0e597ad3fea \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Schedule",
"scheduledAt": "2024-03-21T15:00:00Z",
"tags": ["new-tag"]
}'
Response
{
"id": "49d10214-f4f1-497a-94b7-c0e597ad3fea",
"name": "Updated Schedule",
"scheduledAt": "2024-03-21T15:00:00Z",
"status": "Pending",
"endpoint": "https://www.example.com/api/webhook",
"data": {
"userId": "123"
},
"tags": [
"new-tag"
],
"createdAt": "2024-03-19T10:30:00Z"
}