Skip to content

channel

konigle.models.comm.email.channel

Email channel models for the Konigle SDK.

Email channels represent different types of email flows within an account, such as transactional, marketing, or broadcast emails, each with their own configuration and quotas.

BaseEmailChannel

Bases: BaseModel

channel_type = Field(title='Channel Type', description='Type of email channel (transactional, marketing, broadcast).') class-attribute instance-attribute

Type of email channel.

code = Field(title='Channel Code', description='Unique code for the channel used when sending emails.', max_length=50) class-attribute instance-attribute

Unique code for the channel given by the user that is used to refer to when sending the emails.

EmailChannel

Bases: BaseEmailChannel, TimestampedResource

Email channel for different types of emails within an account.

Channels separate different email flows (transactional, marketing, etc.) and provide individual configuration and rate limiting.

account = Field(title='Account ID', description='ID of the email account this channel belongs to.') class-attribute instance-attribute

Email account this channel belongs to.

daily_quota = Field(default=1000, title='Daily Quota', description='Daily email quota for this channel.', ge=1) class-attribute instance-attribute

Daily email quota for this channel.

enable_engagement_tracking = Field(default=False, title='Engagement Tracking', description='Whether engagement tracking (open and click) is enabled for this channel.') class-attribute instance-attribute

Whether engagement tracking is enabled for this channel.

rate_limit = Field(default=10, title='Rate Limit', description='Rate limit (emails per second) for this channel.', ge=1, le=20) class-attribute instance-attribute

Rate limit (emails per second) for this channel.

status = Field(default=(EmailChannelStatus.ACTIVE), title='Channel Status', description='Current status of the channel.') class-attribute instance-attribute

Current status of the channel.

suspended_at = Field(default=None, title='Suspended At', description='When the channel was suspended.') class-attribute instance-attribute

When the channel was suspended.

suspension_reason = Field(default=None, title='Suspension Reason', description='Reason for suspension if applicable.', max_length=255) class-attribute instance-attribute

Reason for suspension if applicable.

EmailChannelCreate

Bases: BaseEmailChannel, CreateModel

Model for creating a new email channel.

EmailChannelStatus

Bases: str, Enum

Status of an email channel.

ACTIVE = 'active' class-attribute instance-attribute

Channel is active and can send emails.

PENDING = 'pending' class-attribute instance-attribute

Channel is pending setup or verification.

SUSPENDED = 'suspended' class-attribute instance-attribute

Channel is suspended and cannot send emails.

EmailChannelType

Bases: str, Enum

Types of email channels available.

BROADCAST = 'broadcast' class-attribute instance-attribute

Broadcast emails like announcements, updates.

MARKETING = 'marketing' class-attribute instance-attribute

Marketing emails like newsletters, promotions.

TRANSACTIONAL = 'transactional' class-attribute instance-attribute

Transactional emails like order confirmations, password resets.

EmailChannelUpdate

Bases: UpdateModel

Model for updating an existing email channel.

code = Field(default=None, title='Channel Code', description='Unique code for the channel used when sending emails.', max_length=50) class-attribute instance-attribute

Unique code for the channel given by the user that is used to refer to when sending the emails.