Skip to content

send

konigle.models.comm.email.send

Send email models for the Konigle SDK.

Models for sending transactional and marketing emails through the Konigle email service. These models represent the request data for the send-email API endpoint.

Email

Bases: CreateModel

Model for sending direct emails through the Konigle email service.

Not supporting cc and bcc since they don't represent the use case of sending transactional emails and marketing emails.

attachments = Field(default=None, title='Attachments', description='Optional file attachments (max 10 files). Can be file paths, bytes, BytesIO, BinaryIO, or tuples of (file_data, filename).', max_length=10) class-attribute instance-attribute

Optional file attachments (max 10 files).

body_html = Field(title='HTML Body', description='HTML body content.') class-attribute instance-attribute

HTML body content.

body_text = Field(default=None, title='Text Body', description='Plain text body content (optional).') class-attribute instance-attribute

Plain text body content (optional).

category = Field(default=None, title='Category', description='Notification category code for the email. If present, the email will not be sent if the to_email is unsubscribed from the category.', max_length=50) class-attribute instance-attribute

Notification category code for the email.

channel = Field(title='Channel', description='Channel code to use for sending the email.', max_length=20) class-attribute instance-attribute

Channel code to use for sending the email.

from_email = Field(default=None, title='From Email', description='From email address to override the Account.default_from_email.') class-attribute instance-attribute

From email address to override the Account.default_from_email.

headers = Field(default=None, title='Custom Headers', description='Optional custom headers to include in the email.') class-attribute instance-attribute

Optional custom headers to include in the email.

reply_to_email = Field(default=None, title='Reply-To Email', description='Optional reply-to email address. Overrides Account.default_reply_to_email.') class-attribute instance-attribute

Optional reply-to email address. Overrides Account.default_reply_to_email.

save_as_template = Field(default=False, title='Save as Template', description='Whether to save the email as a template for future use.') class-attribute instance-attribute

Whether to save the email as a template for future use.

subject = Field(title='Subject', description='Email subject line.', max_length=255) class-attribute instance-attribute

Email subject line.

to_email = Field(title='To Email', description='Primary recipient email addresses.', min_length=1) class-attribute instance-attribute

Primary recipient email addresses.

normalize_attachments()

Normalize attachments to FileInputT.

validate_attachments(v) classmethod

Validate attachment files.

validate_headers(v) classmethod

Validate custom headers.

EmailResponse

Bases: BaseModel

Response model for successful email send operations.

message_id = Field(default=None, title='Email Message ID', description='Unique identifier for the sent email') class-attribute instance-attribute

Unique identifier for the sent email

status = Field(title='Status', description='Status code of the email send operation.') class-attribute instance-attribute

Status code of the email send operation.

template_id = Field(default=None, title='Template ID', description='ID of the created template (if save_as_template was True).') class-attribute instance-attribute

ID of the created template (if save_as_template was True).