Prerequisites
Installation
Install the useSend Go SDK:Initialize
Create a new client using your API key.USESEND_API_KEY environment variable.
Self-Hosted Setup
If you are running a self-hosted version of useSend, provide the base URL usingWithBaseURL.
The base URL should be the root domain only. Do not include
/api/v1, as the SDK manages API paths internally.Options
WithBaseURL(url string): Override the base API URL (e.g. for self-hosting)WithHTTPClient(*http.Client): Provide a custom HTTP client
The default HTTP client uses a 30s timeout. Requests include a
User-Agent: usesend-go header.Sending Emails
Custom headers are forwarded as-is. useSend only manages the
X-Usesend-Email-ID and References headers.