You can use Cloud API to send voice messages and basic audio messages.
A voice message (sometimes referred to as a voice note, voice memo, or audio) is a recording of one or more persons speaking, and can include background sounds like music. Voice messages include features like automatic download, profile picture, and voice icon, not available with a basic audio message. If the user has set voice message transcripts to Automatic, a text transcription of the message will also be included.

Basic audio messages display a download icon and a music icon. When the WhatsApp user taps the play icon, the user must manually download the audio message for the WhatsApp client to load and then play the audio file.

Use the POST /<WHATSAPP_BUSINESS_PHONE_NUMBER_ID>/messages endpoint to send an audio message to a WhatsApp user.
curl 'https://graph.facebook.com/<API_VERSION>/<WHATSAPP_BUSINESS_PHONE_NUMBER_ID>/messages' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-d '
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "<WHATSAPP_USER_PHONE_NUMBER>",
"type": "audio",
"audio": {
"id": "<MEDIA_ID>", <!-- Only if using uploaded media -->
"link": "<MEDIA_URL>", <!-- Only if using hosted media (not recommended) -->
"voice": <IS_VOICE?> <!-- Only include if sending voice message -->
}
}'| Placeholder | Description | Example Value |
|---|---|---|
String | Required. |
|
String | Optional. Graph API version. | v24.0 |
Boolean | Optional. Set to To send a basic audio message, set to |
|
String | Required if using uploaded media, otherwise omit. ID of the uploaded media asset. |
|
String | Required if using hosted media, otherwise omit. URL of the media asset hosted on your public server. For better performance, we recommend using |
|
String | Required. WhatsApp business phone number ID. |
|
String | Required. WhatsApp user phone number. |
|
| 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; mono input only) | 16 MB |
The most common errors associated with audio files are mismatched MIME types (MIME type doesn't match the file type indicated by the file name) and invalid encoding for Ogg files (OPUS codec only). If you encounter an error when sending a message with a media file, ensure your audio file's actual MIME type matches its type, and is of a type listed above. For Ogg files, ensure you are encoding with the OPUS codec.
Example request to send an image message using an uploaded media ID and a caption.
curl 'https://graph.facebook.com/v24.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" : "1013859600285441",
"voice": true
}
}'
{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "+16505551234",
"wa_id": "16505551234"
}
],
"messages": [
{
"id": "wamid.HBgLMTY0NjcwNDM1OTUVAgARGBI1RjQyNUE3NEYxMzAzMzQ5MkEA"
}
]
}