Overview
Permanently delete an API key. The key will be immediately revoked and can no longer be used for authentication.
Warning: This action is immediate and irreversible. Any applications using this key will lose access.
Security: All key deletions are logged to audit logs with timestamp and user information.
Query Parameters
UUID of the API key to deleteExample: “550e8400-e29b-41d4-a716-446655440000”
Response
Returns the deleted API key object as confirmation.
UUID of the deleted API key
The key value (now revoked and unusable)
When the key was created (ISO 8601)
When the key was last modified (ISO 8601)
Original expiration date (ISO 8601)
When the key was last used (ISO 8601). null if never used.
Email address of the user who created the key
Email address of the user who deleted the key
Example Request
curl -X DELETE "https://api.airweave.ai/v1/api-keys?id=550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"organization_id": "770e8400-e29b-41d4-a716-446655440001",
"decrypted_key": "awv_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"created_at": "2024-03-15T10:00:00Z",
"modified_at": "2024-03-15T10:00:00Z",
"expiration_date": "2024-06-13T10:00:00Z",
"last_used_date": "2024-03-20T14:30:00Z",
"created_by_email": "user@company.com",
"modified_by_email": "admin@company.com"
}
When to Delete Keys
- After rotation: Delete old keys once migration is complete
- Unused keys: Remove keys that haven’t been used (
last_used_date is old or null)
- Expired keys: Clean up keys past their
expiration_date
- Security incident: Immediately revoke potentially compromised keys
- Employee offboarding: Remove keys when team members leave
Error Responses
API key with the specified ID does not exist or does not belong to your organization
Missing or invalid authentication
Cannot delete the API key currently being used for authentication. Use a different key to delete this one.