Loading...
Loading...
Connect WhatsApp to your product with Kapso: onboard customers with setup links, detect connections, receive events via webhooks, and send messages/templates/media. Also manage WhatsApp Flows (create/update/publish, data endpoints, encryption). Use when integrating WhatsApp end-to-end.
npx skill4agent add gokapso/kapso-agent-skills integrate-whatsappkapso loginkapso statusKAPSO_API_BASE_URL/platform/v1KAPSO_API_KEYMETA_GRAPH_VERSIONv24.0X-API-Key: <api_key>npm ikapso setupkapso projects listkapso projects use <project-id>kapso customers listkapso customers new --name "<customer-name>" --external-id <external-id>kapso setup --customer <customer-id>kapso whatsapp numbers list --output jsonkapso whatsapp numbers resolve --phone-number "<display-number>" --output jsonPOST /platform/v1/customersPOST /platform/v1/customers/:id/setup_linksphone_number_idwhatsapp.phone_number.created{
"setup_link": {
"allowed_connection_types": ["dedicated"],
"provision_phone_number": true,
"phone_number_country_isos": ["US"]
}
}kapso setupkapso whatsapp numbers newphone_number_country_isosphone_number_area_codelanguage/platform/v1/meta/whatsapp/v24.0phone_number_idphone_number_idwhatsapp.message.*whatsapp.conversation.*node scripts/create.js --scope project --url <https://...> --events <csv>node scripts/create.js --phone-number-id <id> --url <https://...> --events <csv>--url <https://...>--events <csv|json-array>--kind <kapso|meta>--payload-version <v1|v2>v2--buffer-enabled <true|false>whatsapp.message.received--buffer-window-seconds <n>--max-buffer-size <n>--active <true|false>node scripts/test.js --webhook-id <id>references/webhooks-overview.mdreferences/webhooks-reference.md| ID | Used for | How to discover |
|---|---|---|
| Template CRUD | |
| Sending messages, media upload | |
kapso whatsapp numbers list --output json
kapso whatsapp numbers resolve --phone-number "<display-number>" --output json
kapso whatsapp messages send --phone-number-id <PHONE_NUMBER_ID> --to <wa-id> --text "Hello from Kapso"
kapso whatsapp messages list --phone-number-id <PHONE_NUMBER_ID> --limit 50 --output json
kapso whatsapp messages get <MESSAGE_ID> --phone-number-id <PHONE_NUMBER_ID> --output json
kapso whatsapp conversations list --phone-number-id <PHONE_NUMBER_ID> --output json
kapso whatsapp templates list --phone-number-id <PHONE_NUMBER_ID> --output json
kapso whatsapp templates get <TEMPLATE_ID> --phone-number-id <PHONE_NUMBER_ID> --output jsonnpm install @kapso/whatsapp-cloud-apiimport { 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.sendText({
phoneNumberId: "<PHONE_NUMBER_ID>",
to: "+15551234567",
body: "Hello from Kapso"
});node scripts/list-platform-phone-numbers.mjsassets/template-utility-order-status-update.jsonnode scripts/create-template.mjs --business-account-id <WABA_ID> --file <payload.json>node scripts/template-status.mjs --business-account-id <WABA_ID> --name <name>node scripts/send-template.mjs --phone-number-id <ID> --file <send-payload.json>phone_number_idassets/send-interactive-*.jsonnode scripts/send-interactive.mjs --phone-number-id <ID> --file <payload.json>kapso whatsapp messages ...kapso whatsapp conversations ...kapso whatsapp templates ...GET /{phone_number_id}/messagesGET /{phone_number_id}/conversationsclient.messages.query()client.messages.get()client.conversations.list()client.conversations.get()client.templates.get()parameter_format: "NAMED"{{param_name}}languagelanguage_code{{1}}parameter_namebuttonsub_type: "url"indexidlinkreferences/whatsapp-flows-spec.mdnode scripts/create-flow.js --phone-number-id <id> --name <name>node scripts/update-flow-json.js --flow-id <id> --json-file <path>node scripts/publish-flow.js --flow-id <id>node scripts/send-test-flow.js --phone-number-id <id> --flow-id <id> --to <phone>node scripts/setup-encryption.js --flow-id <id>node scripts/set-data-endpoint.js --flow-id <id> --code-file <path>node scripts/deploy-data-endpoint.js --flow-id <id>node scripts/register-data-endpoint.js --flow-id <id>version: "7.3"routing_modeldata_api_versionassets/sample-flow.jsonversion: "7.3"data_api_version: "3.0"routing_modelassets/dynamic-flow.jsonasync function handler(request, env) {
const body = await request.json();
// body.data_exchange.action: INIT | data_exchange | BACK
// body.data_exchange.screen: current screen id
// body.data_exchange.data: user inputs
return Response.json({
version: "3.0",
screen: "NEXT_SCREEN_ID",
data: { }
});
}exportmodule.exportsscreen: "SUCCESS"extension_message_response.paramsendpoint_uridata_channel_uri"flow_token is missing"| Script | Purpose |
|---|---|
| List webhooks |
| Get webhook details |
| Create a webhook |
| Update a webhook |
| Delete a webhook |
| Send a test event |
| Script | Purpose | Required ID |
|---|---|---|
| Discover business_account_id + phone_number_id | — |
| List WABA phone numbers | business_account_id |
| List templates (with filters) | business_account_id |
| Check single template status | business_account_id |
| Create a template | business_account_id |
| Update existing template | business_account_id |
| Send template message | phone_number_id |
| Send interactive message | phone_number_id |
| Upload media for send-time headers | phone_number_id |
| Script | Purpose |
|---|---|
| List all flows |
| Create a new flow |
| Get flow details |
| Read flow JSON |
| Update flow JSON (creates new version) |
| Publish a flow |
| Get data endpoint config |
| Create/update data endpoint code |
| Deploy data endpoint |
| Register data endpoint with Meta |
| Check encryption status |
| Set up flow encryption |
| Send a test flow message |
| Delete a flow |
| List stored flow responses |
| List function logs |
| List function invocations |
| Script | Purpose |
|---|---|
| Explore OpenAPI (search/op/schema/where) |
node scripts/openapi-explore.mjs --spec whatsapp search "template"
node scripts/openapi-explore.mjs --spec whatsapp op sendMessage
node scripts/openapi-explore.mjs --spec whatsapp schema TemplateMessage
node scripts/openapi-explore.mjs --spec platform ops --tag "WhatsApp Flows"
node scripts/openapi-explore.mjs --spec platform op setupWhatsappFlowEncryption
node scripts/openapi-explore.mjs --spec platform search "setup link"| File | Description |
|---|---|
| UTILITY template with named params + URL button |
| Send-time payload for order_status_update |
| UTILITY template showing button ordering rules |
| MARKETING template with IMAGE header |
| AUTHENTICATION OTP template (COPY_CODE) |
| Interactive button message |
| Interactive list message |
| Interactive CTA URL message |
| Location request message |
| Catalog message |
| Static flow example (no endpoint) |
| Dynamic flow example (with endpoint) |
| Webhook create/update payload example |
automate-whatsappobserve-whatsapp[integrate-whatsapp file map]|root: .
|.:{package.json,SKILL.md}
|assets:{dynamic-flow.json,sample-flow.json,send-interactive-buttons.json,send-interactive-catalog-message.json,send-interactive-cta-url.json,send-interactive-list.json,send-interactive-location-request.json,send-template-order-status-update.json,template-authentication-otp.json,template-marketing-media-header.json,template-utility-named.json,template-utility-order-status-update.json,webhooks-example.json}
|references:{detecting-whatsapp-connection.md,getting-started.md,platform-api-reference.md,setup-links.md,templates-reference.md,webhooks-event-types.md,webhooks-overview.md,webhooks-reference.md,whatsapp-api-reference.md,whatsapp-cloud-api-js.md,whatsapp-flows-spec.md}
|scripts:{create-flow.js,create-function.js,create-template.mjs,create.js,delete-flow.js,delete.js,deploy-data-endpoint.js,deploy-function.js,get-data-endpoint.js,get-encryption-status.js,get-flow.js,get-function.js,get.js,list-connected-numbers.mjs,list-flow-responses.js,list-flows.js,list-function-invocations.js,list-function-logs.js,list-platform-phone-numbers.mjs,list-templates.mjs,list.js,openapi-explore.mjs,publish-flow.js,read-flow-json.js,register-data-endpoint.js,send-interactive.mjs,send-template.mjs,send-test-flow.js,set-data-endpoint.js,setup-encryption.js,submit-template.mjs,template-status.mjs,test.js,update-flow-json.js,update-function.js,update-template.mjs,update.js,upload-media.mjs,upload-template-header-handle.mjs}
|scripts/lib:{args.mjs,cli.js,env.js,env.mjs,http.js,output.js,output.mjs,request.mjs,run.js,whatsapp-flow.js}
|scripts/lib/webhooks:{args.js,kapso-api.js,webhook.js}