Docs
Quick Start
  • Getting Started Guide
  • Postman Collection
  • Booking Workflow Guide
Endpoints
  • Events
  • Venues
  • Spaces
  • Bookings
  • Availability
  • Event Categories
  • Event Types
  • BMS
  • Authentication
  1. Home
  2. Docs
  3. Authentication

Authentication

API keys

Send your key in the X-API-Key header on every request. Booka stores only a hash of it, so a lost key cannot be recovered: ask a Booka admin to rotate it. A rotated key keeps working for a grace period, then stops.

curl "$BASE_URL/api/external/venues" -H "X-API-Key: $API_KEY" -H "X-Tenant: $TENANT"

A missing, unknown, inactive or expired key returns 401 with code: "UNAUTHORIZED".

Choosing the tenant

On staging the tenant comes from the X-Tenant header (for example vnsw). On production it comes from the host name, and the header is ignored.

Scopes

Each key carries a list of scopes. A call without its scope returns 403.

ScopeAllows
spaces.readGET /venues, GET /spaces
events.readGET /events, GET /events/{event}, GET /event-types, GET /event-categories
events.writePOST /events, PUT /events/{event}
events.deleteDELETE /events/{event}
events.confidentialSee and edit confidential events unmasked. Without it they are masked, and the key cannot create or change them
availability.readGET /availability
bookings.readGET /bookings, GET /bookings/{booking}, POST /bookings/bulk-fetch
bookings.writePOST /bookings, PUT /bookings/{booking}, POST /bookings/bulk-update
bookings.deleteDELETE /bookings/{booking}, POST /bookings/bulk-cancel
booking_requests.writePOST /booking-requests
bms.readGET /bms/events, /bms/spaces, /bms/scenarios

Venue restrictions

A key is either global or limited to a list of venues. A limited key only sees those venues, their spaces, bookings and events; asking for another venue returns 403 and fetching its records returns 404. Event types and categories are shared and are not filtered.

What a key can change

  • Events created through the API are stamped with the key (created_by is external:<key id>).
  • A key can update or cancel only bookings created by its own API client, never bookings made in Booka.
  • Internal-only events are never visible through this API.

Rate limiting

Each key has a per-minute request limit (60 by default). Past it the API returns 429 with retry_after in seconds.