---
name: "WhatsApp Business API integration for bot commands"
---

# Story 320: WhatsApp Business API integration for bot commands

## User Story

As a project owner, I want to interact with the bot via WhatsApp using the official WhatsApp Business Platform, so that I can manage the pipeline from WhatsApp alongside the existing Matrix support.

## Acceptance Criteria

- [ ] Webhook endpoint at /webhook/whatsapp receives incoming messages from Meta's API
- [ ] Webhook verification handshake (GET request with hub.verify_token) implemented
- [ ] Incoming messages are parsed and routed to the command dispatch (try_handle_command)
- [ ] Outbound replies sent via POST to graph.facebook.com/v21.0/{phone_number_id}/messages
- [ ] WhatsApp config in bot.toml: phone_number_id, access_token, verify_token, enabled flag
- [ ] bot.toml.example documents the WhatsApp fields
- [ ] All bot commands work (help, status, cost, git, show, delete, ambient, htop without editing)

## Out of Scope

- TBD
