OpenSOP API Reference v0.1

Cancel an instance

POST /sop/:name/:id/cancel

Terminates a running instance immediately. The instance moves to the cancelled state. Any pending steps are skipped. This action is irreversible.

AUTH
Requires X-SOP-Token header. See Authentication.

Path parameters

name string REQUIRED
The process name.
id string REQUIRED
The instance ULID.

Response

200 application/json — Instance in cancelled state.

Errors

404 not_found Instance does not exist.
422 invalid_transition Instance is already in a terminal state.
curl https://api.opensop.dev/sop/customer-onboarding/01HXYZ_ACME_001/cancel \
  -X POST \
  -H "X-SOP-Token: $OPENSOP_TOKEN"
RESPONSE 200
{
  "id":    "01HXYZ_ACME_001",
  "state": "cancelled"
}