Skip to main content
POST
/
send-audio
curl --request POST \
  --url https://zapi.hubmessage.io/channels/{channel_id}/token/{channel_token}/send-audio \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "phone": "5511999999999",
  "audio": "https://exemplo.com/audio.mp3",
  "viewOnce": false
}
'
{
  "zaapId": "3999984263738042930CD6ECDE9VDWSA",
  "messageId": "D241XXXX732339502B68",
  "id": "D241XXXX732339502B68"
}

Overview

Method for sending audio messages. You can send via URL or Base64. The audio is sent as a voice message on WhatsApp.
When sending as Base64, you must include the prefix with the audio type, for example: data:audio/mpeg;base64,.
The response structure is identical to Z-API. Your existing code that processes these returns will continue working without changes.
File size limits and supported formats follow WhatsApp policies. See the official WhatsApp documentation for details.

Authorizations

Authorization
string
header
required

Secret Key gerada no painel de Segurança do Hub Message

Body

application/json
phone
string
required

Telefone do destinatário (DDI + DDD + número)

Example:

"5511999999999"

audio
string
required

URL do áudio ou dados em Base64

viewOnce
boolean
default:false

Enviar como mensagem de visualização única

delayMessage
integer

Delay em segundos antes do envio (1-15)

Required range: 1 <= x <= 15
delayTyping
integer

Tempo em segundos exibindo status "Gravando áudio..." (1-15)

Required range: 1 <= x <= 15

Response

Mensagem enviada com sucesso

zaapId
string

Identificador interno

messageId
string

ID da mensagem no WhatsApp

id
string

Mesmo valor do messageId (compatibilidade)