# Add to your website

> One line of code for the WhatsApp button, website chat, Ask on WhatsApp, booking, opt-in box, lead form and catalogue.

## The one line

Create a site in Wapitick (**Add to your website**) or with `POST /v1/sites` (`websites_create`). Paste the code it
gives you on every page, just before `</body>`:

```html
<script src="https://api.wapitick.com/v1/public/site/wks_YOURKEY/loader.js" async></script>
```

The loader is one small file (under 30 KB) with your settings inside. It sets no cookies, stores nothing in the
browser and makes no request to Wapitick until the visitor clicks, except a single install check while your site is
not verified. The website chat (the larger part) loads only when someone opens it.

## Embeddables

| What | How |
|---|---|
| Floating WhatsApp button (greeting, message with the page title, QR code on desktop, Instagram / Messenger / call links) | on by default |
| Website chat answered by the AI Assistant, continues on WhatsApp | `embeds.chat.enabled` |
| Ask on WhatsApp for a product or service | `<button data-wapitick-ask="Blue kurta, size M"></button>` |
| Booking (inline, pop-up, floating) | `<div data-wapitick="booking"></div>` |
| Opt-in box ("Get updates on WhatsApp") | `<div data-wapitick="optin"></div>` |
| Lead / contact form that continues on WhatsApp | `<div data-wapitick="lead_form"></div>` |
| Catalogue or menu | `<div data-wapitick="catalogue"></div>` |

JavaScript: `WapitickSite.open()`, `.chat()`, `.book()`, `.ask("item")`, `.scan()` (after you add elements later).
Forms record the exact consent wording, time and page; they have a hidden honeypot field, optional Cloudflare
Turnstile and per-IP limits.

Look: every embeddable is styled only by design tokens (`embeds.theme`: accent, text colour, radius, position,
light/dark), so it can be restyled without code.

## Allowed sites

Browser calls are accepted only from the exact origins in `allowed_origins` (filled from your site address and its
`www` twin). Add staging or other domains there.

## Platforms

`POST /v1/sites:detect-platform` (`websites_detect_platform`) tells WordPress, Shopify, Wix, Squarespace, Blogger,
Google Sites, Nuvemshop, Salla, Zid and Webflow apart and returns the steps. On WordPress, install the **Wapitick**
plugin instead of pasting code.

## Check the install, send to your developer

- `POST /v1/sites/{id}/verify` fetches your page and looks for the code; the loader also reports in from the browser.
- `POST /v1/sites/{id}/developer-links` e-mails your developer the code and steps, with a read-only link valid 7 days.
- `GET /v1/sites/{id}/qr.svg` and `GET /v1/sites/{id}/counter-kit.pdf`: a QR code and a printable A4 sign.

No website? Share your Wapitick page link instead.
