Developer API

Book tee times programmatically

A controlled, scoped REST API so trusted partners and AI booking assistants can read live availability, read public club information, and create bookings. Each key identifies exactly one club, and every request is limited to that club. The API is described in OpenAPI 3.1 so an agent can discover it automatically.

Authentication

Every request carries a bearer API key, minted by a club owner in Settings › API. The full key is shown once; store it securely.

Authorization: Bearer mk_live_...

The key identifies one club. You never pass a club id: the key resolves it, and the API only ever returns or writes that club's data. Prices are always resolved server-side, so a request can never set its own price.

Scopes

A key is granted one or more scopes. A request without the required scope is rejected with 403.

  • availability:readRead open tee-time slots and their visitor green-fee prices.
  • bookings:writeCreate a Stripe Checkout session for a slot (payment completes the booking).
  • club:readRead public club information (name, location, course facts).

Endpoints

GET/api/v1/availability

Returns open slots with the VISITOR green-fee price (demand pricing applied as an anonymous guest). A date beyond the public guest booking window returns an empty list. Requires the `availability:read` scope.

POST/api/v1/bookings

Server-prices the slot at the visitor rate and returns a Stripe Checkout URL. The booking is confirmed when the customer completes payment. Requires the `bookings:write` scope.

GET/api/v1/club

Returns public club details (name, location, contact, course facts, booking URL). No member data or PII. Requires the `club:read` scope.

Rate limit

60 requests per minute per key. Exceeding it returns 429 with a Retry-After header (seconds).

Quickstart

curl -H "Authorization: Bearer mk_live_..." \
  "https://munya.app/api/v1/availability?date=2026-07-20"

Creating a booking returns a Stripe Checkout URL; send the customer there to pay. The booking confirms automatically once payment completes.

OpenAPI specification

The full machine-readable spec (OpenAPI 3.1) is served at /api/v1/openapi.json. Point an OpenAPI client or an AI agent at it to generate a typed integration automatically.