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

# Provider Setup

> Step-by-step guides for connecting your WhatsApp provider

Referbro supports multiple WhatsApp Business API providers. Follow the instructions below for your specific provider to get your API credentials and connect them to Referbro.

***

## Pragma

Pragma (by Logisy) is a popular WhatsApp Business Solution Provider for D2C brands.

<Steps>
  <Step title="Get Your API Key">
    1. Log in to your Pragma dashboard at [logisy.tech](https://logisy.tech).
    2. Go to **Settings** in the left sidebar.
    3. Find your **API Key** in the settings page.
    4. Copy the API key — you'll need it in the next step.
  </Step>

  <Step title="Create Templates on Pragma">
    Before configuring templates in Referbro, you must create and get them approved on Pragma's platform:

    <Tip>You can copy and paste our proven, ready-to-use templates from the [Template Library](/docs/features/whatsapp/template-library) directly into Pragma!</Tip>

    1. Go to [logisy.tech/connect/broadcast](https://logisy.tech/connect/broadcast/).
    2. Click the **Manage Template** button.
    3. In the side panel, click **+ New Template**.
    4. Fill in the template details:
       * **Template Name** — A unique name (e.g., `referral_invite`). This becomes your **Template ID** in Referbro.
       * **Category** — Select `Marketing` for referral messages.
       * **Language** — Select your language (e.g., `English (en)`).
       * **Template Type** — Select `Media Interactive` if you need buttons, or `Text` for plain messages.
       * **Body** — Write your message text with `{{1}}`, `{{2}}` etc. as placeholders.
       * **Buttons** — Add URL buttons if needed (e.g., a "Shop Now" button with the referral link).
    5. Click **Publish to WhatsApp** and wait for Meta approval (usually minutes to hours).
  </Step>

  <Step title="Configure in Referbro">
    Go to **Apps → Referbro → WhatsApp Settings** and enter:

    | Field               | Value                                                                                   |
    | :------------------ | :-------------------------------------------------------------------------------------- |
    | **Provider Type**   | `Pragma`                                                                                |
    | **API URL**         | The API endpoint provided by Pragma (check your Pragma dashboard or ask Pragma support) |
    | **API Token**       | Your API Key from Step 1                                                                |
    | **Phone Number ID** | Leave blank (not required for Pragma)                                                   |
  </Step>

  <Step title="Map Template Parameters">
    Pragma uses a specific parameter format. Example configuration:

    ```json theme={null}
    {
      "body.1": "Share your unique link and your friends get ₹150 OFF! 👇",
      "body.2": "https://yourstore.com?ref={{REFERRAL_CODE}}&source=order",
      "languageCode": "en",
      "button.url.0.value": "{{REFERRAL_CODE}}&source=order_cta"
    }
    ```

    <Note>
      **Important:** Pragma button parameters use `button.url.<index>.value` format (not `button.url.<index>.<paramIndex>`). Pragma only supports URL-type buttons.
    </Note>

    <Tip>
      You can use the Referbro **Share Button URL** (`/whatsapp/share`) as the base URL for your URL buttons — when tapped, it opens WhatsApp with the campaign's Share Message pre-filled. See [Share Button URL](/docs/features/whatsapp/overview#share-button-url) for syntax and configuration details.
    </Tip>
  </Step>
</Steps>

***

## Bitespeed

<Steps>
  <Step title="Get Your Channel ID (API Token)">
    Contact the Bitespeed team and ask for your **Channel ID**. In Referbro, this value must be entered in the **API Token** field.
  </Step>

  <Step title="Get Your Templates Ready">
    Create and get your WhatsApp templates approved in Bitespeed first.

    * **Template ID** is the UUID in the template URL when you open a template in Bitespeed.
    * Use `{{1}}`, `{{2}}`, etc. in the template body for dynamic values.
  </Step>

  <Step title="Configure in Referbro">
    | Field               | Value                                                                                       |
    | :------------------ | :------------------------------------------------------------------------------------------ |
    | **Provider Type**   | `Bitespeed`                                                                                 |
    | **API URL**         | Bitespeed API endpoint. If you do not provide one, Referbro uses the default Bitespeed URL. |
    | **API Token**       | Your Bitespeed **Channel ID**                                                               |
    | **Phone Number ID** | Leave blank                                                                                 |
  </Step>

  <Step title="Map Template Parameters">
    Bitespeed template mapping is positional:

    * `{{1}}` is populated from JSON key `1`
    * `{{2}}` is populated from JSON key `2`
    * and so on

    Example:

    ```json theme={null}
    {
      "1": "John",
      "2": "https://yourstore.com?ref=JOHN-AB12"
    }
    ```
  </Step>
</Steps>

***

## Meta (Cloud API)

Direct integration with Meta's official WhatsApp Cloud API — no third-party BSP needed.

<Steps>
  <Step title="Create a Meta App">
    1. Go to the [Meta Developers Portal](https://developers.facebook.com/) and log in.
    2. Click **My Apps → Create App**.
    3. Select app type: **Business**.
    4. Add the **WhatsApp** product to your app.
  </Step>

  <Step title="Get Your Credentials">
    In your Meta App Dashboard, navigate to **WhatsApp → API Setup**:

    * **Phone Number ID** — Listed under "From" phone number. Copy this value.
    * **API URL** — Construct it as: `https://graph.facebook.com/v22.0/YOUR_PHONE_NUMBER_ID/messages` (replace `YOUR_PHONE_NUMBER_ID` with your actual ID).
    * **Access Token** — For production, generate a **Permanent System User Token**:
      1. Go to [Meta Business Settings → System Users](https://business.facebook.com/settings/system-users).
      2. Create a System User or select an existing one.
      3. Click **Generate New Token**, select your WhatsApp app, and grant the `whatsapp_business_messaging` permission.
      4. Copy the generated token.

    <Warning>
      The temporary token shown in API Setup **expires in 24 hours**. Always use a permanent System User Token for production.
    </Warning>
  </Step>

  <Step title="Create Message Templates">
    <Tip>You can copy and paste our proven, ready-to-use templates from the [Template Library](/docs/features/whatsapp/template-library) directly into your WhatsApp Manager!</Tip>

    1. Go to [WhatsApp Manager → Message Templates](https://business.facebook.com/latest/whatsapp_manager/message_templates).
    2. Click **Create Template**.
    3. Choose a **Category** (typically `Marketing` for referral messages).
    4. Select your **Language**.
    5. Write the **Body** with placeholders like `{{1}}`, `{{2}}`.
    6. Add **Buttons** if needed (URL buttons for referral links). You can use the Referbro [Share Button URL](/docs/features/whatsapp/overview#share-button-url) as the button destination.
    7. Submit for review — Meta usually approves within minutes.
  </Step>

  <Step title="Configure in Referbro">
    | Field               | Value                                                            |
    | :------------------ | :--------------------------------------------------------------- |
    | **Provider Type**   | `Meta Whatsapp Business API`                                     |
    | **API URL**         | `https://graph.facebook.com/v22.0/YOUR_PHONE_NUMBER_ID/messages` |
    | **API Token**       | Your permanent System User Access Token                          |
    | **Phone Number ID** | Your WhatsApp Phone Number ID                                    |
  </Step>

  <Step title="Map Template Parameters">
    Meta uses dot-notation keys that mirror the official Cloud API component structure. Example configuration:

    ```json theme={null}
    {
      "languageCode": "en_US",
      "body.1": "John",
      "body.2": "https://yourstore.com?ref={{REFERRAL_CODE}}&source=order",
      "button.url.0.1": "{{REFERRAL_CODE}}&source=order_cta"
    }
    ```

    <Note>
      **Key format:**

      * `body.<index>` — Body variable, 1-based (`body.1` maps to `{{1}}`). You can optionally name a variable with `body.<index>.<name>` for named placeholders.
      * `button.url.<buttonIndex>.<paramIndex>` — URL button parameter. The value is appended to the button's base URL. `buttonIndex` is 0-based, `paramIndex` is 1-based.
      * `button.quick_reply.<buttonIndex>.<paramIndex>` — Quick-reply button. The value is sent as the button's postback payload.
      * `languageCode` — Optional, defaults to `en_US`.
    </Note>

    <Tip>
      You can use the Referbro **Share Button URL** (`/whatsapp/share`) as the base URL for your URL buttons — when tapped, it opens WhatsApp with the campaign's Share Message pre-filled. See [Share Button URL](/docs/features/whatsapp/overview#share-button-url) for syntax and configuration details.
    </Tip>
  </Step>
</Steps>

***

## Wabtune

<Steps>
  <Step title="Get Your API Key">
    Log in to your Wabtune dashboard and navigate to **Settings → API Key**. Copy the key.
  </Step>

  <Step title="Configure in Referbro">
    | Field               | Value                                                                 |
    | :------------------ | :-------------------------------------------------------------------- |
    | **Provider Type**   | `Wabtune`                                                             |
    | **API URL**         | Leave blank (auto-configured) or use the endpoint provided by Wabtune |
    | **API Token**       | Your Wabtune API Key                                                  |
    | **Phone Number ID** | Your Wabtune Phone Number ID (required)                               |
  </Step>

  <Step title="Map Template Parameters">
    Wabtune sends parameters as query values. Keys ending in a number are treated as positional template variables and are sorted by their numeric suffix. Example configuration:

    ```json theme={null}
    {
      "1": "John",
      "2": "https://yourstore.com?ref={{REFERRAL_CODE}}&source=order"
    }
    ```

    <Note>
      Keys ending in a number (e.g. `1`, `2`, or `var1`, `var2`) are ordered by that number and map to the template placeholders in sequence. Any non-numbered keys are passed through as-is.
    </Note>
  </Step>
</Steps>

***

## LimeChat

<Steps>
  <Step title="Get Your Credentials">
    Contact LimeChat support or check your [LimeChat dashboard](https://www.limechat.ai/) for API credentials.
  </Step>

  <Step title="Configure in Referbro">
    | Field               | Value                                                                              |
    | :------------------ | :--------------------------------------------------------------------------------- |
    | **Provider Type**   | `LimeChat`                                                                         |
    | **API URL**         | The message endpoint provided by LimeChat (e.g., `https://api.limechat.ai/v1/...`) |
    | **API Token**       | Your LimeChat Authorization Token (sent as `x-limechat-uat`)                       |
    | **Phone Number ID** | Your LimeChat Account ID (sent as `x-fb-account-id`)                               |
  </Step>

  <Step title="Map Template Parameters">
    LimeChat sends parameters as a flat key-value `data` object, where the **Template ID** is the LimeChat event name and each key matches a variable defined in your LimeChat event. Example configuration:

    ```json theme={null}
    {
      "name": "John",
      "referral_link": "https://yourstore.com?ref={{REFERRAL_CODE}}&source=order"
    }
    ```

    <Note>
      Keys are arbitrary and must match the variable names configured in your LimeChat event. Referbro automatically adds a `referral_code` field to the payload.
    </Note>
  </Step>
</Steps>

***

## AiSensy

<Steps>
  <Step title="Get Your API Key">
    1. Log in to [AiSensy](https://aisensy.com/).
    2. Navigate to **API Docs / Developer Settings** in your dashboard.
    3. Copy your API Key.
  </Step>

  <Step title="Configure in Referbro">
    | Field               | Value                                                |
    | :------------------ | :--------------------------------------------------- |
    | **Provider Type**   | `AiSensy`                                            |
    | **API URL**         | The endpoint provided in AiSensy's API documentation |
    | **API Token**       | Your AiSensy API Key                                 |
    | **Phone Number ID** | Leave blank                                          |
  </Step>

  <Step title="Map Template Parameters">
    AiSensy expects an ordered list of template parameters. Referbro builds that list from keys with a numeric suffix, sorted by the trailing number. The **Template ID** must match the campaign name in AiSensy. Example configuration:

    ```json theme={null}
    {
      "userName": "John",
      "param-1": "John",
      "param-2": "https://yourstore.com?ref={{REFERRAL_CODE}}&source=order"
    }
    ```

    <Note>
      **Key format:**

      * `param-<index>` — Template variable, ordered by the trailing number (`param-1` maps to the first `{{1}}`, etc.).
      * `userName` — Recipient name (defaults to `User` if omitted). It is excluded from the ordered parameter list.
    </Note>
  </Step>
</Steps>

***

## Interakt

<Steps>
  <Step title="Get Your API Key">
    1. Log in to [Interakt](https://www.interakt.shop/).
    2. Go to **Developer Settings** or **API Settings** in your dashboard.
    3. Copy your Secret Key / API Key.
  </Step>

  <Step title="Configure in Referbro">
    | Field               | Value                                                                     |
    | :------------------ | :------------------------------------------------------------------------ |
    | **Provider Type**   | `Interakt`                                                                |
    | **API URL**         | `https://api.interakt.ai/v1/public/message/` (or as provided by Interakt) |
    | **API Token**       | Your Interakt Secret Key                                                  |
    | **Phone Number ID** | Leave blank                                                               |
  </Step>

  <Step title="Map Template Parameters">
    Interakt separates body and button parameters using dot-notation keys. Example configuration:

    ```json theme={null}
    {
      "body.1": "Share your unique link and your friends get ₹150 OFF! 👇",
      "body.2": "https://yourstore.com?ref={{REFERRAL_CODE}}&source=order",
      "button.0.1": "{{REFERRAL_CODE}}&source=order_cta"
    }
    ```

    <Note>
      **Key format:**

      * `body.<index>` — Body variable, 1-based (`body.1` maps to `{{1}}`, `body.2` to `{{2}}`, etc.).
      * `button.<buttonIndex>.<paramIndex>` — Button parameter where `buttonIndex` is 0-based and `paramIndex` is 1-based (`button.0.1` is the first parameter of the first button).
    </Note>

    <Tip>
      You can use the Referbro **Share Button URL** (`/whatsapp/share`) as the base URL for your URL buttons — when tapped, it opens WhatsApp with the campaign's Share Message pre-filled. See [Share Button URL](/docs/features/whatsapp/overview#share-button-url) for syntax and configuration details.
    </Tip>
  </Step>
</Steps>

***

## KwikEngage

<Steps>
  <Step title="Get Your Credentials">
    Contact your KwikEngage representative for API credentials and endpoint details.
  </Step>

  <Step title="Configure in Referbro">
    | Field               | Value                     |
    | :------------------ | :------------------------ |
    | **Provider Type**   | `KwikEngage`              |
    | **API URL**         | As provided by KwikEngage |
    | **API Token**       | Your KwikEngage API Key   |
    | **Phone Number ID** | As provided               |
  </Step>

  <Step title="Map Template Parameters">
    KwikEngage uses the same dot-notation component structure as Meta. Example configuration:

    ```json theme={null}
    {
      "languageCode": "en",
      "body.1": "John",
      "body.2": "https://yourstore.com?ref={{REFERRAL_CODE}}&source=order",
      "button.0.1": "{{REFERRAL_CODE}}&source=order_cta"
    }
    ```

    <Note>
      **Key format:**

      * `body.<index>` — Body variable, 1-based (`body.1` maps to `{{1}}`).
      * `button.<subType>.<buttonIndex>.<paramIndex>` — Button parameter, where `subType` is `url` or `quick_reply`, `buttonIndex` is 0-based, and `paramIndex` is 1-based (e.g. `button.url.0.1`).
      * `languageCode` — Optional, defaults to `en`.
    </Note>

    <Tip>
      You can use the Referbro **Share Button URL** (`/whatsapp/share`) as the base URL for your URL buttons — when tapped, it opens WhatsApp with the campaign's Share Message pre-filled. See [Share Button URL](/docs/features/whatsapp/overview#share-button-url) for syntax and configuration details.
    </Tip>
  </Step>
</Steps>

***

## SagePilot

<Steps>
  <Step title="Get Your Credentials">
    Contact your SagePilot representative for API credentials and endpoint details.
  </Step>

  <Step title="Configure in Referbro">
    | Field               | Value                                                                   |
    | :------------------ | :---------------------------------------------------------------------- |
    | **Provider Type**   | `SagePilot`                                                             |
    | **API URL**         | As provided by SagePilot                                                |
    | **API Token**       | Your SagePilot API Key                                                  |
    | **Phone Number ID** | Your SagePilot **Workspace ID** (required, sent as `X-SP-Workspace-Id`) |
  </Step>

  <Step title="Map Template Parameters">
    SagePilot sends parameters as a key-value map. Each key matches a variable name in your SagePilot template. The **Template ID** must match the template name in SagePilot. Example configuration:

    ```json theme={null}
    {
      "channelId": "your-sagepilot-channel-id",
      "customerName": "John",
      "1": "John",
      "2": "https://yourstore.com?ref={{REFERRAL_CODE}}&source=order"
    }
    ```

    <Note>
      **Key format:**

      * `channelId` — **Required.** Your SagePilot channel ID. It is read from here and not sent as a template variable.
      * `customerName` — Optional recipient name (defaults to `Customer`).
      * All other keys are sent as the template's named parameters.
    </Note>
  </Step>
</Steps>

***

## QuickReply

QuickReply.ai is a WhatsApp Business Solution Provider with built-in automation playbooks.

<Steps>
  <Step title="Get Your Credentials">
    1. Log in to your [QuickReply.ai](https://quickreply.ai/) dashboard.
    2. Navigate to **Settings → API / Developer Settings**.
    3. Copy your **Client ID** and **Secret Key**. QuickReply authenticates each request with these two values.
  </Step>

  <Step title="Get Your Templates Ready">
    Create and get your WhatsApp templates approved in QuickReply first.

    * The **Template ID** is the template's identifier in QuickReply — it is sent as the `templateId` query parameter.
    * Use `{{1}}`, `{{2}}`, etc. in the template body for dynamic values.
  </Step>

  <Step title="Configure in Referbro">
    | Field               | Value                                                                                                                                |
    | :------------------ | :----------------------------------------------------------------------------------------------------------------------------------- |
    | **Provider Type**   | `Quickreply`                                                                                                                         |
    | **API URL**         | Leave blank to use the default (`https://app.quickreply.ai/api/whatsapp/send-template`) or enter the endpoint provided by QuickReply |
    | **API Token**       | Your credentials in the format `client-id:secret-key`                                                                                |
    | **Phone Number ID** | Leave blank                                                                                                                          |

    <Warning>
      The **API Token** must be entered as a single colon-separated string: `client-id:secret-key`. Both values are required.
    </Warning>
  </Step>

  <Step title="Map Template Parameters">
    QuickReply uses prefixed keys for body and button parameters. Example configuration:

    ```json theme={null}
    {
      "param-1": "Share your unique link and your friends get ₹150 OFF! 👇",
      "param-2": "https://yourstore.com?ref={{REFERRAL_CODE}}&source=order",
      "button_param-1": "{{REFERRAL_CODE}}&source=order_cta"
    }
    ```

    <Note>
      **Key format:**

      * `param-<index>` — Body variable, ordered by the numeric suffix (`param-1`, `param-2`, etc.).
      * `button_param-<index>` — Dynamic CTA button URL suffix, ordered by the numeric suffix (optional).
    </Note>

    <Tip>
      You can use the Referbro **Share Button URL** (`/whatsapp/share`) as the base URL for your URL buttons — when tapped, it opens WhatsApp with the campaign's Share Message pre-filled. See [Share Button URL](/docs/features/whatsapp/overview#share-button-url) for syntax and configuration details.
    </Tip>
  </Step>
</Steps>

***

## Custom Provider

Use this for any generic HTTP-based WhatsApp provider not listed above.

| Field               | Value                                                           |
| :------------------ | :-------------------------------------------------------------- |
| **Provider Type**   | `Custom`                                                        |
| **API URL**         | The full URL endpoint to POST messages to                       |
| **API Token**       | Your provider's authentication token (sent as a `Bearer` token) |
| **Phone Number ID** | If required by your provider                                    |

### Map Template Parameters

The Custom provider POSTs a flat JSON payload. Only the `message` and `quickReply` keys are read from your template parameters:

```json theme={null}
{
  "message": "Hi John! Use my link to get ₹150 OFF: https://yourstore.com?ref={{REFERRAL_CODE}}",
  "quickReply": "SHOP_NOW"
}
```

This produces the following request body to your endpoint:

```json theme={null}
{
  "to": "919876543210",
  "message": "Hi John! Use my link to get ₹150 OFF: https://yourstore.com?ref=JOHN-AB12",
  "templateId": "your_template_id",
  "referralCode": "JOHN-AB12",
  "quickReply": "SHOP_NOW"
}
```

<Note>
  If your provider expects a different schema, you may need an intermediary (like a webhook relay or cloud function) to transform the request into your provider's format.
</Note>
