Bridge by Wekoya / Guides / Build an AI WhatsApp bot for your business

Build an AI WhatsApp bot for your business

In short: Connect your WhatsApp Business number to Meta's WhatsApp Cloud API, point its webhook at your server, and answer each message with a model on Bridge by Wekoya, paid in naira. Your bot can reply freely within 24 hours of a customer's last message; after that, WhatsApp allows only pre-approved templates.

Updated

What you need

WhatsApp's rules your bot must follow

From Meta's WhatsApp documentation, checked on 19 November 2026. Meta also charges for some messages; its pages are the authority on rules and prices.

The webhook

WhatsApp sends every incoming message to your webhook. This Node.js server confirms the webhook once, then answers each text message with a model on Bridge and sends the reply back through the Cloud API.

import express from "express"
import OpenAI from "openai"

const bridge = new OpenAI({ apiKey: process.env.BRIDGE_API_KEY, baseURL: "https://wekoya-api.wekoya.tech/v1" })
const GRAPH = "https://graph.facebook.com/v27.0/" + process.env.WHATSAPP_PHONE_NUMBER_ID + "/messages"
const BUSINESS = "You answer customers of Ada's Salon in Yaba, Lagos, on WhatsApp. Be brief and friendly. Open 9am to 7pm, Monday to Saturday. Braids from N15,000."

const app = express()
app.use(express.json())

// WhatsApp checks the webhook once when you set it up.
app.get("/whatsapp", (req, res) => {
  if (req.query["hub.verify_token"] === process.env.WHATSAPP_VERIFY_TOKEN) return res.send(req.query["hub.challenge"])
  res.sendStatus(403)
})

app.post("/whatsapp", async (req, res) => {
  res.sendStatus(200) // answer WhatsApp at once; reply to the customer after
  const message = req.body.entry?.[0]?.changes?.[0]?.value?.messages?.[0]
  if (message?.type !== "text") return

  const reply = await bridge.chat.completions.create({
    model: "gpt-6-luna",
    max_tokens: 400,
    messages: [{ role: "system", content: BUSINESS }, { role: "user", content: message.text.body }],
  })

  await fetch(GRAPH, {
    method: "POST",
    headers: { Authorization: "Bearer " + process.env.WHATSAPP_TOKEN, "Content-Type": "application/json" },
    body: JSON.stringify({ messaging_product: "whatsapp", to: message.from, type: "text", text: { body: reply.choices[0].message.content } }),
  })
})

app.listen(3000)

Before you go live, check the X-Hub-Signature-256 header on each webhook with your Meta app secret, so nobody else can post to it, and keep each customer's last few messages so the bot remembers the conversation.

Voice notes

Customers send voice notes. Download the audio with Meta's media API, turn it into text with Bridge's speech to text, and answer the text as above. English and Hausa are supported; Yoruba, Igbo and Nigerian Pidgin voice notes are not yet. For live, spoken conversations in Yoruba, Hausa and Pidgin, see the voice agent guide.

What it costs

Bridge charges per reply from your naira balance; Meta's own charges are separate. Work out a month of replies on any model:

ModelOne everyday message50 a day for 30 days
DeepSeek V4.1 Flash 1017₦0.568₦851
Gemini 3.8 Flash₦5.01₦7,518
Claude Haiku 5.5₦0.668₦1,002

Put a naira limit on the bot's key under API keys, so a busy day can never spend more than you set. See key limits.

Create a free account

Common questions

Can I use ChatGPT on my WhatsApp Business number?

Not ChatGPT itself, but the same kind of model: connect your number to Meta's WhatsApp Cloud API and answer each message with GPT, Claude, Gemini or DeepSeek through Bridge, paid in naira.

Can the bot message customers first?

Only with a template Meta has approved. Free replies are allowed only within 24 hours of the customer's last message.

Can it reply in Yoruba, Hausa or Pidgin?

For text, ask the model to reply in the customer's language; N-ATLAS, Nigeria's own model, writes Yoruba, Hausa and Igbo. Voice notes can be turned into text in English and Hausa.

Read next