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

# Setup

> Connecting a merchant's WhatsApp number, and switching the assistant on.

We are the Meta Tech Provider: our Meta app, our App Review, one shared inbound
webhook. **Each merchant owns their own WhatsApp Business Account and phone
number.** Meta bills that merchant directly — message cost never flows through
you or us.

## Connecting takes two calls with a human step between them

WhatsApp cannot be provisioned headlessly, and that is Meta's rule rather than
ours: the merchant has to complete an Embedded Signup popup in a real browser.

<Steps>
  <Step title="Read the popup parameters">
    ```http theme={null}
    GET /api/v1/partner/whatsapp/signup-config/
    ```

    ```json theme={null}
    { "app_id": "…", "config_id": "…", "graph_version": "v21.0", "server_ready": true }
    ```

    `app_id` and `config_id` are public by design — a browser needs them to open
    Meta's dialog and they authorise nothing without the secret we never send. Open
    the popup in **your own** admin UI.

    If `server_ready` is `false`, stop: this deployment has no Meta app configured,
    and the popup would open and immediately fail.
  </Step>

  <Step title="Exchange the code, server-side">
    The popup hands the browser a short-lived `code`. Post it back from your server.

    ```http theme={null}
    POST /api/v1/partner/tenants/{ref}/channels/whatsapp/
    ```

    ```json theme={null}
    { "code": "…", "waba_id": "…", "phone_number_id": "…",
      "business_id": "…", "coexistence": false }
    ```

    <Warning>
      **This is the one call in the whole integration that is not safe to
      blind-retry.** The code is single-use and short-lived; replaying a spent one
      fails at Meta, not here. If you lose our response, read the channel back with
      `GET` before you decide anything.
    </Warning>

    Set `coexistence: true` when the number also stays live on the WhatsApp Business
    App. We start Meta's required contacts and history sync for you — Meta gives you
    24 hours from onboarding, so do not defer this call.
  </Step>
</Steps>

<Note>
  Meta's own consent dialog names the app, so the merchant sees **ImpelLabs**
  during signup. This is the one place the white label leaks. Per-partner Meta
  apps would fix it and would push App Review onto every partner. Tell your
  merchants to expect it rather than letting them discover it in a demo.
</Note>

## Connecting does not start the assistant

A newly connected number arrives `pending`. Inbound messages are recorded, a
lead is created, webhooks fire — **and nothing replies.**

<Warning>
  This is deliberate. The number a merchant connects is usually one their existing
  customers already message. Finishing a popup must not point an untested
  assistant at them.
</Warning>

```http theme={null}
POST /api/v1/partner/tenants/{ref}/channels/whatsapp/numbers/{pnid}/activate/
```

```json theme={null}
{ "assistant_id": "…" }
```

Naming an `assistant_id` binds the number to it, so "turn the AI on" is one
call. `{"on": false}` pauses again — credentials kept, inbound still recorded.

Activating a number that **nothing** will answer on is a `400 no_binding`
rather than a silent success: a silent success there is a merchant waiting for
replies that can never arrive. Pass `force: true` if you mean it.

Reconnecting a released number returns it to `pending`, not to answering.
Nobody has said the assistant should resume.

Once a number is live, see [Numbers](/reseller/channels/whatsapp/numbers) for
managing more than one, and
[Conversations](/reseller/channels/whatsapp/conversations) for sending.
