Overview
You have two ways to cancel. Use the cancel endpoint to drop a scheduled action by ID; it only works while the action is inscheduled state. Or use onConflict: "cancel_and_replace" on a fresh push to cancel the colliding action and apply the new one in a single round-trip.
Pattern A: Cancel a scheduled action by ID
Step 1: Schedule an action
Step 2: Cancel before it fires
data with state: cancelled. It will not fire.
Cancellation only works in scheduled state
Once the action is in flight, cancel returns409 ACTION_NOT_CANCELLABLE.
completed or failed.
Pattern B: Cancel and replace in a single push
When the new intent is also a push, combine the cancellation into the new request. This avoids a race where the original fires between cancel and re-push.GET /actions/act_pending_001 returns data.state: cancelled.
When cancel_and_replace cannot help
If the colliding action is alreadyacknowledged, the cancel half of cancel_and_replace fails. You get 409 CONFLICT with the in-flight action ID.
completed or failed, retry the push.
What next
Handle conflict 409s
Both onConflict strategies, plus SCHEDULER_ACTIVE behaviours.
Schedule a charge for later
Recipe that creates the kind of action this page cancels.
Subscribe to webhooks
Detect terminal state transitions without polling.
Canonical actions
The action lifecycle and where cancellation fits.