Skip to main content
POST
/
api
/
v1
/
sessions
/
{sessionId}
/
messages
/
audio
Send audio, documents, and stickers
curl --request POST \
  --url https://api.wadial.com/api/v1/sessions/{sessionId}/messages/audio \
  --header 'Authorization: Bearer <token>'
Use the same shape for audio, document, and sticker sends. Replace the final path segment with the content type you want:
POST /api/v1/sessions/{sessionId}/messages/audio
Authorization: Bearer <api_key>
Content-Type: application/json
Idempotency-Key: <unique-message-key>
{
  "to": "15551234567",
  "content": {
    "type": "audio",
    "mediaUrl": "https://example.com/voice.ogg",
    "mimetype": "audio/ogg; codecs=opus",
    "voice": true
  }
}
Document example:
POST /api/v1/sessions/{sessionId}/messages/document
Authorization: Bearer <api_key>
Content-Type: application/json
{
  "to": "15551234567",
  "content": {
    "type": "document",
    "mediaUrl": "https://example.com/report.pdf",
    "mimetype": "application/pdf",
    "fileName": "report.pdf",
    "caption": "Your report"
  }
}
Sticker example:
POST /api/v1/sessions/{sessionId}/messages/sticker
Authorization: Bearer <api_key>
Content-Type: application/json
{
  "to": "15551234567",
  "content": {
    "type": "sticker",
    "mediaUrl": "https://example.com/sticker.webp",
    "mimetype": "image/webp"
  }
}
You can also upload a file with multipart/form-data using fields to, media, mimetype, caption, fileName, and voice. Successful responses return the outgoing message record:
{
  "data": {
    "contentType": "audio",
    "status": "sent",
    "messageId": "3EB0A1B2C3D4E5F6"
  }
}