Authentication
The public API is served from https://api.flownally.com/v1 and uses bearer API keys. Each key belongs to a service account, which is the identity your integration acts as.
Send the API key
Send the key in the Authorization header of every request:
curl "https://api.flownally.com/v1/contacts:count" \
-H "Authorization: Bearer $FLOWNALLY_API_TOKEN"- Use the bearer format. Send the header as
Authorization: Bearer $FLOWNALLY_API_TOKEN. - Declare JSON bodies. Send
Content-Type: application/jsonwith every JSON request body. - Keep keys on your server. Call the API only from your backend. Never ship a key to a browser, mobile app or client-side bundle.
Service accounts
A service account represents software, such as a CRM sync, a reporting job or an internal tool. People sign in to the Flownally app with their own accounts. Service accounts are for integrations that run without a person.
When you revoke a key, your team needs to know what breaks. Create one service account per integration and environment, and name it after both, for example Production CRM sync or Staging reporting export.
Create your first service account in the app: go to Settings > API access and select Create service account. Flownally creates the first API key with it.
You need the Owner or Admin role. For step-by-step instructions, see How to create a service account.
After that, you can also manage service accounts with the API:
curl -X POST "https://api.flownally.com/v1/service-accounts" \
-H "Authorization: Bearer $FLOWNALLY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Production CRM sync",
"description": "Keeps contacts in sync with the CRM."
}'Deleting a service account revokes all of its API keys.
API keys
An API key is the secret your integration sends as the bearer token. Keys start with flw_ and are 48 characters long.
Key metadata includes keyPrefix, the first 8 characters, so you can tell keys apart without seeing the secret.
The plaintext key is shown once: in the app's API key created dialog, or in the key field of the Create API key response. Listing keys returns metadata only.
curl -X POST "https://api.flownally.com/v1/service-accounts/$SERVICE_ACCOUNT_ID/api-keys" \
-H "Authorization: Bearer $FLOWNALLY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "CRM sync worker"
}'Store the plaintext key safely
Copy the plaintext key directly into your secret manager. Don't paste it into tickets, chat messages, screenshots or logs.
Keep each key easy to trace and easy to revoke:
- Use one key per service or job. You can then revoke one without stopping the others.
- Separate your environments. Use different keys for development, staging and production.
- Keep keys out of source code. Load them from a secret manager or environment variable.
- Record who owns each key. Note which system uses it, who owns it, and when to rotate it.
Keys don't expire. expiresAt is always 9999-12-31T23:59:59Z. A key stops working only when you revoke it or delete its service account.
lastUsedAt shows when a key last authenticated a request.
What can an API key access?
An API key works in one workspace: the workspace of its service account. It can't read or change data in any other workspace.
Within that workspace, API keys aren't limited by role. A key can call every operation, including admin actions such as revoking other API keys and deleting teams.
The Required scopes and Allowed roles on each operation in the reference apply to people signed in to the app, not to API keys.
Treat every API key as an admin credential
To limit the damage of a leaked key, give each integration its own service account and revoke keys you no longer use.
Rotate safely
If you revoke a key before its replacement is live, the integration loses access. Create the replacement key first:
Create → Deploy → Confirm → Revoke
- Create a new API key on the same service account.
- Update the secret in your runtime environment.
- Restart or redeploy the job that uses it.
- Confirm that requests succeed with the new key, and that the old key's
lastUsedAtstops changing. - Revoke the old key.
Revoke a key with Revoke API key as soon as it leaks, its service is retired, or nobody can say what it's for. Revoking takes effect on the next request.
Authentication errors
Authentication errors return a Problem Details body. Use code to tell them apart:
| Status | code | Meaning | What to do |
|---|---|---|---|
401 | gateway_auth_required | The request has no Authorization header. | Send the header with every request. |
401 | gateway_auth_invalid_token, auth_apikey_invalid_format, auth_apikey_not_found | The token is malformed, truncated or unknown. | Check the secret value and the Bearer prefix. |
403 | auth_apikey_revoked | The key was revoked, or its service account was deleted. | Create a new key. |
503 | auth_apikey_validation_unavailable | Flownally couldn't check the key. | Retry with backoff. |
For all other statuses, see Errors.
FAQ
Why does an object I expect return 404?
404?The key can only see its own workspace, so the object is either missing there or lives in another workspace. Check which workspace the key's service account belongs to.
Can I limit what an API key can do?
Not by role. Within its workspace, a key can call every operation, including admin actions. To limit the damage of a leak, give each integration its own service account and revoke keys you no longer use.
How do I tell my keys apart?
Key metadata includes keyPrefix, the first 8 characters of the key, so you don't need the secret. lastUsedAt shows when each key last authenticated a request.
Do webhook deliveries use API keys?
No. Flownally signs each delivery with your workspace's webhook signing key, using Standard Webhooks headers. To verify deliveries and rotate the signing key, see Webhooks.