https://github.com/resendlabs/resend-go
Resend's Official Go SDK
https://github.com/resendlabs/resend-go
Last synced: 20 days ago
JSON representation
Resend's Official Go SDK
- Host: GitHub
- URL: https://github.com/resendlabs/resend-go
- Owner: resend
- License: mit
- Created: 2023-05-19T00:44:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-25T03:28:44.000Z (about 1 month ago)
- Last Synced: 2025-03-28T12:54:36.802Z (27 days ago)
- Language: Go
- Homepage: https://resend.com
- Size: 97.7 KB
- Stars: 121
- Watchers: 3
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-golang-repositories - resend-go
README
# Resend Go SDK
[](https://opensource.org/licenses/MIT)


---## Installation
To install the Go SDK, simply execute the following command on a terminal:
```
go get github.com/resend/resend-go/v2
```## Setup
First, you need to get an API key, which is available in the [Resend Dashboard](https://resend.com).
## Example
```go
import (
"fmt"
"github.com/resend/resend-go/v2"
)func main() {
apiKey := "re_123"client := resend.NewClient(apiKey)
params := &resend.SendEmailRequest{
To: []string{"to@example", "[email protected]"},
From: "[email protected]",
Text: "hello world",
Subject: "Hello from Golang",
Cc: []string{"[email protected]"},
Bcc: []string{"[email protected]"},
ReplyTo: "[email protected]",
}sent, err := client.Emails.Send(params)
if err != nil {
panic(err)
}
fmt.Println(sent.Id)
}```
You can view all the examples in the [examples folder](https://github.com/resend/resend-go/tree/main/examples)