Боты

Бизнес-номера WhatsApp через Cloud API Meta: токены, сообщения, одобренные шаблоны и вебхуки.

Бизнес-номера WhatsApp через Cloud API Meta: токены, сообщения, одобренные шаблоны и вебхуки.

Общие параметры

ПараметрНазначение
-V, --versionoutput the version number.
-v, --verbosemore detail in what is shown: -v ids, -vv everything we know. Default: 0.
--jsonmachine-readable output: one JSON value on stdout; --json=id,text keeps only those fields.
--jsonlmachine-readable output: one JSON object per line, for streaming and jq.
--quietdiagnostics off; a failure is still said.
--tracethe connection's own log lines on stderr — never message content.
--debugon a failure, its whole record — cause and stack — in place of the short line.
--timeout <duration>give up on the whole command after this — 30s, 2m, 500ms.
--offlineanswer from what was recorded and never connect; fails if nothing was.
--no-inputnever prompt or open interactive login; piped input remains available.
--max-input-bytes <bytes>maximum buffered input bytes (default: 16777216).
--max-output-bytes <bytes>maximum machine output bytes (default: 4194304; 0 disables).
--brieffound messages as reference, title, time, sender and excerpt only.
--fullfound messages with their whole text and every provider field.
--dry-runpreview parsed arguments and permissions before running the action.
--yesgo ahead without the question an ask level puts before a write.
--recordkeep this run — ids and timings, never message content.
--no-recorddo not keep it, whatever the configuration says.

Команды

wa bot

a WhatsApp bot, through the official Bot API and a bot token — not your personal account

wa bot auth

the bot token this profile uses

wa bot auth set

check a bot token with WhatsApp, then keep it — typed at a hidden prompt or piped on stdin

Changes something on this computer only.

wa bot auth set [options]
ПараметрНазначение
--secret <name>keep this secret instead of the token, the same way: app-secret (the Meta app's secret, from App settings → Basic; checks each webhook delivery); verify-token (a string you choose and type in the App Dashboard's webhook setup too; answers Meta's handshake).

wa bot auth show

where this profile's bot token comes from, and which bot it is

wa bot auth show

wa bot auth remove

forget this profile's bot token

Changes something on this computer only.

wa bot auth remove

wa bot list

every name on this machine that has a bot token; --check asks WhatsApp which bot each is

wa bot list [query] [options]
АргументОбязательностьНазначение
queryoptionalfield:value terms that narrow the list — the fields are below.
ПараметрНазначение
--checkask the messenger who each bot is, with its token.

wa bot chats

the chats this bot is in — WhatsApp gives a bot no list of them, so list shows the ones it has seen

wa bot chats list

chats this bot has seen on this machine — not a complete list from WhatsApp

wa bot chats list [query]
АргументОбязательностьНазначение
queryoptionalfield:value terms that narrow the list — the fields are below.

wa bot chats show

one chat from WhatsApp, and remember it

wa bot chats show <chat>
АргументОбязательностьНазначение
chatrequireda chat id, user: for a person, or the title of a chat this bot has seen.

wa bot chats leave

take the bot out of a chat; only an admin of the chat can bring it back

Changes something in WhatsApp.

wa bot chats leave <chat>
АргументОбязательностьНазначение
chatrequireda chat id, or the title of a chat this bot has seen.

wa bot chats action

show what the bot is doing in a chat — typing, sending a photo — for a few seconds

Changes something in WhatsApp.

wa bot chats action <chat> <action>
АргументОбязательностьНазначение
chatrequireda chat id, user: for a person, or the title of a chat this bot has seen.
actionrequiredwhat the chat sees. One of: typing, photo, video, voice, file.

wa bot chats admins

the admins of a chat the bot is an admin in

wa bot chats admins list

the chat's admins and what each may do

wa bot chats admins list <chat> [query]
АргументОбязательностьНазначение
chatrequireda chat id, or the title of a chat this bot has seen.
queryoptionalfield:value terms; this list filters by none yet.

wa bot chats admins add

make a member an admin with these rights

Changes something in WhatsApp.

wa bot chats admins add <chat> <person> [options]
АргументОбязательностьНазначение
chatrequireda chat id, or the title of a chat this bot has seen.
personrequiredthe person's user id.
ПараметрНазначение
--can <rights>what they may do, comma-separated: read, members, admins, info, pin, link, post, edit, delete.
--title <title>the title shown beside their name.

wa bot chats admins remove

take an admin's rights back; they stay a member

Changes something in WhatsApp.

wa bot chats admins remove <chat> <person>
АргументОбязательностьНазначение
chatrequireda chat id, or the title of a chat this bot has seen.
personrequiredthe person's user id.

wa bot chats members

the people in a chat the bot is an admin in

wa bot chats members remove

take a person out of a chat; their messages stay

Changes something in WhatsApp.

wa bot chats members remove <chat> <person> [options]
АргументОбязательностьНазначение
chatrequireda chat id, or the title of a chat this bot has seen.
personrequiredthe person's user id.
ПараметрНазначение
--blockalso keep them from coming back by the chat's link.

wa bot chats rules

a chat's moderation rules for this bot, kept on this machine

wa bot chats rules show

the chat's rules; the defaults, marked not saved, if it has none yet

wa bot chats rules show <chat>
АргументОбязательностьНазначение
chatrequireda group's id, or the title of a group this bot has seen.

wa bot chats rules set

change one rule — trusted, blocked, blockedNames, links, invites, forwards, blockedPeople, flood.messages, flood.minutes, flood.action, newAccount.days, newAccount.action, consent.delete, consent.remove

Changes something on this computer only.

wa bot chats rules set <chat> <key> <value>
АргументОбязательностьНазначение
chatrequireda group's id, or the title of a group this bot has seen.
keyrequiredthe rule.
valuerequiredits new value.

wa bot chats rules unset

put one rule back to its default

Changes something on this computer only.

wa bot chats rules unset <chat> <key>
АргументОбязательностьНазначение
chatrequireda group's id, or the title of a group this bot has seen.
keyrequiredthe rule.

wa bot chats moderate

judge a group's new messages and joins by its rules, and act as they allow — as the bot

Changes something in WhatsApp.

wa bot chats moderate <chat> [options]
АргументОбязательностьНазначение
chatrequireda group's id, or the title of a group this bot has seen.
ПараметрНазначение
--since-time <time>judge what came after this ISO 8601 time, or 2h / 1d ago; the saved point stays.
--dry-runjudge and plan; do nothing.
--allow-dangerousyes to every action whose level in the group's rules is ask.
--no-blockremove without banning; by default a removed person cannot come back by the link.
--max-actions <n>at most this many actions in one run; 10 if not given.

wa bot messages

the messages in the chats this bot is in

wa bot messages send

send a message as the bot; without [text], the text is read from stdin

Changes something in WhatsApp.

wa bot messages send <chat> [text] [options]
АргументОбязательностьНазначение
chatrequireda chat id, user: for a person, or the title of a chat this bot has seen.
textoptionalthe message.
ПараметрНазначение
--reply-to <message>answer this message, by its id in the same chat.
--silentdeliver without a notification.
--mdread this messenger's Markdown; see its formatting guide for supported syntax.
--htmlthe text is HTML: , , , .
--file <file>attach a file; the text becomes its caption.
--photo <file>attach a .jpg, .png or .webp as a photo; the text becomes its caption.
--as-filesend the --file as a file to download, a video included.
--voice <file>send an Ogg Opus file as a voice message, alone, with no text.
--allow-any-filesend a file even from credential folders or this CLI's own folders.

wa bot messages list

the latest messages in a chat; where WhatsApp gives a bot no history, and with --offline, the ones this bot has seen on this machine

wa bot messages list <chat> [query] [options]
АргументОбязательностьНазначение
chatrequireda chat id, user: for a person, or the title of a chat this bot has seen.
queryoptionalfield:value terms that narrow the list — the fields are below.
ПараметрНазначение
--limit <n>how many, the newest.

wa bot messages show

one message by its id in a chat

wa bot messages show <chat> <message>
АргументОбязательностьНазначение
chatrequireda chat id, user: for a person, or the title of a chat this bot has seen.
messagerequiredmessage id.

wa bot messages edit

replace the text of a message the bot sent

Changes something in WhatsApp.

wa bot messages edit <chat> <message> <text> [options]
АргументОбязательностьНазначение
chatrequireda chat id, user: for a person, or the title of a chat this bot has seen.
messagerequiredmessage id.
textrequiredthe new text.
ПараметрНазначение
--mdread this messenger's Markdown; see its formatting guide for supported syntax.
--htmlthe text is HTML: , , , .

wa bot messages delete

delete messages in a chat the bot can delete in; it cannot be undone

Changes something in WhatsApp.

wa bot messages delete <chat> <messages> [options]
АргументОбязательностьНазначение
chatrequireda chat id, user: for a person, or the title of a chat this bot has seen.
messagesrequiredmessage ids.
ПараметрНазначение
--allow-dangerousdelete without asking.

wa bot messages pin

pin a message in a chat; quietly unless --notify

Changes something in WhatsApp.

wa bot messages pin <chat> <message> [options]
АргументОбязательностьНазначение
chatrequireda chat id, user: for a person, or the title of a chat this bot has seen.
messagerequiredmessage id.
ПараметрНазначение
--notifytell the chat's members.

wa bot messages unpin

unpin a message in a chat

Changes something in WhatsApp.

wa bot messages unpin <chat> <message>
АргументОбязательностьНазначение
chatrequireda chat id, user: for a person, or the title of a chat this bot has seen.
messagerequiredmessage id.

wa bot messages between

what two or more people wrote in the chats they have all written in — from the local copy, grouped by chat, oldest first; --limit counts per chat. Common chats are the ones this copy saw each of them write in, not a member list from WhatsApp

wa bot messages between <people> [options]
АргументОбязательностьНазначение
peoplerequiredtwo or more people — an id, @username or part of a name each.
ПараметрНазначение
--all-botsalso read every other bot's copy on this machine that read_other_bots allows.
--bots <profiles>also read these bots' copies, comma separated — each allowed by read_other_bots.
--limit <n>how many of the latest messages from each chat.

find what this bot's local copy holds, by text

wa bot search messages

search the messages this bot has read, sent or received on this machine — the local copy only, best match first; a Lucene query: every word must appear; "a phrase", -word, a OR b, from: chat: date: has:; by text, by --from, or both

wa bot search messages [query] [options]
АргументОбязательностьНазначение
queryoptionalthe words to find.
ПараметрНазначение
--all-botsalso read every other bot's copy on this machine that read_other_bots allows.
--bots <profiles>also read these bots' copies, comma separated — each allowed by read_other_bots.
--limit <n>how many.
--page <n>which page, starting at 1.
--newestnewest first instead of best first.
--from <who>only what this person wrote — an id, @username or part of a name; repeat it for any of several.

wa bot recipients

the chats this bot may write to; with no list, every chat — clear removes the list

wa bot recipients list

the chats on the list, or nothing when there is no list

wa bot recipients list [query]
АргументОбязательностьНазначение
queryoptionalfield:value terms that narrow the list — the fields are below.

wa bot recipients add

allow a chat: its id, user:<id>, or the title of a chat this bot has seen

Changes something on this computer only.

wa bot recipients add <chat>
АргументОбязательностьНазначение
chatrequireda chat id, user:<id>, or the title of a chat this bot has seen.

wa bot recipients remove

take a chat off the list

Changes something on this computer only.

wa bot recipients remove <chat>
АргументОбязательностьНазначение
chatrequiredthe chat id, or the title as the list shows it.

wa bot recipients clear

remove the list: the bot may write to any chat again

Changes something on this computer only.

wa bot recipients clear

wa bot sends

what this bot sent, edited and deleted from this machine — ids and outcomes, never text

wa bot sends list

every send, edit and delete this bot made from this machine, with its outcome

wa bot sends list [query]
АргументОбязательностьНазначение
queryoptionalfield:value terms that narrow the list — the fields are below.

wa bot watch

print new messages as they arrive and keep them, until Ctrl-C or --timeout (either ends it normally)

Changes something in WhatsApp.

wa bot watch [options]
ПараметрНазначение
--eventsalso edits, deletions, buttons pressed and people coming and going; every line names its event.
--types <types>only these update types, comma-separated, in the messenger's words.
--public-url <url>receive by webhook at your tunnel's https address instead of polling, e.g. https://.ts.net.
--port <port>the local port behind the tunnel for --public-url (default 8766).

wa bot callbacks

answers to the buttons people press under the bot's messages

wa bot callbacks answer

answer a pressed button by its callback id: --notification shows the person a one-time note, --text replaces the message the button was on

Changes something in WhatsApp.

wa bot callbacks answer <callback> [options]
АргументОбязательностьНазначение
callbackrequiredthe callback id bot watch printed.
ПараметрНазначение
--text <text>the message's new text.
--notification <text>a note only the person who pressed sees.

wa bot commands

the bot's command menu — what people see after /

wa bot commands list

the commands in the menu now

wa bot commands list [query]
АргументОбязательностьНазначение
queryoptionalfield:value terms; this list filters by none yet.

wa bot commands set

replace the whole menu: each command as name=description, e.g. start=Begin

Changes something in WhatsApp.

wa bot commands set <commands>
АргументОбязательностьНазначение
commandsrequiredname=description, one per command.

wa bot commands clear

empty the menu

Changes something in WhatsApp.

wa bot commands clear

wa bot webhooks

where the messenger pushes this bot's updates — while one is set, bot watch gets nothing

wa bot webhooks list

the webhooks this bot has

wa bot webhooks list [query]
АргументОбязательностьНазначение
queryoptionalfield:value terms; this list filters by none yet.

wa bot webhooks set

send this bot's updates to an HTTPS address; refused while another is set

Changes something in WhatsApp.

wa bot webhooks set <url> [options]
АргументОбязательностьНазначение
urlrequiredthe HTTPS address.
ПараметрНазначение
--types <types>only these update types, comma-separated, in the messenger's words.
--secret-stdina secret the messenger sends back with each update — asked for, or read from a pipe.

wa bot webhooks delete

stop sending updates to this address; with none left, bot watch works again

Changes something in WhatsApp.

wa bot webhooks delete <url>
АргументОбязательностьНазначение
urlrequiredthe address.

wa bot contacts

people this bot has seen write — from the local copy on this machine, never asking WhatsApp unless told to

wa bot contacts show

one person: the chats they wrote in (with their last message there) and the latest messages of their private chat with the bot

wa bot contacts show <who> [options]
АргументОбязательностьНазначение
whorequiredan id, @username or part of a name.
ПараметрНазначение
--all-botsalso read every other bot's copy on this machine that read_other_bots allows.
--bots <profiles>also read these bots' copies, comma separated — each allowed by read_other_bots.
--limit <n>how many messages from the private chat.
--sync-firstread the private chat with them again from the messenger first — one request.

wa bot me

the bot this profile's token belongs to: id, name and username

wa bot me

wa bot mcp

serve this bot to an agent over MCP, on stdin and stdout — claude mcp add sales-bot -- wa sales bot mcp

wa bot mcp config

print the mcpServers entry for Claude Desktop, Cursor and others, with full paths; writes nothing

wa bot mcp config

wa bot api

every Cloud API operation wa keeps, generated from Meta's OpenAPI file

wa bot api [options]
ПараметрНазначение
--store-token <profile>keep a returned authentication token only in this bot profile's OS keyring; never print it.
--allow-any-fileread @path files even from credential folders or this CLI's own folders.

wa bot api add-phone-numbers

Add Phone Number to Business Account — write (POST /{Version}/{Business-ID}/add_phone_numbers)

Changes something in WhatsApp.

wa bot api add-phone-numbers [options]
ПараметрНазначение
--business-id <value>Your WhatsApp Business Account ID. This ID can be found in your Business Manager.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api get-business-portfolio

Get Business Portfolio (Specific Fields) — read (GET /{Version}/{Business-ID})

wa bot api get-business-portfolio [options]
ПараметрНазначение
--business-id <value>Business-ID.
--fields <value>fields.

wa bot api get-owned-whats-app-business-accounts

Get Owned WhatsApp Business Accounts — read (GET /{Version}/{Business-ID}/owned_whatsapp_business_accounts)

wa bot api get-owned-whats-app-business-accounts [options]
ПараметрНазначение
--business-id <value>Your Business ID. This ID represents the business portfolio that owns the.
--business-type <value>Filter accounts by business type. Can specify multiple types as comma-separated values.
--after <value>Cursor for forward pagination. Use the cursor from the previous response.
--first <value>Number of results to return in forward pagination. Maximum value is 100.
--before <value>Cursor for backward pagination. Use the cursor from the previous response.
--last <value>Number of results to return in backward pagination. Maximum value is 100.
--find <value>Find a specific WhatsApp Business Account by ID within the owned accounts.

wa bot api get-blocked-users

Get blocked users — read (GET /{Version}/{Phone-Number-ID}/block_users)

wa bot api get-blocked-users [options]
ПараметрНазначение
--phone-number-id <value>Phone-Number-ID.

wa bot api block-users

Block user(s) — write (POST /{Version}/{Phone-Number-ID}/block_users)

Changes something in WhatsApp.

wa bot api block-users [options]
ПараметрНазначение
--phone-number-id <value>Phone-Number-ID.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api unblock-users

Unblock user(s) — write (DELETE /{Version}/{Phone-Number-ID}/block_users)

Changes something in WhatsApp.

wa bot api unblock-users [options]
ПараметрНазначение
--phone-number-id <value>Phone-Number-ID.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api check-call-permissions

Check Call Permissions — read (GET /{Version}/{Phone-Number-ID}/call_permissions)

wa bot api check-call-permissions [options]
ПараметрНазначение
--phone-number-id <value>The ID of the phone number registered with your WhatsApp Business Account.
--user-wa-id <value>The WhatsApp ID of the user you want to check call permissions for.

wa bot api manage-calls

Manage Calls — write (POST /{Version}/{Phone-Number-ID}/calls)

Changes something in WhatsApp.

wa bot api manage-calls [options]
ПараметрНазначение
--phone-number-id <value>The ID of the phone number registered with your WhatsApp Business Account.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api send-marketing-message

Send Marketing Template Message — write (POST /{Version}/{Phone-Number-ID}/marketing_messages)

Changes something in WhatsApp.

wa bot api send-marketing-message [options]
ПараметрНазначение
--phone-number-id <value>WhatsApp Business Phone Number ID.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api upload-media

Upload Image — write (POST /{Version}/{Phone-Number-ID}/media)

Changes something in WhatsApp.

wa bot api upload-media [options]
ПараметрНазначение
--phone-number-id <value>Phone-Number-ID.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api send-message

Send Message. — write (POST /{Version}/{Phone-Number-ID}/messages)

Changes something in WhatsApp.

wa bot api send-message [options]
ПараметрНазначение
--phone-number-id <value>Phone-Number-ID.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api list-qr-codes

List All Message QR Codes — read (GET /{Version}/{Phone-Number-ID}/message_qrdls)

wa bot api list-qr-codes [options]
ПараметрНазначение
--phone-number-id <value>The WhatsApp Business Account phone number ID for which to list QR codes.
--fields <value>Comma-separated list of fields to include in the response. Available fields:.
--code <value>Filter results to a specific QR code by its unique identifier.
--limit <value>Maximum number of QR codes to return in a single response.
--after <value>Cursor for pagination. Use this to get the next page of results.
--before <value>Cursor for pagination. Use this to get the previous page of results.

wa bot api create-or-update-qr-code

Create or Update Message QR Code — write (POST /{Version}/{Phone-Number-ID}/message_qrdls)

Changes something in WhatsApp.

wa bot api create-or-update-qr-code [options]
ПараметрНазначение
--phone-number-id <value>The WhatsApp Business Account phone number ID for which to create or update the QR code.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api get-qr-code

Get Individual Message QR Code — read (GET /{Version}/{Phone-Number-ID}/message_qrdls/{QR-Code-ID})

wa bot api get-qr-code [options]
ПараметрНазначение
--phone-number-id <value>The WhatsApp Business Account phone number ID that owns the QR code.
--qr-code-id <value>The unique 14-character identifier of the QR code to retrieve.
--fields <value>Comma-separated list of fields to include in the response. Available fields:.

wa bot api delete-qr-code

Delete Individual Message QR Code — destructive (DELETE /{Version}/{Phone-Number-ID}/message_qrdls/{QR-Code-ID})

Changes something in WhatsApp.

wa bot api delete-qr-code [options]
ПараметрНазначение
--phone-number-id <value>The WhatsApp Business Account phone number ID that owns the QR code to be deleted.
--qr-code-id <value>The unique 14-character identifier of the QR code to delete.

wa bot api send-encrypted-message

Send Encrypted Message — write (POST /{Version}/{Phone-Number-ID}/messages_encrypted)

Changes something in WhatsApp.

wa bot api send-encrypted-message [options]
ПараметрНазначение
--phone-number-id <value>The ID of the phone number used to send the message. Retrieved from the WhatsApp Business Account.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api get-official-business-account-status

Get Official Business Account Status — read (GET /{Version}/{Phone-Number-ID}/official_business_account)

wa bot api get-official-business-account-status [options]
ПараметрНазначение
--phone-number-id <value>Your WhatsApp Business phone number ID. This ID represents the phone number.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.

wa bot api request-official-business-account

Update Official Business Account Status — write (POST /{Version}/{Phone-Number-ID}/official_business_account)

Changes something in WhatsApp.

wa bot api request-official-business-account [options]
ПараметрНазначение
--phone-number-id <value>Your WhatsApp Business phone number ID. This ID represents the phone number.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api get-phone-number

Retrieve WhatsApp Business Phone Number Information — read (GET /{Version}/{Phone-Number-ID})

wa bot api get-phone-number [options]
ПараметрНазначение
--phone-number-id <value>Your WhatsApp Business Account phone number ID (CSID). This unique identifier is assigned when you.
--fields <value>Comma-separated list of additional fields to include in the response. If not specified,.

wa bot api update-phone-number

Update WhatsApp Business Account Phone Number Status and Configuration — write (POST /{Version}/{Phone-Number-ID})

Changes something in WhatsApp.

wa bot api update-phone-number [options]
ПараметрНазначение
--phone-number-id <value>Your WhatsApp Business Account phone number ID (CSID). This ID is provided when you.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api deregister-phone-number

Deregister WhatsApp Business Phone Number — destructive (POST /{Version}/{Phone-Number-ID}/deregister)

Changes something in WhatsApp.

wa bot api deregister-phone-number [options]
ПараметрНазначение
--phone-number-id <value>The ID of the phone number to deregister. This ID is provided when you register.

wa bot api get-message-history

Get WhatsApp Business Account Message History — read (GET /{Version}/{Phone-Number-ID}/message_history)

wa bot api get-message-history [options]
ПараметрНазначение
--phone-number-id <value>Your WhatsApp Business Account phone number ID. This ID is provided when you register.
--message-id <value>Filter results by specific WhatsApp message ID (WAMID). When provided,.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.
--limit <value>Maximum number of message history entries to return per page.
--after <value>Cursor for pagination. Use this to get the next page of results.
--before <value>Cursor for pagination. Use this to get the previous page of results.

wa bot api register-phone-number

Register WhatsApp Business Phone Number — destructive (POST /{Version}/{Phone-Number-ID}/register)

Changes something in WhatsApp.

wa bot api register-phone-number [options]
ПараметрНазначение
--phone-number-id <value>The ID of the phone number to register. This ID is provided when the phone number.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api request-verification-code

Request Phone Number Verification Code — write (POST /{Version}/{Phone-Number-ID}/request_code)

Changes something in WhatsApp.

wa bot api request-verification-code [options]
ПараметрНазначение
--phone-number-id <value>Your WhatsApp Business phone number ID. This ID represents the phone number.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api get-phone-number-settings

Get phone number settings — read (GET /{Version}/{Phone-Number-ID}/settings)

wa bot api get-phone-number-settings [options]
ПараметрНазначение
--phone-number-id <value>Phone-Number-ID.
--include-sip-credentials <value>Include SIP credentials in the response (requires additional permissions).

wa bot api update-phone-number-settings

Update phone number settings — write (POST /{Version}/{Phone-Number-ID}/settings)

Changes something in WhatsApp.

wa bot api update-phone-number-settings [options]
ПараметрНазначение
--phone-number-id <value>Phone-Number-ID.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api verify-phone-number-code

Verify Phone Number Verification Code — write (POST /{Version}/{Phone-Number-ID}/verify_code)

Changes something in WhatsApp.

wa bot api verify-phone-number-code [options]
ПараметрНазначение
--phone-number-id <value>The WhatsApp Business Account phone number ID that needs verification.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api get-encryption-public-key

Get Business Encryption Public Key — read (GET /{Version}/{Phone-Number-ID}/whatsapp_business_encryption)

wa bot api get-encryption-public-key [options]
ПараметрНазначение
--phone-number-id <value>Your WhatsApp Business phone number ID. This ID represents the phone number.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.

wa bot api set-encryption-public-key

Set Business Encryption Public Key — write (POST /{Version}/{Phone-Number-ID}/whatsapp_business_encryption)

Changes something in WhatsApp.

wa bot api set-encryption-public-key [options]
ПараметрНазначение
--phone-number-id <value>Your WhatsApp Business phone number ID. This ID represents the phone number.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api get-business-profile

Get WhatsApp Business Profile — read (GET /{Version}/{Phone-Number-ID}/whatsapp_business_profile)

wa bot api get-business-profile [options]
ПараметрНазначение
--phone-number-id <value>Your WhatsApp Business phone number ID. This ID represents the phone number.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.

wa bot api update-business-profile

Update WhatsApp Business Profile — write (POST /{Version}/{Phone-Number-ID}/whatsapp_business_profile)

Changes something in WhatsApp.

wa bot api update-business-profile [options]
ПараметрНазначение
--phone-number-id <value>Your WhatsApp Business phone number ID. This ID represents the phone number.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api get-commerce-settings

Get commerce settings — read (GET /{Version}/{Phone-Number-ID}/whatsapp_commerce_settings)

wa bot api get-commerce-settings [options]
ПараметрНазначение
--phone-number-id <value>Phone-Number-ID.

wa bot api set-commerce-settings

Set or update commerce settings — write (POST /{Version}/{Phone-Number-ID}/whatsapp_commerce_settings)

Changes something in WhatsApp.

wa bot api set-commerce-settings [options]
ПараметрНазначение
--phone-number-id <value>Phone-Number-ID.
--is-cart-enabled <value>is_cart_enabled.
--is-catalog-visible <value>is_catalog_visible.

wa bot api get-business-compliance-info

Get Business Compliance Information — read (GET /{Version}/{Phone-Number-ID}/business_compliance_info)

wa bot api get-business-compliance-info [options]
ПараметрНазначение
--phone-number-id <value>Your WhatsApp Business Account phone number ID. This ID can be found in your.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.

wa bot api update-business-compliance-info

Update Business Compliance Information — write (POST /{Version}/{Phone-Number-ID}/business_compliance_info)

Changes something in WhatsApp.

wa bot api update-business-compliance-info [options]
ПараметрНазначение
--phone-number-id <value>Your WhatsApp Business Account phone number ID. This ID can be found in your.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api get-media

Retrieve Media URL — read (GET /{Version}/{Media-ID})

wa bot api get-media [options]
ПараметрНазначение
--media-id <value>Media-ID.
--phone-number-id <value>Specifies that this action only be performed if the media belongs to the provided phone number.

wa bot api delete-media

Delete Media — destructive (DELETE /{Version}/{Media-ID})

Changes something in WhatsApp.

wa bot api delete-media [options]
ПараметрНазначение
--media-id <value>Media-ID.
--phone-number-id <value>Specifies that deletion of the media only be performed if the media belongs to the provided phone number.

wa bot api get-message-history-events

Get WhatsApp Message History Events — read (GET /{Version}/{Message-History-ID}/events)

wa bot api get-message-history-events [options]
ПараметрНазначение
--message-history-id <value>Your WhatsApp Business Message History ID. This ID is provided when you retrieve.
--status-filter <value>Filter results by specific delivery status. When provided,.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.
--limit <value>Maximum number of message history events to return per page.
--after <value>Cursor for pagination. Use this to get the next page of results.
--before <value>Cursor for pagination. Use this to get the previous page of results.

wa bot api get-assigned-whats-app-business-accounts

Get Assigned WhatsApp Business Accounts — read (GET /{Version}/{User-ID}/assigned_whatsapp_business_accounts)

wa bot api get-assigned-whats-app-business-accounts [options]
ПараметрНазначение
--user-id <value>The user ID for whom to retrieve assigned WhatsApp Business Accounts.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.
--limit <value>Maximum number of accounts to return per page. Default is 25, maximum is 100.
--after <value>Cursor for pagination. Use this to get the next page of results.
--before <value>Cursor for pagination. Use this to get the previous page of results.

wa bot api get-whats-app-account-number-details

Get WhatsApp Account Number Details — read (GET /{Version}/{WhatsApp-Account-Number-ID})

wa bot api get-whats-app-account-number-details [options]
ПараметрНазначение
--whats-app-account-number-id <value>Your WhatsApp Account Number ID. This ID represents the account number entity.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.

wa bot api get-assigned-users

List Assigned Users — read (GET /{Version}/{WhatsApp-Business-Account-ID}/assigned_users)

wa bot api get-assigned-users [options]
ПараметрНазначение
--whats-app-business-account-id <value>Your WhatsApp Business Account ID. This ID is provided when you create the account.
--business <value>Business ID that owns or has access to the WhatsApp Business Account.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.
--limit <value>Maximum number of assigned users to return per page. Default is 25, maximum is 100.
--after <value>Cursor for pagination. Use this to get the next page of results.
--before <value>Cursor for pagination. Use this to get the previous page of results.

wa bot api add-assigned-user

Add User to WhatsApp Business Account — write (POST /{Version}/{WhatsApp-Business-Account-ID}/assigned_users)

Changes something in WhatsApp.

wa bot api add-assigned-user [options]
ПараметрНазначение
--whats-app-business-account-id <value>Your WhatsApp Business Account ID. This ID is provided when you create the account.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api remove-assigned-user

Remove User from WhatsApp Business Account — write (DELETE /{Version}/{WhatsApp-Business-Account-ID}/assigned_users)

Changes something in WhatsApp.

wa bot api remove-assigned-user [options]
ПараметрНазначение
--whats-app-business-account-id <value>Your WhatsApp Business Account ID. This ID is provided when you create the account.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api configure-conversational-automation

Configure Conversational Automation — write (POST /{Version}/{Phone-Number-ID}/conversational_automation)

Changes something in WhatsApp.

wa bot api configure-conversational-automation [options]
ПараметрНазначение
--phone-number-id <value>Your WhatsApp Business phone number ID. This ID represents the phone number.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api get-credit-lines

Get credit lines — read (GET /{Version}/{Business-ID}/extendedcredits)

wa bot api get-credit-lines [options]
ПараметрНазначение
--business-id <value>Business-ID.

wa bot api list-phone-numbers

Get WhatsApp Business Account Phone Numbers — read (GET /{Version}/{WABA-ID}/phone_numbers)

wa bot api list-phone-numbers [options]
ПараметрНазначение
--waba-id <value>WhatsApp Business Account ID. This ID can be found in your WhatsApp Manager.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.
--filtering <value>JSON-encoded array of filter conditions. Each filter should specify field, operator, and value.
--sort <value>Sort field and direction. Format: field_name.asc or field_name.desc.
--limit <value>Maximum number of phone numbers to return per page.
--after <value>Cursor for pagination - retrieve records after this cursor.
--before <value>Cursor for pagination - retrieve records before this cursor.

wa bot api create-phone-number

Create WhatsApp Business Account Phone Number — write (POST /{Version}/{WABA-ID}/phone_numbers)

Changes something in WhatsApp.

wa bot api create-phone-number [options]
ПараметрНазначение
--waba-id <value>WhatsApp Business Account ID where the phone number will be added.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api list-schedules

Get WhatsApp Business Account Schedules — read (GET /{Version}/{WABA-ID}/schedules)

wa bot api list-schedules [options]
ПараметрНазначение
--waba-id <value>WhatsApp Business Account ID. This ID can be found in your WhatsApp Manager.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.
--filtering <value>JSON-encoded array of filter conditions. Each filter should specify field, operator, and value.
--sort <value>Sort field and direction. Format: field_name.asc or field_name.desc.
--limit <value>Maximum number of schedules to return per page.
--after <value>Cursor for pagination - retrieve records after this cursor.
--before <value>Cursor for pagination - retrieve records before this cursor.

wa bot api create-schedule

Create WhatsApp Business Account Schedule — write (POST /{Version}/{WABA-ID}/schedules)

Changes something in WhatsApp.

wa bot api create-schedule [options]
ПараметрНазначение
--waba-id <value>WhatsApp Business Account ID where the schedule will be created.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api list-subscribed-apps

Get All Subscriptions for a WABA — read (GET /{Version}/{WABA-ID}/subscribed_apps)

wa bot api list-subscribed-apps [options]
ПараметрНазначение
--waba-id <value>WhatsApp Business Account ID. This ID can be found in your WhatsApp Manager.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.

wa bot api subscribe-app

Subscribe to WABA Webhooks — write (POST /{Version}/{WABA-ID}/subscribed_apps)

Changes something in WhatsApp.

wa bot api subscribe-app [options]
ПараметрНазначение
--waba-id <value>WhatsApp Business Account ID. This ID can be found in your WhatsApp Manager.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api unsubscribe-app

Unsubscribe from WABA Webhooks — write (DELETE /{Version}/{WABA-ID}/subscribed_apps)

Changes something in WhatsApp.

wa bot api unsubscribe-app [options]
ПараметрНазначение
--waba-id <value>WhatsApp Business Account ID. This ID can be found in your WhatsApp Manager.

wa bot api get-template

Get template by ID (default fields) — read (GET /{Version}/{TEMPLATE_ID})

wa bot api get-template [options]
ПараметрНазначение
--template-id <value>TEMPLATE_ID.

wa bot api edit-template

Edit template — write (POST /{Version}/{TEMPLATE_ID})

Changes something in WhatsApp.

wa bot api edit-template [options]
ПараметрНазначение
--template-id <value>TEMPLATE_ID.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api list-templates

Get template by name (default fields) — read (GET /{Version}/{WABA-ID}/message_templates)

wa bot api list-templates [options]
ПараметрНазначение
--waba-id <value>WABA-ID.
--name <value>name.

wa bot api create-template

Create authentication template w/ OTP copy code button — write (POST /{Version}/{WABA-ID}/message_templates)

Changes something in WhatsApp.

wa bot api create-template [options]
ПараметрНазначение
--waba-id <value>WABA-ID.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api delete-template

Delete template by name — destructive (DELETE /{Version}/{WABA-ID}/message_templates)

Changes something in WhatsApp.

wa bot api delete-template [options]
ПараметрНазначение
--waba-id <value>WABA-ID.
--name <value>name.
--hsm-id <value>Template ID.

wa bot api list-activities

Get WhatsApp Business Account Activities — read (GET /{Version}/{WABA-ID}/activities)

wa bot api list-activities [options]
ПараметрНазначение
--waba-id <value>Your WhatsApp Business Account ID. This ID can be found in your WhatsApp Manager.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.
--limit <value>Maximum number of activity records to return per page. Default is 25, maximum is 100.
--after <value>Cursor for pagination. Use this to get the next page of results.
--before <value>Cursor for pagination. Use this to get the previous page of results.
--since <value>Unix timestamp or ISO 8601 date string. Only return activities that occurred after this time.
--until <value>Unix timestamp or ISO 8601 date string. Only return activities that occurred before this time.
--activity-type <value>Filter activities by type. Can be a single type or comma-separated list of types.

wa bot api get-business-account

Get WhatsApp Business Account Details — read (GET /{Version}/{WABA-ID})

wa bot api get-business-account [options]
ПараметрНазначение
--waba-id <value>Your WhatsApp Business Account ID. This ID is provided when you create the account.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.

wa bot api update-business-account

Update WhatsApp Business Account — write (POST /{Version}/{WABA-ID})

Changes something in WhatsApp.

wa bot api update-business-account [options]
ПараметрНазначение
--waba-id <value>Your WhatsApp Business Account ID. This ID is provided when you create the account.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot api get-business-bot

Get WhatsApp Business Bot Details — read (GET /{Version}/{WABA-Bot-ID})

wa bot api get-business-bot [options]
ПараметрНазначение
--waba-bot-id <value>Your WhatsApp Business Bot ID. This ID is provided when you create the bot.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.

wa bot api get-business-profile-by-id

Get WhatsApp Business Profile Details — read (GET /{Version}/{WhatsApp-Business-Profile-ID})

wa bot api get-business-profile-by-id [options]
ПараметрНазначение
--whats-app-business-profile-id <value>Your WhatsApp Business Profile ID. This ID is provided when the profile is created.
--fields <value>Comma-separated list of fields to include in the response. If not specified,.

wa bot api update-business-profile-by-id

Update WhatsApp Business Profile — write (POST /{Version}/{WhatsApp-Business-Profile-ID})

Changes something in WhatsApp.

wa bot api update-business-profile-by-id [options]
ПараметрНазначение
--whats-app-business-profile-id <value>Your WhatsApp Business Profile ID. This ID is provided when the profile is created.
--body <json>the request body as JSON; - reads it from stdin.
--body-file <path>the request body from a JSON file; - is stdin.

wa bot templates

approved messages: the only kind WhatsApp delivers 24 hours after a person wrote

wa bot templates list

the business account's templates, with status, language and category

wa bot templates list [query]
АргументОбязательностьНазначение
queryoptionalfield:value terms that narrow the list — the fields are below.

wa bot templates send

send an approved template; hello_world is pre-approved on the test number

Changes something in WhatsApp.

wa bot templates send <chat> <name> [language] [options]
АргументОбязательностьНазначение
chatrequireda phone number in digits, or user: as bot watch shows it.
namerequiredthe template's name, as bot templates list shows it.
languageoptionalthe template's language code. Default: en_US.
ПараметрНазначение
--payload <json>the values for the template's placeholders, as Meta's components array.

wa bot media

files people sent to the number

wa bot media download

save a file someone sent, by its media id; Meta's link for it lasts 5 minutes

Changes something on this computer only.

wa bot media download <media-id> [options]
АргументОбязательностьНазначение
media-idrequiredthe media id, from the attachment bot watch --jsonl printed.
ПараметрНазначение
--output <file>where to write the file.

Коды выхода

Branch on the code, not on the text: the text can change, the code does not.

CodeWhen
0it worked
2validation_error
3configuration_error
4authentication_error
5permission_error
6not_found
7confirmation_required
8rate_limited
9timeout
10network_error
11provider_error
12provider_unavailable
13invalid_response
14outcome_unknown
130cancelled
1anything else

0 and only 0 means the operation was done. 14 (outcome_unknown) means a message may have gone: repeat it only with the same --operation-id, which WhatsApp uses to drop a second copy.