AI, explained
How do I connect AI to WhatsApp Business?
There are two ways to do this. One scales and survives an audit. The other works beautifully until the number is banned.
The mechanics are straightforward once the account layer is done, and the account layer is where projects stall. Budget more time for verification than for engineering.
The official path, step by step
- Create a Meta Business account and complete business verification. Have the company registration documents ready.
- Set up a WhatsApp Business Account and register a phone number. It cannot already be in use on the consumer WhatsApp or Business app, so use a dedicated number.
- Configure a webhook endpoint. Meta posts inbound messages to it, you verify the signature, then hand the message to your agent.
- Reply through the messages endpoint. Handle status callbacks for sent, delivered, read and failed.
- Submit message templates for approval for anything you send outside an open conversation.
The 24 hour window, which governs everything
Once a user messages you, you can reply freely with normal messages for 24 hours from their last message. After that window closes, you can only reach them with a pre-approved template. This single rule shapes the whole design. An AI agent that plans to follow up two days later needs an approved template for that follow-up, written in advance, in the right language, with variables in the right places. Categories such as marketing, utility and authentication are treated differently and priced differently, so decide the category before you write the copy.
Unofficial libraries, and when they are defensible
Libraries that link as a companion device to a normal WhatsApp account exist, they are quick, and they need no approval. They also violate the terms of service and carry a genuine risk of the number being banned, with no appeal. There is a narrow legitimate case: an internal, read-only, personal-scale tool where losing the number would be an inconvenience rather than a business incident. For anything customer-facing, anything at volume, or anything you would have to explain to a client, use the official API.
What gets accounts restricted
- Messaging people who did not opt in. Quality rating drops, then sending limits drop.
- High block and report rates, which are what actually drive the quality rating.
- Template copy that does not match the approved category.
- Sending marketing dressed as a utility notification.
Design notes for the AI layer
Keep replies short, because they are read on a phone. Answer in European Portuguese when the user writes in Portuguese. Always offer a route to a human, and hand over with the conversation history attached. Log every inbound and outbound message with a timestamp, because you will need it for a dispute.
Digiton builds and runs this integration end to end, including template strategy and the handover model. An AI audit is the usual starting point.
Frequently asked questions
How do I connect AI to WhatsApp Business?
Use the official WhatsApp Business Platform. Verify the business with Meta, register a dedicated number, point a webhook at your own service, pass inbound messages to your AI, and send replies back through the API. Anything sent outside the 24 hour window needs an approved template.
What is the 24 hour customer service window?
A rule that lets you send free-form messages for 24 hours after the customer last wrote to you. Once it expires, only pre-approved templates can reach that person. It is the constraint that determines how you design follow-ups, reminders and any proactive outreach.
Is the WhatsApp Business API free?
The API access is not the cost. Meta charges for messaging, with the model having moved toward per-message pricing that varies by template category and country, and Business Solution Providers add their own fee. Check the current rate card for Portugal before you build the business case.
Related
Ready to put AI to work?
Book a discovery audit and we will map the highest-ROI AI agents and automations for your business.
Book a discovery audit →