> For the complete documentation index, see [llms.txt](https://docs.hostelmate.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostelmate.co/api-documentation.md).

# API Documentation

Learn how to use our APIs, create credentials, authenticate requests, and build custom booking and guest workflows across bookings, guests, and availability.

Everything you need to connect external systems to Hostel Mate—create bookings, sync guests, fetch availability, and more.

## Quick Start

1. Generate an API key: [API Access](https://docs.hostelmate.co/finance-management/user-management/api-access.md)
2. Add the key to your request headers: [Authentication](https://docs.hostelmate.co/api-documentation/authentication.md)
3. Call your first endpoint — for example [Bookings Create](https://docs.hostelmate.co/api-documentation/bookings/create.md)

## Core Guides

* Authentication: required headers and rate limits — [read more](https://docs.hostelmate.co/api-documentation/authentication.md)
* Availability: check which rooms a guest can book for a stay, and for how much — [read more](https://docs.hostelmate.co/api-documentation/availability.md)
* Rates calendar: read nightly prices, closed dates, beds for sale and stay rules, and change prices — [read more](https://docs.hostelmate.co/api-documentation/rates.md)
* Sync only the bookings that changed — [read more](https://docs.hostelmate.co/api-documentation/bookings/list.md#only-the-bookings-that-changed)
* Booking Engine: build your own booking flow (check availability, then create the booking) — [read more](https://docs.hostelmate.co/api-documentation/booking-engine.md)
* Booking operations: [Bookings List](https://docs.hostelmate.co/api-documentation/bookings/list.md), [Booking Detail](https://docs.hostelmate.co/api-documentation/bookings/get.md), [Bookings Create](https://docs.hostelmate.co/api-documentation/bookings/create.md), [Bookings Update](https://docs.hostelmate.co/api-documentation/bookings/update.md), [Booking Logs](https://docs.hostelmate.co/api-documentation/bookings/logs.md), and [Booking Delete](https://docs.hostelmate.co/api-documentation/bookings/delete.md)
* Payments endpoint: [Payments](https://docs.hostelmate.co/api-documentation/payments.md)
* Guests endpoints: [Guests GET](https://docs.hostelmate.co/api-documentation/guests/get.md) and [Guests Update](https://docs.hostelmate.co/api-documentation/guests/update.md)
* Webhooks: real-time event notifications — [read more](https://docs.hostelmate.co/api-documentation/webhooks.md)

## Best Practices

* Store API keys server-side only; rotate them after staff changes
* **Always include `Idempotency-Key`** on `POST` and `PATCH` requests — it is required, not optional; missing it returns `400`
* Respect the 120 requests per minute limit (per API key) and add exponential backoff on 429 errors
* Log request IDs from responses to speed up support investigations

## Need Help?

Send request IDs, timestamps, and payload summaries to <contact@hostelmate.co> when opening a support ticket so we can assist quickly.
