Versions in this module Expand all Collapse all v0 v0.2.0 Nov 13, 2026 Changes in this version + type AttachmentInput struct + Filename string + ID string type Content + Design json.RawMessage type Message + Attachment *MessageFile + type MessageFile struct + Filename string + ID string + MimeType string + Size int type MessageInput + Attachment *AttachmentInput type Sender + Provider *SenderProvider + type SenderProvider struct + ID string + Name string + Own bool v0.1.0 Nov 12, 2026 Changes in this version + const APIVersion + const DefaultBaseURL + type APIError struct + Code string + Fields map[string]FieldProblem + Message string + RequestID string + Status int + func (e *APIError) Error() string + type Activity struct + CreatedAt time.Time + CustomerID string + ID string + Key string + OccurredAt time.Time + Value any + type ActivityInput struct + Key string + OccurredAt *time.Time + Value any + type ActivityRecordParams struct + Activities []ActivityInput + CustomerID string + Email string + Phone string + type ActivityService struct + func (s *ActivityService) Record(ctx context.Context, params ActivityRecordParams, opts ...RequestOption) (*RecordedActivity, error) + type AudienceInput struct + Everyone bool + Segments []SegmentRef + To []string + type Broadcast struct + Audience BroadcastAudience + Channel Channel + Content Content + CreatedAt time.Time + Delivered int + Error *string + Failed int + From *string + ID string + Name string + Read int + Recipients int + SendAt time.Time + Sent int + Status BroadcastStatus + Template *TemplateRef + Test bool + type BroadcastAudience struct + Everyone bool + Name string + Segments []BroadcastSegment + ToCount int + type BroadcastInput struct + Audience AudienceInput + Channel Channel + Content *Content + From string + Name string + SendAt *time.Time + Template *WhatsAppTemplateInput + type BroadcastListParams struct + Channel Channel + Cursor string + Limit int + Q string + Status BroadcastStatus + type BroadcastSegment struct + ID string + Name string + type BroadcastStatus string + const BroadcastCanceled + const BroadcastFailed + const BroadcastScheduled + const BroadcastSending + const BroadcastSent + type BroadcastsService struct + func (s *BroadcastsService) Cancel(ctx context.Context, id string) (*Broadcast, error) + func (s *BroadcastsService) Create(ctx context.Context, b BroadcastInput, opts ...RequestOption) (*Broadcast, error) + func (s *BroadcastsService) Get(ctx context.Context, id string) (*Broadcast, error) + func (s *BroadcastsService) List(ctx context.Context, params BroadcastListParams) iter.Seq2[Broadcast, error] + func (s *BroadcastsService) ListPage(ctx context.Context, params BroadcastListParams) (*Page[Broadcast], error) + type Channel string + const SMS + const WhatsApp + type Client struct + Activity *ActivityService + Broadcasts *BroadcastsService + Customers *CustomersService + Messages *MessagesService + Segments *SegmentsService + Templates *TemplatesService + WebhookEndpoints *WebhookEndpointsService + WhatsApp *WhatsAppService + func NewClient(opts ...Option) (*Client, error) + type ConnectionError struct + Err error + TimedOut bool + func (e *ConnectionError) Error() string + func (e *ConnectionError) Unwrap() error + type Content struct + Subject string + Text string + type Customer struct + Attributes map[string]any + CreatedAt time.Time + Email *string + ID string + Name string + Phone *string + Segments []CustomerSegment + UpdatedAt time.Time + type CustomerActivityService struct + func (s *CustomerActivityService) List(ctx context.Context, customerID string) iter.Seq2[Activity, error] + func (s *CustomerActivityService) ListPage(ctx context.Context, customerID string, limit int, cursor string) (*Page[Activity], error) + func (s *CustomerActivityService) Record(ctx context.Context, customerID string, activities []ActivityInput, ...) (*RecordedActivity, error) + type CustomerCreateParams struct + Customers []NewCustomer + IfExists string + IfSegmentMissing string + type CustomerInput struct + Attributes map[string]any + Email string + Name string + Phone string + type CustomerListParams struct + Cursor string + Limit int + NotInSegment string + Q string + Segment string + Sort string + type CustomerSegment struct + Color string + ID string + Name string + type CustomerSegmentsService struct + func (s *CustomerSegmentsService) List(ctx context.Context, customerID string) ([]Segment, error) + func (s *CustomerSegmentsService) Set(ctx context.Context, customerID string, names []string) ([]Segment, error) + type CustomersService struct + Activity *CustomerActivityService + Segments *CustomerSegmentsService + func (s *CustomersService) Create(ctx context.Context, params CustomerCreateParams, opts ...RequestOption) ([]SavedCustomer, error) + func (s *CustomersService) Delete(ctx context.Context, id string) error + func (s *CustomersService) Get(ctx context.Context, id string) (*Customer, error) + func (s *CustomersService) List(ctx context.Context, params CustomerListParams) iter.Seq2[Customer, error] + func (s *CustomersService) ListPage(ctx context.Context, params CustomerListParams) (*Page[Customer], error) + func (s *CustomersService) Update(ctx context.Context, id string, changes CustomerInput) (*Customer, error) + type FieldProblem struct + Code string + Message string + type Media struct + Content []byte + ContentType string + type Message struct + BroadcastID *string + Channel Channel + Content Content + Cost int + CreatedAt time.Time + CustomerID *string + DeliveredAt *time.Time + Error *string + FailedAt *time.Time + From *string + ID string + Private bool + ReadAt *time.Time + SendAt time.Time + SentAt *time.Time + Status MessageStatus + Template *TemplateRef + Test bool + To MessageTo + type MessageInput struct + Channel Channel + Content *Content + CustomerID string + From string + ReplyTo string + SendAt *time.Time + Template *TemplateChoice + To string + Variables map[string]string + type MessageListParams struct + Channel Channel + Cursor string + Customer string + Limit int + Q string + Status MessageStatus + type MessageStatus string + const MessageCanceled + const MessageDelivered + const MessageFailed + const MessageRead + const MessageScheduled + const MessageSending + const MessageSent + const MessageWaiting + type MessageTemplate struct + Category TemplateCategory + Channel Channel + Content *Content + CreatedAt time.Time + ID string + LibraryTemplateID *string + Name string + Problem *string + UpdatedAt time.Time + Variables []TemplateVariable + WhatsApp *SavedWhatsAppTemplate + type MessageTo struct + Email string + Name string + Phone string + type MessagesService struct + func (s *MessagesService) Cancel(ctx context.Context, id string) (*Message, error) + func (s *MessagesService) Get(ctx context.Context, id string) (*Message, error) + func (s *MessagesService) List(ctx context.Context, params MessageListParams) iter.Seq2[Message, error] + func (s *MessagesService) ListPage(ctx context.Context, params MessageListParams) (*Page[Message], error) + func (s *MessagesService) Media(ctx context.Context, receivedID string) (*Media, error) + func (s *MessagesService) Send(ctx context.Context, msgs []MessageInput, opts ...RequestOption) ([]Message, error) + func (s *MessagesService) SendOne(ctx context.Context, msg MessageInput, opts ...RequestOption) (*Message, error) + func (s *MessagesService) Senders(ctx context.Context) (*Senders, error) + type NewCustomer struct + Activities []ActivityInput + Attributes map[string]any + Email string + Name string + Phone string + Segments []SegmentRef + type Option func(*Client) + func WithAPIKey(key string) Option + func WithBaseURL(u string) Option + func WithHTTPClient(h *http.Client) Option + func WithMaxRetries(n int) Option + func WithTimeout(d time.Duration) Option + type Page struct + Items []T + NextCursor string + Total *int + type RecordedActivity struct + CustomerID string + Items []Activity + type RequestOption func(*requestConfig) + func WithIdempotencyKey(key string) RequestOption + type SavedCustomer struct + Activities []Activity + Customer Customer + Result string + Segments []SegmentRef + type SavedWhatsAppTemplate struct + Language string + Name string + TemplateID *string + Values map[string]string + type Segment struct + Color string + CreatedAt time.Time + CustomerCount *int + Description string + ID string + Kind string + Name string + Rules *SegmentRules + UpdatedAt time.Time + type SegmentCondition struct + Count int + Key string + Op string + SegmentID string + Type string + Value any + WithinDays int + type SegmentCustomersService struct + func (s *SegmentCustomersService) Add(ctx context.Context, segmentID string, customerIDs []string) (*Segment, error) + func (s *SegmentCustomersService) List(ctx context.Context, segmentID string) iter.Seq2[Customer, error] + func (s *SegmentCustomersService) ListPage(ctx context.Context, segmentID string, limit int, cursor string) (*Page[Customer], error) + func (s *SegmentCustomersService) Remove(ctx context.Context, segmentID string, customerIDs []string) (*Segment, error) + type SegmentInput struct + Color string + Description string + Name string + Rules *SegmentRules + type SegmentRef struct + ID string + Name string + type SegmentRules struct + Conditions []SegmentCondition + Match string + type SegmentsService struct + Customers *SegmentCustomersService + func (s *SegmentsService) Create(ctx context.Context, segment SegmentInput) (*Segment, error) + func (s *SegmentsService) Delete(ctx context.Context, id string) error + func (s *SegmentsService) Get(ctx context.Context, id string) (*Segment, error) + func (s *SegmentsService) List(ctx context.Context) ([]Segment, error) + func (s *SegmentsService) Update(ctx context.Context, id string, changes SegmentInput) (*Segment, error) + type Sender struct + Shared bool + Value string + type Senders struct + Email []Sender + SMS []Sender + WhatsApp []Sender + type TemplateCategory string + const Authentication + const Marketing + const Utility + type TemplateChoice struct + func SavedTemplate(nameOrID string) *TemplateChoice + func WhatsAppTemplateByID(id string, values map[string]string) *TemplateChoice + func (t TemplateChoice) MarshalJSON() ([]byte, error) + type TemplateInput struct + Category TemplateCategory + Channel Channel + Content *Content + Name string + WhatsApp *WhatsAppTemplateChoice + type TemplateListParams struct + Category TemplateCategory + Channel Channel + type TemplateRef struct + Category string + ID string + Language string + Name string + Values map[string]string + type TemplateVariable struct + Key string + Private bool + type TemplatesService struct + func (s *TemplatesService) Create(ctx context.Context, t TemplateInput, opts ...RequestOption) (*MessageTemplate, error) + func (s *TemplatesService) Delete(ctx context.Context, id string) error + func (s *TemplatesService) Get(ctx context.Context, id string) (*MessageTemplate, error) + func (s *TemplatesService) List(ctx context.Context, params TemplateListParams) ([]MessageTemplate, error) + func (s *TemplatesService) Update(ctx context.Context, id string, changes TemplateInput) (*MessageTemplate, error) + type WebhookEndpoint struct + CreatedAt time.Time + Description string + Disabled bool + DisabledReason *string + Events []string + ID string + PreviousSecretExpiresAt *time.Time + Secret string + URL string + UpdatedAt time.Time + type WebhookEndpointInput struct + Description string + Disabled *bool + Events []string + URL string + type WebhookEndpointsService struct + func (s *WebhookEndpointsService) Create(ctx context.Context, endpoint WebhookEndpointInput) (*WebhookEndpoint, error) + func (s *WebhookEndpointsService) Delete(ctx context.Context, id string) error + func (s *WebhookEndpointsService) Get(ctx context.Context, id string) (*WebhookEndpoint, error) + func (s *WebhookEndpointsService) List(ctx context.Context) ([]WebhookEndpoint, error) + func (s *WebhookEndpointsService) Update(ctx context.Context, id string, changes WebhookEndpointInput) (*WebhookEndpoint, error) + type WebhookEvent struct + Data json.RawMessage + ID string + OrganizationID string + Timestamp time.Time + Type string + func VerifyWebhook(payload []byte, header http.Header, secret string) (*WebhookEvent, error) + type WebhookVerificationError struct + Reason string + func (e *WebhookVerificationError) Error() string + type WhatsAppService struct + Templates *WhatsAppTemplatesService + type WhatsAppTemplate struct + Body string + Category string + CategoryChange *string + Footer *string + Header *string + ID string + Language string + Name string + Parameters []WhatsAppTemplateParameter + Preview string + Problem *string + Quality string + Status string + SyncedAt time.Time + type WhatsAppTemplateChoice struct + Language string + Name string + Submit *WhatsAppTemplateDraft + Values map[string]string + type WhatsAppTemplateDraft struct + Body string + Category TemplateCategory + Footer string + Header string + Language string + QuickReplies []string + type WhatsAppTemplateInput struct + ID string + Values map[string]string + type WhatsAppTemplateParameter struct + Example string + Key string + type WhatsAppTemplatesService struct + func (s *WhatsAppTemplatesService) List(ctx context.Context, approvedOnly bool) ([]WhatsAppTemplate, error)