POST
/
message
/
sendWhatsAppAudio
/
{instance}
curl --request POST \
  --url https://api.l2msg.com/whatsapp/message/sendWhatsAppAudio/{instance} \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "number": "<string>",
  "audio": "<string>",
  "delay": 123,
  "linkPreview": true,
  "mentionsEveryOne": true,
  "mentioned": [
    "{{remoteJID}}"
  ],
  "quoted": {
    "key": {
      "id": "<string>"
    },
    "message": {
      "conversation": "<string>"
    }
  }
}'
{
  "key": {
    "remoteJid": "553198296801@s.whatsapp.net",
    "fromMe": true,
    "id": "BAE5EFED2AB0BB9F"
  },
  "message": {
    "audioMessage": {
      "url": "https://mmg.whatsapp.net/v/t62.7114-24/21428511_985284763127087_5662928...",
      "mimetype": "audio/mp4",
      "fileSha256": "DJPBnRns6QADzZNH2j0R88mUtFQ4aiOm9aZf6dio2G0=",
      "fileLength": "670662",
      "seconds": 42,
      "ptt": true,
      "mediaKey": "+A3X1Tuyzeh87cCVZpfuKpL3Y4RYdYr3sCDurjSlBTY=",
      "fileEncSha256": "s4tKvHOXIZAw5668/Xcy4zoFba4vW8klmNYC78yOPZs=",
      "directPath": "/v/t62.7114-24/21428511_985284763127087_5662928477636351284_n.enc...",
      "mediaKeyTimestamp": "1717776942"
    }
  },
  "messageTimestamp": "1717776942",
  "status": "PENDING"
}

Authorizations

apikey
string
header
required

Your authorization key header

Path Parameters

instance
string
required

ID of the instance to connect

Body

application/json
number
string
required

Number to receive the message (with country code)

audio
string
required

url or base64

delay
integer

Presence time in milliseconds before sending message

Shows a preview of the target website if there's a link within the message

mentionsEveryOne
boolean

Mentioned everyone when the message send

mentioned
enum<string>[]

Numbers to mention

Available options:
{{remoteJID}}
quoted
object

Response

200 - application/json
Ok
key
object

The key of the message, which identifies the message in the chat.

message
object

The message content, which may include various types of messages like text, images, audio, etc.

messageTimestamp
string

The timestamp of the message, represented as a string.

status
string

The status of the message, such as sent, received, or pending.