OpenSOP API Reference v0.1

Submit a step

POST /sop/:name/:id/steps/:step_id/submit

Advances a step by providing its outputs. The step must be in the active state. Submitting a terminal step or a step in the wrong state returns 422 invalid_transition.

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

Path parameters

name string REQUIRED
The process name.
id string REQUIRED
The instance ULID.
step_id string REQUIRED
The step id as declared in the process YAML.

Request body

Content-Type: application/json

outputs object REQUIRED
Key-value map of step outputs as declared in the process YAML.

Response

200 application/json — Updated step object.

Errors

422 invalid_transition Step is not in the active state.
404 not_found Instance or step not found.
curl https://api.opensop.dev/sop/customer-onboarding/01HXYZ_ACME_001/steps/review-application/submit \
  -X POST \
  -H "X-SOP-Token: $OPENSOP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"outputs":{"decision":"approved","reason":"Documents verified"}}'
RESPONSE 200
{
  "id":      "review-application",
  "state":   "completed",
  "outputs": { "decision": "approved" }
}