wapi.
CLI

Commands

Every API operation has a command, and a guard fails CI when one does not.

All 57 operations have a command. The table below is generated from the CLI's coverage table joined against the route contract, so it cannot describe a command that does not exist, and a new endpoint appears here as soon as it is covered.

Two guards keep that true: ops/check-cli-in-sync.mjs checks both directions — every operation is claimed, and every claimed command resolves in the real command tree — and compat/cli.test.ts runs the compiled binary against a live stack, because a coverage table can say groups leave without that command going anywhere near the leave endpoint.

Selecting a session

Session-scoped commands act on the session you pinned:

wapi use 3                    # pin it
wapi send --to +51... --text "hi"
wapi groups list --session 5  # or override per call

Account-scoped commands take a session id as a positional argument instead (wapi sessions connect 3), because they act on a session rather than through it.

The escape hatch

wapi api GET /api/status
wapi api POST /api/send-message --data '{"to":"+51...","text":"hi"}'

Reaches anything without a command yet, attaching the right credential by reading the route's declared scope. It deliberately counts for nothing in the coverage table — if the escape hatch counted, the guard would pass on day one and forever, and there would be no pressure to build the surface beside it.

Every command

CommandMethodPathCredential
wapi audit getGET/api/audit-logs/{auditLog}PAT
wapi audit listGET/api/audit-logsPAT
wapi contacts blockPOST/api/contacts/{contactPhoneNumber}/blocksession key
wapi contacts getGET/api/contacts/{contactPhoneNumber}session key
wapi contacts listGET/api/contactssession key
wapi contacts pictureGET/api/contacts/{contactPhoneNumber}/picturesession key
wapi contacts savePUT/api/contactssession key
wapi contacts unblockPOST/api/contacts/{contactPhoneNumber}/unblocksession key
wapi dispatchesGET/api/dispatchessession key
wapi groups by-inviteGET/api/groups/invite/{inviteCode}session key
wapi groups createPOST/api/groupssession key
wapi groups invite-linkGET/api/groups/{groupJid}/invite-linksession key
wapi groups joinPOST/api/groups/invite/acceptsession key
wapi groups leavePOST/api/groups/{groupId}/leavesession key
wapi groups listGET/api/groupssession key
wapi groups metadataGET/api/groups/{groupJid}/metadatasession key
wapi groups participants addPOST/api/groups/{groupJid}/participants/addsession key
wapi groups participants listGET/api/groups/{groupJid}/participantssession key
wapi groups participants removePOST/api/groups/{groupJid}/participants/removesession key
wapi groups participants updatePUT/api/groups/{groupId}/participants/updatesession key
wapi groups pictureGET/api/groups/{groupJid}/picturesession key
wapi groups settingsPUT/api/groups/{groupJid}/settingssession key
wapi lid from-phoneGET/api/lid-from-pn/{pn}session key
wapi lid to-phoneGET/api/pn-from-lid/{lid}session key
wapi media decryptPOST/api/decrypt-mediasession key
wapi media uploadPOST/api/uploadsession key
wapi messages deleteDELETE/api/messages/{msgId}session key
wapi messages editPUT/api/messages/{msgId}session key
wapi messages infoGET/api/messages/{msgId}/infosession key
wapi messages resendPOST/api/messages/{message}/resendsession key
wapi messages sendPOST/api/send-messagesession key
wapi on-whatsappGET/api/on-whatsapp/{contact_identifier}session key
wapi presencePOST/api/send-presence-updatesession key
wapi reactPOST/api/messages/reactsession key
wapi readPOST/api/messages/readsession key
wapi sandbox createPOST/api/sandbox/sessionsPAT
wapi sandbox inboundPOST/api/sandbox/inboundsession key
wapi sandbox scanPOST/api/sandbox/scansession key
wapi sandbox threadGET/api/sandbox/threadsession key
wapi sessions connectPOST/api/whatsapp-sessions/{whatsappSession}/connectPAT
wapi sessions createPOST/api/whatsapp-sessionsPAT
wapi sessions deleteDELETE/api/whatsapp-sessions/{whatsappSession}PAT
wapi sessions disconnectPOST/api/whatsapp-sessions/{whatsappSession}/disconnectPAT
wapi sessions getGET/api/whatsapp-sessions/{whatsappSession}PAT
wapi sessions listGET/api/whatsapp-sessionsPAT
wapi sessions logs activityGET/api/whatsapp-sessions/{whatsappSession}/session-logsPAT
wapi sessions logs messagesGET/api/whatsapp-sessions/{whatsappSession}/message-logsPAT
wapi sessions qrGET/api/whatsapp-sessions/{whatsappSession}/qrcodePAT
wapi sessions regenerate-keyPOST/api/whatsapp-sessions/{whatsappSession}/regenerate-keyPAT
wapi sessions restartPOST/api/whatsapp-sessions/{whatsappSession}/restartPAT
wapi sessions updatePUT/api/whatsapp-sessions/{whatsappSession}PAT
wapi statusGET/api/statussession key
wapi tokens createPOST/api/tokensPAT
wapi tokens listGET/api/tokensPAT
wapi tokens revokeDELETE/api/tokens/{token}PAT
wapi userGET/api/usersession key
wapi usernameGET/api/fetch-username/{contact_identifier}session key

57 commands, generated from the CLI’s coverage table.

On this page