Skip to main content
These examples use bearer auth for readability. Use HMAC signing when a request should be signed instead of carrying the secret directly.

Send a first message

Send a native voice note

Stage an ordinary uncompressed WAV file, then send the returned voice_note_id through the exact phone_line_id returned by staging:
Voice notes are not attachments[]. See Voice notes for server-side WAV-to-Opus-CAF conversion, inline base64, JavaScript, Python, expiry, and retry guidance. Callers do not need Apple audio tools.

Create a chat, then follow up

The rich_link part shape is the same on every Chert sender line.
Use this follow-up endpoint for existing DMs and groups. For a new group, create the group with text first, then send this message after you have the chat.id.

Upload and send a file

Send multiple images

Upload multiple images, then request grouped delivery from an existing chat.

Stream replies while developing

For production, create a webhook subscription and listen for message.received.

Download an inbound voice memo

Read attachment_id from the attachment part in message.received, then use the authenticated content route. --remote-header-name preserves a useful filename from Content-Disposition when Chert has one:
The event may report application/octet-stream or omit a filename even when the downloaded bytes are valid audio. See Receiving inbound voice memos for TypeScript, Python, inspection, format variability, and transcription guidance.

React to a message

Use a message id from chat history or a message.received webhook.