API key format
Every key looks like this:| Prefix | Environment | Use against |
|---|---|---|
jfi_sk_live_ | Production | Your real diagrams |
jfi_sk_test_ | Staging | Safe, throwaway data |
Only a SHA-256 hash of your key is stored server-side. Just Flow It can never show you the key again after creation — if you lose it, you must revoke it and create a new one.
Sending the key
Pass the key in theAuthorization header on every request, prefixed with Bearer:
Creating a key
Personal vs. organization keys
The kind of key you get — and what it can act on — depends on your plan.Pro — personal key
A Pro user gets a personal key. It acts on that user’s personal diagrams and folders.
Team — organization key
A member of a Team organization gets an org key. It acts on that organization’s diagrams and folders.
Resources carry an
organization_id: it is null for personal resources and set to the org’s id for organization resources.Scopes
A key holds a subset of the following scopes. A request that needs a scope the key does not hold is rejected with403 insufficient_scope.
| Scope | Grants |
|---|---|
diagrams:read | List, retrieve, and render diagram images |
diagrams:write | Create, update, and delete diagrams |
folders:read | List and retrieve folders |
folders:write | Create, update, and delete folders |
generate | Generate diagrams from natural-language prompts |
Security best practices
- Server-side only. Never ship a key to a browser, mobile app, or any client. The API has no CORS support precisely to discourage this.
- Use environment variables / a secret manager. Don’t hardcode keys in source or commit them to version control.
- Use test keys in non-production. Develop and run CI against
jfi_sk_test_keys so you never touch real data. - Scope minimally. Give a key only the scopes it needs (for example, a reporting job may only need
diagrams:read). - Rotate regularly. Create a new key, deploy it, then revoke the old one.
- Revoke immediately on leak. Revoking a key takes effect at once; subsequent requests return
401 revoked_api_key.
Authentication errors
Every error response uses the standard envelope and includes anX-Request-Id header. All 401 responses also include a WWW-Authenticate: Bearer header.
401 — authentication_error
| Code | When it happens |
|---|---|
missing_api_key | No Authorization: Bearer header was sent |
invalid_api_key | The key is malformed or does not match any stored key |
revoked_api_key | The key was revoked in the dashboard |
expired_api_key | The key has expired |
403 — permission_error
| Code | When it happens |
|---|---|
plan_required | The account is on the Free plan and cannot use the API |
insufficient_scope | The key is valid but does not hold the scope the endpoint requires |
Example: missing scope (403)
Example: missing scope (403)
Calling
POST /v1/diagrams with a key that holds diagrams:read but not diagrams:write:Example: Free plan (403)
Example: Free plan (403)