# API Keys

Create an API key to make API request to FlowGenie. Use them to secure published flows and to gate form access when you embed or post submissions from your own code.

## Create an API key [Permalink for this section](/content/docs/api-keys#create-an-api-key/index.html)

- In the app, go to **Settings → API**.
- Click **Create API Key**, name it after the system that will use it (e.g. “Prod backend”), and confirm.
- Copy the key from the success dialog—this is the only time it is shown—and store it in your secret manager or environment variables.
- Keep keys out of client-side code; inject them from your backend or deployment platform.

## Manage keys [Permalink for this section](/content/docs/api-keys#manage-keys/index.html)

- Keys are scoped to a workspace, so you can make separate keys per environment or integration.
- Rotate keys by creating a new one, updating any deployments to use it, then deleting the old key in **Settings → API** to revoke access immediately.
- Keys are masked after creation and cannot be recovered; delete and recreate if a key is ever exposed.

## Call flows with an API key [Permalink for this section](/content/docs/api-keys#call-flows-with-an-api-key/index.html)

- Publish a flow to get its REST endpoint at `https://app.flowgenie.pro/api/flow/{flowId}`.
- Send the key in the `Authorization` header on each request:

```

curl -X POST "https://app.flowgenie.pro/api/flow/<FLOW_ID>" \
  -H "Authorization: Bearer fk_example_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "email": "customer@example.com" }'
```

## Submit forms with an API key [Permalink for this section](/content/docs/api-keys#submit-forms-with-an-api-key/index.html)

- When you embed a headless form or post submissions directly, include the same header. Non-public forms reject requests without a workspace key.
- Fetch a form definition and submit answers:

```

const res = await fetch('https://app.flowgenie.pro/api/headless/forms/my-form', {
  headers: { Authorization: 'Bearer fk_example_api_key' }
})
const form = await res.json()

await fetch('https://app.flowgenie.pro/api/headless/forms/my-form/submit', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer fk_example_api_key'
  },
  body: JSON.stringify({ questionKey: 'answer' })
})
```

Last updated on January 18, 2026

[Call your flow externally](/content/docs/flows/rest "Call your flow externally"/index.html)
