Send Voice
Voice messages accept OGG/Opus. Required params: instance_id, access_token, chatId, file[url], file[filename], file[mimetype], convert.
Authentication Required
Login to swap the placeholders with your real Instance ID and Access Token.
Log InNo query parameters required
This endpoint doesn't expect data in the URL.
Best practices
Convert audio to the correct format using ffmpeg before sending.
Keep voice notes short (under 2 minutes) for better engagement.
Request Parameters
Configure the parameters required to interact with this endpoint. All query and body arguments are listed below with their details.
Request Body
Sent as a JSON objectstring | Unique ID of the WhatsApp session Example: | ||
string | API access token Example: | ||
string | Recipient's WhatsApp ID (JID). Supports Individuals (@c.us), Groups (@g.us), and Newsletters (@newsletter). Example: | ||
string | Publicly accessible HTTPS URL of the audio file Example: | ||
string | Filename for the audio note Example: | ||
string | MIME type (audio/ogg; codecs=opus recommended) Example: | ||
boolean | Automatically transcode to WhatsApp compatible OGG/Opus Example: | ||
string | — | The ID of the message you are replying to Example: |
Request Samples
Use these ready-to-go code snippets to integrate our API into your project quickly and efficiently. Choose your preferred language and library.
Expected Responses
Explore all possible responses and outcomes from the server. We have documented each status code with data examples to make success and error handling easier.
Example
{
"_data": {
"id": {
"fromMe": true,
"remote": "000000000000@c.us",
"id": "MSG_ID_123456",
"_serialized": "true_000000000000@c.us_MSG_ID_123456"
},
"viewed": false,
"body": "BASE64_IMAGE_DATA",
"type": "image",
"t": 1759108866,
"from": {
"server": "c.us",
"user": "111111111111",
"_serialized": "111111111111@c.us"
},
"to": {
"server": "c.us",
"user": "000000000000",
"_serialized": "000000000000@c.us"
},
"ack": 0,
"isNewMsg": true,
"star": false,
"kicNotified": false,
"caption": "Here's your requested image.",
"deprecatedMms3Url": "https://example.com/media-url",
"directPath": "/media/direct/path/example",
"mimetype": "image/jpeg",
"filehash": "FILE_HASH_PLACEHOLDER",
"encFilehash": "ENC_FILE_HASH_PLACEHOLDER",
"size": 192487,
"mediaKey": "MEDIA_KEY_PLACEHOLDER",
"mediaKeyTimestamp": 1759108865,
"streamable": false,
"mediaHandle": null,
"isFromTemplate": false,
"pollInvalidated": false,
"isSentCagPollCreation": false,
"latestEditMsgKey": null,
"latestEditSenderTimestampMs": null,
"mentionedJidList": {
},
"groupMentions": {
},
"isEventCanceled": false,
"eventInvalidated": false,
"isVcardOverMmsDocument": false,
"isForwarded": false,
"isQuestion": false,
"questionReplyQuotedMessage": null,
"questionResponsesCount": 0,
"readQuestionResponsesCount": 0,
"labels": {
},
"hasReaction": false,
"disappearingModeInitiator": "chat",
"disappearingModeTrigger": "chat_settings",
"productHeaderImageRejected": false,
"lastPlaybackProgress": 0,
"isDynamicReplyButtonsMsg": false,
"isCarouselCard": false,
"parentMsgId": null,
"callSilenceReason": null,
"isVideoCall": false,
"callDuration": null,
"callCreator": null,
"callParticipants": null,
"isCallLink": null,
"callLinkToken": null,
"isMdHistoryMsg": false,
"stickerSentTs": 0,
"lastUpdateFromServerTs": 0,
"invokedBotWid": null,
"bizBotType": null,
"botResponseTargetId": null,
"botPluginType": null,
"botPluginReferenceIndex": null,
"botPluginSearchProvider": null,
"botPluginSearchUrl": null,
"botPluginSearchQuery": null,
"botPluginMaybeParent": false,
"botReelPluginThumbnailCdnUrl": null,
"botMessageDisclaimerText": null,
"botMsgBodyType": null,
"requiresDirectConnection": false,
"bizContentPlaceholderType": null,
"hostedBizEncStateMismatch": false,
"senderOrRecipientAccountTypeHosted": false,
"placeholderCreatedWhenAccountIsHosted": false,
"galaxyFlowDisabled": false,
"links": {
}
},
"mediaKey": "MEDIA_KEY_PLACEHOLDER",
"id": {
"fromMe": true,
"remote": "000000000000@c.us",
"id": "MSG_ID_123456",
"_serialized": "true_000000000000@c.us_MSG_ID_123456"
},
"ack": 0,
"hasMedia": true,
"body": "Here's your requested image.",
"type": "image",
"timestamp": 1759108866,
"from": "111111111111@c.us",
"to": "000000000000@c.us",
"deviceType": "android",
"isForwarded": false,
"forwardingScore": 0,
"isStatus": false,
"isStarred": false,
"fromMe": true,
"hasQuotedMsg": false,
"hasReaction": false,
"vCards": {
},
"mentionedIds": {
},
"groupMentions": {
},
"isGif": false,
"links": {
}
}Command Palette
Search for a command to run...