⚡ REST API · v1.0.0
API Reference
Reference for the Priostack REST API: BPMN deploy, process instances, job workers, incidents, DMN decisions and CMMN cases, the task list, webhooks and your account. One origin, https://priostack.com; keys are sent as X-API-Key or Authorization: Bearer.
1 · Sign up
curl -sX POST https://priostack.com/api/signup \
-H 'Content-Type: application/json' \
-d '{"email":"you@company.com"}'
# Confirm the address: the welcome email
# that follows carries your API key.
2 · Deploy BPMN
curl -sX POST https://priostack.com/api/v1/process-definitions \
-H "Authorization: Bearer ps_your_key" \
-F "file=@my-process.bpmn"
# 200: {"id":"my-process","deployments":[...]}
3 · Start instance
curl -sX POST https://priostack.com/api/v1/process-instances \
-H "Authorization: Bearer ps_your_key" \
-H 'Content-Type: application/json' \
-d '{"bpmnProcessId":"my-process","variables":{"orderId":42}}'
# 201, 1 credit: {"processInstanceKey":"run_...",...}
4 · Poll jobs (worker)
curl -sX POST https://priostack.com/api/v1/jobs/activate \
-H "Authorization: Bearer ps_your_key" \
-H 'Content-Type: application/json' \
-d '{"type":"send-email","maxJobsToActivate":10}'
# Answers at once; sleep 1-5 s when "jobs" is []
5 · Short-lived token
# A 30-minute bearer token minted from the key
# (same authority as the key; mint it server-side):
curl -sX POST https://priostack.com/api/token \
-H 'Content-Type: application/json' \
-d '{"api_key":"ps_your_key"}'
6 · Rotate API key
# Send the current key; the answer carries the new one
# and the old key stops working at once.
curl -sX POST https://priostack.com/api/keys/rotate \
-H "X-API-Key: ps_your_key"
# 200: {"new_key":"ps_...","message":"..."}