---
title: "Configuration"
description: "Set up the client with your API key, retries and timeouts."
url: "https://docs.goomzo.africa/docs/developers/ts-sdk/configuration"
docs_index: /llms.txt
lastUpdated: 2026-11-12
section: "Get started"
---

> 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.

# Configuration

> Set up the client with your API key, retries and timeouts.

The client reads its settings once, when you make it. Make one and share it across your app.

## Options

```ts
import { Goomzo } from '@goomzo/sdk'

const goomzo = new Goomzo({
  apiKey: process.env.GOOMZO_API_KEY,
  maxRetries: 2,
  timeout: 60_000,
})
```

| Option       | Description                                                                           | Default                     |
| ------------ | ------------------------------------------------------------------------------------- | --------------------------- |
| `apiKey`     | _String._ Your API key's secret.                                                      | `GOOMZO_API_KEY`            |
| `maxRetries` | _Number._ How many times a failed request is tried again.                             | `2`                         |
| `timeout`    | _Number._ Milliseconds to wait for each try.                                          | `60000`                     |
| `baseUrl`    | _String._ Where the API is.                                                           | `https://api.goomzo.africa` |
| `fetch`      | _Function._ A `fetch` to use instead of the global one, such as for tests or a proxy. | The global `fetch`          |

**Important:** Keep the API key on your server. Never put it in code that runs in a browser or an app.

## Request options

Every method takes the options for one request as its last argument:

```ts
const controller = new AbortController()

await goomzo.messages.send(
  { messages: [{ to: '+255712345678', channel: 'sms', content: { text: 'Your order is ready.' } }] },
  { idempotencyKey: 'order-1042-ready', signal: controller.signal },
)
```

| Option           | Description                                                                                |
| ---------------- | ------------------------------------------------------------------------------------------ |
| `idempotencyKey` | _String._ Your own key, so a retry from your side isn't done twice. One is made otherwise. |
| `signal`         | _AbortSignal._ Cancels the request.                                                        |

## API version

The SDK sends the `Goomzo-Version` it was written for, as `API_VERSION`:

```ts
import { API_VERSION } from '@goomzo/sdk'
```

## Next steps

- [Send messages](https://docs.goomzo.africa/docs/developers/ts-sdk/messages?utm_source=llms&utm_medium=ai)
- [Errors](https://docs.goomzo.africa/docs/developers/ts-sdk/errors?utm_source=llms&utm_medium=ai)

---

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