- Go module: github.com/Mailrify/mailrify-go
- GitHub repository: Mailrify Go SDK
Prerequisites
Before you start, make sure you have:- A Mailrify secret API key (
sk_...) for server-side API requests - A Mailrify public API key (
pk_...) for event tracking (/v1/track) - At least one verified sending domain for email sending
Install
Initialize clients (mailrify.New)
Create one SDK client for your secret key and one for your public key:
Initialize with alias (mailrify.NewClient)
NewClient is an alias for New.
Configure base URL and timeout (mailrify.WithBaseURL, mailrify.WithTimeout)
Use this when testing against staging or local environments:
Use a custom HTTP client (mailrify.WithHTTPClient)
Key usage rules
The Go SDK enforces key restrictions automatically:pk_*keys can only callEvents.Tracksk_*keys can call non-track endpoints, includingEvents.GetNamesandEvents.ListNames
keyType property on the client.

