curl --request POST \
--url https://api.zapkey.io/message/sendWhatsAppAudio/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"number": "<string>",
"audioMessage": {
"audio": "<string>"
},
"options": {
"delay": 123,
"presence": "recording",
"encoding": true
}
}
'{
"key": {
"remoteJid": "[email protected]",
"fromMe": true,
"id": "BAE5EFED2AB0BB9F"
},
"message": {
"audioMessage": {
"url": "https://mmg.whatsapp.net/v/t62.7114-24/21428511_985284763127087_5662928...",
"mimetype": "audio/mp4",
"fileSha256": "DJPBnRns6QADzZNH2j0R88mUtFQ4aiOm9aZf6dio2G0=",
"fileLength": "670662",
"seconds": 42,
"ptt": true,
"mediaKey": "+A3X1Tuyzeh87cCVZpfuKpL3Y4RYdYr3sCDurjSlBTY=",
"fileEncSha256": "s4tKvHOXIZAw5668/Xcy4zoFba4vW8klmNYC78yOPZs=",
"directPath": "/v/t62.7114-24/21428511_985284763127087_5662928477636351284_n.enc...",
"mediaKeyTimestamp": "1717776942"
}
},
"messageTimestamp": "1717776942",
"status": "PENDING"
}Send WhatsApp Audio
curl --request POST \
--url https://api.zapkey.io/message/sendWhatsAppAudio/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"number": "<string>",
"audioMessage": {
"audio": "<string>"
},
"options": {
"delay": 123,
"presence": "recording",
"encoding": true
}
}
'{
"key": {
"remoteJid": "[email protected]",
"fromMe": true,
"id": "BAE5EFED2AB0BB9F"
},
"message": {
"audioMessage": {
"url": "https://mmg.whatsapp.net/v/t62.7114-24/21428511_985284763127087_5662928...",
"mimetype": "audio/mp4",
"fileSha256": "DJPBnRns6QADzZNH2j0R88mUtFQ4aiOm9aZf6dio2G0=",
"fileLength": "670662",
"seconds": 42,
"ptt": true,
"mediaKey": "+A3X1Tuyzeh87cCVZpfuKpL3Y4RYdYr3sCDurjSlBTY=",
"fileEncSha256": "s4tKvHOXIZAw5668/Xcy4zoFba4vW8klmNYC78yOPZs=",
"directPath": "/v/t62.7114-24/21428511_985284763127087_5662928477636351284_n.enc...",
"mediaKeyTimestamp": "1717776942"
}
},
"messageTimestamp": "1717776942",
"status": "PENDING"
}Your authorization key header
ID of the instance to connect
Number to receive the message (with country code)
Ok
The message content, which may include various types of messages like text, images, audio, etc.
Show child attributes
Details of the audio message.
Show child attributes
The URL of the audio message.
The MIME type of the audio message.
The SHA-256 hash of the audio file.
The length of the audio file.
The duration of the audio message in seconds.
Indicates whether the audio message is a push-to-talk (PTT) message.
The media key of the audio message.
The SHA-256 hash of the encrypted audio file.
The direct path to the audio file.
The timestamp of the media key.
The timestamp of the message, represented as a string.
The status of the message, such as sent, received, or pending.