OpenWA icon

OpenWA

Interact with OpenWA WhatsApp API Gateway

Actions164

Message → Send Audio

AI-generated

Summary

Send audio to a WhatsApp chat from a selected OpenWA session. Choose an audio source—URL, base64 data, or an incoming binary property—and optionally send it as a voice note, quote an earlier message, tag chat members, or apply an idempotency key for deduplication on OpenWA 0.25.0 or later.

Inputs

  • Session Name or ID (required) — Session to send from; choose a listed session or provide its ID.
  • Chat Name or ID (required) — Recipient chat ID, such as a personal chat ending in @c.us or a group ending in @g.us. Only the first 1,000 chats are listed; use an expression for others.
  • Idempotency Key — Optional key of 1-255 visible ASCII characters without spaces. On OpenWA 0.25.0 or later, retrying the same request with the same key within 24 hours returns the first result without sending again. Keys are unique per session: use a distinct key for each message, and reuse it only for retries of that message. Different body or route with the same key returns 422; in-progress or uncertain send returns 409. Older servers ignore this header.
  • Audio Source — Select URL, Base64, or Binary Data. Defaults to URL.
  • Audio URL (required) — URL of the audio to send; shown when Audio Source is URL.
  • Base64 Data (required) — Base64-encoded audio; shown when Audio Source is Base64.
  • MIME Type (required) — MIME type for base64 audio, required by OpenWA when using this source. Defaults to audio/ogg; codecs=opus. Use the actual type for plain audio, such as audio/mpeg.
  • Binary Property (required) — Name of the incoming binary property containing the audio; shown when Audio Source is Binary Data.
  • Send as Voice Note — When enabled, asks WhatsApp to deliver the audio as a PTT voice note. Requires OGG/Opus audio and an OpenWA server version 0.7.17 or later.
  • Quoted Message ID — Optionally quote an earlier message in the recipient chat. If OpenWA cannot resolve the ID, sending fails rather than proceeding without the quote.
  • Mentions — Optional WhatsApp IDs to tag, entered as a comma-separated list, JSON array, or expression resolving to an array. The message text or caption must contain a matching @-mention token for the tag to render.

Output shape

A single item containing the OpenWA send response.

The audio is sent to the selected chat. Binary input is resolved to base64 for the request; no additional text or caption field is exposed for this operation.

Links

Discussion