> For the complete documentation index, see [llms.txt](https://docs.pulsoid.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pulsoid.net/heart-rate-and-sensor-data/read-latest-battery-level-via-http.md).

# Read Latest Battery Level via HTTP

This method allows reading the latest battery level of the user's measuring device, that is the heart rate monitor or watch. It is not the battery of the phone or computer running the Pulsoid app. To receive battery level updates in real time, use [Read Data via WebSocket v2](https://docs.pulsoid.net/heart-rate-and-sensor-data/read-data-via-websocket-v2.md).

{% hint style="warning" %}
Battery level is reported by the latest versions of the Pulsoid desktop, Android, iOS, and watchOS apps. It is not available yet in the Wear OS app, where support is pending review. Users of the Wear OS app or older app versions have no battery level data.
{% endhint %}

**Request:**

<table><thead><tr><th width="131">name</th><th>value</th></tr></thead><tbody><tr><td>url</td><td><code>https://dev.pulsoid.net/api/v1/data/battery_level/latest</code></td></tr><tr><td>method</td><td><code>GET</code></td></tr><tr><td>scope</td><td><code>data:battery_level:read</code></td></tr></tbody></table>

**Query Parameters explained:**

<table><thead><tr><th width="165">name</th><th>type</th><th width="176">possible values</th><th width="83">default</th><th>description</th></tr></thead><tbody><tr><td>response_mode</td><td>string</td><td><code>json</code>, <code>text_plain_only_heart_rate</code></td><td><code>json</code></td><td>Allow control format of response. <code>text_plain_only_heart_rate</code> returns only the battery percent as plain text</td></tr></tbody></table>

**Headers Parameters explained:**

<table><thead><tr><th width="168">name</th><th>value</th><th>description</th></tr></thead><tbody><tr><td>Authorization</td><td>Bearer {access token}</td><td>How to obtains access token<br><a href="https://docs.pulsoid.net/#how-to-obtain-an-authorization-token">https://docs.pulsoid.net/#how-to-obtain-an-authorization-token</a></td></tr></tbody></table>

**Response:**

| name                        | type   | description                                          |
| --------------------------- | ------ | ---------------------------------------------------- |
| measured\_at                | number | Unix timestamp in milliseconds                       |
| data                        | object | Holds metrics data                                   |
| data.battery\_level.percent | number | Battery level of the measuring device, from 0 to 100 |

**Specific Errors:**

| http status code | reason                                                                   |
| ---------------- | ------------------------------------------------------------------------ |
| 400              | Token does not have `data:battery_level:read` scope (error code 6003)    |
| 412              | User doesn't have any battery level data                                 |
| 422              | Unsupported `response_mode`, for example `legacy_json` (error code 6004) |
| 500              | Unexpected error while retrieving the battery level (error code 6010)    |

**cURL Request Example:**

```bash
curl --request GET \
  --url https://dev.pulsoid.net/api/v1/data/battery_level/latest \
  --header 'Authorization: Bearer 8c4da3ce-7ed7-4a19-a1f1-058498661e45'
```

**Response Example**

```json
{
  "measured_at": 1760702400000,
  "data": {
    "battery_level": {
      "percent": 67
    }
  }
}
```

**cURL Request Example with response\_mode=text\_plain\_only\_heart\_rate**

```bash
curl --request GET \
  --url 'https://dev.pulsoid.net/api/v1/data/battery_level/latest?response_mode=text_plain_only_heart_rate' \
  --header 'Authorization: Bearer 8c4da3ce-7ed7-4a19-a1f1-058498661e45'
```

**Response Example with response\_mode=text\_plain\_only\_heart\_rate**

```json
67
```

includes header `content-type: text/plain; charset=UTF-8`
