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".
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.
Each key carries a list of scopes. A call without its scope returns 403.
| Scope | Allows |
|---|---|
| spaces.read | GET /venues, GET /spaces |
| events.read | GET /events, GET /events/{event}, GET /event-types, GET /event-categories |
| events.write | POST /events, PUT /events/{event} |
| events.delete | DELETE /events/{event} |
| events.confidential | See and edit confidential events unmasked. Without it they are masked, and the key cannot create or change them |
| availability.read | GET /availability |
| bookings.read | GET /bookings, GET /bookings/{booking}, POST /bookings/bulk-fetch |
| bookings.write | POST /bookings, PUT /bookings/{booking}, POST /bookings/bulk-update |
| bookings.delete | DELETE /bookings/{booking}, POST /bookings/bulk-cancel |
| booking_requests.write | POST /booking-requests |
| bms.read | GET /bms/events, /bms/spaces, /bms/scenarios |
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.
created_by is external:<key id>).Each key has a per-minute request limit (60 by default). Past it the API returns 429 with retry_after in seconds.