# API documentation

Welcome to the Serenicity API. We hope you will find what you're looking for in here. In case you don't, feel free to contact us through email or chat!

## How to use the API?

The first step is to get your API Secret Key. To do so, head to the [My Account page](https://control.serenicity.fr/profile/api). You can access it using the top-right menu.

Your API Secret Key should be passed as an HTTP header named `Authorization` and be prefixed with `Api-Key`.

```
Api-Key 43262B49-C112-45C4-A2A8-F2BF50104T3C
```

Here is the base URL for every request to the API.

```
https://api.control.serenicity.fr/api/v1
```

If you want to make a call to the API using the [curl command, ](https://curl.se/)the request would look like this:

```shell
curl "https://api.control.serenicity.fr/api/v1/sensors" \
  -H "Authorization: Api-Key YOUR_API_KEY"
```

## Limits

You have a quota of requests per month, if you exceed this quota you will have to pay for to the next plan by contacting your sales representative.&#x20;

{% hint style="danger" %}
To avoid abuse, the number of requests is limited to a maximum of 100 per minute.
{% endhint %}


---

# 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://docs.serenicity.fr/api/api-documentation.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.
