Versions in this module Expand all Collapse all v1 v1.0.0 Nov 24, 2026 Changes in this version + const DefaultBaseURL + const Version + func Bool(v bool) *bool + type Client struct + Enterprise *EnterpriseService + OTP *OTPService + SMS *SMSService + WhatsApp *WhatsAppService + func NewClient(opts ...Option) *Client + type ContactCard struct + FullName string + Organization string + PhoneNumber string + VCard string + WhatsAppID string + type ContactsService struct + func (c *ContactsService) CheckContactExists(ctx context.Context, phone string) (Result, error) + func (c *ContactsService) GetAllContacts(ctx context.Context, opts *GetAllContactsOptions) (Result, error) + func (c *ContactsService) GetAllKnownLIDs(ctx context.Context, opts *GetAllKnownLIDsOptions) ([]Result, error) + func (c *ContactsService) GetContact(ctx context.Context, chatID string) (Result, error) + func (c *ContactsService) GetLIDByPhoneNumber(ctx context.Context, phoneNumber string) (Result, error) + func (c *ContactsService) GetLIDsCount(ctx context.Context) (Result, error) + func (c *ContactsService) GetPhoneNumberByLID(ctx context.Context, lid string) (Result, error) + func (c *ContactsService) GetProfilePicture(ctx context.Context, chatID string) (Result, error) + func (c *ContactsService) UpsertContact(ctx context.Context, chatID, firstName string, opts *UpsertContactOptions) (Result, error) + type CreateInstanceOptions struct + WebhookURL string + type EnterpriseService struct + func (e *EnterpriseService) CreateInstance(ctx context.Context, phone, name string, opts *CreateInstanceOptions) (Result, error) + func (e *EnterpriseService) GetInstanceHealth(ctx context.Context, instanceID string) (Result, error) + func (e *EnterpriseService) ListInstances(ctx context.Context, opts *ListInstancesOptions) ([]Result, error) + func (e *EnterpriseService) RequestNewQRCode(ctx context.Context, instanceID string) (Result, error) + func (e *EnterpriseService) RestartInstance(ctx context.Context, instanceID string) (Result, error) + type Error struct + Body []byte + Message string + StatusCode int + func (e *Error) Error() string + type GenerateLinkOptions struct + Callback *OTPLinkCallback + Expires int + Message *OTPLinkMessage + Name string + type GetAllContactsOptions struct + Limit int + Offset int + SortBy string + SortOrder string + type GetAllKnownLIDsOptions struct + Limit int + Offset int + type LinkPreview struct + Description string + Image Media + Title string + URL string + type ListInstancesOptions struct + Name string + Phone string + Status string + UUID string + type ListOptions struct + Filters map[string]string + Include string + Page int + PerPage int + Sort string + type Media struct + func MediaFile(filename string, r io.Reader) Media + func MediaURL(url string) Media + type MediaOptions struct + Caption string + Filename string + MimeType string + ReplyTo string + type OTPLinkCallback struct + Failed string + Success string + type OTPLinkMessage struct + Expired string + Failed string + Prompt string + Success string + type OTPService struct + func (o *OTPService) GenerateLink(ctx context.Context, chatID string, opts *GenerateLinkOptions) (Result, error) + func (o *OTPService) RequestCode(ctx context.Context, chatID string, opts *RequestCodeOptions) (Result, error) + func (o *OTPService) ValidateCode(ctx context.Context, chatID, code string) (Result, error) + type Option func(*options) + func WithBaseURL(baseURL string) Option + func WithEnterprise(apiKey string) Option + func WithHTTPClient(c *http.Client) Option + func WithOTP(apiKey, instanceID string) Option + func WithSMS(apiKey, instanceID string) Option + func WithWhatsApp(apiKey, instanceID string) Option + type ReadChatOptions struct + Days int + Messages int + type RequestCodeOptions struct + AllCapital *bool + Expires int + Length int + Name string + UseLetter *bool + UseNumber *bool + type Result = map[string]any + type SMSService struct + func (s *SMSService) DeleteMessage(ctx context.Context, messageID string) (Result, error) + func (s *SMSService) DeleteMessageThread(ctx context.Context, messageThreadID string) (Result, error) + func (s *SMSService) EditMessageThread(ctx context.Context, messageThreadID string, isArchived bool) (Result, error) + func (s *SMSService) GetHeartbeats(ctx context.Context, opts *ListOptions) (Result, error) + func (s *SMSService) ListMessageThreads(ctx context.Context, opts *ListOptions) (Result, error) + func (s *SMSService) ListMessages(ctx context.Context, opts *ListOptions) (Result, error) + func (s *SMSService) SendMessage(ctx context.Context, to, content string, opts *SendSMSOptions) (Result, error) + type SendLinkCustomPreviewOptions struct + HighQuality bool + ReplyTo string + type SendLocationOptions struct + ReplyTo string + Title string + type SendPollOptions struct + MultipleAnswers bool + ReplyTo string + type SendSMSOptions struct + MaxSendAttempts int + MessageExpirationSeconds int + RequestID string + ScheduleSendAt string + type SendSeenOptions struct + Participant string + type SendTextOptions struct + LinkPreview bool + LinkPreviewHighQuality bool + ReplyTo string + type UpsertContactOptions struct + LastName string + type VoiceOptions struct + Caption string + ReplyTo string + type WhatsAppService struct + Contacts *ContactsService + func (w *WhatsAppService) DeleteMessage(ctx context.Context, chatID, messageID string) (Result, error) + func (w *WhatsAppService) ForwardMessage(ctx context.Context, chatID, messageID string) (Result, error) + func (w *WhatsAppService) GetQueuedRequest(ctx context.Context, uuid string) (Result, error) + func (w *WhatsAppService) ReactToMessage(ctx context.Context, chatID, messageID, reaction string) (Result, error) + func (w *WhatsAppService) ReadChat(ctx context.Context, chatID string, opts *ReadChatOptions) (Result, error) + func (w *WhatsAppService) SendContactCard(ctx context.Context, chatID string, contacts []ContactCard) (Result, error) + func (w *WhatsAppService) SendFile(ctx context.Context, chatID string, file Media, opts *MediaOptions) (Result, error) + func (w *WhatsAppService) SendImage(ctx context.Context, chatID string, image Media, opts *MediaOptions) (Result, error) + func (w *WhatsAppService) SendLinkCustomPreview(ctx context.Context, chatID, text string, preview LinkPreview, ...) (Result, error) + func (w *WhatsAppService) SendLocation(ctx context.Context, chatID string, latitude, longitude float64, ...) (Result, error) + func (w *WhatsAppService) SendPoll(ctx context.Context, chatID, name string, options []string, ...) (Result, error) + func (w *WhatsAppService) SendSeen(ctx context.Context, chatID, messageID string, opts *SendSeenOptions) (Result, error) + func (w *WhatsAppService) SendText(ctx context.Context, chatID, text string, opts *SendTextOptions) (Result, error) + func (w *WhatsAppService) SendTextSafe(ctx context.Context, chatID, text string, opts *SendTextOptions) (Result, error) + func (w *WhatsAppService) SendVideo(ctx context.Context, chatID string, video Media, opts *MediaOptions) (Result, error) + func (w *WhatsAppService) SendVoice(ctx context.Context, chatID string, voice Media, opts *VoiceOptions) (Result, error) + func (w *WhatsAppService) StarMessage(ctx context.Context, chatID, messageID string, star bool) (Result, error) + func (w *WhatsAppService) StartTyping(ctx context.Context, chatID string) (Result, error) + func (w *WhatsAppService) StopTyping(ctx context.Context, chatID string) (Result, error)