DevFlow
Docs/API and SDKs

REST API authentication: keys, scopes, rotation, IP allow-list

Owner Priya Iyer · Last updated 2026-04-05 · v3.9
apiauthapikeytokenrotationservice-account

REST API authentication

DevFlow uses personal access tokens (PATs) and service-account API keys. Use a service account for CI; PATs are for humans logged in via the dashboard.

creating a service-account key

bash
devflow service-accounts create ci-payments   --scope monitor:write   --scope monitor:read   --scope channel:write

The output prints the key once. Store it in your CI's secret store; you can never read it again.

available scopes

ScopePermits
monitor:readList + read monitors
monitor:writeCreate/update/delete monitors
slo:readList + read SLOs
slo:writeCreate/update/delete SLOs
channel:readList + read alert channels
channel:writeCreate/update/delete alert channels
incident:readList + read incidents
incident:writeAcknowledge/resolve incidents
*:readAll read scopes
*Everything (avoid; use scoped keys)

using the key

bash
curl -H "Authorization: Bearer df_pat_xxx" https://api.devflow.io/v1/monitors

The CLI reads $DEVFLOW_API_KEY automatically.

IP allow-list

Service-account keys can be restricted to a list of IP CIDRs:

bash
devflow service-accounts allow-ip ci-payments --cidr 203.0.113.0/24

A request from outside the allow-list returns 401 with request_id.

rotation

bash
devflow service-accounts rotate ci-payments

This issues a new key, marks the old one for revocation 48 hours later. Both work during the overlap. Use the overlap to push the new key to your CI without downtime. The whole flow is in variables-and-secrets.

audit

Every key creation, scope change, IP allow-list change, and rotation is in the audit log, retained 365 days. PATs work the same way; see Settings → Audit.

Related questions

Was this helpful?
Or ask the docs bot for a follow-up — the floating button bottom-right.