Delete an API key from your workspace. This operation is irreversible and will immediately invalidate the key.
Path Parameters
The unique identifier of the API key to delete
Response
Number of API keys deleted (should be 1 if successful)
Example Request
curl -X DELETE \
'https://your-flowise-instance.com/api/v1/apikey/key-789' \
-H 'Authorization: Bearer YOUR_API_KEY'
Example Response
{
"affected": 1,
"raw": []
}
Important Warnings
Deleting an API key will immediately invalidate it. Any applications or services using this key will lose access instantly.
Before Deleting
Before deleting an API key:
- Identify Usage - Determine which applications/services use this key
- Create Replacement - If needed, create a new API key first
- Update Applications - Update all applications to use the new key
- Test - Verify applications work with the new key
- Delete Old Key - Only then delete the old key
Impact
When you delete an API key:
- All API requests using this key will immediately fail with 401 Unauthorized
- Any embedded chatbots using this key will stop working
- Scheduled jobs or automation using this key will fail
- The key cannot be recovered or restored
Key Rotation Process
- Create a new API key with the same permissions
- Update applications to use the new key
- Monitor for any failed requests using the old key
- Once confirmed all usage has switched, delete the old key
Audit Trail
Deletion events are logged for security auditing:
- Who deleted the key
- When it was deleted
- Which key was deleted
Check your audit logs to review API key deletions.
Recovery
Deleted API keys cannot be recovered. You must create a new key if you deleted one by mistake.
If you accidentally deleted an API key:
- Create a new API key with the same permissions
- Update all affected applications with the new key
- Test thoroughly to ensure everything works
Error Responses
Unauthorized - Invalid or missing authentication
Forbidden - Insufficient permissions to delete API keys
Not Found - API key with specified ID not found
Precondition Failed - Missing required ID parameter or workspace ID
Internal Server Error - Error deleting API key