Docs
Write a workflow in TypeScript or Python, deploy it with one call, and start it from any webhook.
Quickstart
From a new account to a finished run.
- Sign up
Create an account at app.shiftlabs.org with a second factor, then name your workspace.
- Create an API key
An admin creates a key with the
developerrole under API keys. It is shown once; export it asSHIFTLABS_API_KEY. - Write a workflow
One module whose default export is
workflow(…). See Workflows. - Deploy it
PUT /v1/workflows/:namewith the source as the body. The answer carries the new version hash. - Create a trigger
POST /v1/triggersanswers with the trigger URL. Point any webhook sender at it. - Send a delivery
The trigger answers
202with arunId. Follow the run in the dashboard or at/v1/runs/:id/timeline.
# Deploy. Answers {"versionHash", "sizeBytes", "warnings"}.
curl -X PUT https://api.shiftlabs.org/v1/workflows/refund-check \
-H "authorization: Bearer $SHIFTLABS_API_KEY" \
--data-binary @refund-check.ts
# Create a trigger. Answers 201 {"triggerId", "url", "signingScheme"}.
curl -X POST https://api.shiftlabs.org/v1/triggers \
-H "authorization: Bearer $SHIFTLABS_API_KEY" -H "content-type: application/json" \
-d '{"workflow": "refund-check"}'
# Start a run. Answers 202 {"runId"}.
curl -X POST https://hooks.shiftlabs.org/t/<triggerId> \
-H "content-type: application/json" -d '{"id": "ch_123"}'
# Follow it.
curl https://api.shiftlabs.org/v1/runs/<runId>/timeline \
-H "authorization: Bearer $SHIFTLABS_API_KEY"
Concepts
The handful of things everything else is built from.
- Workflow
A named module in your workspace. Every deploy adds a version with an 8-character hash and the next revision letter: A, B … Z, AA.
- Run
One execution, pinned to the version that was current when its delivery arrived. A run is queued, running or sleeping, then completed or failed.
- Trigger
A URL at
hooks.shiftlabs.org/t/…that starts runs of one workflow, optionally only for signed deliveries. - Secret
An encrypted value with hosts. Your code holds a stand-in for it, and the gateway swaps in the value for those hosts only. Marked
readable,reveal()returns it; markedhmac,sign()signs with it. - Connection
Hosts plus an auth template, owned by an admin. The gateway applies it to every request to those hosts, for placement the code can't change. See Connections.
- Var
Plain configuration: a workspace value, overridden per workflow. See Vars.
- API key
A
slk_…key with one role, valid for 1 to 365 days.