Change a schedule
Change a schedule (schedules:manage); the next run is recomputed
Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.
AuthorizationBearer <token>API key (stk_...), or in the Community Edition the access token (stk_local_...)
id*stringIdempotency-Key?stringReplays the stored response when the same key is repeated with the same method, path,
query string and body within 24 hours (422 idempotency_mismatch with a different
request, 409 idempotency_in_progress while the first one runs). Not applied to
multipart uploads or to responses that carry a secret.
length <= 200application/json- body
collection?stringCollection id or exact name (create only)
name?stringlength <= 100channels?array<string>items <= 50kind?string"once""recurring"run_at?stringonce: in the future
date-timerule?When a recurring schedule runs: times (HH:MM) on weekdays in tz, or every N minutes
pick?string"next""selected""all"post_ids?array<string>items <= 200source?string"none""agent""endpoint"endpoint_url?stringuriendpoint_secret?stringSigns the request like a webhook (X-Staqly-Signature); generated when empty, and returned in full once in this response
enabled?booleanOK
application/json- response
id*stringcollection_id*stringcollection_name*stringname*stringchannels*array<string>Channel ids the chosen posts go to (a post's own targets win)
channel_names*array<string>kind*string"once""recurring"run_at*|once only
date-timerule*When a recurring schedule runs: times (HH:MM) on weekdays in tz, or every N minutes
pick*stringnext: the oldest waiting draft; selected: post_ids; all: every waiting draft
"next""selected""all"post_ids*array<string>source*stringWhen nothing waits: do nothing, ask an agent (schedule.posts_requested, GET /v1/work) or fetch posts from endpoint_url
"none""agent""endpoint"endpoint_url*stringendpoint_secret?stringsource endpoint only: the HMAC key of X-Staqly-Signature (sha256=hex(HMAC_SHA256(secret, timestamp + '.' + body)), like a webhook). Shown in full only when staqly generated it, in that create or update response (send an empty endpoint_secret to generate one); a secret you chose is never echoed back; elsewhere masked as ****<last 4>.
enabled*booleannext_run_at*|date-timelast_run_at*|date-timelast_result*stringWhat the last run did, or why it failed
created_at*stringdate-timeupdated_at*stringdate-timecurl -X PATCH 'https://staqly.example.com/v1/schedules/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "collection_id": "string", "collection_name": "string", "name": "string", "channels": [ "string" ], "channel_names": [ "string" ], "kind": "once", "run_at": "2019-08-24T14:15:22Z", "rule": { "times": [ "09:00", "17:30" ], "weekdays": [ 0 ], "tz": "Europe/Warsaw", "every_minutes": 5 }, "pick": "next", "post_ids": [ "string" ], "source": "none", "endpoint_url": "string", "endpoint_secret": "string", "enabled": true, "next_run_at": "2019-08-24T14:15:22Z", "last_run_at": "2019-08-24T14:15:22Z", "last_result": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}