REST API v1 & v2
OpenAPI 3.1 / JSON

Developer API & Platform Integrations

Build custom integrations, automate workflows, and connect Bokd to your existing hardware and software ecosystem.

Authentication & Scoping

All API requests authenticate via Bearer API keys generated inside your club settings. Each key is strictly isolated to your tenant domain.

Send your tenant API key via the X-API-Key header (generated in Portal → Settings → API Keys). All endpoints are strictly tenant-isolated and protected by per-key rate limiting.

curl -X GET "https://api.bokd.app/api/v1/venues/1/availability?date=2026-11-25" \
  -H "X-API-Key: bk_live_your_tenant_api_key" \
  -H "Accept: application/json"

REST API v1 Endpoints

GET
/api/v1/venues

List active courts / venues for your tenant with hourly rates and surface metadata.

GET
/api/v1/venues/{id}

Retrieve detailed venue configuration, amenities, and blocked periods.

GET
/api/v1/venues/{id}/availability

Query real-time available time slots for a specific date (?date=YYYY-MM-DD).

GET
/api/v1/bookings

List bookings with status, court, customer, and payment breakdown.

GET
/api/v1/bookings/{id}

Retrieve a single booking record including participants and payment logs.

GET
/api/v1/users

List registered club players and members with contact details.

GET
/api/v1/users/{id}

Retrieve a single player profile, loyalty points, and booking history.

Query Pipeline API v2

Structured pagination, dynamic filtering, and multi-column sorting.

GET
/api/v2/bookings

Cursor/page paginated bookings with dynamic ?search=, ?sort_by=, ?sort_dir=, and ?filters= JSON pipeline.

GET
/api/v2/venues

Filtered venues list supporting branch scoping, sport type, and active status.

GET
/api/v2/users

Searchable customer directory with date range and role filters.

Public Guest Booking & Bootstrap API

Embed live court availability and booking holds inside custom websites or mobile apps.

GET
/api/{tenantSlug}/public/bootstrap

Fetch club branding, theme colors, supported locales, and feature flags.

GET
/api/{tenantSlug}/public/bookings/availability

Check live slot availability across all courts without authentication.

POST
/api/{tenantSlug}/public/bookings/holds

Temporarily lock a court slot while the player completes checkout.

POST
/api/{tenantSlug}/public/bookings/guest

Confirm a guest booking after OTP verification and receive a manage token.

Signed Webhooks (HMAC-SHA256)

Receive real-time events for booking.created, booking.cancelled, payment.succeeded, and subscription.updated.

// Verify X-Bokd-Signature (HMAC-SHA256 of raw request body)
const crypto = require("crypto");
const computed = crypto
  .createHmac("sha256", process.env.BOKD_WEBHOOK_SECRET)
  .update(rawBody)
  .digest("hex");
const isValid = crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(computed));

HTTP Status & Error Codes

200 / 201
OK / Created — Request succeeded and JSON payload is returned.
401
Unauthorized — Missing or invalid X-API-Key / Bearer token.
403
Forbidden — Key lacks permission or tenant subscription is suspended.
404
Not Found — Resource or tenant slug does not exist inside your scope.
422
Validation Error — Check the errors object for per-field messages.
429
Too Many Requests — Rate limit exceeded; inspect Retry-After header.