How to Send Automated WhatsApp Flight Updates and Itineraries Without Getting Banned

·7 min read
How to Send Automated WhatsApp Flight Updates and Itineraries Without Getting Banned

Most travel agencies try to automate WhatsApp updates the cheap way. They hook up a Python script or a Chrome extension to a regular WhatsApp Business account running on a spare Android phone. It works for two days. On the third day, Meta flags the number for spam, bans the SIM card, and three hundred passengers miss their gate change alerts.

If you run a travel agency in Pakistan, India, or the Gulf, your phone number is your business. Losing it means losing repeat clients. To send flight status updates, PNR confirmations, and PDF itineraries reliably, you must use the official WhatsApp Cloud API.

This guide walks you through setting up an automated itinerary system from scratch, wiring it to your database or GDS, and handling the technical failures that happen in real operations.

What You Need Before Starting

Before writing code or setting up webhooks, gather these items:

  • A verified Meta Business Manager account. In Pakistan, you need your NTN and company registration documents. In India, you need your GSTIN or legal business registration. Verification takes anywhere from 24 hours to two weeks.
  • A clean phone number. The number cannot be registered on WhatsApp or WhatsApp Business on any phone. If it is, you must delete the account from the app first.
  • A Credit or Debit Card. Meta charges for API conversations directly through your Business Manager. Cards issued by Pakistani and Indian banks must have international online transactions enabled.
  • Access to your booking data. This means webhooks or API output from your GDS (Amadeus, Sabre, Travelport) or your agency CRM.

Step 1: Set Up Meta Cloud API Infrastructure

Log in to developers.facebook.com and create a new App. Select Business as the app type.

Scroll down and add the WhatsApp product to your app. Once added, Meta provides a temporary access token, a test phone number, and a Phone Number ID.

To add your real phone number:

  1. Navigate to WhatsApp > API Setup in the developer console.
  2. Click Add Phone Number.
  3. Enter your official agency name as the WhatsApp Display Name. Make sure this name matches the legal name on your business documents or your official website domain. If your agency is registered as "Karachi Travel Services Pvt Ltd", submitting "Cheap Dubai Flights" will lead to display name rejection.
  4. Verify the phone number using the SMS code sent to your physical device.

Once verified, copy your Phone Number ID and WhatsApp Business Account ID. You will need these for every API call.

Step 2: Create Utility Message Templates

WhatsApp categorizes API messages into Utility, Authentication, Service, and Marketing. Flight notifications are Utility conversations. They cost significantly less per conversation than Marketing messages.

However, if you add promotional text to a flight alert—such as "Book a hotel in London with us and get 15% off"—Meta's automated system reclassifies the template as Marketing or rejects it outright.

Go to your WhatsApp Manager, select Account Tools > Message Templates, and create two specific templates.

Template 1: Flight Status Update (Text Only)

Set category to Utility. Name it flight_update_alert.

Body text:

Flight Alert for {{1}}: Your flight {{2}} from {{3}} to {{4}} has been {{5}}. Departure time is now {{6}} from Gate {{7}}. PNR: {{8}}.

The numbers inside double curly braces are dynamic parameters your backend populates at runtime.

Template 2: PDF Itinerary Dispatch (Media Header)

Set category to Utility. Name it send_pnr_itinerary.

Set Header type to Document.

Body text:

Dear {{1}}, your booking for {{2}} to {{3}} is confirmed. Please find your detailed e-ticket attached below. PNR: {{4}}. Safe travels!

Submit both templates. Utility template approvals usually take between 5 minutes and 2 hours.

Step 3: Trigger the API from Your Backend

When a flight schedule changes in your GDS or your staff generates an e-ticket, your system must trigger an HTTP POST request to Meta's API endpoints.

Here is the exact request format to send a PDF itinerary. Send this `POST` request to:

https://graph.facebook.com/v19.0/{YOUR_PHONE_NUMBER_ID}/messages

Set your headers:

  • Authorization: Bearer YOUR_PERMANENT_SYSTEM_USER_TOKEN
  • Content-Type: application/json

JSON Request Body:

{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "923001234567",
  "type": "template",
  "template": {
    "name": "send_pnr_itinerary",
    "language": {
      "code": "en"
    },
    "components": [
      {
        "type": "header",
        "parameters": [
          {
            "type": "document",
            "document": {
              "link": "https://youragency.com/tickets/PNR12345.pdf",
              "filename": "E-Ticket_PNR12345.pdf"
            }
          }
        ]
      },
      {
        "type": "body",
        "parameters": [
          {"type": "text", "text": "Ali Khan"},
          {"type": "text", "text": "Lahore"},
          {"type": "text", "text": "Jeddah"},
          {"type": "text", "text": "PNR12345"}
        ]
      }
    ]
  }
}

Make sure phone numbers are formatted in strict E.164 standard without plus signs, spaces, or hyphens. A Pakistani number like 0300-1234567 must be sent as 923001234567. An Indian number like 09876543210 must be sent as 919876543210.

Step 4: Verify Delivery and Webhooks

If your call succeeds, Meta returns a HTTP 200 response with a JSON object containing a message ID:

{
  "messaging_product": "whatsapp",
  "contacts": [{"input": "923001234567", "wa_id": "923001234567"}],
  "messages": [{"id": "wamid.HBgLOTIzMDAxMjM0NTY3FQIAERgSQTU4M0Y2RkM3RDU4MDM5Q0E1AA=="}]
}

A successful response does not mean the customer read the message. It means Meta accepted the payload. To confirm delivery, configure a webhook endpoint in your application.

Under your Meta App, go to WhatsApp > Configuration and set your Webhook URL. Subscribe to the messages field.

Meta will push status events to your webhook. You will receive updates indicating whether the message status is sent, delivered, or read. If a delivery fails, the webhook payload contains the failure reason.

Handling Common API Failures

Things break. Flight databases send missing data, passengers give landline numbers, and API tokens expire. Prepare your system for these specific errors.

Meta Error CodeMeaningHow to Fix It
131026Message UndeliverableThe recipient number is not on WhatsApp, their phone is off, or Meta blocked the account. Do not retry automatically; mark the record for SMS fallback.
131047Re-engagement window expiredYou tried sending a freeform text message instead of an approved template outside the 24-hour window. Send an approved template first.
100Invalid ParameterUsually caused by missing template parameters or a broken PDF URL. Ensure your document link is publicly accessible via HTTPS and under 100 MB.

If your PDF generation takes time on the server, do not force the API to wait. Generate the PDF, upload it to an S3 bucket or secure server, obtain the public URL, and then trigger the WhatsApp request asynchronously.

Managing Incoming Replies

Sending an automated flight update inevitably causes passengers to reply. They will text back saying "Can I change my meal?" or "Is baggage included?".

The Meta Cloud API gives you the raw infrastructure, but it does not come with a user interface. If a passenger replies to an automated flight update, that incoming message arrives at your webhook as JSON data. Your script must read it, or it vanishes into your server logs.

If you have built your own custom CRM dashboard, you can build a chat view using incoming webhooks. If you do not have an in-house frontend team, you can route your API connections into a team inbox service like WA Link. This allows your ticketing staff to view incoming customer replies, send manual follow-ups within the free 24-hour support window, and assign chats to specific agents.

Keep in mind that while shared inbox tools manage manual chat conversations, your automated system alerts still need a custom backend script or middleware to convert GDS schedule alerts into Meta API templates.

Next Steps for Travel Operations

Once basic updates work, improve your system setup:

  • Add interactive Quick Reply buttons to templates ("View Flight Status", "Contact Agent").
  • Set up auto-retries on SMS when error code 131026 fires.
  • Create a rate-limiting queue on your backend so you do not hit Meta's throughput limit (which starts at 80 messages per second for Cloud API).

Frequently Asked Questions

Can I use my current WhatsApp Business phone app with the API?

No. A phone number used for the Cloud API cannot be logged into the standard WhatsApp or WhatsApp Business mobile app at the same time. All incoming and outgoing interactions must happen through API calls or a connected shared inbox platform.

How much does Meta charge for WhatsApp flight updates in South Asia?

Meta charges per 24-hour conversation window, not per individual message. If you send a flight alert (Utility category), Meta opens a 24-hour Utility conversation window. Any additional utility messages sent to that customer within 24 hours incur no extra charge. Exact rates vary slightly by target country code and regional pricing tier. Check Meta's official WhatsApp Business Platform pricing documentation for current per-country Utility rates.

What is the maximum file size for a PDF itinerary sent via WhatsApp API?

Meta allows document attachments up to 100 MB. However, for practical mobile downloads on cellular networks in Pakistan and India, keep your generated PDF itinerary files under 2 MB.

Start a free trial