shiftlabs Start free

Vars

Plain configuration for your workflows: a workspace value, overridden per workflow, changed without a redeploy.

Reading vars

Your code reads vars from the run context. A name that is not set reads as absent, not as an error.

refund-check
import { workflow } from "shiftlabs";

export default workflow<{ id: string }>(async ({ payload, vars, log }) => {
  const region = vars.REGION ?? "us-east";
  const limit = Number(vars.REFUND_LIMIT_CENTS ?? "5000");
  log.info("checking refund", { id: payload.id, region, limit });
});

Values are always strings. Parse numbers, flags or JSON yourself.

Workspace and workflow

A workspace var applies to every workflow. A workflow's own var with the same name wins for that workflow only.

shellcurl
# A workspace var (developer key). Answers {"name", "value", "workflow": null, "updatedAt"}.
curl -X PUT https://api.shiftlabs.org/v1/vars/REGION \
  -H "authorization: Bearer $SHIFTLABS_API_KEY" -H "content-type: application/json" \
  -d '{"value": "us-east"}'

# refund-check's own value wins over the workspace's.
curl -X PUT https://api.shiftlabs.org/v1/workflows/refund-check/vars/REGION \
  -H "authorization: Bearer $SHIFTLABS_API_KEY" -H "content-type: application/json" \
  -d '{"value": "eu-west"}'

# Delete the override: refund-check reads the workspace value again.
curl -X DELETE https://api.shiftlabs.org/v1/workflows/refund-check/vars/REGION \
  -H "authorization: Bearer $SHIFTLABS_API_KEY"

Vars · ridgeline-ops

2
NameValueOverridden by
REFUND_LIMIT_CENTS5000—
REGIONus-eastrefund-check

Workflow overrides

edit them on each workflow
WorkflowNameValue
refund-checkREGIONeu-west

Updated 2026-10-20 21:05 UTC

Vars are not secrets

Use a var for a region, a channel or a threshold. Put credentials in a secret.

Dashboard and API

Developers and admins add, change and delete vars. Viewers read them.

Routes
RouteMethodMinimum role
/v1/vars every var: [{name, value, workflow, updatedAt}], workflow null for workspace varsGETviewer
/v1/vars/:NAME {"value"}PUT · DELETEdeveloper
/v1/workflows/:workflow/vars/:NAME {"value"}PUT · DELETEdeveloper

PUT answers the var. DELETE answers {"deleted": "NAME"}, or 404 {"error": "var not found"}.