> 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

{% 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).

* **Adding Webhooks:** You can specify an external URL and pick exactly which events should trigger the webhook.
* **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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hostelmate.co/finance-management/user-management/api-access.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
