# Build your own site

You are a Haven host and you want your own direct booking website, built your way: in Lovable, Bolt, v0, Replit, Cursor, Claude Code, Codex or by hand. This page is the whole path. There is no application, no review and no certification. Those exist for companies building software for other people's accounts; this is your own.

Haven stays the booking engine. Your site shows the listings, prices and availability that live in Haven, and hands the guest to Haven's checkout to pay. You never build a calendar store, a pricing engine or a payment form.

## The three steps

### 1. Connect your AI tool to Haven

Add the Haven Build server to the tool that is building your site:

```
https://www.bookwithhaven.com/api/public/mcp/build
```

It is a Model Context Protocol (MCP) server. Your tool signs you in to Haven once, you approve it, and from then on the agent can look up your listing codes, fetch working code, and check its own work against your account. It can read; it cannot change anything. Per-tool instructions are on [Build MCP endpoint](../04-api/08-build-mcp.md).

No MCP in your tool? Skip this step. Paste the prompt in step 3 anyway; everything it needs is also in these docs.

### 2. Create an API key, if your site needs one

Many sites do not. Showing prices, drawing a calendar and taking bookings all work with no key at all.

You need a key when your site's server should read your Haven content (listings, photos, descriptions) or act on your account (reservations, messages, rates). Create one at [Connected apps](https://www.bookwithhaven.com/connected-apps#api-keys): click **Create API key**, name it, copy it. It works immediately.

Then add it to your project as a secret named `HAVEN_API_KEY`, in your hosting platform's secrets or environment variables. Never paste it into a chat and never put it in code. See [API keys](05-api-keys.md).

### 3. Paste the prompt

Copy the setup prompt from [Build a direct booking site with AI](https://www.bookwithhaven.com/build-direct-booking-site-with-ai) into your tool. It tells the agent how Haven works, which rules to keep, and to walk the integration through to a test booking.

With the Build server connected you can also just say: **"Use Haven Build to connect this site to Haven."**

## Three ways to connect a site

They combine. Pick by how much of the booking experience you want to design yourself.

| Way                     | What you get                                                                                 | API key | Effort  |
| ----------------------- | -------------------------------------------------------------------------------------------- | ------- | ------- |
| **Booking widget**      | One script tag and one div per listing. Haven draws the calendar, price and Book button.     | No      | Minutes |
| **Custom booking flow** | Your own calendar and booking card on Haven's live prices, with Haven's checkout at the end. | No      | An hour |
| **Pages from Haven**    | Listing pages, galleries and a stays grid filled from your Haven content, on your server.    | Yes     | An hour |

A typical full build is pages from Haven with a custom booking card.

## Two kinds of endpoint

This is the one idea to hold on to, and your AI tool will be told it too.

**Booking endpoints need no key and are safe in the browser.** A priced quote, nightly prices and availability, a search across a group site, and the checkout handoff. They answer only what a visitor to your Haven listing page can already see. See [Booking endpoints](../04-api/07-storefront.md).

**The account API needs your key and runs on your server only.** Everything about your account: listings and photos, calendars, rates, reservations, guest messages, your Haven sites, and the writes that change them. See [Endpoint index](../04-api/01-endpoint-index.md) and [Operations (writes)](../04-api/03-operations.md).

A key in a browser is public. That is the only way to get this badly wrong, and the code Haven hands your agent is split so it cannot happen by accident.

## What your site never does

- **Calculate a price.** Show the quote Haven returns. Fees, taxes, discounts and seasonal rates are already in it.
- **Take a payment.** The Book button sends the guest to Haven's checkout, which runs on Stripe and settles to your own Stripe account.
- **Store availability.** Read it live. It changes the moment a guest books on Airbnb or anywhere else.

## Before you go live

Ask your agent to run the Build server's `check_go_live`. It reports, from Haven's own data, whether guests can book: each listing, payouts, your plan, and whether your site's API calls are succeeding, with a link for anything only you can finish.

Then book a test stay on your site in a private window. The price on your page should match Haven's, and Book should land on Haven's checkout with the dates filled in. Stop at the payment page.

## What you can and cannot reach

A key reaches your own Haven account and nothing else. It has every permission a host can grant an application, read and write, capped by your own role on the account: an owner's or manager's key can change things, and nobody's key can do what Haven grants to no application at all (billing, payouts, team seats, closing the account). The full list is the [Scope reference](../02-scopes/02-scope-reference.md).

Two things stay protected even with a full key. Refunds and price adjustments take two steps, with a confirmation in between. And a listing whose rates or calendar are owned by a connected property management system refuses a write to them, because the next sync would erase it.

## Building for other hosts?

If your software will connect to accounts that are not yours, a key is the wrong tool: you need an application that each host authorizes. That path is reviewed. Start at [Getting access](01-getting-access.md).
