Package-level declarations

Types

Link copied to clipboard
@Serializable
data class ApiKey(val apiKeyId: String, val name: String? = null, val updatedAt: Instant, val createdAt: Instant)

Represents an API key with its ID, optional name, and timestamps.

Link copied to clipboard
@Serializable
data class ApiKeyList(val count: Int, val limit: Int? = null, val nextPageToken: String? = null, val apiKeys: List<ApiKey>)

Paginated list of API keys.

Link copied to clipboard
@Serializable
data class Attachment(val attachmentId: String, val filename: String? = null, val size: Int, val contentType: String? = null, val contentDisposition: ContentDisposition? = null, val contentId: String? = null)

Metadata for an email attachment including filename, size, content type, and disposition.

Link copied to clipboard
data class AttachmentData(val data: ByteArray, val contentType: String)

Raw attachment binary data with its content type.

Link copied to clipboard

Disposition type for email attachments: inline or attachment.

Link copied to clipboard
@Serializable
data class CreateApiKeyResponse(val apiKeyId: String, val apiKey: String)

Response from creating an API key, containing the key ID and secret value.

Link copied to clipboard
@Serializable
data class Domain(val domainId: String, val name: String, val verified: Boolean, val updatedAt: Instant, val createdAt: Instant)

Represents a custom email domain with its verification status and timestamps.

Link copied to clipboard
@Serializable
data class DomainList(val count: Int, val limit: Int? = null, val nextPageToken: String? = null, val domains: List<Domain>)

Paginated list of domains.

Link copied to clipboard
@Serializable
data class Draft(val inboxId: String, val draftId: String, val labels: List<String> = emptyList(), val timestamp: Instant, val from: String? = null, val to: List<String> = emptyList(), val cc: List<String> = emptyList(), val bcc: List<String> = emptyList(), val subject: String? = null, val preview: String? = null, val text: String? = null, val html: String? = null, val attachments: List<Attachment> = emptyList(), val updatedAt: Instant, val createdAt: Instant)

Represents an email draft with recipients, subject, body content, and attachments.

Link copied to clipboard
@Serializable
data class DraftList(val count: Int, val limit: Int? = null, val nextPageToken: String? = null, val drafts: List<Draft>)

Paginated list of drafts.

Link copied to clipboard
@Serializable
data class Inbox(val podId: String? = null, val inboxId: String, val email: String, val displayName: String? = null, val clientId: String? = null, val updatedAt: Instant, val createdAt: Instant)

Represents an email inbox with its address, display name, and optional pod/client association.

Link copied to clipboard
@Serializable
data class InboxList(val count: Int, val limit: Int? = null, val nextPageToken: String? = null, val inboxes: List<Inbox>)

Paginated list of inboxes.

Link copied to clipboard

Direction for list filtering: allow or block.

Link copied to clipboard
@Serializable
data class ListEntry(val entry: String, val updatedAt: Instant, val createdAt: Instant)

Represents an entry in an allow/block list.

Link copied to clipboard
@Serializable
data class ListEntryList(val count: Int, val limit: Int? = null, val nextPageToken: String? = null, val entries: List<ListEntry>)

Paginated list of list entries.

Link copied to clipboard

Type of list entry: sender, recipient, domain, or subject.

Link copied to clipboard
@Serializable
data class Message(val inboxId: String, val threadId: String, val messageId: String, val labels: List<String> = emptyList(), val timestamp: Instant, val from: String, val to: List<String> = emptyList(), val cc: List<String> = emptyList(), val bcc: List<String> = emptyList(), val subject: String? = null, val preview: String? = null, val text: String? = null, val html: String? = null, val attachments: List<Attachment> = emptyList(), val inReplyTo: String? = null, val references: List<String> = emptyList(), val headers: Map<String, String> = emptyMap(), val size: Int, val updatedAt: Instant, val createdAt: Instant)

Represents a complete email message with headers, body, attachments, and metadata.

Link copied to clipboard
@Serializable
data class MessageList(val count: Int, val limit: Int? = null, val nextPageToken: String? = null, val messages: List<Message>)

Paginated list of messages.

Link copied to clipboard
@Serializable
data class Metric(val eventType: String, val count: Int, val timestamp: Instant)

A single metric data point with event type, count, and timestamp.

Link copied to clipboard

Time period for metric aggregation: hour, day, week, or month.

Link copied to clipboard
@Serializable
data class Organization(val updatedAt: Instant, val createdAt: Instant)

Represents an organization with its timestamps.

Link copied to clipboard
@Serializable
data class Pod(val podId: String, val updatedAt: Instant, val createdAt: Instant)

Represents a pod (isolated workspace) with its ID and timestamps.

Link copied to clipboard
@Serializable
data class PodList(val count: Int, val limit: Int? = null, val nextPageToken: String? = null, val pods: List<Pod>)

Paginated list of pods.

Link copied to clipboard
@Serializable
data class PodListEntry(val entry: String, val updatedAt: Instant, val createdAt: Instant)

Represents a pod-level entry in an allow/block list.

Link copied to clipboard
@Serializable
data class PodListEntryList(val count: Int, val limit: Int? = null, val nextPageToken: String? = null, val entries: List<PodListEntry>)

Paginated list of pod-level list entries.

Link copied to clipboard
@Serializable
data class QueryMetricsResponse(val metrics: List<Metric>)

Response containing a list of aggregated email event metrics.

Link copied to clipboard
@Serializable
data class RawMessageResponse(val raw: String)

Response containing the raw RFC 2822 message content.

Link copied to clipboard
@Serializable
data class SendMessageResponse(val messageId: String, val threadId: String)

Response from sending a message, containing the message and thread IDs.

Link copied to clipboard
@Serializable
data class Thread(val inboxId: String, val threadId: String, val labels: List<String> = emptyList(), val timestamp: Instant, val receivedTimestamp: Instant? = null, val sentTimestamp: Instant? = null, val senders: List<String> = emptyList(), val recipients: List<String> = emptyList(), val subject: String? = null, val preview: String? = null, val attachments: List<Attachment> = emptyList(), val lastMessageId: String, val messageCount: Int, val size: Int, val updatedAt: Instant, val createdAt: Instant)

Represents an email thread with participants, subject, message count, and attachments.

Link copied to clipboard
@Serializable
data class ThreadList(val count: Int, val limit: Int? = null, val nextPageToken: String? = null, val threads: List<Thread>)

Paginated list of threads.

Link copied to clipboard
@Serializable
data class UpdateMessageResponse(val messageId: String, val labels: List<String> = emptyList())

Response from updating a message, containing the message ID and updated labels.

Link copied to clipboard
@Serializable
data class Webhook(val webhookId: String, val url: String, val events: List<String> = emptyList(), val updatedAt: Instant, val createdAt: Instant)

Represents a webhook subscription with its target URL and subscribed events.

Link copied to clipboard

Supported webhook event types for message and domain lifecycle events.

Link copied to clipboard
@Serializable
data class WebhookList(val count: Int, val limit: Int? = null, val nextPageToken: String? = null, val webhooks: List<Webhook>)

Paginated list of webhooks.