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

# Audio Messages

> Send audio files via WhatsApp

Send audio files for voice announcements, podcasts, or audio instructions.

## Send an Audio Message

<CodeGroup>
  ```typescript TypeScript theme={null}
  const message = await zavu.messages.send({
    to: "+14155551234",
    channel: "whatsapp",
    messageType: "audio",
    content: {
      mediaUrl: "https://example.com/announcement.mp3"
    }
  });
  ```

  ```python Python theme={null}
  message = zavu.messages.send(
      to="+14155551234",
      channel="whatsapp",
      message_type="audio",
      content={
          "media_url": "https://example.com/announcement.mp3"
      }
  )
  ```

  ```ruby Ruby theme={null}
  message = client.messages.send(
    to: "+14155551234",
    channel: "whatsapp",
    message_type: "audio",
    content: {
      media_url: "https://example.com/announcement.mp3"
    }
  )
  ```

  ```go Go theme={null}
  message, err := client.Messages.Send(context.TODO(), zavudev.MessageSendParams{
      To:          zavudev.String("+14155551234"),
      Channel:     zavudev.String("whatsapp"),
      MessageType: zavudev.String("audio"),
      Content: &zavudev.MessageContentParams{
          MediaURL: zavudev.String("https://example.com/announcement.mp3"),
      },
  })
  ```

  ```php PHP theme={null}
  $message = $client->messages->send([
      'to' => '+14155551234',
      'channel' => 'whatsapp',
      'messageType' => 'audio',
      'content' => [
          'mediaUrl' => 'https://example.com/announcement.mp3',
      ],
  ]);
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.zavu.dev/v1/messages \
    -H "Authorization: Bearer zv_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{
      "to": "+14155551234",
      "channel": "whatsapp",
      "messageType": "audio",
      "content": {
        "mediaUrl": "https://example.com/announcement.mp3"
      }
    }'
  ```
</CodeGroup>

## Specifications

| Property | Requirement             |
| -------- | ----------------------- |
| Formats  | AAC, MP3, MP4, AMR, OGG |
| Max size | 16 MB                   |
| Caption  | Not supported           |

<Note>
  Audio messages do not support captions. If you need to add context, send a text message before or after the audio.
</Note>

## URL Requirements

Your audio URL must:

* Be publicly accessible (no authentication)
* Use HTTPS
* Return the correct `Content-Type` header
* Be available for at least 24 hours

## Use Cases

* Voice announcements
* Audio instructions
* Podcast episodes
* Voice notes
* Music samples
