Implementation:BerriAI Litellm Email Alert Types
Appearance
| Attribute | Value |
|---|---|
| Sources | enterprise/litellm_enterprise/types/enterprise_callbacks/send_emails.py |
| Domains | Types, Email, Enterprise Callbacks |
| Last Updated | 2026-02-15 16:00 GMT |
Overview
This module defines Pydantic models and enums used for email alerting events, settings management, and email parameter configuration across the enterprise email callback system.
Description
The module provides the following types:
Models:
EmailParams-- Pydantic model containing common email template parameters:logo_url,support_contact,base_url,recipient_email,subject, andsignature.SendKeyCreatedEmailEvent-- ExtendsWebhookEventwith avirtual_keyfield for key creation notifications.SendKeyRotatedEmailEvent-- ExtendsWebhookEventwithvirtual_keyand optionalkey_aliasfor key rotation notifications.EmailEventSettings-- Pairs anEmailEventwith anenabledboolean.EmailEventSettingsUpdateRequest-- Request body containing a list ofEmailEventSettingsfor bulk updates.EmailEventSettingsResponse-- Response body containing a list ofEmailEventSettings.DefaultEmailSettings-- Provides default enabled/disabled values for all email events, with helper methodsto_dict()andget_defaults().
Enums:
EmailEvent-- String enum with values:virtual_key_created= "Virtual Key Created"new_user_invitation= "New User Invitation"virtual_key_rotated= "Virtual Key Rotated"soft_budget_crossed= "Soft Budget Crossed"max_budget_alert= "Max Budget Alert"
Usage
Import these types when working with the email alerting system, email endpoints, or email settings management.
Code Reference
Source Location
enterprise/litellm_enterprise/types/enterprise_callbacks/send_emails.py
Signature
class EmailParams(BaseModel):
logo_url: str
support_contact: str
base_url: str
recipient_email: str
subject: str
signature: str
class SendKeyCreatedEmailEvent(WebhookEvent):
virtual_key: str
class SendKeyRotatedEmailEvent(WebhookEvent):
virtual_key: str
key_alias: Optional[str] = None
class EmailEvent(str, enum.Enum):
virtual_key_created = "Virtual Key Created"
new_user_invitation = "New User Invitation"
virtual_key_rotated = "Virtual Key Rotated"
soft_budget_crossed = "Soft Budget Crossed"
max_budget_alert = "Max Budget Alert"
class EmailEventSettings(BaseModel):
event: EmailEvent
enabled: bool
class EmailEventSettingsUpdateRequest(BaseModel):
settings: List[EmailEventSettings]
class EmailEventSettingsResponse(BaseModel):
settings: List[EmailEventSettings]
class DefaultEmailSettings(BaseModel):
settings: Dict[EmailEvent, bool] = ...
def to_dict(self) -> Dict[str, bool]: ...
@classmethod
def get_defaults(cls) -> Dict[str, bool]: ...
Import
from litellm_enterprise.types.enterprise_callbacks.send_emails import (
EmailEvent,
EmailParams,
SendKeyCreatedEmailEvent,
SendKeyRotatedEmailEvent,
EmailEventSettings,
EmailEventSettingsUpdateRequest,
EmailEventSettingsResponse,
DefaultEmailSettings,
)
I/O Contract
Inputs
| Type | Fields | Description |
|---|---|---|
EmailParams |
logo_url, support_contact, base_url, recipient_email, subject, signature |
Parameters for rendering email templates. |
SendKeyCreatedEmailEvent |
Inherits WebhookEvent + virtual_key: str |
Event data for key creation emails. |
SendKeyRotatedEmailEvent |
Inherits WebhookEvent + virtual_key: str, key_alias: Optional[str] |
Event data for key rotation emails. |
Outputs
| Type | Description |
|---|---|
DefaultEmailSettings.get_defaults() |
Returns Dict[str, bool] with all events enabled by default.
|
Usage Examples
from litellm_enterprise.types.enterprise_callbacks.send_emails import (
EmailEvent, DefaultEmailSettings, EmailEventSettings
)
# Get default settings
defaults = DefaultEmailSettings.get_defaults()
# {'Virtual Key Created': True, 'New User Invitation': True, ...}
# Create an event setting
setting = EmailEventSettings(
event=EmailEvent.virtual_key_created,
enabled=False,
)
Related Pages
- BerriAI_Litellm_Base_Email_Alerting -- Base class that uses these types
- BerriAI_Litellm_Email_Alert_Endpoints -- REST endpoints that use these types
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment