Create a new API key for authenticating requests to Flowise. API keys can be scoped with specific permissions.
Request Body
User-defined name for the API key
Array of permission strings to grant to this API key. Must be a non-empty array of strings.
Response
Unique identifier for the created API key
The API key value - save this immediately as it won’t be shown again
Array of granted permissions
When the API key was created
ID of the workspace containing this API key
Example Request - Execute Only
curl -X POST \
'https://your-flowise-instance.com/api/v1/apikey' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"keyName": "Production Execute Key",
"permissions": [
"chatflows:execute",
"agentflows:execute"
]
}'
Example Request - Full Access
curl -X POST \
'https://your-flowise-instance.com/api/v1/apikey' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"keyName": "Development Full Access",
"permissions": [
"chatflows:view",
"chatflows:create",
"chatflows:update",
"chatflows:delete",
"chatflows:execute",
"agentflows:view",
"agentflows:create",
"agentflows:update",
"agentflows:delete",
"agentflows:execute",
"credentials:view",
"credentials:create",
"tools:view",
"tools:create"
]
}'
Example Response
{
"id": "key-789",
"keyName": "Production Execute Key",
"apiKey": "fsk_1234567890abcdefghijklmnopqrstuvwxyz",
"permissions": [
"chatflows:execute",
"agentflows:execute"
],
"createdDate": "2024-01-20T16:30:00Z",
"updatedDate": "2024-01-20T16:30:00Z",
"workspaceId": "workspace-123"
}
Available Permissions
Execution Permissions
chatflows:execute - Execute chatflows via API
agentflows:execute - Execute agentflows via API
Management Permissions
chatflows:view - View chatflow configurations
chatflows:create - Create new chatflows
chatflows:update - Update existing chatflows
chatflows:delete - Delete chatflows
agentflows:view - View agentflow configurations
agentflows:create - Create new agentflows
agentflows:update - Update existing agentflows
agentflows:delete - Delete agentflows
Resource Permissions
credentials:view / credentials:create / credentials:update / credentials:delete
tools:view / tools:create / tools:update / tools:delete
documentStores:view / documentStores:create / documentStores:update / documentStores:delete
apikeys:view / apikeys:create / apikeys:update / apikeys:delete
Best Practices
Save your API key immediately! The full key is only shown once during creation. After that, it will be masked for security.
- Principle of Least Privilege - Grant only the permissions needed
- Separate Keys by Use Case - Create different keys for different applications
- Rotate Regularly - Delete and recreate keys periodically
- Secure Storage - Store keys in environment variables or secret managers
- Monitor Usage - Track API key usage for security
Common Permission Sets
Public Execution Key
For embedding chatbots:
["chatflows:execute", "agentflows:execute"]
Development Key
For testing and development:
[
"chatflows:view", "chatflows:create", "chatflows:update", "chatflows:execute",
"agentflows:view", "agentflows:create", "agentflows:update", "agentflows:execute"
]
Admin Key
For administrative operations:
[
"chatflows:view", "chatflows:create", "chatflows:update", "chatflows:delete",
"agentflows:view", "agentflows:create", "agentflows:update", "agentflows:delete",
"credentials:view", "credentials:create", "credentials:update", "credentials:delete",
"tools:view", "tools:create", "tools:update", "tools:delete",
"apikeys:view", "apikeys:create", "apikeys:update", "apikeys:delete"
]
Error Responses
Bad Request - Missing keyName or permissions, or permissions not a non-empty array of strings
Unauthorized - Invalid or missing authentication
Forbidden - Insufficient permissions to create API keys
Precondition Failed - Request validation failed
Internal Server Error - Error creating API key