---
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/go-sdk/messages"
docs_index: /llms.txt
lastUpdated: 2026-11-12
section: "Guides"
related:
  - /docs/developers/go-sdk/templates
  - /docs/developers/go-sdk/customers
  - /docs/developers/go-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.

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

```go
msg, err := client.Messages.SendOne(ctx, goomzo.MessageInput{
	To:      "+255712345678",
	Channel: goomzo.SMS,
	Content: &goomzo.Content{Text: "Amina, order #1042 is ready."},
})
```

`SendOne` returns the message, its `Status` `sending`, or `scheduled` with a `SendAt`.

## Send up to 100

```go
msgs, err := client.Messages.Send(ctx, []goomzo.MessageInput{
	{To: "+255712345678", Channel: goomzo.SMS, Content: &goomzo.Content{Text: "Amina, order #1042 is ready."}},
	{CustomerID: "cus_4hq2v9n1c8x0t6pk", Channel: goomzo.WhatsApp, Content: &goomzo.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:

```go
_, err := client.Broadcasts.Create(ctx, goomzo.BroadcastInput{
	Name:     "Black Friday",
	Channel:  goomzo.SMS,
	Content:  &goomzo.Content{Text: "Hi {{name|there}}, 20% off everything today."},
	Audience: goomzo.AudienceInput{Segments: []goomzo.SegmentRef{{Name: "VIP"}}},
})
```

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

## Read messages

```go
msg, err := client.Messages.Get(ctx, "msg_7c1x9v2b4n6m8q0w")

for msg, err := range client.Messages.List(ctx, goomzo.MessageListParams{Status: goomzo.MessageFailed}) {
	if err != nil {
		return err
	}
	fmt.Println(msg.To.Phone, *msg.Error)
}
```

## Other methods

| Method                            | Does                                               |
| --------------------------------- | -------------------------------------------------- |
| `Messages.Cancel(ctx, id)`        | Cancels a message that hasn't gone.                |
| `Messages.Senders(ctx)`           | Lists the SMS sender IDs you can send from.        |
| `Messages.Media(ctx, receivedID)` | Gets a file a customer sent on WhatsApp.           |
| `Broadcasts.Get(ctx, id)`         | Gets a broadcast, with how its messages are doing. |
| `Broadcasts.List(ctx, params)`    | Lists broadcasts.                                  |
| `Broadcasts.Cancel(ctx, id)`      | Cancels a broadcast that hasn't gone.              |

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

## Next steps

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

---

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