Skip to content

Cancel a pending scheduled action

POST
/admin/scheduled-actions/{id}/cancel

Cancels a scheduled action before it fires (ADR 0020). Only a pending action can be cancelled; a done / failed / already- cancelled one is terminal and returns 409. This is the reason scheduled actions are a durable table rather than raw enqueued jobs: a subscription-expiry action must be cancellable if the subscription renews.

id
required
string format: uuid

The action after cancellation.

One row of the scheduled_actions table (ADR 0020) — a declarative future action executed by the reaper through the jobs queue.

object
id
required
string format: uuid
action
required
string
Allowed values: restrict delete change_state change_sensitivity notify
target_kind
required
string
Allowed values: asset post collection user
target_id
required

The target’s id as text. A UUID for asset/post/collection, a user ref for user — the column is polymorphic across both.

string
params

Per-action parameters. For change_sensitivity, a to field naming the target tier; for change_state, a to_state code; for delete, an optional reason.

object
key
additional properties
any
scheduled_for
required
string format: date-time
state
required
string
Allowed values: pending done cancelled failed
error

Failure message when state is failed; null otherwise.

string
nullable
created_by

User who scheduled it; null for system-scheduled actions.

integer format: int64
nullable
created_at
required
string format: date-time
executed_at

When the reaper ran it; null while pending or cancelled.

string format: date-time
nullable

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Authenticated but missing required capabilities

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Resource not found

object
error
required

Human-readable error summary

string
Example
the request could not be completed

The action is not pending and cannot be cancelled.

object
error
required

Human-readable error summary

string
Example
the request could not be completed