# Create WhatsApp setup link
Source: https://docs.lomi.africa/api/whatsapp/WhatsAppMerchantController_createSetupLink

Open this link on the merchant phone to connect WhatsApp.

***

title: "Create WhatsApp setup link"
description: "Open this link on the merchant phone to connect WhatsApp."
full: true
method: post
path: /whatsapp/setup-links
operationId: WhatsAppMerchantController\_createSetupLink
--------------------------------------------------------

## Overview

Returns a setup `url`. The merchant opens it on their phone and finishes Meta signup.

`connection_type` defaults to `coexistence`, so the WhatsApp Business app stays on the phone. `dedicated` is an API-only number.

The first connection needs about 150 000 F CFA of monthly volume. A number that is already connected can request a new link below that floor.

## Authentication

Merchant routes require an API key in the `X-API-KEY` header (see [Integration overview](/api)). Use a **test** key against `https://sandbox.api.lomi.africa` and a **live** key against `https://api.lomi.africa`.

## Endpoint

`POST /whatsapp/setup-links`

Base URLs:

* `https://sandbox.api.lomi.africa`
* `https://api.lomi.africa`

## Request

### Path parameters

*No path parameters.*

### Query parameters

*No query parameters.*

### Body

| Name              | Required | Schema                       | Description                  |
| ----------------- | -------- | ---------------------------- | ---------------------------- |
| `connection_type` | No       | `coexistence` \| `dedicated` | Defaults to `coexistence`.   |
| `language`        | No       | string                       | Language for the setup flow. |

## Responses

| Status | Description                        |
| ------ | ---------------------------------- |
| `200`  | Setup `url` for the merchant phone |
| `401`  | Invalid or missing API key         |

## Errors

Errors follow the standard JSON error format. **401** means the key is missing or invalid. The first connection can be refused until monthly volume reaches about 150 000 F CFA.

## Example

```bash
curl -sS -X POST "https://sandbox.api.lomi.africa/whatsapp/setup-links" \
  -H "X-API-KEY: $LOMI_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"connection_type":"coexistence"}'
```

## OpenAPI

* **operationId**: `WhatsAppMerchantController_createSetupLink`
* **Operation**: `POST /whatsapp/setup-links`

Full schemas and **Try it**: [API reference](/api). Machine-readable contract: repo `apps/docs/openapi.json`.
