AdminTerminate (stop) a workflow run

Terminate (stop) a workflow run

Stops a workflow instance. The stop is recorded authoritatively in the registry (and is immutable thereafter) and the engine terminate is invoked best-effort. Stopping an already-finished instance is an idempotent success. Requires dual auth: X-Admin-API-Key + JWT.

curl -X POST "https://api.spkey.co/admin/workflows/example_string/terminate" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "success": true,
  "instanceId": "example_string",
  "status": "example_string",
  "message": "example_string"
}
POST
/admin/workflows/{instanceId}/terminate
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.
API Key (header: X-API-Key)
X-API-Keystring
Required

API key for B2B organization access. Provided during organization onboarding.

API key for B2B organization access. Provided during organization onboarding.
path
instanceIdstring
Required

Workflow instance id

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

header
X-API-Keystring
Required

API Key for authentication. API key for B2B organization access. Provided during organization onboarding.

Path Parameters

instanceIdstring
Required

Workflow instance id

Responses

successboolean
Required
instanceIdstring
Required
statusstring
Required

Status after the terminate attempt

messagestring