Versions in this module Expand all Collapse all v0 v0.2.0 Jul 6, 2026 Changes in this version + const DefaultMaxRetries + const DefaultTimeout + const DefaultWebhookTolerance + const SignatureHeader + const SuppressionReasonHardBounce + const SuppressionReasonManual + const SuppressionReasonStop + const SuppressionReasonUnsubscribe + const Version + func Bool(v bool) *bool + func Float(v float64) *float64 + func Int(v int) *int + func IsAuthentication(err error) bool + func IsBadRequest(err error) bool + func IsConflict(err error) bool + func IsGone(err error) bool + func IsInternalServer(err error) bool + func IsNotFound(err error) bool + func IsPermissionDenied(err error) bool + func IsRateLimit(err error) bool + func IsUnprocessableEntity(err error) bool + func SignWebhookPayload(secret string, payload []byte, ts int64) string + func String(v string) *string + func Time(v time.Time) *time.Time + func VerifyWebhookSignature(payload []byte, header, secret string, tolerance int) bool + type APIError struct + Body json.RawMessage + ErrorType string + Errors []ErrorDetail + Message string + RequestID string + RetryAfter *float64 + Retryable *bool + StatusCode int + func (e *APIError) Error() string + type AWSUsageReportParams struct + Page *int + type AuthService struct + func (s *AuthService) Login(ctx context.Context, params LoginParams) (*LoginResult, error) + func (s *AuthService) Signup(ctx context.Context, params SignupParams) (*UserProfile, error) + type BatchAccepted struct + ID string + Livemode bool + Messages []BatchMessage + Object string + RowCount *int + Skipped *SkippedBreakdown + SkippedCount *int + Status string + type BatchMessage struct + Channel string + ID string + Object string + Status string + type Broadcast struct + Channel string + CompletedAt *time.Time + Failed int + ID string + Livemode *bool + Queued int + SendAt *time.Time + Sent int + StartedAt *time.Time + Status string + TargetCount int + type BroadcastAccepted struct + Channel string + ID string + Livemode bool + Object string + Skipped *SkippedBreakdown + SkippedCount int + Status string + TargetCount int + type BroadcastCreateParams struct + Application *string + Audience map[string]any + Channel string + Content map[string]any + ExtraBody map[string]any + IdempotencyKey string + Priority *string + Provider *string + SendAt *time.Time + Sender *string + TTL *int + Template map[string]any + WhatsApp map[string]any + WhatsAppTemplate map[string]any + WidgetKey *string + type BroadcastDeliveriesParams struct + Cursor *string + Limit *int + type BroadcastDelivery struct + ClientID string + Error *string + ID string + SentAt *time.Time + Status string + type BroadcastsService struct + func (s *BroadcastsService) Cancel(ctx context.Context, broadcastID string) (*BroadcastAccepted, error) + func (s *BroadcastsService) Create(ctx context.Context, params BroadcastCreateParams) (*BroadcastAccepted, error) + func (s *BroadcastsService) Deliveries(ctx context.Context, broadcastID string, params BroadcastDeliveriesParams) (*Page[BroadcastDelivery], error) + func (s *BroadcastsService) Retrieve(ctx context.Context, broadcastID string) (*Broadcast, error) + type BulkBatch struct + Channels []any + CreatedAt *time.Time + Filename string + ID int + SentAt *time.Time + Success int + Timezone string + Total int + type BulkBatchDetail struct + Applications []any + Messages []any + Provider string + Recipients []BulkRecipient + ScheduledAt *time.Time + Sender string + Subject string + Template []any + WebApplications []any + type BulkFile struct + ModifiedAt time.Time + Name string + Size int + type BulkFileList struct + Count int + Results []BulkFile + type BulkFileUpload struct + ModifiedAt time.Time + Name string + OriginalFilename string + Size int + type BulkFileUploadParams struct + Content []byte + Filename string + Path string + Reader io.Reader + type BulkFilesService struct + func (s *BulkFilesService) List(ctx context.Context) (*BulkFileList, error) + func (s *BulkFilesService) Upload(ctx context.Context, params BulkFileUploadParams) (*BulkFileUpload, error) + type BulkRecipient struct + ClientID string + Email string + Error string + ID int + PhoneNumber string + Status string + type BulkRecipientDetail struct + Application string + Channel string + CreatedAt *time.Time + FileName string + ID int + Messages string + Provider string + ScheduledAt *time.Time + Sender string + SentAt *time.Time + Status string + Subject string + Template string + WebApp string + type BulkRecipientsService struct + func (s *BulkRecipientsService) Retrieve(ctx context.Context, recipientID int) (*BulkRecipientDetail, error) + type BulkSendParams struct + Application *string + BulkFile *string + Channel *string + Expire *bool + Files []string + Group *string + Language *string + Message *string + Name *string + Provider *string + Recipients []map[string]any + RemoveDuplicates *bool + ScheduledAt *string + Sender *string + Subject *string + Template *string + Timezone *string + WebApplication *string + WhatsAppTemplate *string + WhatsAppTemplateLanguage *string + WhatsAppTemplateVariables *string + type BulkSendResult struct + BulkID int + Failed int + Filename string + Message string + OK int + Queued int + type BulkService struct + Files *BulkFilesService + Recipients *BulkRecipientsService + func (s *BulkService) List(ctx context.Context) ([]BulkBatch, error) + func (s *BulkService) Retrieve(ctx context.Context, bulkID int) (*BulkBatchDetail, error) + func (s *BulkService) Send(ctx context.Context, params BulkSendParams) (*BulkSendResult, error) + type BulksReportParams struct + DateFrom *string + DateTo *string + Search *string + type ChannelsReportParams struct + ChannelName []string + DateFrom *string + DateTo *string + type Client struct + Auth *AuthService + Broadcasts *BroadcastsService + Bulk *BulkService + ClientGroups *ClientGroupsService + Clients *ClientsService + Events *EventsService + Messages *MessagesService + OTP *OTPService + Profile *ProfileService + Push *PushService + Reports *ReportsService + Suppressions *SuppressionsService + Templates *TemplatesService + WebhookEndpoints *WebhookEndpointsService + WhatsAppTemplates *WhatsAppTemplatesService + func NewClient(opts ...Option) (*Client, error) + func (c *Client) BaseURL() string + type ClientCreateParams struct + CivilID *string + ClientID string + DefaultChannel *string + DefaultLanguage *string + Email *string + FirstName *string + LastName *string + Notes *string + PhoneNumber *string + type ClientGroup struct + Clients []ClientProfile + ID int + IsActive bool + Name string + Slug string + type ClientGroupCreateParams struct + ClientIDs []string + IsActive *bool + Name string + Slug string + type ClientGroupListParams struct + Cursor *string + Limit *int + type ClientGroupReplaceParams struct + ClientIDs []string + IsActive *bool + Name string + Slug string + type ClientGroupUpdateParams struct + ClientIDs []string + IsActive *bool + Name *string + Slug *string + type ClientGroupsService struct + func (s *ClientGroupsService) Create(ctx context.Context, params ClientGroupCreateParams) (*ClientGroup, error) + func (s *ClientGroupsService) Delete(ctx context.Context, groupID int) error + func (s *ClientGroupsService) List(ctx context.Context) ([]ClientGroup, error) + func (s *ClientGroupsService) ListPage(ctx context.Context, params ClientGroupListParams) (*Page[ClientGroup], error) + func (s *ClientGroupsService) Replace(ctx context.Context, groupID int, params ClientGroupReplaceParams) (*ClientGroup, error) + func (s *ClientGroupsService) Retrieve(ctx context.Context, groupID int) (*ClientGroup, error) + func (s *ClientGroupsService) Update(ctx context.Context, groupID int, params ClientGroupUpdateParams) (*ClientGroup, error) + type ClientListParams struct + Cursor *string + Limit *int + type ClientProfile struct + CivilID *string + ClientID string + DefaultChannel string + DefaultLanguage string + Email string + FirstName string + LastName string + Notes string + PhoneNumber string + type ClientUpdateParams struct + CivilID *string + DefaultChannel *string + DefaultLanguage *string + Email *string + FirstName *string + LastName *string + Notes *string + PhoneNumber *string + type ClientsReportParams struct + DateFrom *string + DateTo *string + Device []string + Language []string + Search *string + WebSubscription *string + type ClientsService struct + func (s *ClientsService) Create(ctx context.Context, params ClientCreateParams) (*ClientProfile, error) + func (s *ClientsService) Delete(ctx context.Context, clientID string) error + func (s *ClientsService) List(ctx context.Context) ([]ClientProfile, error) + func (s *ClientsService) ListPage(ctx context.Context, params ClientListParams) (*Page[ClientProfile], error) + func (s *ClientsService) Replace(ctx context.Context, clientID string, params ClientUpdateParams) (*ClientProfile, error) + func (s *ClientsService) Retrieve(ctx context.Context, clientID string) (*ClientProfile, error) + func (s *ClientsService) Update(ctx context.Context, clientID string, params ClientUpdateParams) (*ClientProfile, error) + type ConnectionError struct + Timeout bool + func (e *ConnectionError) Error() string + func (e *ConnectionError) Unwrap() error + type Error struct + Message string + func (e *Error) Error() string + type ErrorDetail struct + Attr *string + Code string + Detail string + type Event struct + APIVersion string + Created *time.Time + Data EventData + ID string + Livemode bool + Object string + Type string + func ConstructWebhookEvent(payload []byte, header, secret string, tolerance int) (*Event, error) + type EventData struct + BroadcastID *string + Channel *string + ClientID *string + CreatedAt *time.Time + Error *string + ExternalID *string + Failed *int + ID *string + Livemode *bool + Object *string + Provider *string + Recipient *string + Sent *int + SentAt *time.Time + Status *string + TargetCount *int + type EventListParams struct + Cursor *string + Limit *int + Type *string + type EventsService struct + func (s *EventsService) List(ctx context.Context, params EventListParams) (*Page[Event], error) + func (s *EventsService) Retrieve(ctx context.Context, eventID string) (*Event, error) + type LoginParams struct + Password string + Username string + type LoginResult struct + Token string + type MessageAccepted struct + Channel string + ID string + Livemode bool + Object string + Skipped *SkippedBreakdown + SkippedCount *int + Status string + TargetCount *int + type MessageBatchParams struct + Application *string + Channel *string + Content map[string]any + ExtraBody map[string]any + File *string + IdempotencyKey string + Messages []map[string]any + Priority *string + Provider *string + SendAt *time.Time + Sender *string + TTL *int + Template map[string]any + WhatsApp map[string]any + WhatsAppTemplate map[string]any + WidgetKey *string + type MessageSendParams struct + Application *string + Audience map[string]any + Channel string + Content map[string]any + ExtraBody map[string]any + IdempotencyKey string + OverrideSuppression *bool + Priority *string + Provider *string + SendAt *time.Time + Sender *string + TTL *int + Template map[string]any + To map[string]any + WhatsApp map[string]any + WhatsAppTemplate map[string]any + WidgetKey *string + type MessageStatus struct + Channel *string + EventID string + ID string + IsSent bool + Livemode *bool + Messages []MessageStatusItem + Object string + SendAt *time.Time + Status string + Timeline []MessageTimelineEntry + type MessageStatusItem struct + ClientID string + Email string + IsRead bool + PhoneNumber string + ReadCount int + type MessageTimelineEntry struct + At *time.Time + Provider *string + Status string + type MessagesReportParams struct + DateFrom *string + DateTo *string + Device []string + ReportType string + Search *string + Source []string + Status []string + Template []int + type MessagesService struct + func (s *MessagesService) Cancel(ctx context.Context, eventID string) (*MessageAccepted, error) + func (s *MessagesService) Retrieve(ctx context.Context, eventID string) (*MessageStatus, error) + func (s *MessagesService) Send(ctx context.Context, params MessageSendParams) (*MessageAccepted, error) + func (s *MessagesService) SendBatch(ctx context.Context, params MessageBatchParams) (*BatchAccepted, error) + type OTPSendParams struct + IdempotencyKey string + Purpose string + To map[string]any + type OTPSendResult struct + Channel string + ExpiresAt time.Time + Livemode bool + OTPID string + TaskIDs []string + type OTPService struct + func (s *OTPService) Send(ctx context.Context, params OTPSendParams) (*OTPSendResult, error) + func (s *OTPService) Verify(ctx context.Context, params OTPVerifyParams) (*OTPVerifyResult, error) + type OTPVerifyParams struct + Code string + OTPID string + type OTPVerifyResult struct + Livemode bool + Purpose string + Verified bool + VerifiedAt time.Time + type Option func(*clientConfig) + func WithAPIKey(key string) Option + func WithBaseURL(baseURL string) Option + func WithDefaultHeader(key, value string) Option + func WithHTTPClient(hc *http.Client) Option + func WithMaxRetries(n int) Option + func WithTimeout(d time.Duration) Option + func WithWorkspace(workspace string) Option + type Page struct + Next *string + Previous *string + Results []T + func (p *Page[T]) All(ctx context.Context) iter.Seq2[T, error] + func (p *Page[T]) HasNextPage() bool + func (p *Page[T]) NextPage(ctx context.Context) (*Page[T], error) + type ProfileReplaceParams struct + CivilID *string + DefaultLanguage *string + Email string + FirstName string + LastName string + PhoneNumber string + type ProfileService struct + func (s *ProfileService) Replace(ctx context.Context, params ProfileReplaceParams) (*UserProfile, error) + func (s *ProfileService) Retrieve(ctx context.Context) (*UserProfile, error) + func (s *ProfileService) Update(ctx context.Context, params ProfileUpdateParams) (*UserProfile, error) + type ProfileUpdateParams struct + CivilID *string + DefaultLanguage *string + Email *string + FirstName *string + LastName *string + PhoneNumber *string + type ProviderBalance struct + Balance string + type PushClientDevices struct + ClientID string + DeviceID string + DeviceType string + KeepDevices *bool + Slug string + type PushMarkReadResult struct + AffectedRows int + type PushNotification struct + Date string + Message string + Subject string + type PushPlatform string + const PushPlatformAndroid + const PushPlatformCombined + const PushPlatformIOS + type PushService struct + func (s *PushService) ListNotifications(ctx context.Context, slug string, platform PushPlatform) ([]PushNotification, error) + func (s *PushService) MarkRead(ctx context.Context, slug string) (*PushMarkReadResult, error) + func (s *PushService) SubscribeAndroid(ctx context.Context, params PushSubscribeAndroidParams) (*PushSubscribeResult, error) + func (s *PushService) SubscribeIOS(ctx context.Context, params PushSubscribeIOSParams) (*PushSubscribeResult, error) + func (s *PushService) SubscribeWeb(ctx context.Context, params PushSubscribeWebParams) (*WebPushSubscription, error) + func (s *PushService) UpsertDevices(ctx context.Context, params PushUpsertDevicesParams) (*PushClientDevices, error) + type PushSubscribeAndroidParams struct + Slug string + Token *string + type PushSubscribeIOSParams struct + Environment *string + Slug string + Token *string + type PushSubscribeResult struct + Success int + type PushSubscribeWebParams struct + ClientID string + Slug string + SubscriptionInfo *string + type PushUpsertDevicesParams struct + ClientID string + DeviceID *string + DeviceType string + KeepDevices *bool + Slug string + type Report struct + Page int + ReportData []map[string]any + ReportType string + TotalItems int + TotalPages int + type ReportsService struct + func (s *ReportsService) AWSUsage(ctx context.Context, params AWSUsageReportParams) (*Report, error) + func (s *ReportsService) Balance(ctx context.Context, slug string) (*ProviderBalance, error) + func (s *ReportsService) Bulks(ctx context.Context, params BulksReportParams) (*Report, error) + func (s *ReportsService) Channels(ctx context.Context, params ChannelsReportParams) (*Report, error) + func (s *ReportsService) Clients(ctx context.Context, params ClientsReportParams) (*Report, error) + func (s *ReportsService) Messages(ctx context.Context, params MessagesReportParams) (*Report, error) + func (s *ReportsService) SpecificBulks(ctx context.Context, params SpecificBulksReportParams) (*Report, error) + func (s *ReportsService) Subscriptions(ctx context.Context, params SubscriptionsReportParams) (*Report, error) + func (s *ReportsService) Users(ctx context.Context, params UsersReportParams) (*Report, error) + type SignupParams struct + CivilID *string + ClientID *string + DefaultLanguage *string + Email string + FirstName string + LastName string + Password string + PhoneNumber string + type SkippedBreakdown struct + Duplicate int + Suppressed int + WrongChannel int + type SpecificBulksReportParams struct + BulksFile int + DateFrom *string + DateTo *string + MobileApp []string + Search *string + Status []string + WebApp []string + type SubscriptionsReportParams struct + DateFrom *string + DateTo *string + DeviceType []string + MobileApp []string + ReportType string + Search *string + WebApp []string + type Suppression struct + Address string + Channel *string + Created *time.Time + ID string + Livemode bool + Object string + Reason string + type SuppressionCreateParams struct + Address string + Channel *string + Reason *string + type SuppressionListParams struct + Address *string + Channel *string + Cursor *string + Limit *int + Reason *string + type SuppressionsService struct + func (s *SuppressionsService) Create(ctx context.Context, params SuppressionCreateParams) (*Suppression, error) + func (s *SuppressionsService) Delete(ctx context.Context, suppressionID string) error + func (s *SuppressionsService) List(ctx context.Context, params SuppressionListParams) (*Page[Suppression], error) + type Template struct + Body string + BodyMd string + Channel *string + Created *time.Time + Object string + Slug string + Subject string + Updated *time.Time + Version int + Versions []int + type TemplateCreateParams struct + Body *string + BodyMd *string + Channel *string + Slug string + Subject *string + type TemplateListParams struct + Channel *string + Cursor *string + Limit *int + Q *string + type TemplateUpdateParams struct + Body *string + BodyMd *string + Channel *string + Subject *string + type TemplatesService struct + func (s *TemplatesService) Create(ctx context.Context, params TemplateCreateParams) (*Template, error) + func (s *TemplatesService) Delete(ctx context.Context, slug string) error + func (s *TemplatesService) List(ctx context.Context, params TemplateListParams) (*Page[Template], error) + func (s *TemplatesService) Retrieve(ctx context.Context, slug string) (*Template, error) + func (s *TemplatesService) Update(ctx context.Context, slug string, params TemplateUpdateParams) (*Template, error) + type UserProfile struct + CivilID *string + ClientID string + DefaultLanguage string + Email string + FirstName string + LastName string + PhoneNumber string + type UsersReportParams struct + DateFrom *string + DateTo *string + Search *string + type WABA struct + ID *int + Name *string + type WebPushSubscription struct + ClientID string + Slug string + SubscriptionInfo string + type WebhookAttempt struct + Attempts int + Created *time.Time + Error *string + EventID string + EventType string + ID string + LastAttemptAt *time.Time + NextAttemptAt *time.Time + OK bool + Object string + ResponseStatus *int + type WebhookAttemptListParams struct + Cursor *string + Limit *int + type WebhookEndpoint struct + CreatedAt *time.Time + Description string + EnabledEvents []string + ID string + Livemode bool + Object string + Status string + URL string + type WebhookEndpointCreateParams struct + Description *string + EnabledEvents []string + Livemode *bool + URL string + type WebhookEndpointListParams struct + Cursor *string + Limit *int + type WebhookEndpointTestResult struct + Delivered bool + Error *string + LatencyMs int + ResponseStatus *int + type WebhookEndpointUpdateParams struct + Description *string + EnabledEvents []string + Status *string + URL *string + type WebhookEndpointWithSecret struct + Secret string + type WebhookEndpointsService struct + func (s *WebhookEndpointsService) Create(ctx context.Context, params WebhookEndpointCreateParams) (*WebhookEndpointWithSecret, error) + func (s *WebhookEndpointsService) Delete(ctx context.Context, endpointID string) error + func (s *WebhookEndpointsService) List(ctx context.Context, params WebhookEndpointListParams) (*Page[WebhookEndpoint], error) + func (s *WebhookEndpointsService) ListAttempts(ctx context.Context, endpointID string, params WebhookAttemptListParams) (*Page[WebhookAttempt], error) + func (s *WebhookEndpointsService) Retrieve(ctx context.Context, endpointID string) (*WebhookEndpoint, error) + func (s *WebhookEndpointsService) Test(ctx context.Context, endpointID string) (*WebhookEndpointTestResult, error) + func (s *WebhookEndpointsService) Update(ctx context.Context, endpointID string, params WebhookEndpointUpdateParams) (*WebhookEndpoint, error) + type WebhookSignatureVerificationError struct + Message string + func (e *WebhookSignatureVerificationError) Error() string + type WhatsAppTemplate struct + Category string + Components []map[string]any + ExternalID string + ID int + Language string + Mode string + Name string + Preview string + Status string + Variables []WhatsAppTemplateVariable + WABA WABA + type WhatsAppTemplateList struct + Count int + Results []WhatsAppTemplate + type WhatsAppTemplateListParams struct + Language *string + Name *string + WABAID *int + type WhatsAppTemplateVariable struct + Key string + Label string + type WhatsAppTemplatesService struct + func (s *WhatsAppTemplatesService) List(ctx context.Context, params WhatsAppTemplateListParams) (*WhatsAppTemplateList, error) + func (s *WhatsAppTemplatesService) Retrieve(ctx context.Context, templateID int) (*WhatsAppTemplate, error)