Versions in this module Expand all Collapse all v0 v0.1.0 Jul 11, 2026 Changes in this version + const DefaultBaseURL + const Version + func Bool(b bool) *bool + func String(s string) *string + type APIError struct + Code string + Message string + StatusCode int + func (e *APIError) Error() string + type ActivityEvent struct + CreatedAt time.Time + IPAddress string + URL string + UserAgent string + type Address struct + Email string + Name string + func (a *Address) UnmarshalJSON(data []byte) error + func (a Address) MarshalJSON() ([]byte, error) + type Attachment struct + ContentType string + Data []byte + Name string + type BatchEntryResult struct + Data *SendResult + Error *APIError + Status string + type BatchSendResult struct + Messages []BatchEntryResult + type BouncesService struct + func (s *BouncesService) Get(ctx context.Context, id int64) (*Message, error) + func (s *BouncesService) List(ctx context.Context, opts *ListBouncesOptions) (*ListBouncesResult, error) + type Client struct + Bounces *BouncesService + DMARC *DMARCService + Emails *EmailsService + Stats *StatsService + Streams *StreamsService + Templates *TemplatesService + func NewClient(apiKey string, opts ...Option) *Client + func (c *Client) Ping(ctx context.Context) (*PingResult, error) + type CreateStreamRequest struct + Name string + Permalink string + StreamType string + type CreateTemplateRequest struct + HTMLBody string + Name string + Permalink string + Subject string + TextBody string + type DMARCRecord struct + Count int64 + DKIMAligned bool + DKIMResult string + Disposition string + EnvelopeFrom string + HeaderFrom string + ID int64 + SPFAligned bool + SPFResult string + SourceIP string + type DMARCReport struct + DateRangeBegin time.Time + DateRangeEnd time.Time + Domain string + ID int64 + OrgEmail string + OrgName string + ReceivedAt time.Time + RecordCount int64 + ReportID string + type DMARCReportDetail struct + Records []DMARCRecord + Report DMARCReport + type DMARCService struct + func (s *DMARCService) Report(ctx context.Context, id int64) (*DMARCReportDetail, error) + func (s *DMARCService) Reports(ctx context.Context, opts *ListDMARCReportsOptions) (*ListDMARCReportsResult, error) + func (s *DMARCService) Summary(ctx context.Context, opts *DMARCSummaryOptions) (*DMARCSummary, error) + type DMARCSource struct + Count int64 + DKIMAlignedPct float64 + DispositionCounts map[string]int64 + SPFAlignedPct float64 + SourceIP string + type DMARCSummary struct + ByDisposition map[string]int64 + BySource []DMARCSource + Fail int64 + Pass int64 + PassRate float64 + Total int64 + type DMARCSummaryOptions struct + Domain string + From time.Time + To time.Time + type Delivery struct + CreatedAt time.Time + Details string + ID int64 + Output string + SentWithSSL bool + Status string + type DeliveryStats struct + Domains []DomainQueue + Queued int64 + type DomainQueue struct + Domain string + Queued int64 + type Email struct + Deliveries []Delivery + Message Message + type EmailsService struct + func (s *EmailsService) Clicks(ctx context.Context, id int64) ([]ActivityEvent, error) + func (s *EmailsService) Deliveries(ctx context.Context, id int64) ([]Delivery, error) + func (s *EmailsService) Get(ctx context.Context, id int64) (*Email, error) + func (s *EmailsService) List(ctx context.Context, opts *ListEmailsOptions) (*ListEmailsResult, error) + func (s *EmailsService) Opens(ctx context.Context, id int64) ([]ActivityEvent, error) + func (s *EmailsService) Raw(ctx context.Context, id int64) ([]byte, error) + func (s *EmailsService) Send(ctx context.Context, req *SendEmailRequest) (*SendResult, error) + func (s *EmailsService) SendBatch(ctx context.Context, reqs []*SendEmailRequest) (*BatchSendResult, error) + func (s *EmailsService) SendWithTemplate(ctx context.Context, req *SendWithTemplateRequest) (*SendResult, error) + func (s *EmailsService) SendWithTemplateBatch(ctx context.Context, reqs []*SendWithTemplateRequest) (*BatchSendResult, error) + type ListBouncesOptions struct + Query string + Scope string + Status string + Tag string + type ListBouncesResult struct + Bounces []Message + Pagination Pagination + type ListDMARCReportsOptions struct + Domain string + From time.Time + To time.Time + type ListDMARCReportsResult struct + Pagination Pagination + Reports []DMARCReport + type ListEmailsOptions struct + Query string + Scope string + Status string + Stream string + Tag string + type ListEmailsResult struct + Messages []Message + Pagination Pagination + type ListOptions struct + Page int + PerPage int + type Message struct + Bounce bool + Bypassed bool + CreatedAt time.Time + Held bool + ID int64 + MailFrom string + MessageID string + Metadata map[string]any + RcptTo string + Scope string + Size int64 + SpamScore float64 + SpamStatus string + Status string + StreamID int64 + Subject string + Tag string + Threat bool + Token string + type Option func(*Client) + func WithBaseURL(baseURL string) Option + func WithHTTPClient(httpClient *http.Client) Option + func WithUserAgent(userAgent string) Option + type Pagination struct + Page int + PerPage int + Total int64 + TotalPages int64 + type PingResult struct + Pong bool + Server string + ServerID int64 + type RenderedTemplate struct + HTMLBody *string + Subject *string + TextBody *string + type SendEmailRequest struct + Attachments []Attachment + Bcc []Address + Cc []Address + From Address + HTMLBody string + Headers map[string]string + Metadata map[string]any + ReplyTo []Address + Stream string + Subject string + Tag string + TextBody string + To []Address + type SendRecipient struct + MessageID int64 + RcptTo string + Status string + Token string + type SendResult struct + MessageID int64 + Recipients []SendRecipient + type SendWithTemplateRequest struct + Template string + TemplateModel map[string]any + type Stats struct + Bounced int64 + Clicks int64 + HardFail int64 + Held int64 + Incoming int64 + Opens int64 + Outgoing int64 + Pending int64 + Sent int64 + SoftFail int64 + Total int64 + UniqueClicks int64 + UniqueOpens int64 + type StatsOptions struct + From time.Time + To time.Time + type StatsService struct + func (s *StatsService) Deliveries(ctx context.Context) (*DeliveryStats, error) + func (s *StatsService) Get(ctx context.Context, opts *StatsOptions) (*Stats, error) + type Stream struct + Archived bool + ID int64 + Name string + Permalink string + StreamType string + UUID string + type StreamsService struct + func (s *StreamsService) Archive(ctx context.Context, permalink string) (*Stream, error) + func (s *StreamsService) Create(ctx context.Context, req *CreateStreamRequest) (*Stream, error) + func (s *StreamsService) Get(ctx context.Context, permalink string) (*Stream, error) + func (s *StreamsService) List(ctx context.Context) ([]Stream, error) + func (s *StreamsService) Update(ctx context.Context, permalink string, req *UpdateStreamRequest) (*Stream, error) + type Template struct + Archived bool + HTMLBody string + ID int64 + Name string + Permalink string + Subject string + TextBody string + UUID string + type TemplatesService struct + func (s *TemplatesService) Archive(ctx context.Context, permalink string) (*Template, error) + func (s *TemplatesService) Create(ctx context.Context, req *CreateTemplateRequest) (*Template, error) + func (s *TemplatesService) Get(ctx context.Context, permalink string) (*Template, error) + func (s *TemplatesService) List(ctx context.Context) ([]Template, error) + func (s *TemplatesService) Render(ctx context.Context, permalink string, model map[string]any) (*RenderedTemplate, error) + func (s *TemplatesService) Update(ctx context.Context, permalink string, req *UpdateTemplateRequest) (*Template, error) + type UpdateStreamRequest struct + Archived *bool + Name *string + StreamType *string + type UpdateTemplateRequest struct + Archived *bool + HTMLBody *string + Name *string + Subject *string + TextBody *string