> 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/finance-management/user-management/api-access.md).

# API Access

Generate API keys, set up Webhooks, and monitor API request logs for seamless external integrations.

{% hint style="info" %}
Hostel Mate is designed to play nicely with your other tools. The API Access page provides developers and tech-savvy managers with everything needed to connect custom software, external booking engines, or data analysis tools directly to your property's database.
{% endhint %}

## 1. API Key Management (Settings)

To authenticate external requests, you need an API key. We keep this simple and highly secure by providing **a single master API key per property**.

| Feature               | Description                                                                                                |
| --------------------- | ---------------------------------------------------------------------------------------------------------- |
| **Generating a Key**  | If the empty state reads "No API Key Generated", click **Generate Key** to create your first active token. |
| **Copying & Viewing** | You can reveal the key with the eye icon, or copy it directly to your clipboard.                           |
| **Key Rotation**      | If you suspect your key has been compromised, you can generate a new one.                                  |

{% hint style="warning" %}
Generating a new key immediately invalidates the old key, so any integrations using the old key will break until updated.
{% endhint %}

## 2. Webhooks

{% hint style="success" %}
Why constantly ask the API if something changed when we can just tell you?
{% endhint %}

The **Webhooks** tab allows you to configure endpoints that will receive real-time `POST` requests whenever a critical event occurs (like a new booking or a payment update).

API keys and request logs work on every plan except Lite. Webhooks are part of the **Advanced** plan; on other plans the Webhooks tab shows an upgrade card. An Admin can move up to Advanced any time from [Plan & Billing](https://docs.hostelmate.co/finance-management/plan-billing.md#changing-your-plan).

* **Adding Webhooks:** Click **Add Webhook**, pick the events, then enter your URL. New bookings, booking changes and cancellations from every channel are ticked for you (the "API only" versions send only what's done through the API); you can also add booking notes, guest changes, self check-ins, guest messages and payments. Type in the search box to find an event, tick a group's box to take all of its events, and open **Selected** to check what you've picked. Each event shows its name as we send it and a short line on what it means. The full list is in [Webhooks](https://docs.hostelmate.co/api-documentation/webhooks.md#supported-events).
* **Changing events:** Click **Edit events** on any webhook card to add or remove events later.
* **Monitoring Deliveries:** Click "View recent deliveries" on any webhook card to see a live log of exactly what we sent, and what HTTP status your server responded with.

## 3. Request Logs

Having integration issues? The **Logs** tab is your debugging command center.

Here you can view a raw feed of every single API request that has hit your property's data. You can filter these logs by:

* **HTTP Method** (`GET`, `POST`, etc.)
* **Status Code** (e.g., filter for `500` Server Errors)
* **Date Range**

Clicking on any log entry expands it to show the full payload, query parameters, and response details.
