# TankMate API

{% hint style="success" %}
A TankMate Premium Web Subscription is required to use the API service - AUD 49 / year, per account. This subscription is managed and billed through the new TankMate web app / portal.
{% endhint %}

### Accessing your API Key and User ID

To access your sensor data, a valid API Key is required, as well as your User ID (uid).  These can be accessed via the [TankMate web portal](https://tankmate.app/), under the Account tab.

The Tankmate API includes two endpoints:

* **Sensor status**: which returns the current state of all sensors linked to one account. This includes the current tank level, fill percentage etc. as well as the hardware status - such as the battery health, signal strength etc.&#x20;
* **Level data**: returns all readings for a specific sensor (deviceID), for the previous X number of days

#### Access the [TankMate API Swagger UI documentation here](https://api.tankmate.app/docs)

<figure><img src="/files/dvpjB82UfkAlGenSXm5Q" alt=""><figcaption><p>"status" and "level-data" endpoints</p></figcaption></figure>


---

# 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://tankmate.gitbook.io/tankmate/app-user-guides/tankmate-api.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.
