Skip to main content
POST
/
v22.0
/
106540352242922
/
messages
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"
  }
}'
{
  "messaging_product": "whatsapp",
  "contacts": [
    {
      "input": "+16505551234",
      "wa_id": "16505551234"
    }
  ],
  "messages": [
    {
      "id": "wamid.HBgLMTY0NjcwNDM1OTUVAgARGBI1RjQyNUE3NEYxMzAzMzQ5MkEA"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://meta-preview.mintlify.io/llms.txt

Use this file to discover all available pages before exploring further.

Sending Audio Messages

Use the POST /<WHATSAPP_BUSINESS_PHONE_NUMBER_ID>/messages endpoint to send an audio message to a WhatsApp user.

Request Syntax

POST /<WHATSAPP_BUSINESS_PHONE_NUMBER_ID>/messages

Post Body

{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "<WHATSAPP_USER_PHONE_NUMBER>",
  "type": "audio",
  "audio": {
    "id" : "<MEDIA_ID>"
  }
}

Post Body Parameters

<MEDIA_ID>
string
required
Required if using an uploaded media asset (recommended).Uploaded media asset ID.Example: 3674626312780147
<MEDIA_URL>
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 instead.Example: https://www.luckyshrub.com/assets/lucky-track.aac
<WHATSAPP_USER_PHONE_NUMBER>
string
required
Required. WhatsApp user phone number.Example: +16505551234

Supported Audio Formats

Audio TypeExtensionMIME TypeMax Size
AAC.aacaudio/aac16 MB
AMR.amraudio/amr16 MB
MP3.mp3audio/mpeg16 MB
MP4 Audio.m4aaudio/mp416 MB
OGG Audio.oggaudio/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.
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"
  }
}'

Example Response

{
  "messaging_product": "whatsapp",
  "contacts": [
    {
      "input": "+16505551234",
      "wa_id": "16505551234"
    }
  ],
  "messages": [
    {
      "id": "wamid.HBgLMTY0NjcwNDM1OTUVAgARGBI1RjQyNUE3NEYxMzAzMzQ5MkEA"
    }
  ]
}