> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kapa.energy/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get an access token and read battery information.

## Before you begin

You need your OAuth client ID, client secret, and the ID of a battery accessible to your client.
The API base URL is `https://api.kapa.energy`.

## Get an access token

Set `KAPA_CLIENT_ID` and `KAPA_CLIENT_SECRET` in your environment, then send a client credentials request:

```bash theme={null}
curl --request POST 'https://api.kapa.energy/token' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=client_credentials' \
  --data-urlencode "client_id=$KAPA_CLIENT_ID" \
  --data-urlencode "client_secret=$KAPA_CLIENT_SECRET"
```

The response includes `access_token`, `token_type`, and `expires_in`.
Set `KAPA_ACCESS_TOKEN` to the returned access token. Request a new token when it expires.

## Read battery information

Set `KAPA_BATTERY_ID` to your battery ID, then send the token in the `Authorization` header:

```bash theme={null}
curl "https://api.kapa.energy/bat/v1/$KAPA_BATTERY_ID/info" \
  --header "Authorization: Bearer $KAPA_ACCESS_TOKEN"
```

The response describes the battery's manufacturer, model, usable capacity, and nominal power ratings.
Energy values use watt-hours (Wh), and power values use watts (W).

## Explore the API

Open the **API reference** tab to explore authentication, battery information, commands, telemetry, and batches.
Open the **Webhooks** tab to inspect telemetry and command status event payloads.

Read the [overview](https://docs.kapa.energy/index.md) for time conventions, power signs, command behavior, idempotency, and errors.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.