@kapso/cli
v0.19.2
Published
Kapso CLI for source-controlled workflows, functions, WhatsApp numbers, conversations, messages, and templates
Readme
@kapso/cli
CLI for operating Kapso projects from the terminal, including source-controlled functions, workflows, WhatsApp numbers, conversations, messages, and templates.
Usage
$ npm install -g @kapso/cli
$ kapso COMMAND
running command...
$ kapso (--version)
@kapso/cli/0.19.2 linux-x64 node-v24.22.0
$ kapso --help [COMMAND]
USAGE
$ kapso COMMAND
...The local routing release adds BSUID sends, thread take/pass/release, routing and account enforcement webhooks, and structured API errors. See the local validation guide for offline checks and live validation results, remaining account prerequisites, and test commands.
Call history and native artifact inspection are described in
the Calling command guide. Use Meta wacid IDs for
calls get and local Kapso UUIDs for calls artifact.
Common flow:
kapso setup
kapso status
kapso whatsapp numbers list
kapso whatsapp conversations list
kapso whatsapp messages send --phone-number-id <phone-number-id> --to <wa-id> --text "Hello"CI / non-interactive flow:
export KAPSO_API_KEY=your_project_api_key
kapso status
kapso customers list
kapso whatsapp numbers list
kapso setup --customer <customer-id>When KAPSO_API_KEY is set, project-scoped commands use it directly and ignore stored login context. Account commands such as kapso login and kapso projects list still use the normal browser login flow.
Kapso collects minimal authenticated CLI usage telemetry through the Kapso app to understand command reliability and usage. Telemetry includes the command name, CLI version, duration, exit status, and current project ID when already known locally. It never sends raw arguments, flags, message bodies, phone numbers, file paths, working directory, environment variables, tokens, raw errors, stacks, or response bodies. Set KAPSO_TELEMETRY_DISABLED=1 or DO_NOT_TRACK=1 to opt out.
Source-controlled projects
Use kapso link, kapso pull, and kapso push when you want a Kapso project represented by local files that can live in git. The first source sync scope is functions and workflows.
kapso login
kapso link --project <project-id>
kapso pullThis creates a small repo binding and writes project source files:
kapso.yaml
.kapso/project.json
.kapso/remote-map.json
functions/<function-slug>/function.yaml
functions/<function-slug>/index.js
workflows/<workflow-slug>/workflow.yaml
workflows/<workflow-slug>/definition.jsonkapso.yaml and the functions/ and workflows/ directories are intended to be committed. .kapso/project.json stores the local project binding, and .kapso/remote-map.json stores the last pulled remote state used for dirty-file and stale-remote checks.
Workflows as code
Workflows can be edited as JSON/YAML only, or authored with @kapso/workflows.
npm install @kapso/workflowskapso pull writes a generated workflow.js file beside pulled workflow JSON when no workflow source file exists yet. Edit that file when you want code to become the source of truth, or keep editing workflow.yaml and definition.json directly. After workflow.js or workflow.ts has been edited, kapso pull preserves it and only updates the remote-owned workflow.yaml and definition.json files.
If workflows/<slug>/workflow.ts or workflows/<slug>/workflow.js exists, kapso build compiles it into workflow.yaml and definition.json.
import { START, Workflow } from "@kapso/workflows";
const workflow = new Workflow("inbound-support", {
name: "Inbound Support",
});
workflow.addTrigger({
type: "inbound_message",
phoneNumberId: "<phone-number-id>",
});
workflow.addNode(START, {
position: { x: 100, y: 100 },
});
workflow.addNode("reply", {
type: "send_text",
message: "Thanks for reaching out.",
});
workflow.addEdge(START, "reply");
export default workflow;If no workflow code file exists, the CLI uses the existing workflow.yaml and definition.json files directly. This keeps the CLI compatible with projects that prefer editing pulled JSON instead of using the TypeScript library.
When a workflow source file exists, kapso push compiles it only after that source file changes. This lets kapso pull refresh JSON from the remote app without replacing hand-authored workflow code with generated raw code.
When workflow code is the source of truth, committing the generated workflow.yaml and definition.json files is a repo decision. Keeping them in git makes diffs visible without running a build. Ignoring them keeps the repo focused on authored code.
/workflows/*/definition.json
/workflows/*/workflow.yamlPull, build, and push
kapso pull
kapso build
kapso push --dry-run
kapso pushTarget one object when you do not want to pull or push every source file:
kapso pull workflow <workflow-slug>
kapso pull function <function-slug>
kapso pull workflow <workflow-slug> --diff
kapso push workflow <workflow-slug>
kapso push function <function-slug>kapso pull refuses to overwrite locally edited remote-owned files and prints a compact incoming diff when it is blocked. Authored workflow source files are preserved instead of blocked. Use kapso pull --diff to inspect all blocked diffs without writing files, or kapso pull --overwrite when the remote copy should replace local edits in remote-owned files. Targeted pull uses the same dirty-file protection, but only for the selected function or workflow. kapso push refuses to update a remote function or workflow that changed since your last pull. Remote-only objects are reported, but not deleted.
kapso push does not activate draft workflows. After a real workflow push, the CLI prints a link to open the workflow in Kapso so you can review and activate it from the web app.
Commands
kapso buildkapso customers get CUSTOMERIDkapso customers listkapso customers newkapso help [COMMAND]kapso linkkapso loginkapso logoutkapso logs searchkapso projects currentkapso projects listkapso projects use PROJECTIDkapso pull [KIND] [SLUG]kapso push [KIND] [SLUG]kapso setupkapso statuskapso whatsapp calls artifact CALLUUIDkapso whatsapp calls get CALLIDkapso whatsapp calls listkapso whatsapp conversations get CONVERSATIONIDkapso whatsapp conversations listkapso whatsapp messages get MESSAGEIDkapso whatsapp messages listkapso whatsapp messages sendkapso whatsapp numbers get [NUMBERREF]kapso whatsapp numbers health [NUMBERREF]kapso whatsapp numbers listkapso whatsapp numbers newkapso whatsapp numbers resolve [NUMBERREF]kapso whatsapp project-webhooks delete WEBHOOKIDkapso whatsapp project-webhooks get WEBHOOKIDkapso whatsapp project-webhooks listkapso whatsapp project-webhooks newkapso whatsapp project-webhooks test WEBHOOKIDkapso whatsapp project-webhooks update WEBHOOKIDkapso whatsapp templates get TEMPLATEIDkapso whatsapp templates listkapso whatsapp templates newkapso whatsapp threads passkapso whatsapp threads releasekapso whatsapp threads takekapso whatsapp webhooks delete WEBHOOKIDkapso whatsapp webhooks get WEBHOOKIDkapso whatsapp webhooks listkapso whatsapp webhooks newkapso whatsapp webhooks update WEBHOOKID
kapso build
Compile Kapso workflow.ts or workflow.js files into source JSON
USAGE
$ kapso build
DESCRIPTION
Compile Kapso workflow.ts or workflow.js files into source JSONSee code: src/commands/build.ts
kapso customers get CUSTOMERID
Get a customer by ID
USAGE
$ kapso customers get CUSTOMERID [--output json|human] [--project <value>]
ARGUMENTS
CUSTOMERID Customer ID
FLAGS
--output=<option> [default: json] Output format
<options: json|human>
--project=<value> Project ID override
DESCRIPTION
Get a customer by IDSee code: src/commands/customers/get.ts
kapso customers list
List customers in the current project
USAGE
$ kapso customers list [--output json|human] [--project <value>]
FLAGS
--output=<option> [default: json] Output format
<options: json|human>
--project=<value> Project ID override
DESCRIPTION
List customers in the current projectSee code: src/commands/customers/list.ts
kapso customers new
Create a customer in the current project
USAGE
$ kapso customers new --external-id <value> --name <value> [--output json|human] [--project <value>]
FLAGS
--external-id=<value> (required) External customer identifier
--name=<value> (required) Customer name
--output=<option> [default: json] Output format
<options: json|human>
--project=<value> Project ID override
DESCRIPTION
Create a customer in the current projectSee code: src/commands/customers/new.ts
kapso help [COMMAND]
Display help for kapso.
USAGE
$ kapso help [COMMAND...] [-n]
ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for kapso.See code: @oclif/plugin-help
kapso link
Bind this directory to a Kapso project for pull and push
USAGE
$ kapso link [--project <value>] [--verify]
FLAGS
--project=<value> Project ID override
--[no-]verify Verify Platform API access before writing the binding
DESCRIPTION
Bind this directory to a Kapso project for pull and pushSee code: src/commands/link.ts
kapso login
Log in to Kapso
USAGE
$ kapso login
DESCRIPTION
Log in to Kapso
EXAMPLES
$ kapso loginSee code: src/commands/login.ts
kapso logout
Log out from Kapso
USAGE
$ kapso logout
DESCRIPTION
Log out from Kapso
EXAMPLES
$ kapso logoutSee code: src/commands/logout.ts
kapso logs search
Search Rails logs for the current project
USAGE
$ kapso logs search [--filter <value>...] [--limit <value>] [--output json|human] [--period 24h|7d|30d]
[--problems-only] [--project <value>] [--query <value>] [--source
all|external_api_log|whatsapp_webhook_event|flow_event|webhook_delivery]
FLAGS
--filter=<value>... Filter in key=value format. Repeat for multiple filters.
--limit=<value> Maximum number of log events to return
--output=<option> [default: json] Output format
<options: json|human>
--period=<option> [default: 24h] Time period to search
<options: 24h|7d|30d>
--problems-only Only return log events marked as problems
--project=<value> Project ID override
--query=<value> Text query to search for
--source=<option> [default: all] Log source to search
<options: all|external_api_log|whatsapp_webhook_event|flow_event|webhook_delivery>
DESCRIPTION
Search Rails logs for the current projectSee code: src/commands/logs/search.ts
kapso projects current
Show the current project context
USAGE
$ kapso projects current [--output json|human]
FLAGS
--output=<option> [default: json] Output format
<options: json|human>
DESCRIPTION
Show the current project contextSee code: src/commands/projects/current.ts
kapso projects list
List projects available to the current account
USAGE
$ kapso projects list [--output json|human]
FLAGS
--output=<option> [default: json] Output format
<options: json|human>
DESCRIPTION
List projects available to the current accountSee code: src/commands/projects/list.ts
kapso projects use PROJECTID
Use a project as the default for project-scoped commands
USAGE
$ kapso projects use PROJECTID
ARGUMENTS
PROJECTID Project ID to persist as the current project
DESCRIPTION
Use a project as the default for project-scoped commandsSee code: src/commands/projects/use.ts
kapso pull [KIND] [SLUG]
Pull Kapso functions and workflows into this repo
USAGE
$ kapso pull [KIND] [SLUG] [--diff] [--overwrite] [--project <value>]
ARGUMENTS
[KIND] (function|workflow) Optional source kind to pull
[SLUG] Function or workflow slug to pull
FLAGS
--diff Show incoming diffs for blocked local edits without writing files
--overwrite Overwrite local files that changed since the last pull
--project=<value> Project ID override
DESCRIPTION
Pull Kapso functions and workflows into this repoSee code: src/commands/pull.ts
kapso push [KIND] [SLUG]
Push local Kapso functions and workflows
USAGE
$ kapso push [KIND] [SLUG] [--dry-run] [--project <value>]
ARGUMENTS
[KIND] (function|workflow) Optional source kind to push
[SLUG] Function or workflow slug to push
FLAGS
--dry-run Show the push plan without changing remote resources
--project=<value> Project ID override
DESCRIPTION
Push local Kapso functions and workflowsSee code: src/commands/push.ts
kapso setup
Guided first-time setup for Kapso and a WhatsApp number
USAGE
$ kapso setup [--area-code <value>] [--connection-type coexistence|dedicated...] [--country <value>...]
[--customer <value>] [--failure-url <value>] [--language <value>] [--no-provision-phone-number] [--output
json|human] [--project <value>] [--success-url <value>]
FLAGS
--area-code=<value> Preferred phone number area code
--connection-type=<option>... Allowed connection type (defaults to dedicated)
<options: coexistence|dedicated>
--country=<value>... Preferred phone number country ISO
--customer=<value> Customer ID override
--failure-url=<value> Failure redirect URL
--language=<value> Setup link language
--no-provision-phone-number Do not auto-provision a phone number during setup
--output=<option> [default: human] Output format
<options: json|human>
--project=<value> Project ID override
--success-url=<value> Success redirect URL
DESCRIPTION
Guided first-time setup for Kapso and a WhatsApp numberSee code: src/commands/setup.ts
kapso status
Show Kapso setup and project status
USAGE
$ kapso status [--output json|human]
FLAGS
--output=<option> [default: human] Output format
<options: json|human>
DESCRIPTION
Show Kapso setup and project statusSee code: src/commands/status.ts
kapso whatsapp calls artifact CALLUUID
Inspect or download a native call artifact using KAPSO_API_KEY on the APP host.
USAGE
$ kapso whatsapp calls artifact CALLUUID --kind recording|transcription [--force [--download --out <value>]] [--output
json|human]
ARGUMENTS
CALLUUID Local Kapso call UUID (the id returned by calls get), not Meta wacid
FLAGS
--download Save original artifact bytes; requires --out. Never prints audio.
--force Replace an existing output file after a successful download
--kind=<option> (required) Artifact kind
<options: recording|transcription>
--out=<value> Output file path for --download
--output=<option> [default: json] Output format
<options: json|human>
DESCRIPTION
Inspect or download a native call artifact using KAPSO_API_KEY on the APP host.
CALL_UUID is Kapso’s local UUID, not Meta’s wacid. Retention is estimated at about 7 days; Kapso keeps no permanent
copy. Recording inspection prints metadata, never audio.
EXAMPLES
$ kapso whatsapp calls artifact 123e4567-e89b-42d3-a456-426614174000 --kind transcription --output human
$ kapso whatsapp calls artifact 123e4567-e89b-42d3-a456-426614174000 --kind recording --download --out call.oggSee code: src/commands/whatsapp/calls/artifact.ts
kapso whatsapp calls get CALLID
Look up a WhatsApp call by its Meta call ID
USAGE
$ kapso whatsapp calls get CALLID [--output json|human] [--phone-number <value>] [--phone-number-id <value>]
[--project <value>]
ARGUMENTS
CALLID Meta call ID (wacid.…), not the local Kapso UUID
FLAGS
--output=<option> [default: json] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
DESCRIPTION
Look up a WhatsApp call by its Meta call ID
EXAMPLES
$ kapso whatsapp calls get wacid.example --phone-number-id 123 --output humanSee code: src/commands/whatsapp/calls/get.ts
kapso whatsapp calls list
List WhatsApp call history (one cursor-paginated page)
USAGE
$ kapso whatsapp calls list [--after <value>] [--direction <value>] [--limit <value>] [--output json|human]
[--phone-number <value>] [--phone-number-id <value>] [--project <value>] [--since <value>] [--status <value>]
[--until <value>]
FLAGS
--after=<value> Cursor for the next page
--direction=<value> Filter by call direction (for example USER_INITIATED or BUSINESS_INITIATED)
--limit=<value> [default: 20] Maximum calls per page (1–100)
--output=<option> [default: json] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
--since=<value> Calls at/after this ISO timestamp
--status=<value> Filter by call status (for example completed, failed, or missed)
--until=<value> Calls at/before this ISO timestamp
DESCRIPTION
List WhatsApp call history (one cursor-paginated page)
EXAMPLES
$ kapso whatsapp calls list --phone-number-id 123 --limit 20 --output humanSee code: src/commands/whatsapp/calls/list.ts
kapso whatsapp conversations get CONVERSATIONID
Get a WhatsApp conversation by ID
USAGE
$ kapso whatsapp conversations get CONVERSATIONID [--output json|human] [--project <value>]
ARGUMENTS
CONVERSATIONID Conversation ID
FLAGS
--output=<option> [default: json] Output format
<options: json|human>
--project=<value> Project ID override
DESCRIPTION
Get a WhatsApp conversation by IDSee code: src/commands/whatsapp/conversations/get.ts
kapso whatsapp conversations list
List WhatsApp conversations in the current project, sorted by most recent activity
USAGE
$ kapso whatsapp conversations list [--assigned-user <value>] [--output json|human] [--page <value>] [--per-page <value>]
[--phone <value>] [--phone-number <value>] [--phone-number-id <value>] [--project <value>] [--status active|ended]
[--unassigned]
FLAGS
--assigned-user=<value> Filter by assigned user ID
--output=<option> [default: json] Output format
<options: json|human>
--page=<value> Page number
--per-page=<value> Results per page
--phone=<value> Filter by contact phone number
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
--status=<option> Filter by conversation status
<options: active|ended>
--unassigned Only include unassigned conversations
DESCRIPTION
List WhatsApp conversations in the current project, sorted by most recent activitySee code: src/commands/whatsapp/conversations/list.ts
kapso whatsapp messages get MESSAGEID
Get a WhatsApp message by ID
USAGE
$ kapso whatsapp messages get MESSAGEID [--output json|human] [--phone-number <value>] [--phone-number-id <value>]
[--project <value>]
ARGUMENTS
MESSAGEID Message ID
FLAGS
--output=<option> [default: json] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
DESCRIPTION
Get a WhatsApp message by IDSee code: src/commands/whatsapp/messages/get.ts
kapso whatsapp messages list
List WhatsApp messages in the current project (cursor pagination)
USAGE
$ kapso whatsapp messages list [--after <value>] [--before <value>] [--conversation <value>] [--direction
inbound|outbound] [--limit <value>] [--output json|human] [--per-page <value>] [--phone-number <value>]
[--phone-number-id <value>] [--project <value>] [--since <value>] [--status pending|sent|delivered|read|failed]
[--until <value>]
FLAGS
--after=<value> Cursor for the next page
--before=<value> Cursor for the previous page
--conversation=<value> Filter by conversation ID. If no WhatsApp number is provided, it is resolved from the
conversation.
--direction=<option> Filter by direction
<options: inbound|outbound>
--limit=<value> Maximum number of messages to return
--output=<option> [default: json] Output format
<options: json|human>
--per-page=<value> Alias for --limit on cursor-paginated responses
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
--since=<value> Filter by messages created at/after this timestamp
--status=<option> Filter by message status
<options: pending|sent|delivered|read|failed>
--until=<value> Filter by messages created at/before this timestamp
DESCRIPTION
List WhatsApp messages in the current project (cursor pagination)See code: src/commands/whatsapp/messages/list.ts
kapso whatsapp messages send
Send a WhatsApp message
USAGE
$ kapso whatsapp messages send [--endpoint messages|marketing-messages] [--input <value>] [--messaging-account-id <value>]
[--output json|human] [--phone-number <value>] [--phone-number-id <value>] [--project <value>] [--recipient <value>]
[--stdin] [--take-control] [--text <value>] [--to <value>]
FLAGS
--endpoint=<option> [default: messages] Meta send endpoint
<options: messages|marketing-messages>
--input=<value> Path to a JSON payload file
--messaging-account-id=<value> Messaging account ID used to fund this send
--output=<option> [default: json] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
--recipient=<value> Recipient business-scoped user ID (BSUID); may be combined with --to
--stdin Read the JSON payload from stdin
--take-control Take thread control before sending (requires escalation app role)
--text=<value> Text body shortcut
--to=<value> Recipient phone number
DESCRIPTION
Send a WhatsApp messageSee code: src/commands/whatsapp/messages/send.ts
kapso whatsapp numbers get [NUMBERREF]
Get a WhatsApp number by Meta ID or display phone number
USAGE
$ kapso whatsapp numbers get [NUMBERREF] [--output json|human] [--phone-number <value>] [--phone-number-id <value>]
[--project <value>]
ARGUMENTS
[NUMBERREF] WhatsApp phone number ID or display phone number
FLAGS
--output=<option> [default: json] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
DESCRIPTION
Get a WhatsApp number by Meta ID or display phone numberSee code: src/commands/whatsapp/numbers/get.ts
kapso whatsapp numbers health [NUMBERREF]
Run a health check for a WhatsApp number
USAGE
$ kapso whatsapp numbers health [NUMBERREF] [--output json|human] [--phone-number <value>] [--phone-number-id <value>]
[--project <value>]
ARGUMENTS
[NUMBERREF] WhatsApp phone number ID or display phone number
FLAGS
--output=<option> [default: json] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
DESCRIPTION
Run a health check for a WhatsApp numberSee code: src/commands/whatsapp/numbers/health.ts
kapso whatsapp numbers list
List WhatsApp numbers in the current project
USAGE
$ kapso whatsapp numbers list [--customer <value>] [--output json|human] [--page <value>] [--per-page <value>] [--project
<value>]
FLAGS
--customer=<value> Filter by customer ID
--output=<option> [default: json] Output format
<options: json|human>
--page=<value> Page number
--per-page=<value> Results per page
--project=<value> Project ID override
DESCRIPTION
List WhatsApp numbers in the current projectSee code: src/commands/whatsapp/numbers/list.ts
kapso whatsapp numbers new
Start WhatsApp number setup in the current project
USAGE
$ kapso whatsapp numbers new [--area-code <value>] [--connection-type coexistence|dedicated...] [--country <value>...]
[--customer <value>] [--failure-url <value>] [--language <value>] [--no-provision-phone-number] [--output
json|human] [--project <value>] [--success-url <value>]
FLAGS
--area-code=<value> Preferred phone number area code
--connection-type=<option>... Allowed connection type (defaults to dedicated)
<options: coexistence|dedicated>
--country=<value>... Preferred phone number country ISO
--customer=<value> Customer ID override
--failure-url=<value> Failure redirect URL
--language=<value> Setup link language
--no-provision-phone-number Do not auto-provision a phone number during setup
--output=<option> [default: human] Output format
<options: json|human>
--project=<value> Project ID override
--success-url=<value> Success redirect URL
DESCRIPTION
Start WhatsApp number setup in the current projectSee code: src/commands/whatsapp/numbers/new.ts
kapso whatsapp numbers resolve [NUMBERREF]
Resolve a WhatsApp number reference to a canonical phone number ID
USAGE
$ kapso whatsapp numbers resolve [NUMBERREF] [--output json|human] [--phone-number <value>] [--phone-number-id <value>]
[--project <value>]
ARGUMENTS
[NUMBERREF] WhatsApp phone number ID or display phone number
FLAGS
--output=<option> [default: json] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
DESCRIPTION
Resolve a WhatsApp number reference to a canonical phone number IDSee code: src/commands/whatsapp/numbers/resolve.ts
kapso whatsapp project-webhooks delete WEBHOOKID
Delete a project WhatsApp webhook
USAGE
$ kapso whatsapp project-webhooks delete WEBHOOKID [--output json|human] [--project <value>]
ARGUMENTS
WEBHOOKID Webhook ID
FLAGS
--output=<option> [default: human] Output format
<options: json|human>
--project=<value> Project ID override
DESCRIPTION
Delete a project WhatsApp webhookSee code: src/commands/whatsapp/project-webhooks/delete.ts
kapso whatsapp project-webhooks get WEBHOOKID
Get a WhatsApp webhook by ID across the project
USAGE
$ kapso whatsapp project-webhooks get WEBHOOKID [--output json|human] [--project <value>]
ARGUMENTS
WEBHOOKID Webhook ID
FLAGS
--output=<option> [default: json] Output format
<options: json|human>
--project=<value> Project ID override
DESCRIPTION
Get a WhatsApp webhook by ID across the projectSee code: src/commands/whatsapp/project-webhooks/get.ts
kapso whatsapp project-webhooks list
List WhatsApp webhooks across the project, including number webhooks
USAGE
$ kapso whatsapp project-webhooks list [--kind kapso|meta] [--output json|human] [--page <value>] [--per-page <value>] [--project
<value>]
FLAGS
--kind=<option> Filter by webhook kind
<options: kapso|meta>
--output=<option> [default: json] Output format
<options: json|human>
--page=<value> Page number
--per-page=<value> Results per page
--project=<value> Project ID override
DESCRIPTION
List WhatsApp webhooks across the project, including number webhooksSee code: src/commands/whatsapp/project-webhooks/list.ts
kapso whatsapp project-webhooks new
Create a project WhatsApp webhook
USAGE
$ kapso whatsapp project-webhooks new --event
whatsapp.message.received|whatsapp.message.sent|whatsapp.message.delivered|whatsapp.message.read|whatsapp.message.fa
iled|whatsapp.conversation.created|whatsapp.conversation.ended|whatsapp.conversation.inactive|workflow.execution.han
doff|workflow.execution.failed|whatsapp.config.created|whatsapp.phone_number.created|whatsapp.phone_number.deleted|w
hatsapp.phone_number.offboarded|whatsapp.phone_number.disconnected|whatsapp.phone_number.reconnected|whatsapp.accoun
t.disabled|whatsapp.account.restricted|whatsapp.account.reinstated|whatsapp.account.violation|project.event|kapso_ag
ent.run.approval_required|kapso_agent.run.completed|kapso_agent.run.failed|kapso_agent.run.cancelled... --url
<value> [--active] [--buffer-enabled] [--buffer-window-seconds <value>] [--header <value>...] [--inactive]
[--inactivity-minutes <value>] [--kind kapso] [--max-buffer-size <value>] [--output json|human] [--payload-version
v1|v2] [--project <value>] [--secret-key <value>]
FLAGS
--active
Create the webhook as active
--[no-]buffer-enabled
Enable buffering for whatsapp.message.received
--buffer-window-seconds=<value>
Buffer window in seconds (requires --buffer-enabled)
--event=<option>...
(required) Webhook event to subscribe to
<options: whatsapp.message.received|whatsapp.message.sent|whatsapp.message.delivered|whatsapp.message.read|whatsapp.
message.failed|whatsapp.conversation.created|whatsapp.conversation.ended|whatsapp.conversation.inactive|workflow.exe
cution.handoff|workflow.execution.failed|whatsapp.config.created|whatsapp.phone_number.created|whatsapp.phone_number
.deleted|whatsapp.phone_number.offboarded|whatsapp.phone_number.disconnected|whatsapp.phone_number.reconnected|whats
app.account.disabled|whatsapp.account.restricted|whatsapp.account.reinstated|whatsapp.account.violation|project.even
t|kapso_agent.run.approval_required|kapso_agent.run.completed|kapso_agent.run.failed|kapso_agent.run.cancelled>
--header=<value>...
Custom header in Name=value format
--inactive
Create the webhook as inactive
--inactivity-minutes=<value>
Minutes before sending whatsapp.conversation.inactive
--kind=<option>
Webhook kind
<options: kapso>
--max-buffer-size=<value>
Maximum buffered events before flush (requires --buffer-enabled)
--output=<option>
[default: human] Output format
<options: json|human>
--payload-version=<option>
Webhook payload version
<options: v1|v2>
--project=<value>
Project ID override
--secret-key=<value>
Webhook secret key override
--url=<value>
(required) Webhook destination URL
DESCRIPTION
Create a project WhatsApp webhookSee code: src/commands/whatsapp/project-webhooks/new.ts
kapso whatsapp project-webhooks test WEBHOOKID
Queue a sample delivery to a configured webhook URL
USAGE
$ kapso whatsapp project-webhooks test WEBHOOKID [--event <value>] [--output json|human] [--project <value>]
ARGUMENTS
WEBHOOKID Webhook ID
FLAGS
--event=<value> Configured event to test; server chooses an event if omitted
--output=<option> [default: human] Output format
<options: json|human>
--project=<value> Project ID override
DESCRIPTION
Queue a sample delivery to a configured webhook URLSee code: src/commands/whatsapp/project-webhooks/test.ts
kapso whatsapp project-webhooks update WEBHOOKID
Update a project WhatsApp webhook
USAGE
$ kapso whatsapp project-webhooks update WEBHOOKID [--active] [--buffer-enabled] [--buffer-window-seconds <value>] [--clear-headers]
[--event whatsapp.message.received|whatsapp.message.sent|whatsapp.message.delivered|whatsapp.message.read|whatsapp.m
essage.failed|whatsapp.conversation.created|whatsapp.conversation.ended|whatsapp.conversation.inactive|workflow.exec
ution.handoff|workflow.execution.failed|whatsapp.config.created|whatsapp.phone_number.created|whatsapp.phone_number.
deleted|whatsapp.phone_number.offboarded|whatsapp.phone_number.disconnected|whatsapp.phone_number.reconnected|whatsa
pp.account.disabled|whatsapp.account.restricted|whatsapp.account.reinstated|whatsapp.account.violation|project.event
|kapso_agent.run.approval_required|kapso_agent.run.completed|kapso_agent.run.failed|kapso_agent.run.cancelled...]
[--header <value>...] [--inactive] [--inactivity-minutes <value>] [--kind kapso] [--max-buffer-size <value>]
[--output json|human] [--payload-version v1|v2] [--project <value>] [--secret-key <value>] [--url <value>]
ARGUMENTS
WEBHOOKID Webhook ID
FLAGS
--active
Set the webhook to active
--[no-]buffer-enabled
Enable buffering for whatsapp.message.received
--buffer-window-seconds=<value>
Buffer window in seconds (requires --buffer-enabled)
--clear-headers
Replace custom headers with an empty object
--event=<option>...
Webhook event to subscribe to
<options: whatsapp.message.received|whatsapp.message.sent|whatsapp.message.delivered|whatsapp.message.read|whatsapp.
message.failed|whatsapp.conversation.created|whatsapp.conversation.ended|whatsapp.conversation.inactive|workflow.exe
cution.handoff|workflow.execution.failed|whatsapp.config.created|whatsapp.phone_number.created|whatsapp.phone_number
.deleted|whatsapp.phone_number.offboarded|whatsapp.phone_number.disconnected|whatsapp.phone_number.reconnected|whats
app.account.disabled|whatsapp.account.restricted|whatsapp.account.reinstated|whatsapp.account.violation|project.even
t|kapso_agent.run.approval_required|kapso_agent.run.completed|kapso_agent.run.failed|kapso_agent.run.cancelled>
--header=<value>...
Custom header in Name=value format
--inactive
Set the webhook to inactive
--inactivity-minutes=<value>
Minutes before sending whatsapp.conversation.inactive
--kind=<option>
Webhook kind
<options: kapso>
--max-buffer-size=<value>
Maximum buffered events before flush (requires --buffer-enabled)
--output=<option>
[default: human] Output format
<options: json|human>
--payload-version=<option>
Webhook payload version
<options: v1|v2>
--project=<value>
Project ID override
--secret-key=<value>
Webhook secret key override
--url=<value>
Webhook destination URL
DESCRIPTION
Update a project WhatsApp webhookSee code: src/commands/whatsapp/project-webhooks/update.ts
kapso whatsapp templates get TEMPLATEID
Get a WhatsApp template by ID
USAGE
$ kapso whatsapp templates get TEMPLATEID [--output json|human] [--phone-number <value>] [--phone-number-id <value>]
[--project <value>]
ARGUMENTS
TEMPLATEID Template ID
FLAGS
--output=<option> [default: json] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
DESCRIPTION
Get a WhatsApp template by IDSee code: src/commands/whatsapp/templates/get.ts
kapso whatsapp templates list
List WhatsApp templates for a number (cursor pagination)
USAGE
$ kapso whatsapp templates list [--after <value>] [--before <value>] [--category MARKETING|UTILITY|AUTHENTICATION]
[--language <value>] [--limit <value>] [--name <value>] [--output json|human] [--per-page <value>] [--phone-number
<value>] [--phone-number-id <value>] [--project <value>] [--status
APPROVED|PENDING|REJECTED|PAUSED|IN_APPEAL|DISABLED]
FLAGS
--after=<value> Cursor for the next page
--before=<value> Cursor for the previous page
--category=<option> Filter by template category
<options: MARKETING|UTILITY|AUTHENTICATION>
--language=<value> Filter by language code
--limit=<value> Maximum number of templates to return
--name=<value> Filter by template name
--output=<option> [default: json] Output format
<options: json|human>
--per-page=<value> Alias for --limit on cursor-paginated responses
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
--status=<option> Filter by template status
<options: APPROVED|PENDING|REJECTED|PAUSED|IN_APPEAL|DISABLED>
DESCRIPTION
List WhatsApp templates for a number (cursor pagination)See code: src/commands/whatsapp/templates/list.ts
kapso whatsapp templates new
Create a WhatsApp template for a number
USAGE
$ kapso whatsapp templates new [--input <value>] [--output json|human] [--phone-number <value>] [--phone-number-id
<value>] [--project <value>] [--stdin]
FLAGS
--input=<value> Path to a JSON payload file
--output=<option> [default: json] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
--stdin Read the JSON payload from stdin
DESCRIPTION
Create a WhatsApp template for a numberSee code: src/commands/whatsapp/templates/new.ts
kapso whatsapp threads pass
Pass a WhatsApp thread to another app role
USAGE
$ kapso whatsapp threads pass --target-role escalation|ai_agent|customer_service|marketing|utility|ctwa [--metadata
<value>] [--output json|human] [--phone-number <value>] [--phone-number-id <value>] [--project <value>] [--recipient
<value>] [--to <value>]
FLAGS
--metadata=<value> Context passed to the receiving app (up to 2,000 characters)
--output=<option> [default: json] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
--recipient=<value> Recipient business-scoped user ID (BSUID)
--target-role=<option> (required) Role receiving control (must be enabled on the account)
<options: escalation|ai_agent|customer_service|marketing|utility|ctwa>
--to=<value> Recipient phone number
DESCRIPTION
Pass a WhatsApp thread to another app roleSee code: src/commands/whatsapp/threads/pass.ts
kapso whatsapp threads release
Release a WhatsApp thread to Meta routing
USAGE
$ kapso whatsapp threads release [--metadata <value>] [--output json|human] [--phone-number <value>] [--phone-number-id
<value>] [--project <value>] [--recipient <value>] [--to <value>]
FLAGS
--metadata=<value> Context passed to the receiving app (up to 2,000 characters)
--output=<option> [default: json] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
--recipient=<value> Recipient business-scoped user ID (BSUID)
--to=<value> Recipient phone number
DESCRIPTION
Release a WhatsApp thread to Meta routingSee code: src/commands/whatsapp/threads/release.ts
kapso whatsapp threads take
Take control of a WhatsApp thread (requires escalation app role)
USAGE
$ kapso whatsapp threads take [--metadata <value>] [--output json|human] [--phone-number <value>] [--phone-number-id
<value>] [--project <value>] [--recipient <value>] [--to <value>]
FLAGS
--metadata=<value> Context passed to the receiving app (up to 2,000 characters)
--output=<option> [default: json] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
--recipient=<value> Recipient business-scoped user ID (BSUID)
--to=<value> Recipient phone number
DESCRIPTION
Take control of a WhatsApp thread (requires escalation app role)See code: src/commands/whatsapp/threads/take.ts
kapso whatsapp webhooks delete WEBHOOKID
Delete a WhatsApp webhook for a number
USAGE
$ kapso whatsapp webhooks delete WEBHOOKID [--output json|human] [--phone-number <value>] [--phone-number-id <value>]
[--project <value>]
ARGUMENTS
WEBHOOKID Webhook ID
FLAGS
--output=<option> [default: human] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
DESCRIPTION
Delete a WhatsApp webhook for a numberSee code: src/commands/whatsapp/webhooks/delete.ts
kapso whatsapp webhooks get WEBHOOKID
Get a WhatsApp webhook by ID
USAGE
$ kapso whatsapp webhooks get WEBHOOKID [--output json|human] [--phone-number <value>] [--phone-number-id <value>]
[--project <value>]
ARGUMENTS
WEBHOOKID Webhook ID
FLAGS
--output=<option> [default: json] Output format
<options: json|human>
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
DESCRIPTION
Get a WhatsApp webhook by IDSee code: src/commands/whatsapp/webhooks/get.ts
kapso whatsapp webhooks list
List WhatsApp webhooks for a number
USAGE
$ kapso whatsapp webhooks list [--active] [--inactive] [--kind kapso|meta] [--output json|human] [--page <value>]
[--per-page <value>] [--phone-number <value>] [--phone-number-id <value>] [--project <value>] [--url-contains
<value>]
FLAGS
--active Only include active webhooks
--inactive Only include inactive webhooks
--kind=<option> Filter by webhook kind
<options: kapso|meta>
--output=<option> [default: json] Output format
<options: json|human>
--page=<value> Page number
--per-page=<value> Results per page
--phone-number=<value> WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value> WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use
"--phone-number".
--project=<value> Project ID override
--url-contains=<value> Filter by URL substring
DESCRIPTION
List WhatsApp webhooks for a numberSee code: src/commands/whatsapp/webhooks/list.ts
kapso whatsapp webhooks new
Create a WhatsApp webhook for a number
USAGE
$ kapso whatsapp webhooks new --url <value> [--active] [--buffer-enabled] [--buffer-window-seconds <value>] [--event
whatsapp.message.received|whatsapp.message.sent|whatsapp.message.delivered|whatsapp.message.read|whatsapp.message.fa
iled|whatsapp.conversation.created|whatsapp.conversation.ended|whatsapp.conversation.inactive|whatsapp.contact.ident
ity_changed|whatsapp.contact.marketing_preference_changed|whatsapp.meta_business_agent.handover|whatsapp.thread.owne
rship_changed|whatsapp.thread.standby|workflow.execution.handoff|workflow.execution.failed...] [--header <value>...]
[--inactive] [--inactivity-minutes <value>] [--kind kapso|meta] [--max-buffer-size <value>] [--output json|human]
[--payload-version v1|v2] [--phone-number <value>] [--phone-number-id <value>] [--project <value>] [--secret-key
<value>]
FLAGS
--active
Create the webhook as active
--[no-]buffer-enabled
Enable buffering for whatsapp.message.received
--buffer-window-seconds=<value>
Buffer window in seconds (requires --buffer-enabled)
--event=<option>...
Webhook event to subscribe to
<options: whatsapp.message.received|whatsapp.message.sent|whatsapp.message.delivered|whatsapp.message.read|whatsapp.
message.failed|whatsapp.conversation.created|whatsapp.conversation.ended|whatsapp.conversation.inactive|whatsapp.con
tact.identity_changed|whatsapp.contact.marketing_preference_changed|whatsapp.meta_business_agent.handover|whatsapp.t
hread.ownership_changed|whatsapp.thread.standby|workflow.execution.handoff|workflow.execution.failed>
--header=<value>...
Custom header in Name=value format
--inactive
Create the webhook as inactive
--inactivity-minutes=<value>
Minutes before sending whatsapp.conversation.inactive
--kind=<option>
Webhook kind
<options: kapso|meta>
--max-buffer-size=<value>
Maximum buffered events before flush (requires --buffer-enabled)
--output=<option>
[default: human] Output format
<options: json|human>
--payload-version=<option>
Webhook payload version
<options: v1|v2>
--phone-number=<value>
WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value>
WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use "--phone-number".
--project=<value>
Project ID override
--secret-key=<value>
Webhook secret key override
--url=<value>
(required) Webhook destination URL
DESCRIPTION
Create a WhatsApp webhook for a numberSee code: src/commands/whatsapp/webhooks/new.ts
kapso whatsapp webhooks update WEBHOOKID
Update a WhatsApp webhook for a number
USAGE
$ kapso whatsapp webhooks update WEBHOOKID [--active] [--buffer-enabled] [--buffer-window-seconds <value>] [--clear-headers]
[--event whatsapp.message.received|whatsapp.message.sent|whatsapp.message.delivered|whatsapp.message.read|whatsapp.m
essage.failed|whatsapp.conversation.created|whatsapp.conversation.ended|whatsapp.conversation.inactive|whatsapp.cont
act.identity_changed|whatsapp.contact.marketing_preference_changed|whatsapp.meta_business_agent.handover|whatsapp.th
read.ownership_changed|whatsapp.thread.standby|workflow.execution.handoff|workflow.execution.failed...] [--header
<value>...] [--inactive] [--inactivity-minutes <value>] [--kind kapso|meta] [--max-buffer-size <value>] [--output
json|human] [--payload-version v1|v2] [--phone-number <value>] [--phone-number-id <value>] [--project <value>]
[--secret-key <value>] [--url <value>]
ARGUMENTS
WEBHOOKID Webhook ID
FLAGS
--active
Set the webhook to active
--[no-]buffer-enabled
Enable buffering for whatsapp.message.received
--buffer-window-seconds=<value>
Buffer window in seconds (requires --buffer-enabled)
--clear-headers
Replace custom headers with an empty object
--event=<option>...
Webhook event to subscribe to
<options: whatsapp.message.received|whatsapp.message.sent|whatsapp.message.delivered|whatsapp.message.read|whatsapp.
message.failed|whatsapp.conversation.created|whatsapp.conversation.ended|whatsapp.conversation.inactive|whatsapp.con
tact.identity_changed|whatsapp.contact.marketing_preference_changed|whatsapp.meta_business_agent.handover|whatsapp.t
hread.ownership_changed|whatsapp.thread.standby|workflow.execution.handoff|workflow.execution.failed>
--header=<value>...
Custom header in Name=value format
--inactive
Set the webhook to inactive
--inactivity-minutes=<value>
Minutes before sending whatsapp.conversation.inactive
--kind=<option>
Webhook kind
<options: kapso|meta>
--max-buffer-size=<value>
Maximum buffered events before flush (requires --buffer-enabled)
--output=<option>
[default: human] Output format
<options: json|human>
--payload-version=<option>
Webhook payload version
<options: v1|v2>
--phone-number=<value>
WhatsApp display phone number (resolved to a phone number ID)
--phone-number-id=<value>
WhatsApp phone number ID (Meta internal ID). If you have the real number instead, use "--phone-number".
--project=<value>
Project ID override
--secret-key=<value>
Webhook secret key override
--url=<value>
Webhook destination URL
DESCRIPTION
Update a WhatsApp webhook for a numberSee code: src/commands/whatsapp/webhooks/update.ts
