Skip to Content
Growth Engine APIAuthentication

API authentication

Available. POST/GET/PATCH/DELETE /v1/keys and GET /v1/keys/scopes are live.

Server-to-server calls use a tenant API key:

Authorization: Bearer glpk_<prefix>_<secret>
  • The prefix is safe to log and appears in the key list; the secret is shown once at issuance and stored hashed.
  • Keys carry scopes (GET /v1/keys/scopes lists them: keys:manage, users:read, users:write, flows:read|write|run, sources:read|write, contacts:read|write, results:read, adapters:manage, webhooks:manage, branding:manage). A key acts for the whole tenant; there is no narrower scope to select per request. Your bootstrap key (issued with the tenant) has every scope.
  • Issue further keys with POST /v1/keys { "name", "scopes"?, "expiresAt"? }; the plaintext is returned once; GET /v1/keys lists prefixes and status only.
  • Rotation = issue a new key, then revoke the old one; revocation takes effect within 60 s.
  • Keys are for your backend only. Browsers never hold an API key; GUI users get a session token instead.

Who can call what: gates

Every Engine route declares a gate: admin, tenant, or user. Gates are hierarchical (admin ⊇ tenant ⊇ user):

Your credentialPrincipal kindCan call routes gated…
Soiltech-operator API key (provisioning; not tied to a tenant; used by Soiltech’s Engine Admin console; not available to tenants)adminadmin, tenant, user
Your tenant API key (glpk_…)tenanttenant, user
A GUI user’s session cookieuseruser only
  • The gate says who may call a route. Scopes on a tenant key say what it may do on tenant- and user-gated routes (e.g. flows:write, adapters:manage). Admin keys hold every scope; user sessions have none; a user acts as themselves inside their tenant and only on the flows, sources, contacts and lists they own (who owns what).
  • A handful of routes are user-exact (GET /v1/auth/me, POST /v1/auth/logout); an API key has no session, so keys get 403 there.
  • Public (no gate): /healthz, /readyz, /openapi.json, POST /v1/auth/session, GET /verify/{token}.
  • Errors: no or invalid credential → 401; wrong kind for the gate or missing scope → 403.
Route familyGateTenant-key scopes
/v1/tenants… (Soiltech provisioning)adminnone
/v1/keys (your keys)tenantkeys:manage
/v1/users…, session-tokens, verificationstenantusers:read / users:write
POST /v1/auth/sessionpublicnone
GET /v1/auth/me, POST /v1/auth/logoutuser (exact)none
/v1/sources, /v1/events, /v1/contactsusersources:*, events:write, contacts:*
/v1/flows… (CRUD, enable/disable, run)userflows:read / flows:write / flows:run
runs, /v1/sources/{id}/status, /v1/reportsuserresults:read
/v1/adapters (+ /test)tenantadapters:manage
/v1/webhooks…tenantwebhooks:manage
/v1/brandingtenantbranding:manage