Services
Performance MarketingFunnel CreationLanding PagesMarketing AutomationLead Generation
Products
CRM + AI Email MarketingWhatsApp APIAI Voice CallingAuto DialerForms, Live Chat & Bot
Company
Ad budget calculatorPricingSolutionsDocsAboutContactBook a strategy call

WhatsApp API

Complete guide to the Convrly WhatsApp platform: connecting the official Cloud API, the team inbox, broadcasts, sequences, flow and AI bots, Google Sheet and Meta form automation, booking reminders, the website chat button and settings. Product overview

Overview

Convrly WhatsApp is a self-hosted portal for the official WhatsApp Business Cloud API (PHP 8.1 + MySQL, no framework). Your whole team works from one inbox, and automations reply to leads in seconds.

PageWhat it does
DashboardLead pipeline, lead sources, upcoming bookings, recent leads, account health, estimated WhatsApp spend
InboxEvery conversation with assignment, window timers, media, bot handover, booking
ContactsAll contacts with source, status and opt-out
BroadcastCSV upload, template preview, send and results
TemplatesApproved templates from Meta and recent send failures
Lead formsMeta Instant Form → template mappings
Google Sheet → WhatsAppWelcome message for new sheet rows
BotsFlow bot and AI bot with knowledge bases
SnippetsSaved replies used by AI suggestions
BookingsDemo/appointment bookings and the bulk scheduler
WidgetsWebsite WhatsApp chat buttons
TeamUsers and roles
SettingsAuto-reply, Telegram, AI, calls, reminders

Requirements

ComponentRequirement
HostingVPS or shared hosting with HTTPS (1st year included)
PHP8.1+ with cURL and PDO MySQL
DatabaseMySQL / MariaDB
CronEvery minute
MetaA Meta Business account, a Meta app with WhatsApp, a phone number not already used on the WhatsApp app
OptionalTelegram bot (alerts), Anthropic API key (AI bot and suggestions)

Installation

  1. Create a database and import install-fresh.sql. In phpMyAdmin, click the database name in the sidebar first, otherwise you get “No database selected”.
  2. Fill in config.php: the database block, phone_number_id, waba_id, access_token, app_secret, and invent a long random verify_token. Set timezone to your local time zone.
  3. Upload everything to public_html/wa/. Check .htaccess kept its leading dot. Opening /wa/config.php must return 403.
  4. Add the worker cron job, every minute:
/usr/bin/php /home/USER/domains/yourdomain.com/public_html/wa/worker.php
  1. Set the webhook in your Meta app → WhatsApp → Configuration: Callback URL https://yourdomain.com/wa/webhook.php, Verify token = the one in config. Subscribe to messages (and calls for call logging).
  2. Subscribe the app to your WhatsApp Business Account — this step is not in Meta's UI and without it nothing arrives:
curl -X POST "https://graph.facebook.com/v21.0/<WABA_ID>/subscribed_apps" \
  -H "Authorization: Bearer <TOKEN>"
  1. Open login.php. The first person to load it creates the owner account.

One app per WhatsApp Business Account: subscribing this portal's webhook takes the slot from any other tool connected before. That tool stops receiving messages immediately.

WhatsApp rules you must know

RuleWhat it means for you
24-hour windowFree-form replies only work within 24 hours of the customer's last message (72 hours after a Click-to-WhatsApp ad). Outside it you must use an approved template, which Meta charges for.
Marketing capMeta delivers roughly 2 marketing templates per person per 24 hours across all businesses. Blocked sends return error 131049.
Quality ratingSpam reports lower your rating. Broadcast only to people who recently engaged — never to cold lists. The portal refuses to broadcast unless your rating is GREEN.
MediaMedia is sent by public HTTPS URL; the file must be reachable online.

Team inbox

  • Every conversation in one list with unread badges, search and open/unread filters.
  • A live 24-hour window countdown on each chat.
  • Assign a chat to a team member; agents see their inbox.
  • Send text, images and PDF documents; customer media (images, PDFs, documents) is downloaded and shown in the chat.
  • Send template when the window is closed.
  • Stop bot & take over to end a running bot session.
  • Use this reply on an AI suggestion to send your saved snippet.
  • 📅 Schedule demo to book a slot from the chat (see Bookings).
  • Works on mobile with a full-screen list and a back arrow.

Multiple WhatsApp numbers

Connect more than one WhatsApp number. A switcher at the top selects the active number; every page — inbox, contacts, broadcasts — filters to it. The same person messaging two of your numbers is treated as two separate conversations.

Contacts

Contacts show name, number, product of interest, last message, source and status. Filter by source:

  • Click-to-WhatsApp ad
  • Instant Form (Meta lead form)
  • Imported
  • Messaged us directly

Mark contacts as opted in or opted out, and bulk-delete. Anyone who replies STOP is opted out permanently and never messaged again.

Team & roles

RoleAccess
OwnerEverything, created on first login
AdminEverything except deleting the owner
AgentInbox only

Add people from Team with a temporary password. Sessions use bcrypt passwords, login lockout and CSRF protection.

Install as an app

On Android Chrome an install bar appears — tap it to add Convrly WhatsApp to your home screen. On iPhone use Share → Add to Home Screen. The icon shows your unread count.

Templates

Templates are pulled from Meta and refreshed hourly. The Templates page shows each approved template rendered as a WhatsApp bubble with its category, header type and variables, and lets you set a media URL for templates with an image header. Recent send failures lists every failed send with the error code and campaign.

Broadcasts

  1. Open Broadcast and pick an approved template — a preview is shown before you send.
  2. Upload a CSV of numbers (up to 500 per file).
  3. Send. Numbers messaged in the last 24 hours are skipped, and the page is safe to refresh.

Results shows per campaign: queued, sent, delivered, read, replied, failed, capped and errors.

Templates that need {{1}} variables can't be used in broadcasts yet. Broadcasting is blocked when your quality rating isn't GREEN.

Follow-up sequences

Leads can receive automatic follow-up messages over time. As soon as a human team member replies to the lead, all pending automated follow-ups for that lead are cancelled — so nobody gets a robotic message after a real conversation has started.

Opt-outs

Replies like STOP are honoured permanently across broadcasts, sequences and Sheet automation.

Auto-reply & missed calls

  • Auto-reply (Settings → General): sent once, on a lead's first message. Keep it free of prices — a human handles those.
  • Missed-call message (Settings → Voice calls): WhatsApp calls are logged and you get an alert; missed callers automatically receive your “we'll call you back” text. Calls can optionally be auto-rejected.

The portal cannot answer WhatsApp voice calls. For AI voice, see AI Voice Calling.

Google Sheet → WhatsApp

Send a welcome template to every new row added to a Google Sheet — perfect for leads collected by other tools.

  1. In Google Sheets: File → Share → Publish to web → CSV. Copy the URL.
  2. In Google Sheet → WhatsApp, add a source: paste the published CSV URL and press Test fetch.
  3. Map the columns: Phone*, Name, Email, Product.
  4. Choose a default product and a welcome template (or “don't send, just import”).
  • Only rows added after you activate the source are messaged — your existing rows are marked as seen, not sent.
  • One message per phone per source, ever.
  • Respects opt-outs and the GREEN quality rule.
  • Throttled to 40 sends per run.

Meta Instant Forms → WhatsApp

When someone fills your Meta (Facebook/Instagram) lead form, they instantly get a WhatsApp template.

  1. Open Lead forms. Forms seen in incoming leads are listed with their Form ID.
  2. Map a form: Form ID, a label, the product and the template to send on submission.
  3. Save. Active mappings are listed with lead counts.

Reading lead-form data requires the leads_retrieval permission, which needs Meta App Review.

Click-to-WhatsApp ads

Leads arriving from Click-to-WhatsApp ads are tagged with that source automatically, and get the longer 72-hour free window.

Telegram alerts

  1. Create a bot with @BotFather in Telegram and copy its token.
  2. Message @userinfobot to get your chat ID.
  3. Paste both in Settings → Notifications and press Send a test.

You'll be alerted for new messages and calls — the best way to never miss a lead, even with the app closed.

Flow bot

A step-by-step bot built from your own questions, buttons and lists — no AI, so it never says anything you didn't write.

  • Starts on a new lead's first message.
  • Each step can show buttons or a list and branch on the answer.
  • Ends by handing over to a human, with a summary sent to Telegram.
  • The lead can type “human”, “agent” or “talk to person” at any time to reach your team.
  • One flow bot is active at a time.

AI chatbot

The AI bot answers incoming messages using your knowledge base.

  1. In Bots, create a knowledge base and paste your content (products, prices, timings, FAQs).
  2. Click Activate on the one to use.
  3. Set the bot's persona / tone and the daily reply cap per contact (default 15).
  4. Turn the AI bot on.
  • Only replies inside the open 24-hour window.
  • “Human” or “agent” stops the bot for that lead.
  • Uses your Anthropic API key (Settings → AI).

AI reply suggestions & snippets

Create snippets — your own pre-written answers, each with a label, slug and hint. When a message arrives, the AI picks the snippet that best answers it and shows it as a suggestion in the inbox; your agent sends it with one click.

  • The AI only chooses — the text is always yours, so prices and dates are never invented.
  • Set a confidence threshold in Settings → AI reply suggestions.
  • Each snippet shows how often it was used.

Booking from the inbox

  1. After a call with a lead, open their chat and click 📅 Schedule demo.
  2. Pick the product, date, time and joining link, and add notes to include.
  3. Click Schedule & send.

The lead immediately gets two confirmation messages, and three automatic reminders are scheduled before the slot. Reminders are sent free inside the 24-hour window; otherwise your approved reminder template is used (set the template name and language in Settings → Demo reminders).

From Bookings you can reschedule (old reminders are cancelled and recreated and the lead is notified), cancel, mark done or mark no-show. Select several chats to schedule all at once.

Bulk scheduler

Book a whole group into the same session at once — for example everyone attending Tuesday's webinar.

  1. Open Bulk demo scheduler and fill the session details once: product, date, time and join link.
  2. Upload a CSV of numbers (it only needs a phone column), or add one number at a time.
  3. Click Upload & schedule all.
  • Each person is added to your contacts and appears in the inbox.
  • Everyone gets the confirmation plus the reminder ladder.
  • The page shows scheduled, sent, delivered and read counts, today's bookings, and lets you retry failed sends.
phone
919876543210
919812345678

When the AI caller gets a “yes” on a call, it sends the booking to /wa/api/enqueue_reminder.php with a shared secret, and the same confirmation and reminder ladder starts automatically.

Website WhatsApp button

Create a floating WhatsApp chat button for any website under Widgets:

SettingOptions
WhatsApp numberThe number visitors will chat with
Pre-filled messageText already typed when the chat opens
Button text & colourYour label and brand colour
Greeting bubbleA short greeting shown next to the button
PositionBottom right or bottom left
Show delaySeconds before the button appears

Copy the snippet into your website. Changes go live within about 5 minutes.

<script src="https://yourdomain.com/wa/w.js?id=your-widget-slug" async></script>

All settings

SectionSettings
GeneralBusiness name, auto-reply on/off and text
NotificationsTelegram bot token, chat ID, alert on inbound, test
AI reply suggestionsAnthropic API key, model, confidence threshold
AI botOn/off, persona, daily cap per contact
Voice callsMissed-call message, auto-reject calls
Demo remindersReminder template name and language
Spend estimateYour per-message rates (marketing, utility, authentication) and GST %

Dashboard & spend

The dashboard shows the lead pipeline, where leads came from, upcoming bookings, recent leads, account health (quality rating) and an estimated WhatsApp spend based on your per-message rates.

Troubleshooting

ProblemFix
Nothing arrives in the inboxRun the subscribed_apps curl command; check the webhook and verify token
Messages queued but not sentCheck the worker cron is running every minute
Error 131049Meta's per-person marketing cap — not fixable by sending more
Reminders at the wrong timeSet timezone in config.php to your local time zone
A page shows error 500Open wa/error_log — the last lines name the file and line
“Table users doesn't exist”Run the upgrade SQL for your version

Known limits

  • No self-service password reset — an admin sets passwords.
  • No push notifications when the app is closed — Telegram covers this.
  • Broadcast templates can't use {{1}} variables yet.
  • Log tables grow over time and should be trimmed occasionally.

FAQ

QuestionAnswer
Is it the official API?Yes — Meta's WhatsApp Business Cloud API.
Limits on users or bots?None.
Who pays for messages?You pay Meta directly, at Meta's rates.
Can I use numbers from any country?Yes. Always store numbers with the country code.

Need help? Every purchase includes three months of support. Contact us and we'll walk you through it.