The WhatsApp API supports the following audio types:
- audio/aac(.aac)
- audio/mp3 (.mp3)
- audio/mp4 (.m4a)
- audio/amr (.amr)
- audio/ogg (.ogg)
The maximum file size allowed for audios is 15 MB.
PARAMETER | FORMAT | REQUIRED | DESCRIPTION | DEFAULT |
url | string | Yes | The URL that your audio file is uploaded to should be publicly accessible |
Sample request using CURL:
$ curl -X POST https://api.geniq.io/rest/v1/whatsapp/messages \
-H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-d '{
"recipient":"6591234567",
"type":"audio",
"url":"https://download.samplelib.com/mp3/sample-3s.mp3",
"reference": "12345"
}' \