Execute Scheduled Cancel

View as Markdown
Execute a scheduled cancellation (cancel_at_period_end / cancel_at). This endpoint is INTERNAL and only callable by Restate workflows. It is invoked by the `execute_cancel` handler when the deferred cancellation timer fires. The endpoint re-reads the subscription and only proceeds if the scheduled cancellation flags are still set. If the customer reactivated during the scheduled window (clearing cancel_at_period_end / cancel_at), the request is a no-op — preventing a stale timer from hard-cancelling a revived subscription. Returns ExecuteScheduledCancelResponse with status: - "cancelled": Cancellation executed successfully - "skipped": No scheduled cancellation (reactivated) or already cancelled - "failed": Cancellation attempt raised an error

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

subscription_idstringRequired
account_idstringRequired

Headers

X-Restate-Secret-Keystring or nullOptional
X-System-Reasonstring or nullOptional

Response

Successful Response
statusenum
subscription_idstring or nullOptional
reasonstring or nullOptional

Errors

422
Unprocessable Entity Error