---
title: "Send messages"
description: "Send SMS and WhatsApp messages, follow them, and cancel ones that haven't gone."
url: "https://docs.goomzo.africa/docs/developers/ts-sdk/messages"
docs_index: /llms.txt
lastUpdated: 2026-11-12
section: "Guides"
related:
  - /docs/developers/ts-sdk/templates
  - /docs/developers/ts-sdk/customers
  - /docs/developers/ts-sdk/webhooks
---

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

# Send messages

> Send SMS and WhatsApp messages, follow them, and cancel ones that haven't gone.

`goomzo.messages` sends messages, each to its own person, and reads them back. For the fields of a message, see
[Send messages](https://docs.goomzo.africa/docs/developers/messages/send?utm_source=llms&utm_medium=ai).

## Send one message

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

`sendOne` answers with the message, its `status` `sending`, or `scheduled` with a `sendAt`.

## Send up to 100

```ts
const { items } = await goomzo.messages.send({
  messages: [
    { to: '+255712345678', channel: 'sms', content: { text: 'Amina, order #1042 is ready.' } },
    { customerId: 'cus_4hq2v9n1c8x0t6pk', channel: 'whatsapp', content: { text: 'Juma, order #1043 is ready.' } },
  ],
})
```

They're queued all or none. If one isn't valid, none is sent, and the error names it, such as `messages[1].to`.

## Send to many people

A broadcast sends one message to segments, numbers or every customer:

```ts
await goomzo.broadcasts.create({
  name: 'Black Friday',
  channel: 'sms',
  content: { text: 'Hi {{name|there}}, 20% off everything today.' },
  audience: { segments: [{ name: 'VIP' }] },
})
```

See [Broadcasts](https://docs.goomzo.africa/docs/developers/messages/broadcasts?utm_source=llms&utm_medium=ai).

## Read messages

```ts
const message = await goomzo.messages.get('msg_7c1x9v2b4n6m8q0w')

for await (const message of goomzo.messages.list()) {
  console.log(message.to.phone, message.status)
}
```

## Other methods

| Method                       | Does                                        |
| ---------------------------- | ------------------------------------------- |
| `messages.cancel(id)`        | Cancels a message that hasn't gone.         |
| `messages.senders()`         | Lists the SMS sender IDs you can send from. |
| `messages.media(receivedId)` | Gets a file a customer sent on WhatsApp.    |

**Note:** Follow a message's status with [webhooks](https://docs.goomzo.africa/docs/developers/ts-sdk/webhooks?utm_source=llms&utm_medium=ai), not by asking again and again.

## Next steps

- [Send templates](https://docs.goomzo.africa/docs/developers/ts-sdk/templates?utm_source=llms&utm_medium=ai)
- [Webhooks](https://docs.goomzo.africa/docs/developers/ts-sdk/webhooks?utm_source=llms&utm_medium=ai)

---

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