# Automatic help on the signup screen

`PUT /v1/branding`

When your customer's signup fails with a Meta code our catalog knows —or your customer pastes it on the screen—, the link's page can tell them right away **what happened and what to do**: up to 3 steps, with verified Meta links, and one button: **«Done, try again»** if the link still works, or **«Ask {your brand} for a new link»** if it doesn't.

**Three modes.** `off` (as always: the box to tell what happened), `brand` (with your logo and name) or `neutral` (no brand). Default: `off`.

**Where to choose.** For all your links, `signupHelp` on `PUT /v1/branding` or in the dashboard: **Settings › Branding › Automatic help on the onboarding screen**. Per link, `signupHelp` on `POST /v1/onboarding-links` or `PATCH /v1/onboarding-links/{id}` (`null` = the account's). The link wins; if it says nothing, the account; otherwise `off`.

**What you get.** `onboarding.help_requested` carries `shownToClient` and `shownHelp` (mode, title, steps): you know what your customer saw. `GET /v1/onboarding-links/{id}` returns `signupHelpShown` with `connectedAfter`: whether they connected after seeing it.

## Examples

### cURL

```bash
# 1) for every link of the account (default "off")
curl -X PUT https://api.waiaconnect.com/v1/branding \
  -H "Authorization: Bearer wc_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"signupHelp": "brand"}'

# 2) or per link ("neutral" = no brand; null = the account's)
curl -X POST https://api.waiaconnect.com/v1/onboarding-links \
  -H "Authorization: Bearer wc_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"externalId": "pharmacy-42", "signupHelp": "neutral", "historyDelivery": false}'

# 3) did your customer see it, and did they connect after?
curl https://api.waiaconnect.com/v1/onboarding-links/onb_… -H "Authorization: Bearer wc_live_YOUR_API_KEY"
# → { "link": { "signupHelpEffective": "neutral",
#       "signupHelpShown": { "count": 1, "mode": "neutral", "connectedAfter": true, … } } }
```

### Node.js

```javascript
const H = { "Authorization": "Bearer wc_live_YOUR_API_KEY", "Content-Type": "application/json" };

// the account default (a link that sets "signupHelp" wins)
await fetch("https://api.waiaconnect.com/v1/branding", { method: "PUT", headers: H, body: JSON.stringify({ signupHelp: "brand" }) });

// or per link
const link = await (await fetch("https://api.waiaconnect.com/v1/onboarding-links", {
  method: "POST", headers: H,
  body: JSON.stringify({ externalId: "pharmacy-42", signupHelp: "neutral", historyDelivery: false })
})).json();

// later: what your customer saw
const { link: view } = await (await fetch(`https://api.waiaconnect.com/v1/onboarding-links/${link.publicId}`, { headers: H })).json();
console.log(view.signupHelpShown?.connectedAfter);
```

### PHP

```php
<?php
$h = ["Authorization: Bearer wc_live_YOUR_API_KEY", "Content-Type: application/json"];
$ch = curl_init("https://api.waiaconnect.com/v1/branding");
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_HTTPHEADER => $h,
  CURLOPT_POSTFIELDS => json_encode(["signupHelp" => "brand"]),
]);
echo curl_exec($ch);
```

### Python

```python
import requests
H = {"Authorization": "Bearer wc_live_YOUR_API_KEY"}

# the account default (a link that sets "signupHelp" wins)
requests.put("https://api.waiaconnect.com/v1/branding", headers=H, json={"signupHelp": "brand"})

# or per link
link = requests.post("https://api.waiaconnect.com/v1/onboarding-links", headers=H,
                     json={"externalId": "pharmacy-42", "signupHelp": "neutral", "historyDelivery": False}).json()

# later: what your customer saw
view = requests.get(f"https://api.waiaconnect.com/v1/onboarding-links/{link['publicId']}", headers=H).json()["link"]
print((view["signupHelpShown"] or {}).get("connectedAfter"))
```

## Notes

- It never shows an AI diagnosis or a code the catalog doesn't know: for those the usual box stays, and the case still reaches you.
- When the verification-code limit is the problem, the screen doesn't offer a retry: each attempt makes it worse.
- A value other than `off`, `brand`, `neutral` or `null` returns `400 ONBOARDING_SIGNUP_HELP_INVALID`.
