Delete Api Key

Delete an API key.

This endpoint deletes an API key, ensuring that the API key belongs to the organization
associated with the API key used for authentication.

Parameters:
api_key_id (int): The ID of the API key to delete
request (Request): The FastAPI request object
db (AsyncSession): The database session (injected)
organization_id (Optional[int]): The organization ID from the API key or request

Returns:
ApiKey: The deleted API key

Raises:
HTTPException:
- 400: If organization ID is missing
- 404: If the API key is not found or not accessible
- 500: If an unexpected error occurs during deletion

Language
Credentials
Header
Click Try It! to start a request and see the response here!