Skip to main content

Authentication

All API requests require authentication via API key.

Getting an API Key

  1. Go to Settings > API Keys in the FlowMaestro dashboard
  2. Click Create API Key
  3. Name your key and select the required scopes
  4. Copy the key immediately — it won't be shown again

API Key Format

API keys use prefixes to identify their environment:

PrefixEnvironmentDescription
fm_live_ProductionFor production use
fm_test_TestFor development/testing

Using Your API Key

You can authenticate using either method:

curl https://api.flowmaestro.ai/v1/workflows \
-H "X-API-Key: fm_live_your_api_key"

Authorization Bearer Header

curl https://api.flowmaestro.ai/v1/workflows \
-H "Authorization: Bearer fm_live_your_api_key"

API Key Scopes

Scopes control what operations an API key can perform:

Workflow Scopes

ScopeDescription
workflows:readList and get workflows
workflows:executeExecute workflows

Execution Scopes

ScopeDescription
executions:readRead execution status/results
executions:cancelCancel running executions

Agent Scopes

ScopeDescription
agents:readList and get agents
agents:executeExecute agents (send messages)

Thread Scopes

ScopeDescription
threads:readRead conversation threads
threads:writeCreate/update threads

Trigger Scopes

ScopeDescription
triggers:readList triggers
triggers:executeExecute triggers manually

Knowledge Base Scopes

ScopeDescription
knowledge-bases:readList and get knowledge bases
knowledge-bases:queryQuery (semantic search)

Webhook Scopes

ScopeDescription
webhooks:readList and get webhooks
webhooks:writeCreate/update/delete webhooks

Scope Bundles

Pre-defined scope collections for common use cases:

BundleIncluded Scopes
workflow-executorworkflows:read, workflows:execute, executions:read, executions:cancel, triggers:read, triggers:execute
agent-executoragents:read, agents:execute, threads:read, threads:write
knowledge-base-readerknowledge-bases:read, knowledge-bases:query
read-onlyAll read scopes
full-accessAll scopes

Managing API Keys

Rotate a Key

Rotating a key revokes the old key and creates a new one:

  1. Go to Settings > API Keys
  2. Click the Rotate button on the key
  3. Copy the new key immediately

Revoke a Key

  1. Go to Settings > API Keys
  2. Click Delete on the key to revoke it

Security Best Practices

warning

Never expose your API key in client-side code or public repositories.

  • Store keys securely — Use environment variables or secret managers
  • Use minimum scopes — Only grant the permissions you need
  • Rotate regularly — Rotate keys periodically for security
  • Monitor usage — Check the "last used" timestamp in the dashboard
  • Set expiration — Configure key expiration for temporary access
  • Use test keys — Use fm_test_ keys during development

Error Responses

HTTP StatusError CodeDescription
401invalid_api_keyMissing or invalid API key
401expired_api_keyAPI key has expired
401revoked_api_keyAPI key has been revoked
403insufficient_scopeMissing required scope for endpoint
429rate_limit_exceededRate limit exceeded