---
title: "Introducing: The AhaSend Go SDK"
description: "We have a confession to make: we absolutely love the Go Programming Language! And since Go has been so good to us, we couldn't resist building a Go SDK for AhaSend. So we did!"
url: https://ahasend.com/blog/introducing-ahasend-go-sdk
markdown_url: https://ahasend.com/blog/introducing-ahasend-go-sdk.md
lang: en
type: blog_post
published: 2025-10-21
updated: 2026-08-28
author: "Fred Moody"
category: "Product Update"
image: https://cms.ahasend.com/sites/default/files/2025-12/ahasend-go-sdk.png
---

# Introducing: The AhaSend Go SDK

_By Fred Moody, October 21, 2025, in Product Update_

![We Love Go!](https://cms.ahasend.com/sites/default/files/2025-12/ahasend-go-sdk.png)

We have a confession to make: we absolutely love the Go Programming Language! And since Go has been so good to us, we couldn't resist building a Go SDK for AhaSend. So we did!

![We love Go!](https://cms.ahasend.com/sites/default/files/styles/max_width_1000/public/2025-10/welovego_0.png?itok=j_laKX5I)

We are proud to announce that the official [Go SDK for AhaSend](https://github.com/AhaSend/ahasend-go/) has been released! 

Our Go SDK comes packed with features:

- **Complete** [**APIv2**](https://ahasend.com/docs/api-reference)** Coverage**: Send emails, manage domains, webhooks, routes, suppressions, and more
- **Type Safety**: Full Go type system with pointer utilities for optional fields
- **Built-in Rate Limiting**: Automatic protection against 429 errors with configurable limits
- **Intelligent Retries**: Exponential backoff with jitter for failed requests
- **Webhook Processing**: Standard Webhooks compliant verification and parsing
- **Comprehensive Tracking**: Opens, clicks, bounces, deliveries, and more
- **Automatic Idempotency**: Prevent duplicate API calls (including email sends) automatically

### **AhaSend Go SDK Example**

Our [Go SDK](https://github.com/AhaSend/ahasend-go/) contains [11+ production-ready examples](https://github.com/AhaSend/ahasend-go/tree/main/examples) covering all major use cases. In the below example I'll walk you true the proces to sent your first email.

#### **Prerequisites**

Before running these examples, you need:

1. An [AhaSend account](https://dash.ahasend.com/user/register) and API key
2. Go 1.18 or later installed
3. Set your API credentials as environment variables:

   ```bash
   export AHASEND_API_KEY="your-api-key-here"
   export AHASEND_ACCOUNT_ID="your-account-id-here"
   ```

#### Steps to send your first email

1. Create a new directory and initialize the go project.

   ```bash
   $ mkdir ahasend-example
   $ cd ahasend-example
   $ go mod init ahasend-example
   ```

2. Add the ahasend-go SDK to your project
3. Download [send\_email.go](https://github.com/AhaSend/ahasend-go/blob/main/examples/send_email.go)

   ```bash
   $ curl -o send_email.go https://raw.githubusercontent.com/AhaSend/ahasend-go/refs/heads/main/examples/send_email.go
   ```

4. Remove the first line ( `//go:build ignore`) from `send_email.go`.
5. Run the following command to download the dependencies

   ```bash
   $ go mod tidy
   ```

6. Change the message (lines [44-78](https://github.com/AhaSend/ahasend-go/blob/main/examples/send_email.go#L44C2-L79C1)), specifically the sender and recipient these lines to your liking (and make sure to have validated the domain!)

   ```go
   	message := requests.CreateMessageRequest{
   		From: common.SenderAddress{
   			Email: "sender@yourdomain.com",
   			Name:  ahasend.String("Your Name"),
   		},
   		Recipients: []common.Recipient{
   			{
   				Email: "recipient@example.com",
   				Name:  ahasend.String("Recipient Name"),
   			},
   		},
   ```

7. To send the email execute

   ```bash
   $ go run examples/send_email.go
   ```

For more production ready-examples head over to [the Examples directory](https://github.com/AhaSend/ahasend-go/tree/main/examples) within [ the AhaSend Go SDK Repository](https://github.com/AhaSend/ahasend-go/) on Github.
