Versions in this module Expand all Collapse all v0 v0.1.0 Jun 21, 2026 Changes in this version + const DefaultBaseURL + const WebhookSignatureHeader + func JoinAddresses(addrs ...string) string + func VerifyWebhookSignature(secret, payload, signatureHeader string, tolerance time.Duration) bool + type APIError struct + Body string + StatusCode int + func (e *APIError) Error() string + type APIKeysService struct + func (s *APIKeysService) Create(ctx context.Context, req CreateApiKeyRequest) (ApiKeyCreationResult, error) + func (s *APIKeysService) Delete(ctx context.Context, id string) error + func (s *APIKeysService) List(ctx context.Context) ([]ApiKey, error) + type ApiKey struct + CreatedAt time.Time + ExpiresAt *time.Time + ID string + IsActive bool + KeyPrefix string + LastUsedAt *time.Time + MaskedKey string + Name string + RevokedAt *time.Time + Scopes []string + type ApiKeyCreationResult struct + FullKey string + Key ApiKey + type BatchItemResult struct + Error string + ID string + Index int + Status string + type Block struct + Extra map[string]any + ID string + Padding string + Type string + func (b *Block) UnmarshalJSON(data []byte) error + func (b Block) MarshalJSON() ([]byte, error) + type BlockDocument struct + Sections []Block + Settings *DocumentSettings + type BlocklistListing struct + Codes []string + Error string + Listed bool + Provider string + Zone string + type BlocklistReport struct + AnyListed bool + Domain string + Lists []BlocklistListing + type BulkRecipient struct + Bcc string + Cc string + ReplyTo string + Subject string + To string + Variables map[string]any + type BulkSendRequest struct + Bcc string + Cc string + From string + FromName string + HTML string + Recipients []BulkRecipient + ReplyTo string + Subject string + Tags string + TemplateID string + Text string + Variables map[string]any + type Client struct + APIKeys *APIKeysService + Domains *DomainsService + Emails *EmailsService + Messages *MessagesService + Templates *TemplatesService + Webhooks *WebhooksService + func New(apiKey string, opts ...Option) *Client + func (c *Client) BaseURL() string + type CreateApiKeyRequest struct + ExpiresAt *time.Time + Name string + Scopes []string + type CreateDomainRequest struct + Domain string + MailFromSubdomain string + type CreateTemplateRequest struct + Document BlockDocument + Name string + Slug string + Variables map[string]any + type CreateWebhookRequest struct + Enabled *bool + EventTypes string + URL string + type DnsRecord struct + Name string + Purpose string + TTL int + Type string + Value string + type DocumentSettings struct + BackgroundColor string + ContentWidth int + FontFamily string + PreviewText string + type DomainsService struct + func (s *DomainsService) Blocklist(ctx context.Context, id string) (BlocklistReport, error) + func (s *DomainsService) Create(ctx context.Context, req CreateDomainRequest) (SendingDomain, error) + func (s *DomainsService) Delete(ctx context.Context, id string) error + func (s *DomainsService) Get(ctx context.Context, id string) (SendingDomain, error) + func (s *DomainsService) List(ctx context.Context) ([]SendingDomain, error) + func (s *DomainsService) Verify(ctx context.Context, id string) (SendingDomain, error) + type EmailsService struct + func (s *EmailsService) Bulk(ctx context.Context, req BulkSendRequest) (SendBatchResponse, error) + func (s *EmailsService) Cancel(ctx context.Context, id string) (Message, error) + func (s *EmailsService) Get(ctx context.Context, id string) (Message, error) + func (s *EmailsService) Lint(ctx context.Context, req SendEmailRequest) (LintResult, error) + func (s *EmailsService) List(ctx context.Context, test *bool, limit int) ([]Message, error) + func (s *EmailsService) Send(ctx context.Context, req SendEmailRequest) (SendEmailResponse, error) + func (s *EmailsService) SendBatch(ctx context.Context, emails []SendEmailRequest) (SendBatchResponse, error) + type LintAuth struct + AlignedMailFrom bool + DKIM bool + Domain string + DomainVerified bool + type LintIssue struct + Code string + Fix string + Message string + Severity string + type LintResult struct + Authentication LintAuth + Issues []LintIssue + Passed bool + Rating string + Score int + type Message struct + Bcc string + Cc string + CreatedAt time.Time + ErrorMessage string + FromEmail string + FromName string + ID string + ProviderMessageID string + QueuedAt time.Time + ReplyTo string + SentAt *time.Time + Status MessageStatus + Subject string + Tags string + ToEmail string + type MessageDetail struct + HTMLBody string + Message Message + TextBody string + type MessageEvent struct + ID string + Metadata json.RawMessage + OccurredAt time.Time + Type MessageEventType + type MessageEventType int + const MessageEventTypeBounce + const MessageEventTypeClick + const MessageEventTypeComplaint + const MessageEventTypeDelivered + const MessageEventTypeDeliveryDelay + const MessageEventTypeOpen + const MessageEventTypeReject + const MessageEventTypeSent + func (t MessageEventType) String() string + type MessageStatus int + const MessageStatusBounced + const MessageStatusCanceled + const MessageStatusComplained + const MessageStatusDelivered + const MessageStatusFailed + const MessageStatusQueued + const MessageStatusScheduled + const MessageStatusSending + const MessageStatusSent + func (s MessageStatus) String() string + type MessagesService struct + func (s *MessagesService) Events(ctx context.Context, id string) ([]MessageEvent, error) + func (s *MessagesService) Get(ctx context.Context, id string) (MessageDetail, error) + func (s *MessagesService) List(ctx context.Context, test *bool, limit int) ([]Message, error) + type Option func(*Client) + func WithBaseURL(baseURL string) Option + func WithHTTPClient(h *http.Client) Option + func WithOrgID(orgID string) Option + type PreviewResult struct + Errors []string + HTML string + Mjml string + type PreviewTemplateRequest struct + Document *BlockDocument + TemplateID string + Variables map[string]any + type SendBatchResponse struct + Accepted int + Rejected int + Results []BatchItemResult + type SendEmailRequest struct + Bcc string + Cc string + From string + FromName string + HTML string + ReplyTo string + SendAt *time.Time + Subject string + Tags string + TemplateID string + Text string + To string + Variables map[string]any + type SendEmailResponse struct + ID string + Status string + type SendingDomain struct + CreatedAt time.Time + CustomMailFromDomain string + DNSRecords []DnsRecord + Domain string + ID string + LastCheckedAt *time.Time + Status SendingDomainStatus + VerifiedAt *time.Time + type SendingDomainStatus int + const SendingDomainStatusFailed + const SendingDomainStatusNotStarted + const SendingDomainStatusPending + const SendingDomainStatusVerified + func (s SendingDomainStatus) String() string + type Template struct + CompiledHTML string + CreatedAt time.Time + Document *BlockDocument + ID string + MjmlSource string + ModifiedAt *time.Time + Name string + Slug string + Status TemplateStatus + Variables map[string]any + Version int + type TemplateStatus int + const TemplateStatusDraft + const TemplateStatusPublished + func (s TemplateStatus) String() string + type TemplateSummary struct + CreatedAt time.Time + ID string + ModifiedAt *time.Time + Name string + Slug string + Status TemplateStatus + Version int + type TemplatesService struct + func (s *TemplatesService) Create(ctx context.Context, req CreateTemplateRequest) (Template, error) + func (s *TemplatesService) Delete(ctx context.Context, id string) error + func (s *TemplatesService) Get(ctx context.Context, id string) (Template, error) + func (s *TemplatesService) List(ctx context.Context) ([]TemplateSummary, error) + func (s *TemplatesService) Preview(ctx context.Context, req PreviewTemplateRequest) (PreviewResult, error) + func (s *TemplatesService) Publish(ctx context.Context, id string) (Template, error) + func (s *TemplatesService) Update(ctx context.Context, id string, req UpdateTemplateRequest) (Template, error) + type UpdateTemplateRequest struct + Document BlockDocument + Name string + Slug string + Variables map[string]any + type UpdateWebhookRequest struct + Enabled *bool + EventTypes string + URL string + type Webhook struct + CreatedAt time.Time + Enabled bool + EventTypes string + ID string + LastDeliveryAt *time.Time + LastStatusCode *int + SecretHint string + URL string + type WebhookDelivery struct + Attempt int + CreatedAt time.Time + Error string + ID string + MessageEventID string + ModifiedAt *time.Time + StatusCode *int + Succeeded bool + WebhookID string + type WebhookSecretResult struct + SigningSecret string + Webhook Webhook + type WebhooksService struct + func (s *WebhooksService) Create(ctx context.Context, req CreateWebhookRequest) (WebhookSecretResult, error) + func (s *WebhooksService) Delete(ctx context.Context, id string) error + func (s *WebhooksService) Deliveries(ctx context.Context, id string, limit int) ([]WebhookDelivery, error) + func (s *WebhooksService) Get(ctx context.Context, id string) (Webhook, error) + func (s *WebhooksService) List(ctx context.Context) ([]Webhook, error) + func (s *WebhooksService) Replay(ctx context.Context, deliveryID string) (WebhookDelivery, error) + func (s *WebhooksService) RotateSecret(ctx context.Context, id string) (WebhookSecretResult, error) + func (s *WebhooksService) Update(ctx context.Context, id string, req UpdateWebhookRequest) (Webhook, error)