Connect a number
Sign in to the portal and open your numbers screen. Add a number, give it a label you will recognise —
Sales, Support, Delivery — and a QR code appears.On the phone that owns that WhatsApp number, open WhatsApp → Settings → Linked devices → Link a device, and scan the QR on screen.The status turns to Connected within a few seconds of a successful scan. The link stays active the same way WhatsApp Web does — you do not need to keep that page open.Create an API key
Open the API Keys screen and create a key. Give it a label so you know later which server it lives on.
Find your instance_id
Every connected number has its own Each entry has an
instance_id. It is shown next to the number on your numbers screen, with a copy button.You can also list them from the API:instance_id, your label, and connected — which tells you whether that number can send right now.One key, many numbers
This is the one idea worth reading slowly, because every example on this site uses both fields and they do different jobs. Your API key identifies your account — it is who you are. Yourinstance_id identifies one of your connected numbers — it is which of them the message goes out from.
Picture a shop with three WhatsApp numbers: one for Sales, one for Support, one for Delivery updates. All three run on one key. Each request names the number it should leave from, so the order confirmation goes out from Sales and “your parcel is on its way” goes out from Delivery.
Every number keeps its
instance_id for life. It does not change when a number drops off and someone re-scans the QR — so there is nothing to redeploy after a reconnect. See If your number disconnects.Formatting the recipient
to is the recipient’s number with its country code and no leading zero:
Spaces, dashes, brackets and a leading
+ are accepted and stripped for you. What must remain is 6 to 15 digits. A number that fails that check comes back as 422 invalid_recipient.
Where to go next
Send other message types
Images, PDFs, locations, polls and more — twelve types, one pattern.
Handle errors properly
Which errors to retry, which to alert a human about.