Convert audio into a WhatsApp voice note (Ogg/Opus)
POST/api/sessions/:sessionId/media/convert/voice
Convert audio into a WhatsApp voice note (Ogg/Opus)
Request
Responses
- 200
- 400
- 401
- 403
- 413
- 503
Converted bytes, ready to post to send-audio with ptt=true. WhatsApp only renders a playable mic bubble for Ogg/Opus; other formats arrive as an audio file that will not play.
Neither url nor base64 given, the url is not an absolute http(s) URL or answers non-2xx, times out or cannot be reached, or ffmpeg refused the input.
The API key is missing, unknown, revoked, or expired
The API key's role, session or chat scope, or IP allow-list does not allow this operation
The supplied media is above the media size cap.
Conversion is disabled, the ffmpeg binary is not runnable, or the conversion queue is saturated — retry shortly. It also answers 503 once the gateway is shutting down. The session routes its url fetches through an egress proxy, and the fetch failed or timed out before any response arrived, so the request was not carried out. The proxy or the target behind it may be at fault; the gateway cannot tell which. Retryable, but a 503 that persists while the proxy works points at the url. Without a session proxy the same failure answers 400.