List pending steps
GET
/sop/steps/pending
Returns all steps across all instances that are in the active state and of type automated. External workers poll this endpoint to discover work.
Response
200
application/json — Array of active automated step objects with their instance context.
Errors
401
unauthorized
Token missing or revoked.
curl https://api.opensop.dev/sop/steps/pending \ -H "X-SOP-Token: $OPENSOP_TOKEN"
const pending = await fetch(
"https://api.opensop.dev/sop/steps/pending",
{ headers: { "X-SOP-Token": process.env.OPENSOP_TOKEN } }
).then(r => r.json());
resp = requests.get(
"https://api.opensop.dev/sop/steps/pending",
headers={"X-SOP-Token": os.environ["OPENSOP_TOKEN"]}
)
Net::HTTP.start("api.opensop.dev", use_ssl: true) do |h|
req = Net::HTTP::Get.new("/sop/steps/pending")
req["X-SOP-Token"] = ENV["OPENSOP_TOKEN"]
puts h.request(req).body
end
RESPONSE
200
[
{
"step_id": "send-welcome-email",
"instance_id": "01HXYZ_ACME_001",
"process": "customer-onboarding",
"inputs": { "email": "[email protected]" }
}
]