Versions in this module Expand all Collapse all v0 v0.1.0 Aug 4, 2026 Changes in this version + func IsAuth(err error) bool + func IsNotFound(err error) bool + func IsRateLimit(err error) bool + func IsValidation(err error) bool + func VerifyWebhook(payload, signatureHeader, secret string) bool + type Account struct + BillingActive bool + BillingEmail string + CreatedAt string + Id string + Name string + OnboardedAt string + Plan string + Region string + Slug string + Status string + type AccountResource struct + func (r *AccountResource) Get(ctx context.Context) (*Account, error) + func (r *AccountResource) Update(ctx context.Context, body *AccountUpdateBody) (*Account, error) + type AccountUpdateBody struct + BillingEmail string + Name string + type ApiKey struct + Active bool + ExpiresAt string + Id string + KeyPrefix string + Label string + LastUsedAt string + Permissions []string + type ApiKeysCreateBody struct + ExpiresIn any + Label string + Permissions []string + type ApiKeysResource struct + func (r *ApiKeysResource) Create(ctx context.Context, body *ApiKeysCreateBody) (*CreatedApiKey, error) + func (r *ApiKeysResource) Delete(ctx context.Context, id string) (any, error) + func (r *ApiKeysResource) List(ctx context.Context) ([]ApiKey, error) + type BounceRecord struct + Address string + BounceCode string + BounceType string + Id string + OccurredAt string + OriginalFrom string + ProjectId string + ProviderMessageId string + Suppressed bool + TenantId string + type BouncesPage struct + Items []BounceRecord + Page float64 + PageSize float64 + Total float64 + TotalPages float64 + type Client struct + Account *AccountResource + ApiKeys *ApiKeysResource + Domains *DomainsResource + Folders *FoldersResource + InboundPolicy *InboundPolicyResource + Logs *LogsResource + MailboxGroups *MailboxGroupsResource + Mailboxes *MailboxesResource + Messages *MessagesResource + SenderRules *SenderRulesResource + Stats *StatsResource + Tokens *TokensResource + Webhooks *WebhooksResource + func New(opts Options) (*Client, error) + func NewWithKey(apiKey string) (*Client, error) + func (cl *Client) Stream(ctx context.Context, handler func(Event) error) error + type CreatedApiKey struct + Active bool + ApiKey string + ExpiresAt string + Id string + KeyPrefix string + Label string + Permissions []string + type DeliverabilityDay struct + BounceRate string + BouncedCount float64 + ComplaintCount float64 + ComplaintRate string + Date string + DeferredCount float64 + DeliveredCount float64 + DeliveryRate string + Id string + SentCount float64 + type Domain struct + Checks map[string]any + CreatedAt string + Domain string + Id string + ReceivingEnabled bool + Region string + Status string + type DomainDetail struct + Checks map[string]any + CreatedAt string + Domain string + Id string + ReceivingEnabled bool + Records []DomainDnsRecord + Region string + Status string + Verification map[string]any + type DomainDnsRecord struct + Host string + Optional bool + Priority float64 + Purpose string + Type string + Value string + Verified bool + type DomainsCreateBody struct + Domain string + ReceivingEnabled bool + Region string + type DomainsResource struct + func (r *DomainsResource) Create(ctx context.Context, body *DomainsCreateBody) (*DomainDetail, error) + func (r *DomainsResource) Delete(ctx context.Context, id string) (any, error) + func (r *DomainsResource) Get(ctx context.Context, id string) (*DomainDetail, error) + func (r *DomainsResource) List(ctx context.Context) ([]Domain, error) + func (r *DomainsResource) ListRecords(ctx context.Context, id string) ([]DomainDnsRecord, error) + func (r *DomainsResource) Verify(ctx context.Context, id string) (*DomainDetail, error) + type Error struct + Code string + Message string + RequestID string + RetryAfter int + Status int + func (e *Error) Error() string + type Event struct + Data string + Event string + ID string + type Folder struct + Id string + MailboxId string + MessageCount float64 + Name string + SpecialUse string + UnreadCount float64 + type FoldersDeleteQuery struct + Force string + type FoldersResource struct + func (r *FoldersResource) Delete(ctx context.Context, id string, query *FoldersDeleteQuery) (any, error) + func (r *FoldersResource) Update(ctx context.Context, id string, body *FoldersUpdateBody) (*Folder, error) + type FoldersUpdateBody struct + Name string + type InboundPolicy struct + ActionOnSpam string + BlockedExtensions []string + CreatedAt string + DmarcEnforce bool + GreylistEnabled bool + Id string + MaxMessageSize float64 + ProjectId string + RejectNoDkim bool + RejectNoSpf bool + SpamThreshold string + TenantId string + UpdatedAt string + type InboundPolicyResource struct + func (r *InboundPolicyResource) Get(ctx context.Context) (*InboundPolicy, error) + func (r *InboundPolicyResource) Update(ctx context.Context, body *InboundPolicyUpdateBody) (*InboundPolicy, error) + type InboundPolicyUpdateBody struct + ActionOnSpam string + MaxMessageSize float64 + RejectNoDkim bool + RejectNoSpf bool + SpamThreshold float64 + type LogsResource struct + func (r *LogsResource) Outbound(ctx context.Context) (*OutboundLogsPage, error) + type Mailbox struct + CreatedAt string + DisplayName string + Email string + Id string + Status string + type MailboxGroup struct + ActionOnSpam string + BurstLimit float64 + CreatedAt string + DailyLimit float64 + HourlyLimit float64 + Id string + Name string + ProjectId string + RetentionDays float64 + SpamScoreThreshold string + TenantId string + UpdatedAt string + type MailboxGroupsCreateBody struct + ActionOnSpam string + BurstLimit float64 + DailyLimit float64 + HourlyLimit float64 + Name string + RetentionDays float64 + SpamScoreThreshold float64 + type MailboxGroupsResource struct + func (r *MailboxGroupsResource) Create(ctx context.Context, body *MailboxGroupsCreateBody) (*MailboxGroup, error) + func (r *MailboxGroupsResource) Delete(ctx context.Context, id string) (any, error) + func (r *MailboxGroupsResource) Get(ctx context.Context, id string) (*MailboxGroup, error) + func (r *MailboxGroupsResource) List(ctx context.Context) ([]MailboxGroup, error) + func (r *MailboxGroupsResource) Update(ctx context.Context, id string, body *MailboxGroupsUpdateBody) (*MailboxGroup, error) + type MailboxGroupsUpdateBody struct + ActionOnSpam string + BurstLimit float64 + DailyLimit float64 + HourlyLimit float64 + Name string + RetentionDays float64 + SpamScoreThreshold float64 + type MailboxTokenRevocation struct + Revoked int64 + type MailboxesCreateBody struct + DisplayName string + DomainId string + GroupId string + LocalPart string + Quota any + type MailboxesCreateFolderBody struct + Name string + type MailboxesListMessagesQuery struct + Folder string + Page string + PageSize string + Q string + Read string + Starred string + Threaded string + type MailboxesListQuery struct + DomainId string + type MailboxesResource struct + func (r *MailboxesResource) Create(ctx context.Context, body *MailboxesCreateBody) (*Mailbox, error) + func (r *MailboxesResource) CreateFolder(ctx context.Context, id string, body *MailboxesCreateFolderBody) (*Folder, error) + func (r *MailboxesResource) Delete(ctx context.Context, id string) (any, error) + func (r *MailboxesResource) Get(ctx context.Context, id string) (*Mailbox, error) + func (r *MailboxesResource) List(ctx context.Context, query *MailboxesListQuery) ([]Mailbox, error) + func (r *MailboxesResource) ListFolders(ctx context.Context, id string) ([]Folder, error) + func (r *MailboxesResource) ListMessages(ctx context.Context, id string, query *MailboxesListMessagesQuery) (*MessageList, error) + func (r *MailboxesResource) Tokens(ctx context.Context, mailboxId string) (*MailboxTokenRevocation, error) + func (r *MailboxesResource) Update(ctx context.Context, id string, body *MailboxesUpdateBody) (*Mailbox, error) + type MailboxesUpdateBody struct + DisplayName string + GroupId string + Quota any + Status any + type Message struct + Attachments []MessageAttachment + BccAddresses []map[string]any + BodyHtml string + BodyText string + CcAddresses []map[string]any + FolderId string + FromAddress string + FromName string + HasAttachments bool + Id string + MailboxId string + MessageIdHeader string + ProjectId string + Read bool + ReceivedAt string + SentAt string + SizeBytes float64 + SpamScore string + Starred bool + Subject string + TenantId string + ThreadId string + ToAddresses []map[string]any + type MessageAttachment struct + ContentId string + Filename string + Id string + MessageId string + MimeType string + SizeBytes string + type MessageList struct + Messages []MessageSummary + Pagination map[string]any + Threads []MessageThread + type MessageSummary struct + BccAddresses []map[string]any + BodyHtml string + BodyText string + CcAddresses []map[string]any + FolderId string + FromAddress string + FromName string + HasAttachments bool + Id string + MailboxId string + MessageIdHeader string + ProjectId string + Read bool + ReceivedAt string + SentAt string + SizeBytes float64 + SpamScore string + Starred bool + Subject string + TenantId string + ThreadId string + ToAddresses []map[string]any + type MessageThread struct + From string + Id string + Messages []MessageSummary + MessagesCount float64 + Preview string + Starred bool + Subject string + Ts string + Unread bool + type MessagesGetStatusByKeyQuery struct + IdempotencyKey string + type MessagesResource struct + func (r *MessagesResource) Delete(ctx context.Context, id string) (any, error) + func (r *MessagesResource) Get(ctx context.Context, id string) (*Message, error) + func (r *MessagesResource) GetStatus(ctx context.Context, id string) (*OutboundStatus, error) + func (r *MessagesResource) GetStatusByKey(ctx context.Context, query *MessagesGetStatusByKeyQuery) (*OutboundStatus, error) + func (r *MessagesResource) Send(ctx context.Context, body *MessagesSendBody) (*SendResult, error) + type MessagesSendBody struct + Attachments []map[string]any + Bcc []map[string]any + BodyHtml string + BodyText string + Cc []map[string]any + From string + ReplyTo string + Subject string + ThreadId string + To []map[string]any + type Options struct + APIKey string + BaseURL string + DefaultHeaders map[string]string + HTTPClient *http.Client + MaxRetries int + ProjectID string + TimeoutMs int + type OutboundLog struct + Attempts float64 + BounceCode string + BounceType string + DeliveredAt string + FromAddress string + Id string + LastAttemptAt string + MessageId string + NextRetryAt string + ProjectId string + ProviderMessageId string + QueuedAt string + SentAt string + SmtpResponse string + Status string + TenantId string + ToAddress string + type OutboundLogsPage struct + Items []OutboundLog + Page float64 + PageSize float64 + Total float64 + TotalPages float64 + type OutboundStatus struct + Attempts float64 + BounceCode string + BounceType string + DeliveredAt string + MessageId string + ProviderMessageId string + QueuedAt string + SentAt string + Status string + Terminal bool + type SendResult struct + MessageId string + ThreadId string + type SenderRule struct + Action string + CreatedAt string + Id string + MatchType string + ProjectId string + Reason string + RuleType string + TenantId string + Value string + type SenderRulesCreateBody struct + Action string + MatchType string + Reason string + RuleType string + Value string + type SenderRulesListQuery struct + Type string + type SenderRulesResource struct + func (r *SenderRulesResource) Create(ctx context.Context, body *SenderRulesCreateBody) (*SenderRule, error) + func (r *SenderRulesResource) Delete(ctx context.Context, id string) (any, error) + func (r *SenderRulesResource) List(ctx context.Context, query *SenderRulesListQuery) ([]SenderRule, error) + type StatsResource struct + func (r *StatsResource) Bounces(ctx context.Context) (*BouncesPage, error) + func (r *StatsResource) Deliverability(ctx context.Context) ([]DeliverabilityDay, error) + func (r *StatsResource) Usage(ctx context.Context) (*Usage, error) + type Token struct + ExpiresAt string + Id string + Token string + type TokenRevocation struct + Id string + RevokedAt string + type TokensCreateBody struct + ExpiresIn any + MailboxId string + Permissions []string + type TokensResource struct + func (r *TokensResource) Create(ctx context.Context, body *TokensCreateBody) (*Token, error) + func (r *TokensResource) Revoke(ctx context.Context, id string) (*TokenRevocation, error) + type Usage struct + Limits map[string]any + Plan map[string]any + TotalMailboxes float64 + TotalMessagesCount float64 + TotalStorageUsedBytes string + Usage map[string]any + type Webhook struct + Active bool + Events []string + Id string + Url string + type WebhookDelivery struct + Attempts float64 + CreatedAt string + DeliveredAt string + EndpointId string + EventType string + HttpStatus float64 + Id string + Payload map[string]any + Status string + type WebhooksCreateBody struct + Active bool + Events []string + Secret string + Url string + type WebhooksResource struct + func (r *WebhooksResource) Create(ctx context.Context, body *WebhooksCreateBody) (*Webhook, error) + func (r *WebhooksResource) Delete(ctx context.Context, id string) (any, error) + func (r *WebhooksResource) List(ctx context.Context) ([]Webhook, error) + func (r *WebhooksResource) ListDeliveries(ctx context.Context, id string) ([]WebhookDelivery, error) + func (r *WebhooksResource) Update(ctx context.Context, id string, body *WebhooksUpdateBody) (*Webhook, error) + type WebhooksUpdateBody struct + Active bool + Events []string + Secret string + Url string