A WhatsApp Business number (WhatsApp Cloud API) is an account like a Facebook Page, and its messages are conversations in the same API with the same events. The person is identified by their international number (wa_id).
Before connecting: is the number on the WhatsApp app?
A number connected to the Cloud API is removed from the WhatsApp or WhatsApp Business app on the phone, and its old chats do not move. If the number is in use on a phone and should stay there, use a new number for the platform, or wait for connecting a WhatsApp Business app number (below).
Connecting by hand (available now)
- The company needs a Meta Business account on business.facebook.com.
- On developers.facebook.com, use Create App with the Business type, then add the WhatsApp product.
- In WhatsApp → API Setup → Add phone number, enter the display name and the number, then the code sent by SMS or call.
- Copy the WhatsApp Business Account ID and the Phone number ID from the same page.
- In Business Settings → System users, create a system user (Admin), assign it the app and the number, then Generate token with whatsapp_business_messaging and whatsapp_business_management, expiring Never.
- Add a payment method in WhatsApp Manager, because templates aren't sent without one.
- In the platform, open Connections → 'Or connect manually with the IDs and a token' and enter the account ID, the phone number ID and the token, plus a 6-digit PIN if the number is not registered yet. The platform checks the number belongs to the account, registers it and subscribes to its events.
The number and the bills stay in the company's own name, and nothing has to be redone when one-click connecting opens.
One-click connecting (after Meta's approval)
The 'Connect WhatsApp with Facebook' button opens Meta's window (Embedded Signup). The company picks its account, adds and confirms the number, and the platform does the rest with no token to copy. Next to it, a WhatsApp Business app number can be connected so it stays on the phone and the platform together. Both work for companies once Meta approves the platform's WhatsApp permissions. Until then, connect by hand.
Templates from the platform
In Marketing, open 'WhatsApp templates', or in Connections press 'Templates' next to the number. You'll see the number's templates and their status, and you can make a new one (UTILITY, MARKETING or AUTHENTICATION) that goes straight to Meta's review.
Replying within 24 hours
POST /api/v1/conversations/{id}/messages { "text": "..." }
POST /api/v1/conversations/{id}/messages { "image": { "source": "url", "url": "https://..." } }
Templates: the first message, or after 24 hours
WhatsApp allows writing first, or replying after the window, only with a template Meta approved. Parameters fill {{1}}, {{2}}, ... in the template body, in order.
GET /api/v1/whatsapp/accounts/{socialAccountId}/templates
POST /api/v1/whatsapp/messages
{
"socialAccountId": "0192...",
"to": "201001234567",
"template": { "name": "order_update", "language": "ar", "parameters": ["Sara", "A-1042"] },
"externalReference": "order-1042"
}
POST /api/v1/conversations/{id}/messages
{ "template": { "name": "order_update", "language": "ar", "parameters": ["Sara", "A-1042"] } }
The answer is 202 with conversationId, messageId and operationId. An unapproved template or the wrong number of values is refused before anything reaches Meta.
Any kind of message to a number, in one call
If your system used Unifonic's Conversations API, the same content shapes work here unchanged. Send the number and the content; the platform finds the person's conversation or starts it. When the company has one WhatsApp number, socialAccountId can be left out.
POST /api/v1/messages
{
"socialAccountId": "0192...",
"recipient": { "contact": "+201001234567", "channel": "whatsapp" },
"content": { "type": "file", "url": "https://example.com/invoice-1042.pdf", "fileName": "invoice-1042.pdf", "text": "Your invoice" },
"externalReference": "invoice-1042"
}
Kinds: text, image, video, audio, file, contacts, location, listMessage (up to 10 choices), replyButton (up to 3 buttons, with text, a picture, a video or a file on top), product and productList (from the catalogue), and template (with a picture, video or file in its header, and text, date and amount values).
- Only a template may go to someone who hasn't written, or after 24 hours since they last did. Any other kind is then refused with 409 messaging_window_closed, and no conversation is made for nothing.
- Without a catalogId on product or productList, the company's catalogue saved under Orders → Settings is used. Our products reach that catalogue through the feed link there, so productRetailerId is the product's id here.
- The call answers at once with 202, messageId, conversationId and operationId. The outcome follows as social.message.sent or social.message.failed, and on the operation.
- SMS fallback isn't offered. Sent anyway, the call is accepted with warnings: fallback_not_supported.
A products campaign to people who haven't written
product and productList only go inside the 24 hours. To send products to someone who hasn't written, use one of these Marketing templates once Meta approves it in WhatsApp Manager:
- Catalog template: a 'View catalog' button opens the whole catalogue. Send a button with subType "catalog" and an action, optionally with thumbnailProductRetailerId for the product whose picture shows on top.
- Products template (mpm): a 'View items' button opens up to 30 products in up to 10 sections, each titled in up to 24 characters.
- Carousel: up to 10 cards, each with a product (type "product"), a picture or a video on top and its own buttons. Without a catalogId on a product, the company's saved catalogue is used.
- A 'Copy offer code' button: a parameter of type coupon_code.
"content": {
"type": "template", "name": "eid_products", "language": { "code": "ar" },
"components": [
{ "type": "body", "parameters": [ { "type": "text", "text": "Mona" } ] },
{ "type": "button", "subType": "mpm", "index": 0, "parameters": [ { "type": "action", "action": {
"thumbnailProductRetailerId": "sku-1",
"sections": [ { "title": "Best sellers", "productItems": [ { "productRetailerId": "sku-1" }, { "productRetailerId": "sku-2" } ] } ]
} } ] }
]
}
Status and media
Delivered and read statuses update the message. If Meta accepted a message and then could not deliver it, you get social.message.failed with an error code such as whatsapp_131047. Incoming pictures and files come with a platformMediaId instead of a link. Download them from:
GET /api/v1/messages/{messageId}/attachments/{index}
Meta keeps incoming media for a limited time, so copy what you need into your own system.
Carts from the WhatsApp catalogue
When a customer sends a cart from the WhatsApp catalogue, Meta delivers it only to us, so it reaches you like any message, in social.message.received and in GET /api/v1/conversations/{id}/messages, with a cart field. Each line has the retailerId exactly as it is in the catalogue, the quantity, and the price and currency the customer saw in WhatsApp. When the line is one of your products on the platform it also has productId and name. When it comes from your own catalogue, your code (SKU) arrives as it is and name is null. On other messages cart is null.
"cart": {
"lines": [
{ "retailerId": "0192a8f0000070008000000000000011", "productId": "0192a8f0-0000-7000-8000-000000000011", "name": "تيشيرت قطن", "quantity": 2, "price": 350, "currency": "EGP" },
{ "retailerId": "SKU-1042", "productId": null, "name": null, "quantity": 1, "price": 99.5, "currency": "EGP" }
],
"more": 0,
"catalogId": "1234567890123456",
"orderId": null,
"orderNumber": null
}
catalogId is the catalogue the cart came from, and more counts lines left out because the cart was longer than one message keeps, which is rare. If the orders add-on is on and the bot can't take a cart all the way, we make a new order from it when it has at least one of your products. You then get social.order.created with fromCart: true and cartMessageId, and GET messages shows orderId and orderNumber on the cart.
Cost
Meta bills the business's own account for templates, and for replies inside the window beyond the first 1,000 a month per number (from 1 October 2026). Check Meta's WhatsApp pricing page before relying on any figure.