Skip to content
Keptslot
Start free

Build with AI

An AI coding tool writes a better integration when it reads these docs first. There are two ways to give them to it.

Most integrations are a booking form on a website. This prompt points your tool at that guide and the API description, and lists the mistakes that cost a booking.

Build this with your AI coding tool

Paste the prompt into Cursor, Claude Code, ChatGPT or whatever you build with.

See the prompt
Add Keptslot online booking to this website: the customer picks a service and a time, books, and pays a deposit if the service takes one.

Read these first:
- Guide: https://keptslot.com/docs/guides/booking-page.md
- API description (OpenAPI 3.1): https://keptslot.com/openapi.yaml

Start by asking me for my workspace slug, and remind me to do the dashboard setup in the guide's first section. Fit the work into this site's existing framework and styling; don't add a new framework or build step. If this site already calls Keptslot, check that code against the rules below and tell me what doesn't follow them before changing anything.

The calls, in order, all to https://api.keptslot.com:
1. GET /v1/public/workspaces/{slug}: services, calendars and the questions the form must ask.
2. GET /v1/availability: open times for one service.
3. GET /v1/quote: the length, price and amount due for a service with the extras chosen.
4. POST /v1/bookings: create the booking.
5. POST /v1/bookings/{id}/verify: only when the booking asks for a 6-digit code.

Rules:
- Call 1 takes no key: send none, or the browser refuses the request. Send workspace.publishable_key from its response on calls 2 to 5. Never put a secret key (sk_) in the page.
- If a call answers 403 origin_not_allowed, tell me to add this site's address to the Booking page key.
- A service may offer extras (extra_ids on the service in the workspace response). List only services with standalone true as the choices, and show a service's extras after it is chosen.
- Pass the chosen extra_ids to availability, to the quote and to the booking. Leave extra_ids out when none are chosen; an empty value is refused. When rescheduling, pass only exclude_booking_id to availability.
- Show the quote's price_cents and payment_amount_cents, not the service's own figures. A null payment_amount_cents means nothing is due at booking.
- Send an Idempotency-Key when creating a booking, and keep the access_token from the response. No later response returns it.
- Handle all three outcomes: confirmed, pending with a 6-digit code, and pending with a payment object.
- For the deposit, use stripe_publishable_key and connected_account_id from the payment object.
- Only booking.status "confirmed" means booked. Read it once after a redirect; never poll.
- If workspace.online_bookings_paused is true, the business is not taking online bookings: show that instead of the form. Availability, creating a booking and rescheduling answer 409 bookings_paused. Cancelling still works.
- On the manage page, offer Reschedule only when can_reschedule is true and online_bookings_paused is false. can_reschedule does not account for the pause.
- Show times in the business's timezone (timezone on the workspace response), not the visitor's.

Optional: if I give you a secret key (sk_) in an environment variable, you can set up the workspace from the terminal: calendars with their titles, bios, weekly hours and time off, services (including deposit amounts) and their categories, the booking form's questions, and workspace settings such as timezone, booking policy and "Custom booking frontend". https://keptslot.com/docs/guides/first-call.md shows the calls.
- List what already exists first, and ask me before changing anything that was already there.
- Setting a calendar's working hours, a service's calendars or a question's services replaces the whole list, and editing a question replaces the whole question. Send everything that should stay.
- The secret key never goes in the site's code or in any file the site serves.
- These stay in the dashboard for me: the publishable key and its allowed origins, connecting Stripe, the Pro plan (deposits need both), and photos.

Every docs page has a plain Markdown copy: add .md to its address. The booking page guide is at /docs/guides/booking-page.md. These files cover everything else:

  • llms.txt The starting point. It describes the API and links to the other files.
  • llms-full.txt The overview and every guide in one file.
  • llms-small.txt The same, shortened for a smaller context window.
  • openapi.yaml Every endpoint with its request and response shapes. The endpoint reference pages are built from it and have no Markdown copy.