flowawsome@flowaws/node-sdk

Quickstart

Create a tenant, get an API key, and route your first approval instance. Every step below is plain REST — swap in whichever HTTP client your stack already uses.

1Create your organization

POST /onboarding/signup is public and IP rate-limited — it creates a brand-new organization plus its first admin account, and hands back both a session token and an API key in one response.

curl -X POST https://api.flowawsome.com/v1/onboarding/signup \
  -H "Content-Type: application/json" \
  -d '{
    "companyName": "Acme Inc",
    "slug": "acme",
    "adminEmail": "admin@acme.com",
    "adminDisplayName": "Acme Admin",
    "adminPassword": "correct-horse-battery-staple"
  }'

2Pick a credential

The response from step 1 gives you two different credentials for two different callers — use whichever matches who's making the next call:

  • accessToken — a session JWT for the admin user you just created. Send it as Authorization: Bearer <token> from a logged-in user's browser or backend-for-frontend.
  • apiKey.rawToken — a service-scoped key. Send it as X-Api-Key: <token> from another system calling flowawsome server-to-server. It's shown once, in this response — issue a new one via POST /access-control/api-keys if you lose it.

3Route an approval instance

This is the call an external system (ERP, an internal tool) makes to kick off an approval — the resolution engine picks the workflow definition and approver chain for you.

curl -X POST https://api.flowawsome.com/v1/services/$SERVICE_ID/workflow-instances \
  -H "X-Api-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "resourceType": "purchase_order",
    "resourceId": "po-10231",
    "initiatorUserId": "'$USER_ID'",
    "idempotencyKey": "po-10231-submit-1"
  }'

See the Workflow API in the Reference for step actions (approve/reject) and instance status polling.

4Verify webhooks and tokens with the Node.js SDK

@flowaws/node-sdk is optional — everything above is reproducible with plain REST — but it does two things locally, without calling back into the API: verifying a webhook signature, and verifying an access token.

npm install @flowaws/node-sdk

5Next steps

  • Building your own login screen instead of the hosted admin console? The Auth endpoints under the Identity API are a stable public contract you can call directly — see Identity API.
  • Registering a webhook endpoint to receive workflow events — see POST /workflows/webhook-endpoints in the Workflow API.
  • Granting a department or job title access to a service instead of one API key at a time — see the Access Control API.