# Introduction

TheBooking implements a **REST API** to make the interaction with its data easier for developers.

{% hint style="warning" %}
The API is still at early stage, so it could have some limits. Feel free to contact our support for any report or suggestion.
{% endhint %}

## Auth API tokens

In order to use the API, a client must provide an authorization API token to identify itself.

Authorization tokens can be generated inside the `Settings > API` section. A token can authorize either read-only operations (GET) or read-writing data operations (POST or GET).

A token can't be modified, but it can be revoked (deleted).

## API base url

The base URL that a REST request has to call can be found inside the `Settings > API` section. It depends on your WordPress installation and on how permalinks are set, generally it has this form:

```
https://mywebsite.com/index.php?rest_route=/thebooking/v1/api/
```

so for instance, a GET call for listing reservations should be directed to:

```
http://mywebsite.com/index.php?rest_route=/thebooking/v1/api/reservations/get/
```

## Authorization

Each API request must be equipped with a REST API token. Once a token is generated, it must be included in the **Authorization header** of the request:

```
Authorization Bearer <token>
```


---

# Agent Instructions: 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:

```
GET https://stroheimdesign.gitbook.io/api/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
