Pular para o conteúdo

POST /v1/conversations/media

POST
/v1/conversations/media
curl --request POST \
--url https://seu-endereco-da-api/v1/conversations/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@file \
--form voiceNote=true

Permissão que a Chave de acesso precisa: Enviar mensagem e atender (conversations:write).

Media typemultipart/form-data
object
file
required

Outbound message media (image/video/audio/document)

string format: binary
voiceNote

True converts the audio to a WhatsApp voice note (Ogg/Opus) and returns its duration and waveform

string
Allowed values: true false
Media typeapplication/json
object
key
required
string
mime
required
string
durationMs
required

Only for a voice note: the converted audio’s duration

number
nullable
waveform
required

Only for a voice note: 64 levels from 0 to 100, base64

string
nullable

Example generated

{
"key": "example",
"mime": "example",
"durationMs": 1,
"waveform": "example"
}