Skip to main content
Get the Resend Go SDK installed and configured in your Go application.

Requirements

Before installing the SDK, ensure your environment meets these requirements:
  • Go 1.23 or later - The SDK requires Go 1.23+
  • Go modules - The SDK uses Go modules for dependency management

Install the SDK

1

Install via go get

Add the Resend Go SDK to your project using the go get command:
This downloads the SDK and adds it to your go.mod file.
2

Import the package

Import the Resend package in your Go files:
Make sure to use the /v3 suffix in the import path to get the latest version of the SDK.
3

Verify installation

Create a simple file to verify the installation:
Run the file to confirm everything is working:
You should see the success message printed to the console.

Package structure

The Resend Go SDK is organized into service-based modules:

Dependencies

The SDK has minimal dependencies. The only testing dependency is:
  • github.com/stretchr/testify - Used for testing (not required in production)
All other dependencies are part of the Go standard library.

Custom HTTP client

By default, the SDK uses a standard HTTP client with a 1-minute timeout. You can provide your own HTTP client for custom configurations:
This is useful when you need to:
  • Configure custom timeouts
  • Add retry logic
  • Use custom transport layers
  • Implement request/response logging

Environment configuration

The SDK reads the RESEND_BASE_URL environment variable if you need to use a custom API endpoint. This is typically only needed for testing or enterprise configurations.

Next steps

Now that you have the SDK installed, you’re ready to send your first email:

Quickstart

Learn how to send your first email with the Resend Go SDK