Versions in this module Expand all Collapse all v1 v1.0.0 Jul 29, 2026 Changes in this version + const DefaultBaseURL + type Balance struct + Balance float64 + Currency string + SMSEstimate *int + type BalanceService struct + func (s *BalanceService) Get(ctx context.Context) (*Balance, error) + type BulkSendParams struct + ContactListIDs []int + Route string + SenderID string + Text string + type Client struct + Balance *BalanceService + Messages *MessagesService + Routes *RoutesService + func New(apiKey string, opts ...Option) *Client + func (c *Client) BaseURL() string + type Error struct + Code string + Detail any + Err error + Message string + RequestID string + Status int + func (e *Error) Balance() (float64, bool) + func (e *Error) Cost() (float64, bool) + func (e *Error) Currency() (string, bool) + func (e *Error) Error() string + func (e *Error) IsAuthentication() bool + func (e *Error) IsConnection() bool + func (e *Error) IsInsufficientBalance() bool + func (e *Error) IsNotFound() bool + func (e *Error) IsPermission() bool + func (e *Error) IsRateLimit() bool + func (e *Error) Unwrap() error + type ListParams struct + Limit int + Page int + Status string + type Message struct + ErrorMessage *string + FailedAt *string + SubmittedAt *string + Timeline []TimelineEvent + type MessageList struct + Limit int + Messages []MessageSummary + Page int + Total int + type MessageSummary struct + Cost float64 + Country *string + CreatedAt string + Currency *string + DeliveredAt *string + ErrorCode *string + ID string + Phone string + RetryCount int + Route *string + Segments int + SenderID *string + Status string + Text string + type MessagesService struct + func (s *MessagesService) Get(ctx context.Context, messageID string) (*Message, error) + func (s *MessagesService) List(ctx context.Context, params ListParams) (*MessageList, error) + func (s *MessagesService) Retry(ctx context.Context, messageID string) (*SendResult, error) + func (s *MessagesService) Schedule(ctx context.Context, params SendParams) (*SendResult, error) + func (s *MessagesService) Send(ctx context.Context, params SendParams) (*SendResult, error) + func (s *MessagesService) SendBulk(ctx context.Context, params BulkSendParams) (map[string]any, error) + type Option func(*Client) + func WithBaseURL(u string) Option + func WithHTTPClient(h *http.Client) Option + func WithMaxRetries(n int) Option + type Route struct + Code string + CountryCode string + CountryName string + Currency string + IsActive bool + Name string + PricePerSegment float64 + SenderIDDefault string + type RoutesService struct + func (s *RoutesService) List(ctx context.Context) ([]Route, error) + type SendParams struct + Route string + ScheduleMode string + ScheduledAt string + SenderID string + Text string + To string + type SendResult struct + BalanceAfter float64 + Cost float64 + CostCurrency string + ID string + Route string + RouteCost float64 + RouteCurr string + ScheduledAt *string + Segments int + Status string + type TimelineEvent struct + At string + Detail *string + Event string + Metadata map[string]any + Status string