> 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

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](/finance-management/user-management/api-access.md)
2. Add the key to your request headers: [Authentication](/api-documentation/authentication.md)
3. Call your first endpoint — for example [Bookings Create](/api-documentation/bookings/create.md)

## Core Guides

* Authentication: required headers and rate limits — [read more](/api-documentation/authentication.md)
* Booking Engine API: surface availability on your website — [read more](/api-documentation/booking-engine.md)
* Booking operations: [Bookings List](/api-documentation/bookings/list.md), [Booking Detail](/api-documentation/bookings/get.md), [Bookings Create](/api-documentation/bookings/create.md), [Bookings Update](/api-documentation/bookings/update.md), [Booking Logs](/api-documentation/bookings/logs.md), and [Booking Delete](/api-documentation/bookings/delete.md)
* Payments endpoint: [Payments](/api-documentation/payments.md)
* Guests endpoints: [Guests GET](/api-documentation/guests/get.md) and [Guests Update](/api-documentation/guests/update.md)
* Webhooks: real-time event notifications — [read more](/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 req/min limit 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.
