Versions in this module Expand all Collapse all v0 v0.1.0 Aug 27, 2026 Changes in this version + const DefaultBaseURL + const DefaultWebhookTolerance + const Version + func SignWebhook(secret, msgID string, timestamp int64, payload string) string + func VerifyWebhookSignature(secret, msgID, timestamp, payload, signatureHeader string) bool + func VerifyWebhookSignatureAt(secret, msgID, timestamp, payload, signatureHeader string, ...) bool + type APIKeysService struct + func (s *APIKeysService) Create(ctx context.Context, params Params) (Object, error) + func (s *APIKeysService) List(ctx context.Context) (*List, error) + func (s *APIKeysService) Revoke(ctx context.Context, id string) (Object, error) + type AssetsService struct + func (s *AssetsService) Delete(ctx context.Context, id string, params Params) (Object, error) + func (s *AssetsService) List(ctx context.Context, params Params) (*List, error) + func (s *AssetsService) Upload(ctx context.Context, params Params) (Object, error) + type Attachment struct + Content string + ContentID string + ContentType string + Filename string + type AttachmentMeta struct + ContentType string + Filename string + Size int64 + type AutomationRunsService struct + func (s *AutomationRunsService) Cancel(ctx context.Context, automationID, runID string, params Params) (Object, error) + func (s *AutomationRunsService) Get(ctx context.Context, automationID, runID string, params Params) (Object, error) + func (s *AutomationRunsService) List(ctx context.Context, automationID string, params Params) (*List, error) + type AutomationsService struct + func (s *AutomationsService) Activate(ctx context.Context, id string, params Params) (Object, error) + func (s *AutomationsService) Archive(ctx context.Context, id string, params Params) (Object, error) + func (s *AutomationsService) Create(ctx context.Context, params Params) (Object, error) + func (s *AutomationsService) Delete(ctx context.Context, id string, params Params) (Object, error) + func (s *AutomationsService) Get(ctx context.Context, id string, params Params) (Object, error) + func (s *AutomationsService) List(ctx context.Context, params Params) (*List, error) + func (s *AutomationsService) Metrics(ctx context.Context, id string, params Params) (Object, error) + func (s *AutomationsService) Pause(ctx context.Context, id string, params Params) (Object, error) + func (s *AutomationsService) Test(ctx context.Context, id string, params Params) (Object, error) + func (s *AutomationsService) Update(ctx context.Context, id string, params Params) (Object, error) + func (s *AutomationsService) Validate(ctx context.Context, params Params) (Object, error) + func (s *AutomationsService) Version(ctx context.Context, id string, version interface{}, params Params) (Object, error) + func (s *AutomationsService) Versions(ctx context.Context, id string, params Params) (Object, error) + type BatchResponse struct + Data []SendEmailResponse + type Client struct + APIKeys *APIKeysService + Assets *AssetsService + AutomationRuns *AutomationRunsService + Automations *AutomationsService + ContactProperties *ContactPropertiesService + Contacts *ContactsService + Domains *DomainsService + Emails *EmailsService + EventDefinitions *EventDefinitionsService + Events *EventsService + Posts *PostsService + Segments *SegmentsService + Senders *SendersService + Suppressions *SuppressionsService + Templates *TemplatesService + Topics *TopicsService + Webhooks *WebhooksService + func New(apiKey string, opts ...Option) (*Client, error) + func (c *Client) BaseURL() string + type ContactPropertiesService struct + func (s *ContactPropertiesService) Create(ctx context.Context, params Params) (Object, error) + func (s *ContactPropertiesService) Delete(ctx context.Context, id string) (Object, error) + func (s *ContactPropertiesService) List(ctx context.Context, params Params) (*List, error) + func (s *ContactPropertiesService) Update(ctx context.Context, id string, params Params) (Object, error) + type ContactsService struct + func (s *ContactsService) Create(ctx context.Context, request CreateContactRequest) (Object, error) + func (s *ContactsService) Delete(ctx context.Context, idOrEmail string, params Params) (Object, error) + func (s *ContactsService) Get(ctx context.Context, idOrEmail string, params Params) (Object, error) + func (s *ContactsService) List(ctx context.Context, params Params) (*List, error) + func (s *ContactsService) Update(ctx context.Context, idOrEmail string, request UpdateContactRequest) (Object, error) + func (s *ContactsService) Upsert(ctx context.Context, request CreateContactRequest) (Object, error) + type CreateContactRequest struct + Email string + Extra Params + PublicationID string + Status string + func (r CreateContactRequest) MarshalJSON() ([]byte, error) + type CreatePostRequest struct + Extra Params + From string + HTML string + Kind string + Name string + PublicationID string + ReplyTo string + ScheduledAt string + Send bool + Subject string + TemplateID string + Text string + Variables map[string]interface{} + func (r CreatePostRequest) MarshalJSON() ([]byte, error) + type CreateTopicRequest struct + DefaultSubscription string + Description string + Extra Params + Name string + PublicationID string + Visibility string + func (r CreateTopicRequest) MarshalJSON() ([]byte, error) + type DomainsService struct + Tracking *TrackingDomainsService + func (s *DomainsService) Create(ctx context.Context, params Params) (Object, error) + func (s *DomainsService) Delete(ctx context.Context, id string, params Params) (Object, error) + func (s *DomainsService) Get(ctx context.Context, id string, params Params) (Object, error) + func (s *DomainsService) List(ctx context.Context, params Params) (*List, error) + func (s *DomainsService) Update(ctx context.Context, id string, params Params) (Object, error) + func (s *DomainsService) Verify(ctx context.Context, id string, params Params) (Object, error) + type DroppedRecipient struct + Address string + Field string + Reason string + type Email struct + Attachments []AttachmentMeta + BCC string + CC string + ClickCount int + ClickedAt string + CreatedAt string + DelayedAt string + DroppedRecipients []DroppedRecipient + Error string + FailedAt string + From string + HTML string + Headers map[string]string + ID string + LastEvent string + Object string + OpenCount int + OpenedAt string + ReplyTo string + ScheduledAt string + Status string + Subject string + Tags []Tag + Text string + To string + type EmailsService struct + Inbound *InboundService + func (s *EmailsService) Analytics(ctx context.Context, params Params) (Object, error) + func (s *EmailsService) Batch(ctx context.Context, requests []SendEmailRequest) (*BatchResponse, error) + func (s *EmailsService) Cancel(ctx context.Context, id string) (Object, error) + func (s *EmailsService) Get(ctx context.Context, id string) (*Email, error) + func (s *EmailsService) List(ctx context.Context, params Params) (*List, error) + func (s *EmailsService) Reschedule(ctx context.Context, id, scheduledAt string) (Object, error) + func (s *EmailsService) Send(ctx context.Context, request SendEmailRequest) (*SendEmailResponse, error) + func (s *EmailsService) Update(ctx context.Context, id string, request UpdateEmailRequest) (Object, error) + type Error struct + Body string + Code string + Details interface{} + Message string + RequestID string + Status int + func (e *Error) Error() string + type EventDefinitionsService struct + func (s *EventDefinitionsService) Create(ctx context.Context, params Params) (Object, error) + func (s *EventDefinitionsService) Delete(ctx context.Context, id string, params Params) (Object, error) + func (s *EventDefinitionsService) Get(ctx context.Context, id string, params Params) (Object, error) + func (s *EventDefinitionsService) List(ctx context.Context, params Params) (*List, error) + func (s *EventDefinitionsService) Update(ctx context.Context, id string, params Params) (Object, error) + type EventsService struct + func (s *EventsService) List(ctx context.Context, params Params) (*List, error) + func (s *EventsService) Send(ctx context.Context, params Params) (Object, error) + type HTTPDoer interface + Do func(req *http.Request) (*http.Response, error) + type InboundAttachmentsService struct + func (s *InboundAttachmentsService) Get(ctx context.Context, id, attachmentID string) (Object, error) + func (s *InboundAttachmentsService) List(ctx context.Context, id string) (Object, error) + type InboundService struct + Attachments *InboundAttachmentsService + func (s *InboundService) Get(ctx context.Context, id string) (Object, error) + func (s *InboundService) List(ctx context.Context, params Params) (*List, error) + func (s *InboundService) Reply(ctx context.Context, id string, params Params) (Object, error) + type List struct + Data []Object + HasMore bool + Limit int + NextCursor string + Object string + Offset int + Total int + type Object map[string]interface + func (o Object) Bool(key string) bool + func (o Object) Decode(v interface{}) error + func (o Object) Float(key string) float64 + func (o Object) Int(key string) int + func (o Object) List(key string) []Object + func (o Object) Object(key string) Object + func (o Object) String(key string) string + type Option func(*Client) + func WithBaseURL(baseURL string) Option + func WithHTTPClient(doer HTTPDoer) Option + type Params map[string]interface + type PostsService struct + func (s *PostsService) Create(ctx context.Context, request CreatePostRequest) (Object, error) + func (s *PostsService) Delete(ctx context.Context, id string, params Params) (Object, error) + func (s *PostsService) Get(ctx context.Context, id string, params Params) (Object, error) + func (s *PostsService) List(ctx context.Context, params Params) (*List, error) + func (s *PostsService) Send(ctx context.Context, id string, request SendPostRequest) (Object, error) + func (s *PostsService) SendTest(ctx context.Context, id string, request SendTestPostRequest) (*SendTestPostResponse, error) + func (s *PostsService) Update(ctx context.Context, id string, params Params) (Object, error) + type SegmentsService struct + func (s *SegmentsService) Create(ctx context.Context, params Params) (Object, error) + func (s *SegmentsService) Delete(ctx context.Context, id string, params Params) (Object, error) + func (s *SegmentsService) Get(ctx context.Context, id string, params Params) (Object, error) + func (s *SegmentsService) List(ctx context.Context, params Params) (*List, error) + func (s *SegmentsService) Update(ctx context.Context, id string, params Params) (Object, error) + type SendEmailRequest struct + Attachments []Attachment + BCC []string + CC []string + Extra Params + From string + HTML string + Headers map[string]string + ReplyTo []string + ScheduledAt string + SenderID string + Subject string + Tags []Tag + Template *TemplateRef + Text string + To []string + TrackingClick *bool + TrackingOpen *bool + func (r SendEmailRequest) MarshalJSON() ([]byte, error) + type SendEmailResponse struct + ID string + Object string + type SendPostRequest struct + Extra Params + ScheduledAt string + func (r SendPostRequest) MarshalJSON() ([]byte, error) + type SendTestPostRequest struct + Extra Params + From string + Recipients []string + ReplyTo string + func (r SendTestPostRequest) MarshalJSON() ([]byte, error) + type SendTestPostResponse struct + FailedTo []string + SentTo []string + type SendersService struct + func (s *SendersService) Create(ctx context.Context, params Params) (Object, error) + func (s *SendersService) Delete(ctx context.Context, id string, params Params) (Object, error) + func (s *SendersService) Get(ctx context.Context, id string, params Params) (Object, error) + func (s *SendersService) List(ctx context.Context, params Params) (*List, error) + func (s *SendersService) Update(ctx context.Context, id string, params Params) (Object, error) + type SuppressionsService struct + func (s *SuppressionsService) Add(ctx context.Context, params Params) (Object, error) + func (s *SuppressionsService) Export(ctx context.Context) (string, error) + func (s *SuppressionsService) List(ctx context.Context, params Params) (*List, error) + func (s *SuppressionsService) Remove(ctx context.Context, params Params) (Object, error) + type Tag struct + Name string + Value string + type TemplateRef struct + ID string + Variables map[string]interface{} + type TemplatesService struct + func (s *TemplatesService) Create(ctx context.Context, params Params) (Object, error) + func (s *TemplatesService) Delete(ctx context.Context, id string, params Params) (Object, error) + func (s *TemplatesService) Duplicate(ctx context.Context, id string, params Params) (Object, error) + func (s *TemplatesService) Get(ctx context.Context, id string, params Params) (Object, error) + func (s *TemplatesService) List(ctx context.Context, params Params) (*List, error) + func (s *TemplatesService) Publish(ctx context.Context, id string, params Params) (Object, error) + func (s *TemplatesService) Render(ctx context.Context, params Params) (Object, error) + func (s *TemplatesService) RestoreVersion(ctx context.Context, id string, version interface{}, params Params) (Object, error) + func (s *TemplatesService) Unpublish(ctx context.Context, id string, params Params) (Object, error) + func (s *TemplatesService) Update(ctx context.Context, id string, params Params) (Object, error) + func (s *TemplatesService) Versions(ctx context.Context, id string, params Params) (Object, error) + type TopicsService struct + func (s *TopicsService) Create(ctx context.Context, request CreateTopicRequest) (Object, error) + func (s *TopicsService) Delete(ctx context.Context, id string, params Params) (Object, error) + func (s *TopicsService) Get(ctx context.Context, id string, params Params) (Object, error) + func (s *TopicsService) List(ctx context.Context, params Params) (*List, error) + func (s *TopicsService) Update(ctx context.Context, id string, params Params) (Object, error) + type TrackingDomainsService struct + func (s *TrackingDomainsService) Create(ctx context.Context, domainID string, params Params) (Object, error) + func (s *TrackingDomainsService) Delete(ctx context.Context, domainID, trackingDomainID string, params Params) (Object, error) + func (s *TrackingDomainsService) List(ctx context.Context, domainID string, params Params) (Object, error) + func (s *TrackingDomainsService) Verify(ctx context.Context, domainID, trackingDomainID string, params Params) (Object, error) + type UpdateContactRequest struct + Extra Params + PublicationID string + Status string + func (r UpdateContactRequest) MarshalJSON() ([]byte, error) + type UpdateEmailRequest struct + Extra Params + ScheduledAt string + func (r UpdateEmailRequest) MarshalJSON() ([]byte, error) + type WebhooksService struct + func (s *WebhooksService) Create(ctx context.Context, params Params) (Object, error) + func (s *WebhooksService) Delete(ctx context.Context, id string, params Params) (Object, error) + func (s *WebhooksService) Get(ctx context.Context, id string, params Params) (Object, error) + func (s *WebhooksService) List(ctx context.Context, params Params) (*List, error) + func (s *WebhooksService) Update(ctx context.Context, id string, params Params) (Object, error)