POST /api/phones creates a phone in qr status. The session host leases it, stores a base64 QR image, and changes status when WhatsApp connects or disconnects.
Runtime requirement
The backend must be able to reach WhatsApp. DISABLE_WHATSAPP=true disables the session host.
Connection flow
1
Create the phone
In Phones, add an E.164 number and desk name. Phone mutations require an admin session.
2
Wait for QR
Keep the session host running until qr_code appears on the phone record.
3
Scan
Open WhatsApp → Linked Devices and scan the QR. The backend changes the status to connected.