{"meta":{"page":"blog/whatsapp-chatbot-business-best-practices-api","language":"en","url":"https://spoki.com/en/blog/whatsapp-chatbot-business-best-practices-api","generated_at":"2026-04-18T20:29:44.509Z","formats":{"html":"https://spoki.com/en/blog/whatsapp-chatbot-business-best-practices-api","markdown":"https://spoki.com/en/blog/whatsapp-chatbot-business-best-practices-api.md","json":"https://spoki.com/en/blog/whatsapp-chatbot-business-best-practices-api.json","xml":"https://spoki.com/en/blog/whatsapp-chatbot-business-best-practices-api.xml"}},"content":{"title":"WhatsApp Chatbot for Business: Best Practices with the WhatsApp Business API","sections":[{"heading":"WhatsApp Chatbot for Business: Best Practices with the WhatsApp Business API","level":1,"text":"**Author:** Spoki | **Published:** 2/12/2026\n\n*Build a WhatsApp chatbot for business with the WhatsApp Business API and Spoki. Templates, 24-hour session, opt-in, and automation for compliant conversations.*\n\n---\n\nA **WhatsApp chatbot** for business can answer questions, qualify **leads**, and handle **support** on the channel many customers use daily. With the **WhatsApp Business API** and **Spoki**, you manage **templates**, the **24-hour session**, and **opt-in** so your **chatbot** stays compliant and effective.\n\nThis guide covers **best practices** for a **WhatsApp chatbot**: when to use **templates** vs **session** messages, **opt-in**, and how **Spoki** fits in. You will find links to [registration](https://spoki.io/registration), [pricing](https://spoki.io/pricing), [support](https://spoki.io/support), [book](https://spoki.io/book), and the [ROI calculator](https://spoki.io/roi-calculator)."},{"heading":"How a WhatsApp Chatbot Works with the API","level":2,"text":"The **WhatsApp Business API** does not let you send free-form text for the first message or after the **24-hour session** has expired. Your **chatbot** must:\n\n- **Start with a template:** The first message to a contact (or after **24h** of no reply) must be an **approved template**. **Spoki** helps you create and send **templates** so your **chatbot** can initiate **conversations** (e.g. “Hi {{1}}, how can we help? Reply with a number: 1 Support, 2 Sales.”). See [registration](https://spoki.io/registration) and [support](https://spoki.io/support).\n\n- **Use session messages for replies:** Once the user replies, you enter the **24-hour session**. During the **session**, your **chatbot** can send **session** messages—free-form replies, **buttons**, or **quick replies** (within **API** limits). No **template** is needed for each answer. **Spoki** keeps **session** and **template** logic clear so your **chatbot** does not break the rules. Use [pricing](https://spoki.io/pricing) and the [ROI calculator](https://spoki.io/roi-calculator) to plan volume.\n\n**Spoki** sits between your **chatbot** (or **app**) and the **WhatsApp Business API**: you send **templates** and **session** messages via **Spoki**, and **Spoki** handles delivery and **24-hour** rules. **Inbound** messages can be forwarded to your **webhook** so your **chatbot** logic runs on your server or in your **CRM**."},{"heading":"Opt-In: Required Before Any Chatbot Message","level":2,"text":"**WhatsApp** requires that users have agreed to receive messages before you send them. **Best practices for chatbot opt-in:**\n\n- **Collect consent clearly:** When a user **registers**, clicks a **WhatsApp** link, or fills a form, ask explicitly if they want to receive messages via **WhatsApp**. Store **opt-in** in your **CRM** or **Spoki**. **Spoki** helps you respect **opt-out** so your **chatbot** list stays compliant. See [registration](https://spoki.io/registration) and [support](https://spoki.io/support).\n\n- **Scope:** Tell users what they will receive (e.g. “**Support** and **sales** assistance via **WhatsApp**”). Do not use the same **opt-in** for unrelated **campaigns** unless they have agreed. **Spoki** can segment contacts so your **chatbot** only messages those who have **opt-in** for that use case.\n\n- **Honour opt-out:** When a user sends **STOP**, your **chatbot** or **app** must process it (e.g. update your database, stop sending). **Spoki** can forward **opt-out** events to your **webhook** so your **chatbot** stays compliant. Use [book](https://spoki.io/book) for **webhook** design."},{"heading":"Chatbot Use Cases: Support, Lead Qualification, FAQ","level":2,"text":"**Support:** A user sends a **WhatsApp** message (e.g. “I need help with my **order**”). Your **chatbot** receives it via **Spoki**’s **webhook**, then replies with **session** messages (e.g. “What’s your **order** ID?” or “Choose: 1 **Order** status, 2 **Refund**”). Within **24 hours** you can send as many **session** messages as needed. After **24h**, the next outbound message must be an **approved template**. **Spoki** helps you manage this so **support** **chatbots** stay compliant. Links: [support](https://spoki.io/support), [pricing](https://spoki.io/pricing).\n\n**Lead qualification:** Send an **approved template** to welcome a new **lead** (e.g. “Hi {{1}}, thanks for your interest. Reply 1 for **sales**, 2 for more info.”). When they reply, your **chatbot** can ask questions with **session** messages and route to **sales** or **support**. **Spoki** delivers **inbound** messages to your **webhook** so your **chatbot** can qualify **leads** in real time. See [book](https://spoki.io/book) and the [ROI calculator](https://spoki.io/roi-calculator).\n\n**FAQ:** Your **chatbot** can answer common questions within the **session** (e.g. opening hours, **pricing**, **registration** link). Use **session** messages for answers; when the **session** expires, the next proactive message must be a **template**. **Spoki** and your **chatbot** logic keep **templates** and **session** in sync. Use [registration](https://spoki.io/registration) and [support](https://spoki.io/support) for **template** ideas."},{"heading":"Integrating Your Chatbot with Spoki","level":2,"text":"**Spoki** provides an **API** and **webhooks**. Your **chatbot** (on your server, **CRM**, or **no-code** platform) can:\n\n- **Send messages:** Call **Spoki** to send **templates** (with variables) or **session** messages. **Spoki** returns delivery status and enforces **24-hour** rules.\n\n- **Receive messages:** Configure a **webhook** URL in **Spoki**. When a user sends a **WhatsApp** message, **Spoki** posts the event to your **webhook**. Your **chatbot** parses it, runs logic (e.g. **FAQ**, **lead** routing), and replies via **Spoki** within the **session**.\n\nKeep **opt-in** and **opt-out** in sync: when a user opts out, your **chatbot** must stop messaging them. **Spoki** helps you record **opt-out** and can notify your **webhook**. See [registration](https://spoki.io/registration) and [support](https://spoki.io/support) for integration help."},{"heading":"Testing and Improving Your Chatbot","level":2,"text":"Before going live, test your **chatbot** with **approved templates** and **session** flows. Confirm that **opt-in** is checked before every send and that **opt-out** (e.g. STOP) is processed and stored. Use **Spoki** to monitor delivery and **webhook** responses; fix timeouts or errors so users get replies within the **24-hour** window. Over time, review which **templates** start the best **conversations** and which **session** flows convert (e.g. **lead** to **sales**). **Spoki** and [support](https://spoki.io/support) can help you tune **chatbot** logic and **template** wording."},{"heading":"Pitfalls to Avoid","level":2,"text":"- **Sending without opt-in:** Never let your **chatbot** message users who have not agreed to **WhatsApp**. **Spoki** helps you store and check **opt-in** so **chatbot** **conversations** stay compliant.\n\n- **Using free-form for the first message or after 24h:** The **API** requires **approved templates** in those cases. Design **templates** that start **conversations** (e.g. menu, welcome); **Spoki** sends them. Use **session** messages only within **24 hours** of the user’s last message.\n\n- **Ignoring the 24-hour window:** Your **chatbot** has **24 hours** after the user’s last message to reply with **session** messages. After that, use an **approved template** to re-open the **conversation**. **Spoki** keeps **session** and **template** logic clear so your **chatbot** does not miss the window or break the rules. Use the [ROI calculator](https://spoki.io/roi-calculator) to plan **chatbot** volume."},{"heading":"Conclusion","level":2,"text":"A **WhatsApp chatbot** for business can handle **support**, **lead** qualification, and **FAQ** when you use **approved templates** for the first touch, **session** messages within **24 hours**, and **opt-in** for every contact. **Spoki** works with the **WhatsApp Business API** so you manage **templates**, **webhooks**, and consent in one place.\n\nReady to build a **WhatsApp chatbot**? Visit [Spoki](https://spoki.io) for the **WhatsApp Business API**, [registration](https://spoki.io/registration), and [pricing](https://spoki.io/pricing). Use [support](https://spoki.io/support) or [book](https://spoki.io/book) for **chatbot** and **webhook** design, and the [ROI calculator](https://spoki.io/roi-calculator) to plan volume."},{"heading":"Categories","level":3,"text":"- Blog-en"},{"heading":"Tags","level":3,"text":"- AI & Automation\n- Lead Generation\n- WhatsApp API\n\n---"},{"heading":"About Spoki","level":2,"text":"Use Spoki's simple, fast and intuitive platform to drive conversions, automate tasks and grow your business."},{"heading":"Solutions","level":3,"text":"- Marketing\n- Sales\n- Customer Care\n- Developers"},{"heading":"Special Programs","level":3,"text":"- Agencies\n- Affiliation\n- Reseller\n- Start up"},{"heading":"Quick Links","level":3,"text":"- [Features](https://spoki.com/en/features)\n- [Pricing](https://spoki.com/en/pricing)\n- [About](https://spoki.com/en/about)\n- [FAQ](https://spoki.com/en/faq)\n- [Blog](https://spoki.com/en/blog)\n- [Case Studies](https://spoki.com/en/case-studies)\n- [Integrations](https://spoki.com/en/integrations)\n\n© 2026 Spoki. All rights reserved."}]}}