Skip to main content
POST
/
api
/
sendVoice
Send a voice message
curl --request POST \
  --url https://{host}/api/sendVoice \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "session": "session",
  "chatId": "5511999999999@c.us",
  "url": "https://example.com/audio.mp3"
}'
{
  "success": true,
  "messageId": "3EB0XXXXXX"
}

Description

This endpoint allows you to send audio messages (voice notes) to individual contacts or groups on WhatsApp. The audio must be sent in base64 format. Voice notes are displayed as playable audio messages on WhatsApp.

Body

{
  "sessionId": "my-session",
  "jid": "5511999999999@s.whatsapp.net",
  "audio": {
    "content": "iVBORw0KGgoAAAANSUhEUgAAAA...",
    "mimetype": "image/png"
  }
}

Body Parameters

PropertyTypeRequiredDescription
sessionIdstring✅ YesAuthenticated session ID that will send the audio
jidstring✅ YesRecipient identifier (WhatsApp JID). Format: 5511999999999@s.whatsapp.net for contacts or 120363XXXXX@g.us for groups
audioobject✅ YesObject containing the audio data
audio.contentstring✅ YesAudio content encoded in base64
audio.mimetypestring❌ NoAudio MIME type (e.g., audio/ogg, audio/mpeg, audio/mp4). If not specified, will be detected automatically
{
  "success": true,
  "messageId": "3EB0XXXXXX"
}

Status Codes

  • 200 - Audio sent successfully
  • 400 - Invalid parameters or audio corrupted
  • 401 - Unauthorized session
  • 404 - Session not found
  • 413 - Audio too large

Usage Example

curl -X POST https://api.wappfy.com.br/api/sendVoice \
  -H "Content-Type: application/json" \
  -d '{
    "sessionId": "my-session",
    "jid": "5511999999999@s.whatsapp.net",
    "audio": {
      "content": "T2dnUwACAAAAAAAAAABNcnEoAAAAABYMN3EBHFN...",
      "mimetype": "audio/ogg"
    }
  }'

Authorizations

apikey
string
header
required

Your Wappfy API key (get it at dash.wappfy.com.br)

Body

application/json
chatId
string
required

Chat ID (WhatsApp JID)

Example:

"5511999999999@c.us"

file
object
required

Audio/voice file (remote URL or base64 data)

  • Option 1
  • Option 2
session
string
required

Session name (instanceName)

Example:

"my-session"

reply_to
string

Message ID you want to reply to

Example:

null

Response

201 - application/json

The response is of type object.

I