Skip to main content
Send an audio clip and the recipient sees the native iMessage audio message balloon — waveform, play button, scrubber — not a generic file pill.

Send an audio message

Two-step flow: upload the audio file via POST /v1/files, then send it by file ID. Common formats are accepted — m4a, mp3, wav, caf, aiff.
import { readFileSync } from "node:fs";
import { createClient } from "@messages-dev/sdk";

const client = createClient();

// 1. Upload the audio file
const file = await client.uploadFile({
  file: readFileSync("clip.m4a"),
  mimeType: "audio/mp4",
  filename: "clip.m4a",
});

// 2. Send it as an audio message
await client.sendAudioMessage({
  from: "+15551234567",
  to: "+15559876543",
  audioMessage: file.id,
});
File IDs are reusable — upload a clip once and send it to many recipients without re-uploading.

Parameters

FieldRequiredDescription
fromYesSender line handle.
toYesRecipient phone number, Apple ID, or chat ID (cht_...).
audioMessageYesFile ID (file_...) of an audio file uploaded via POST /v1/files.
replyToNoMessage ID or GUID to reply to.

Requirements

iMessage only — audio messages are not supported on SMS lines. Some lines don’t support audio messages; sending from one of those returns 400 advanced_features_required.

Supported formats

Common audio formats are accepted:
  • m4a / aac
  • mp3
  • wav
  • caf
  • aiff
The audio is transcoded server-side, so you don’t need to pre-encode.