> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pingback.live/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp

> Connect WhatsApp Business to receive and reply to customer messages in PingBack.

Connecting a WhatsApp Business number routes inbound messages into your PingBack inbox. Agents can reply directly from PingBack, and replies are delivered back to customers on WhatsApp.

<Note>WhatsApp is available on the **Mini** and **Pro** plans only.</Note>

## Prerequisites

Before you start, make sure you have:

* A **WhatsApp Business API** account (via Meta's Cloud API or a BSP).
* A **Meta App** in the [Meta Developer Portal](https://developers.facebook.com/) with WhatsApp webhook permissions enabled.
* Your **Phone Number ID** and a valid **Access Token** from the Meta App dashboard.

## Setup

<Steps>
  <Step title="Create the WhatsApp channel in PingBack">
    Send a `POST` request to `/api/v1/channels/` with `type` set to `"whatsapp"` and your WhatsApp credentials in the `config` object.

    <CodeGroup>
      ```bash curl theme={null}
      curl -X POST https://api.pingback.live/api/v1/channels/ \
        -H "Authorization: Bearer <your_token>" \
        -H "Content-Type: application/json" \
        -d '{
          "type": "whatsapp",
          "config": {
            "phone_number_id": "1234567890",
            "access_token": "EAAxxxxxxxxxxxxxxx",
            "verify_token": "pingback_verify"
          },
          "is_active": true
        }'
      ```

      ```json response theme={null}
      {
        "id": 42,
        "type": "whatsapp",
        "is_active": true,
        "config": {
          "phone_number_id": "1234567890",
          "access_token": "EAAxxxxxxxxxxxxxxx",
          "verify_token": "pingback_verify",
          "_meta_setup_instructions": {
            "callback_url": "https://api.pingback.live/api/v1/webhooks/whatsapp",
            "verify_token": "pingback_verify"
          }
        }
      }
      ```
    </CodeGroup>

    The response includes a `_meta_setup_instructions` object with the values you need for the next step.
  </Step>

  <Step title="Configure the webhook in your Meta App">
    In your Meta App's **WhatsApp > Configuration** section, set the following:

    | Field            | Value                                                |
    | ---------------- | ---------------------------------------------------- |
    | **Callback URL** | `https://api.pingback.live/api/v1/webhooks/whatsapp` |
    | **Verify token** | `pingback_verify`                                    |

    Then subscribe to the **`messages`** webhook field and click **Verify and Save**.

    <Warning>The callback URL and verify token must match exactly as shown above. Any difference will cause webhook verification to fail.</Warning>
  </Step>

  <Step title="Test the connection">
    Send a WhatsApp message from a customer phone number to your connected Business number. The message should appear as a new conversation in your PingBack inbox within seconds.
  </Step>
</Steps>
