---
title: "TypeScript SDK"
description: "The Goomzo API for TypeScript and JavaScript."
url: "https://docs.goomzo.africa/docs/developers/ts-sdk"
docs_index: /llms.txt
lastUpdated: 2026-11-12
section: "Get started"
related:
  - /docs/developers/get-started
  - /docs/developers/python-sdk
  - /docs/developers/php-sdk
  - /docs/developers/go-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.

# TypeScript SDK

> The Goomzo API for TypeScript and JavaScript.

`@goomzo/sdk` is the Goomzo API for TypeScript and JavaScript. It types every request and answer, retries safely,
and pages through lists for you. It has no dependencies, and runs anywhere with `fetch`.

## Requirements

- Node 20 or later, Bun, Deno, Cloudflare Workers or Vercel Edge.
- An API key. See [Authentication](https://docs.goomzo.africa/docs/developers/authentication?utm_source=llms&utm_medium=ai).

## Install

```bash
npm install @goomzo/sdk
```

## Make your first request

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

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

const goomzo = new Goomzo()

const message = await goomzo.messages.sendOne({
  to: '+255712345678',
  channel: 'sms',
  content: { text: 'Amina, order #1042 is ready.' },
})

console.log(message.id, message.status)
```

## What it does for you

- **Types:** every request and answer is typed, made from the API's own description.
- **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.
- **Lists:** await a list for one page, or loop over it with `for await` for every item.
- **Errors you can act on:** a `GoomzoError` has the `status`, the `code`, the `fields` that were wrong and the
  `requestId`.

## Next steps

<Cards>
  <Card title="Configuration" href="/docs/developers/ts-sdk/configuration" description="API key, retries, timeouts and your own fetch." />
  <Card title="Send messages" href="/docs/developers/ts-sdk/messages" description="SMS and WhatsApp, one or up to 100 at once." />
  <Card title="Webhooks" href="/docs/developers/ts-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)
