Versions in this module Expand all Collapse all v0 v0.4.0 Jul 2, 2026 Changes in this version + func VerifyWebhookSignatureWithFreshness(body []byte, signatureHeader, secret string, toleranceSeconds int) bool v0.3.0 Jul 1, 2026 Changes in this version + func VerifyWebhookSignature(body []byte, signatureHeader, secret string) bool + type AuthMode string + const ModeLive + const ModeTest + type AutoRechargeConfig struct + AlertEnabled bool + AlertThreshold float64 + CardID *string + Enabled bool + PlanQuantity int + Threshold float64 + type AutoRechargeUpdate struct + AlertEnabled *bool + AlertThreshold *float64 + CardID *string + Enabled *bool + PlanQuantity *int + Threshold *float64 + type Balance struct + Balance float64 + Company Company + Currency string + type BillingResource struct + func (r *BillingResource) Cards(ctx context.Context) ([]Card, error) + func (r *BillingResource) Invoices(ctx context.Context, params InvoicesParams) (*Paginated[InvoiceItem], error) + func (r *BillingResource) Plans(ctx context.Context) ([]Plan, error) + func (r *BillingResource) Purchase(ctx context.Context, params PurchaseParams) (*PurchaseResult, error) + type BulkMessage struct + From string + Message string + Phone string + Reference string + Schedule string + type Card struct + Alias *string + Default bool + Flag string + ID string + Name string + Number string + Validate string + type Client struct + Billing *BillingResource + Contacts *ContactsResource + Lists *ListsResource + func New(opts Options) *Client + func (c *Client) Get(ctx context.Context, id string) (*SendDetail, error) + func (c *Client) GetAutoRecharge(ctx context.Context) (*AutoRechargeConfig, error) + func (c *Client) GetBalance(ctx context.Context) (*Balance, error) + func (c *Client) GetNumbers(ctx context.Context, id string, params NumbersParams) (*Paginated[SendNumberItem], error) + func (c *Client) GetSMSTypes(ctx context.Context) ([]SMSTypeItem, error) + func (c *Client) GetWebhook(ctx context.Context) (*WebhookConfig, error) + func (c *Client) List(ctx context.Context, params ListParams) (*Paginated[SendListItem], error) + func (c *Client) Mode() AuthMode + func (c *Client) ResolveMode(ctx context.Context) (AuthMode, error) + func (c *Client) Send(ctx context.Context, params SendParams) (*SendResult, error) + func (c *Client) SendBulk(ctx context.Context, params SendBulkParams) (*SendResult, error) + func (c *Client) SetAutoRecharge(ctx context.Context, params AutoRechargeUpdate) (*AutoRechargeConfig, error) + func (c *Client) SetWebhook(ctx context.Context, params WebhookUpdate) (*WebhookConfig, error) + type Company struct + Document *string + Name string + type ContactDetail struct + Email *string + FullName string + Phone string + type ContactInput struct + Email string + FullName string + Lists []string + Phone string + type ContactsListParams struct + Page int + PerPage int + Search string + Title string + type ContactsResource struct + func (r *ContactsResource) Create(ctx context.Context, input ContactInput) (string, error) + func (r *ContactsResource) Delete(ctx context.Context, id string) (*MessageResult, error) + func (r *ContactsResource) Get(ctx context.Context, id string) (*ContactDetail, error) + func (r *ContactsResource) List(ctx context.Context, params ContactsListParams) (*Paginated[map[string]any], error) + func (r *ContactsResource) Update(ctx context.Context, id string, input ContactInput) (string, error) + type Error struct + Code string + Details any + FieldErrors []FieldError + Message string + Status int + func AsError(err error) (*Error, bool) + func (e *Error) Error() string + type FieldError struct + Field string + Message string + type InvoiceCard struct + Code string + Name string + type InvoiceItem struct + Card *InvoiceCard + Date string + DisplayID int + Expiry string + Status *InvoiceStatus + Total float64 + UUID string + type InvoiceStatus struct + Code string + Color *string + Icon *string + Name string + type InvoicesParams struct + Page int + PerPage int + type ListInput struct + Name string + type ListParams struct + Page int + type ListResult struct + ID string + Name string + type ListsListParams struct + Page int + PerPage int + Title string + type ListsResource struct + func (r *ListsResource) Create(ctx context.Context, input ListInput) (*ListResult, error) + func (r *ListsResource) Delete(ctx context.Context, id string) (*MessageResult, error) + func (r *ListsResource) Get(ctx context.Context, id string) (*ListResult, error) + func (r *ListsResource) List(ctx context.Context, params ListsListParams) (*Paginated[map[string]any], error) + func (r *ListsResource) Update(ctx context.Context, id string, input ListInput) (*ListResult, error) + type MessageResult struct + Message string + type NumbersParams struct + Page int + Status string + type Options struct + APIKey string + BaseURL string + HTTPClient *http.Client + type Paginated struct + Data []T + Meta PaginationMeta + type PaginationMeta struct + CurrentPage int + FirstPage int + FirstPageURL string + LastPage int + LastPageURL string + NextPageURL *string + PerPage int + PreviousPageURL *string + Total int + type Plan struct + ID string + Popular bool + Price float64 + Quantity int + Sale float64 + Total float64 + Unit float64 + type PurchaseParams struct + CardID string + Coupon string + PlanID string + Quantity int + type PurchaseResult struct + InvoiceUUID string + PaymentIntentID string + Quantity int + Status string + Total float64 + type SMSTypeItem struct + ID int + Name string + Price float64 + Sale *float64 + type SendBulkParams struct + FlashSms *bool + Messages []BulkMessage + SMSTypeID int + URLCallback string + type SendDetail struct + Characters int + Cost float64 + Date *string + ID string + Phones []SendNumberDetail + Quantity int + Status string + Summary SendSummary + Total float64 + Type string + User string + type SendListItem struct + CreatedAt string + Date *string + FullName string + ID string + Number *int + Quantity int + Status string + Type string + type SendNumberDetail struct + Characters int + Code *string + Cost float64 + CreatedAt string + ID string + Message string + Phone string + Status string + Template *string + type SendNumberItem struct + Code *string + CreatedAt string + ID string + Phone string + Status string + type SendParams struct + From string + Message string + Phone string + Reference string + SMSTypeID int + Schedule string + type SendResult struct + ID string + Quantity int + Status string + Test bool + type SendSummary struct + Delivered int + Done bool + Failed int + InProgress int + Total int + type WebhookConfig struct + Secret *string + URL *string + type WebhookUpdate struct + RotateSecret *bool + URL *string