> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zavu.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Text Messages

> Send simple text messages via WhatsApp

Text messages are the simplest WhatsApp message type. They support basic formatting and links.

## Send a Text Message

<CodeGroup>
  ```typescript TypeScript theme={null}
  const result = await zavu.messages.send({
    to: "+14155551234",
    text: "Hello from Zavu!",
    channel: "whatsapp",
  });
  ```

  ```python Python theme={null}
  result = zavu.messages.send(
      to="+14155551234",
      text="Hello from Zavu!",
      channel="whatsapp"
  )
  ```

  ```ruby Ruby theme={null}
  result = client.messages.send(
    to: "+14155551234",
    text: "Hello from Zavu!",
    channel: "whatsapp"
  )
  ```

  ```go Go theme={null}
  result, err := client.Messages.Send(context.TODO(), zavudev.MessageSendParams{
      To:      zavudev.String("+14155551234"),
      Text:    zavudev.String("Hello from Zavu!"),
      Channel: zavudev.String("whatsapp"),
  })
  ```

  ```php PHP theme={null}
  $result = $client->messages->send([
      'to' => '+14155551234',
      'text' => 'Hello from Zavu!',
      'channel' => 'whatsapp',
  ]);
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.zavu.dev/v1/messages \
    -H "Authorization: Bearer $ZAVU_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "to": "+14155551234",
      "text": "Hello from Zavu!",
      "channel": "whatsapp"
    }'
  ```
</CodeGroup>

## Text Formatting

WhatsApp supports basic formatting in text messages:

| Format        | Syntax       | Example   |
| ------------- | ------------ | --------- |
| Bold          | `*text*`     | *Hello*   |
| Italic        | `_text_`     | *Hello*   |
| Strikethrough | `~text~`     | ~~Hello~~ |
| Monospace     | `` `text` `` | `Hello`   |

### Example with Formatting

```json theme={null}
{
  "to": "+14155551234",
  "text": "Your order *#12345* is _confirmed_.\n\nTotal: `$99.99`",
  "channel": "whatsapp"
}
```

## Specifications

| Property    | Requirement                 |
| ----------- | --------------------------- |
| Max length  | 4096 characters             |
| Links       | Auto-detected and clickable |
| Emoji       | Fully supported             |
| Line breaks | Use `\n`                    |

## Use Cases

* Order confirmations
* Appointment reminders
* Account notifications
* Two-factor authentication codes
* General customer communication
