Skip to main content
Set "is_audio_message": true on a message whose one part is media audio to deliver it as a spoken message — chat.db’s own discriminator, on the message rather than a part type. Relay renders it inline with playback, duration, and waveform.

Send from a public URL

Use a public HTTPS URL. Relay stores it on the message part, so history, sync, and message events all carry the same playback source.

Send an uploaded file

Upload the bytes first, then pass the returned attachment_id:
The attachment must meet three conditions:
  • Be available, per its upload state.
  • Belong to the sender, the agent making the call.
  • Declare an audio/* content type at upload time.
See Attachments for the raw upload flow and 100 MB limit.

Voice memo or audio attachment

Both use the same file storage.

Rules

  • Pass one source, url or attachment_id, not both.
  • Send duration_ms when you have it. It is optional and accepts a non-negative integer.
  • Upload a supported format. Relay validates the audio/* MIME family and does not transcode. M4A/AAC (audio/mp4) is the recommended interoperable format. MP3 and WAV also play in Relay’s AVFoundation player.
  • Expect normal message behavior: the same response, history, replies, reactions, idempotency, and delivery and read receipts.
Incoming media part on a message with is_audio_messages use the same shape and include a downloadable url.

Next steps