Skip to main content
DELETE
/
api
/
v1
/
apikey
/
{id}
Delete API Key
curl --request DELETE \
  --url https://api.example.com/api/v1/apikey/{id}
{
  "401": {},
  "403": {},
  "404": {},
  "412": {},
  "500": {},
  "affected": 123,
  "raw": [
    {}
  ]
}
Delete an API key from your workspace. This operation is irreversible and will immediately invalidate the key.

Path Parameters

id
string
required
The unique identifier of the API key to delete

Response

affected
number
Number of API keys deleted (should be 1 if successful)
raw
array
Raw database response

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:
  1. Identify Usage - Determine which applications/services use this key
  2. Create Replacement - If needed, create a new API key first
  3. Update Applications - Update all applications to use the new key
  4. Test - Verify applications work with the new key
  5. 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

  1. Create a new API key with the same permissions
  2. Update applications to use the new key
  3. Monitor for any failed requests using the old key
  4. 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:
  1. Create a new API key with the same permissions
  2. Update all affected applications with the new key
  3. Test thoroughly to ensure everything works

Error Responses

401
error
Unauthorized - Invalid or missing authentication
403
error
Forbidden - Insufficient permissions to delete API keys
404
error
Not Found - API key with specified ID not found
412
error
Precondition Failed - Missing required ID parameter or workspace ID
500
error
Internal Server Error - Error deleting API key

Build docs developers (and LLMs) love