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

# Setup links

> Let a customer connect their own WhatsApp account.

A setup link is a one-time URL your customer opens to connect their WhatsApp Business Account through Meta's Embedded Signup. Their credentials go to Meta, never through your product.

```bash theme={null}
curl https://lazyapp.in/v1/platform/setup-links \
  -H "Authorization: Bearer $LAZYAPP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "cus_9f8b1c2d",
    "expires_in_days": 7,
    "use_policy": "single",
    "allowed_connection_type": "new",
    "redirect_url": "https://yourapp.example/settings/whatsapp?connected=1",
    "success_webhook_url": "https://yourapp.example/hooks/whatsapp-connected",
    "failure_webhook_url": "https://yourapp.example/hooks/whatsapp-failed"
  }'
```

```json theme={null}
{
  "id": "set_4a6b8c7d",
  "customer_id": "cus_9f8b1c2d",
  "url": "https://lazyapp.in/connect/set_4a6b8c7d...",
  "expires_at": "2026-08-26T11:42:07+00:00",
  "use_policy": "single",
  "use_count": 0,
  "usable": true,
  "token": "..."
}
```

Hand `url` to your customer. Email it, or put it behind a **Connect WhatsApp** button in your settings screen.

For the full connect story (console vs platform, webhooks, reconnect), see [Connecting WhatsApp](https://docs.lazyapp.in/guides/connecting-whatsapp.md).

## Options

| Field | Effect |
| - | - |
| `expires_in_days` | 1–90. Shorter is safer |
| `use_policy` | `single` burns after one success. `multi` allows `max_uses` |
| `allowed_connection_type` | `new` for a fresh account, `reconnect` to repair an existing one, `either` |
| `redirect_url` | Where the customer lands afterwards |
| `locale` | Renders the connect screen in their language |
| `success_webhook_url` / `failure_webhook_url` | Per-link callbacks, in addition to your workspace webhooks |
| `template_set` | Starter templates to apply when the customer connects. Valid keys from [`GET /v1/templates/sets`](https://docs.lazyapp.in/api-reference/templates/list-starter-template-sets) |
| `meta_billing_mode` | `customer_managed` (default) or `partner_managed`. Stored on the link and applied to the WhatsApp Business Account. It cannot be changed later on that account. See [Who pays Meta](#who-pays-meta) |

## Who pays Meta

With `customer_managed`, the default, Meta bills the business for its messages on its own Meta payment method, at Meta's rates. LazyApp charges nothing per message, and your platform wallet pays only ₹999 a month for the connected number.

Use `partner_managed` only when LazyApp pays Meta for that account through a LazyApp credit line. Then each paid message is debited from a wallet: Meta's rate, plus 5% when the WhatsApp account is not billed in USD and a further 5% for messages not sent through LazyApp. See [Wallets](https://docs.lazyapp.in/billing/wallets.md#platform-teams). Choose deliberately: the mode is fixed for the account once the customer connects. See [How platform billing works](https://docs.lazyapp.in/platform/overview.md#how-platform-billing-works) and [Meta message billing](https://docs.lazyapp.in/billing/meta-message-billing.md).

## Starter templates

When a customer connects through a setup link, LazyApp can seed their workspace with a pre-built template set — appointment reminders, order updates and the like. Pass `template_set` when creating the link:

```json theme={null}
{
  "customer_id": "cus_9f8b1c2d",
  "template_set": "real_estate"
}
```

Discover valid keys with [`GET /v1/templates/sets`](https://docs.lazyapp.in/api-reference/templates/list-starter-template-sets). Do not hardcode them — the available sets depend on this installation's configuration.

## Do not trust the redirect

The `redirect_url` fires in the customer's browser. It can be reached without the connection having succeeded, and it will not fire at all if they close the tab after a successful connect.

Treat it as UX only. Confirm from the server side:

> **customer.connected**
>
> The connection is live and ready to send.

> **setup\_link.failed**
>
> The attempt failed. Show your customer what to fix and issue a new link.

## Revoking

```bash theme={null}
curl -X DELETE https://lazyapp.in/v1/platform/setup-links/{setup_link} \
  -H "Authorization: Bearer $LAZYAPP_API_KEY"
```

Answers `204`. The URL stops working immediately. `GET /v1/platform/setup-links` lists links, page-numbered, with `usable` telling you whether each still works, so a support agent can see at a glance whether a customer's link expired.

## After connecting

Check what their number actually supports before enabling features in your UI — see [capabilities](https://docs.lazyapp.in/concepts/capabilities.md). A new connection may not have calling or block lists, and that is Meta's decision rather than yours.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.