> ## 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.

# Quickstart

> Use the open-source library to call the WhatsApp Cloud API

The SDK mirrors Meta’s official Cloud API surface so anything you build here works against Meta directly.

When you point it at Kapso, you can opt into additional fields with `fields=kapso(...)`, store history, and query conversations.

## Installation

```bash theme={null}
npm install @kapso/whatsapp-cloud-api
# or
yarn add @kapso/whatsapp-cloud-api
```

## Quickstart

**Direct Meta API (default)**

```ts theme={null}
import { WhatsAppClient } from '@kapso/whatsapp-cloud-api';

const client = new WhatsAppClient({ accessToken: process.env.META_ACCESS_TOKEN! });
await client.messages.sendText({ phoneNumberId: '647015955153740', to: '56961567267', body: 'Hello!' });
```

**Via Kapso proxy**

```ts theme={null}
const client = new WhatsAppClient({ baseUrl: 'https://app.kapso.ai/api/meta/', kapsoApiKey: process.env.KAPSO_API_KEY! });
// Kapso adds storage/query APIs and optional kapso(...) fields in responses
```

<Note>
  When using `accessToken` without the Kapso base URL, Kapso storage and query features are not used.
</Note>

## Support matrix

| Feature                                                                 | WhatsApp token (direct Graph) | Kapso base URL + API key |
| ----------------------------------------------------------------------- | :---------------------------: | :----------------------: |
| Send text                                                               |               ✅               |             ✅            |
| Send media (image, video, audio, document, sticker)                     |               ✅               |             ✅            |
| Send location                                                           |               ✅               |             ✅            |
| Send interactive (buttons, list, product, product list, flow, carousel) |               ✅               |             ✅            |
| Send template                                                           |               ✅               |             ✅            |
| Reactions                                                               |               ✅               |             ✅            |
| Mark read                                                               |               ✅               |             ✅            |
| Media: upload                                                           |               ✅               |             ✅            |
| Media: get/delete                                                       |               ✅               |             ✅            |
| Templates: list (by WABA)                                               |               ✅               |             ✅            |
| Phone numbers: settings/profile                                         |               ✅               |             ✅            |
| Calling: connect/pre‑accept/accept/reject/terminate                     |               ✅               |             ✅            |
| Calling: permissions.get                                                |               ✅               |             ✅            |
| Conversations: list/get                                                 |               ❌               |             ✅            |
| Messages history: query/list by conversation                            |               ❌               |             ✅            |
| Contacts: list/get/update                                               |               ❌               |             ✅            |
| Call logs: list                                                         |               ❌               |             ✅            |
| Storage of conversations/messages                                       |               ❌               |             ✅            |
| Supabase sync                                                           |               ❌               |             ✅            |

## Next steps

Check out the guides to learn how to send different types of messages and use advanced features.

<CardGroup cols={2}>
  <Card title="GitHub repository" icon="github" href="https://github.com/gokapso/whatsapp-cloud-api-js" arrow="true" cta="View on GitHub">
    Source code, examples, and issue tracker for the SDK.
  </Card>

  <Card title="API reference" icon="link" href="/api-reference/whatsapp-api-overview" arrow="true" cta="Open reference">
    REST endpoints if you want to build your own client.
  </Card>
</CardGroup>
