Documentation Index
Fetch the complete documentation index at: https://docs.kapso.ai/llms.txt
Use this file to discover all available pages before exploring further.
Voice message (voice note)
Voice messages display with a voice icon, automatic download, and optional transcription. Must be .ogg files with OPUS codec.
import { WhatsAppClient } from '@kapso/whatsapp-cloud-api';
const client = new WhatsAppClient({
baseUrl: 'https://api.kapso.ai/meta/whatsapp',
kapsoApiKey: process.env.KAPSO_API_KEY!
});
await client.messages.sendAudio({
phoneNumberId: '647015955153740',
to: '15551234567',
audio: {
id: '1013859600285441',
voice: true
}
});
Basic audio message
Basic audio displays with a download icon and music icon. Supports AAC, AMR, MP3, MP4, and OGG formats (max 16MB).
import { WhatsAppClient } from '@kapso/whatsapp-cloud-api';
const client = new WhatsAppClient({
baseUrl: 'https://api.kapso.ai/meta/whatsapp',
kapsoApiKey: process.env.KAPSO_API_KEY!
});
await client.messages.sendAudio({
phoneNumberId: '647015955153740',
to: '15551234567',
audio: {
link: 'https://example.com/ringtone.mp3'
}
});