Skip to main content
POST
/
v1
/
channels
/
{channelId}
/
messages
Send audio
curl --request POST \
  --url https://api.hubmessage.io/v1/channels/{channelId}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "recipient": {
    "identifier": "5511999999999"
  },
  "content": {
    "type": "AUDIO",
    "attachments": [
      {
        "url": "https://actions.google.com/sounds/v1/alarms/digital_watch_alarm_long.ogg"
      }
    ]
  }
}
'
{
  "messageId": "wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0"
}

Overview

Sends an audio message to a contact. The content.type field must be AUDIO and the audio is sent via URL in the attachments array.
This endpoint only works when the conversation window is open (24 hours).

Authorizations

Authorization
string
header
required

Secret Key generated in the Hub Message Security panel

Path Parameters

channelId
string
required

Channel ID

Example:

"YOUR_CHANNEL_ID"

Body

application/json
recipient
object
required
content
object
required

Response

Message sent successfully

messageId
string

Sent message ID