Go client for the current Yournotify API.
go get github.com/yournotify/yournotify-gopackage main
import (
"fmt"
yournotify "github.com/yournotify/yournotify-go"
)
func main() {
client := yournotify.NewClient("YOURNOTIFY_API_KEY")
if _, err := client.ValidateAuth(); err != nil {
panic(err)
}
res, err := client.SendEmail("Welcome", "Welcome", "<p>Hello</p>", "Hello", "draft", "noreply@smtp.yournotify.net", []map[string]any{
{"email": "person@example.com", "name": "Person"},
})
if err != nil {
panic(err)
}
fmt.Println(res)
}- Auth:
ValidateAuth,GetProfile - Campaigns:
CreateCampaign,SendEmail,SendSMS,SendWhatsApp,SendPush,SendInApp,TestCampaign, analytics helpers - Contacts and lists: create, read, update, delete helpers
- Rewards: rewards, products, analytics, submissions, send helpers
- Automation:
Identify,Track
The client returns structured API errors for non-2xx responses.