> ## Documentation Index
> Fetch the complete documentation index at: https://meta-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Audio Messages

> Audio messages display an audio icon and a link to an audio file. When the WhatsApp user taps the icon, the WhatsApp client loads and plays the audio file.

<Frame>
  <img src="https://mintcdn.com/meta-preview/xMiwyYRUQd9GqgJ7/images/audio-message.png?fit=max&auto=format&n=xMiwyYRUQd9GqgJ7&q=85&s=322557d3bca2b2d629f4e54d9a7923fd" width="1331" height="233" data-path="images/audio-message.png" />
</Frame>

## Sending Audio Messages

Use the **[POST /\<WHATSAPP\_BUSINESS\_PHONE\_NUMBER\_ID>/messages](https://developers.facebook.com/docs/whatsapp/cloud-api/reference/messages)** endpoint to send an audio message to a WhatsApp user.

### Request Syntax

```bash theme={null}
POST /<WHATSAPP_BUSINESS_PHONE_NUMBER_ID>/messages
```

### Post Body

```json theme={null}
{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "<WHATSAPP_USER_PHONE_NUMBER>",
  "type": "audio",
  "audio": {
    "id" : "<MEDIA_ID>"
  }
}
```

### Post Body Parameters

<ParamField body="<MEDIA_ID>" type="string" required>
  **Required if using an uploaded media asset (recommended)**.

  [Uploaded media](https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media#upload-media) asset ID.

  Example: 3674626312780147
</ParamField>

<ParamField body="<MEDIA_URL>" type="string" required>
  **Required if linking to your media asset (not recommended)**

  URL of audio asset on your public server. For better performance, we recommend that you [upload your media asset](https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media#upload-media) instead.

  Example: [https://www.luckyshrub.com/assets/lucky-track.aac](https://www.luckyshrub.com/assets/lucky-track.aac)
</ParamField>

<ParamField body="<WHATSAPP_USER_PHONE_NUMBER>" type="string" required>
  **Required.** WhatsApp user phone number.

  Example: +16505551234
</ParamField>

## Supported Audio Formats

| Audio Type | Extension | MIME Type                                                   | Max Size |
| ---------- | --------- | ----------------------------------------------------------- | -------- |
| AAC        | .aac      | audio/aac                                                   | 16 MB    |
| AMR        | .amr      | audio/amr                                                   | 16 MB    |
| MP3        | .mp3      | audio/mpeg                                                  | 16 MB    |
| MP4 Audio  | .m4a      | audio/mp4                                                   | 16 MB    |
| OGG Audio  | .ogg      | audio/ogg (OPUS codecs only; base audio/ogg not supported.) | 16 MB    |

## Example Request

Example request to send an image message using an uploaded media ID and a caption.

<RequestExample>
  ```bash Example Request theme={null}
  curl 'https://graph.facebook.com/v22.0
  /106540352242922/messages' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer EAAJB...' \
  -d '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "+16505551234",
    "type": "audio",
    "audio": {
      "id" : "3674626312780147"
    }
  }'
  ```
</RequestExample>

## Example Response

<ResponseExample>
  ```json Example Response theme={null}
  {
    "messaging_product": "whatsapp",
    "contacts": [
      {
        "input": "+16505551234",
        "wa_id": "16505551234"
      }
    ],
    "messages": [
      {
        "id": "wamid.HBgLMTY0NjcwNDM1OTUVAgARGBI1RjQyNUE3NEYxMzAzMzQ5MkEA"
      }
    ]
  }
  ```
</ResponseExample>
