---
title: "Go SDK"
description: "The Goomzo API for Go."
url: "https://docs.goomzo.africa/docs/developers/go-sdk"
docs_index: /llms.txt
lastUpdated: 2026-11-12
section: "Get started"
related:
  - /docs/developers/get-started
  - /docs/developers/ts-sdk
  - /docs/developers/python-sdk
  - /docs/developers/php-sdk
---

> For an index of all documentation, see [/llms.txt](https://docs.goomzo.africa/llms.txt). Any page is also available as Markdown by adding .md to its URL.

# Go SDK

> The Goomzo API for Go.

`github.com/goomzo/goomzo-go` is the Goomzo API for Go. It types every request and answer, retries safely within
your context's deadline, and pages through lists for you. It needs nothing beyond the standard library.

## Requirements

- Go 1.24 or later.
- An API key. See [Authentication](https://docs.goomzo.africa/docs/developers/authentication?utm_source=llms&utm_medium=ai).

## Install

```bash
go get github.com/goomzo/goomzo-go
```

## Make your first request

Set your API key's secret as `GOOMZO_API_KEY`, then send a message:

```go
package main

import (
	"context"
	"fmt"
	"log"

	"github.com/goomzo/goomzo-go"
)

func main() {
	client, err := goomzo.NewClient()
	if err != nil {
		log.Fatal(err)
	}
	msg, err := client.Messages.SendOne(context.Background(), goomzo.MessageInput{
		To:      "+255712345678",
		Channel: goomzo.SMS,
		Content: &goomzo.Content{Text: "Amina, order #1042 is ready."},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(msg.ID, msg.Status)
}
```

## How it reads

- **Every call takes a context.** Cancel it, or give it a deadline, to stop a call and its retries.
- **Requests and answers are structs,** with the API's fields. A field that can be empty in an answer is a pointer,
  such as `Message.Error`.
- **Lists are iterators.** Range over one for every item, or ask for one [page](https://docs.goomzo.africa/docs/developers/go-sdk/lists?utm_source=llms&utm_medium=ai).

## What it does for you

- **A fixed version:** it pins the API version it was written for, so a new version never changes what your code
  gets.
- **Safe retries:** network errors, `429` and `5xx` are tried again, twice by default. Every `POST` carries an
  `Idempotency-Key`, the same on each try, so nothing is done twice.
- **Errors you can act on:** an `*APIError` has the `Status`, the `Code`, the `Fields` that were wrong and the
  `RequestID`.

## Next steps

<Cards>
  <Card
    title="Configuration"
    href="/docs/developers/go-sdk/configuration"
    description="API key, retries, timeouts and your own HTTP client."
  />
  <Card title="Send messages" href="/docs/developers/go-sdk/messages" description="SMS and WhatsApp, one or up to 100 at once." />
  <Card title="Webhooks" href="/docs/developers/go-sdk/webhooks" description="Check that an event is from Goomzo." />
</Cards>

---

For an index of all available documentation, see [/llms.txt](https://docs.goomzo.africa/llms.txt)
