Send Audio Message
Send audio messages that appear as voice notes in WhatsApp. These are different from regular audio files and display as playable voice messages (PTT - Push-to-Talk) in the chat.Endpoint
Path Parameters
The name of your WhatsApp instance that you created
Request Body
This endpoint supports three methods for sending audio:
- URL: Provide a direct link to the audio file
- Base64: Provide the base64-encoded audio content
- File Upload: Use
multipart/form-datato upload an audio file
The recipient’s WhatsApp number in international format (without + symbol)Example:
5511999999999 for a Brazilian numberThe audio content as a URL or base64 string (not required when using file upload)Examples:
- URL:
https://example.com/audio.mp3 - Base64:
data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAA...
Delay before sending the message in millisecondsExample:
1000 for 1 second delayQuote a previous message by providing its key and message object
Enable audio encoding for better compatibilityDefault:
falseResponse
Message key information
The sent message object containing the audio message data
Unix timestamp when the message was sent
Message status (e.g., “PENDING”, “SENT”)
Code Examples
Advanced Examples
Send audio from URL
Send audio from URL
Send audio with base64 encoding
Send audio with base64 encoding
Send audio as reply to message
Send audio as reply to message
Audio Format Guidelines
For best compatibility with WhatsApp voice messages, use the following formats:
Recommended Formats
- Format: MP3, OGG (Opus codec), AAC
- Sample rate: 16kHz or 48kHz
- Bitrate: 64kbps - 128kbps
- Channels: Mono (1 channel)
- Maximum duration: No hard limit, but shorter is better for voice notes
- Maximum size: 16MB
Supported Audio Formats
- MP3 (audio/mpeg)
- OGG with Opus codec (audio/ogg)
- M4A/AAC (audio/mp4, audio/aac)
- WAV (audio/wav) - will be converted
PTT vs Regular Audio
Voice Message (PTT) - This Endpoint
- Appears as a voice message with waveform
- Plays automatically in sequence
- Designed for quick voice communication
- Maximum 16MB file size
Regular Audio File - Send Media Endpoint
- Appears as an audio file attachment
- Requires manual play
- Suitable for music, podcasts, etc.
- Can be larger files
Error Responses
HTTP status code
Error description
Common Errors
| Status Code | Error Message | Solution |
|---|---|---|
| 400 | ”Owned media must be a url, base64, or valid file with buffer” | Ensure audio is provided as URL, base64, or file upload |
| 401 | Unauthorized | Check your API key |
| 404 | Not Found | Verify instance exists and is connected |
| 500 | Internal Server Error | Check audio file format and size |
The audio URL must be publicly accessible. If you’re getting errors, verify that the URL can be accessed without authentication.