Skip to main content
There are two ways to send your first message:
  • Kapso proxy + TypeScript SDK - Use the open-source library
  • Kapso REST API - Call the HTTPS endpoint directly with your X-API-Key.
You can only send free-form messages within 24 hours of receiving a customer message. After 24 hours, use templates.

Send via the TypeScript SDK

import { WhatsAppClient } from '@kapso/whatsapp-cloud-api';

const client = new WhatsAppClient({
  baseUrl: 'https://app.kapso.ai/api/meta/',
  kapsoApiKey: process.env.KAPSO_API_KEY!
});

await client.messages.sendText({
  phoneNumberId: '647015955153740',
  to: '56961567267',
  body: 'Hola desde Kapso!'
});

Send via Kapso API

Text message

curl -X POST https://app.kapso.ai/api/v1/whatsapp_conversations/{conversation_id}/whatsapp_messages \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": {
      "content": "Hello from Kapso!"
    }
  }'

Image message

curl -X POST https://app.kapso.ai/api/v1/whatsapp_conversations/{conversation_id}/whatsapp_messages \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": {
      "message_type": "image",
      "media_url": "https://example.com/image.jpg",
      "content": "Caption text"
    }
  }'

Message types

  • text: Plain text up to 4096 characters
  • image: JPEG, PNG with optional caption
  • video: MP4, 3GPP up to 16MB
  • audio: Voice messages
  • document: PDFs and files
  • location: Geographic coordinates
I