Query battery state and energy history from the Tesla Fleet API energy endpoints

domain: developer.tesla.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Register a third-party application on developer.tesla.com and configure OAuth 2.0 redirect URIs; Tesla Fleet API uses OAuth with scopes such as 'energy_device_data' and 'energy_cmds'.
  2. Complete the OAuth authorization code flow with a Tesla account owner to obtain an access token; include the required scopes for reading energy data.
  3. Retrieve the list of energy products (Powerwall gateways) associated with the account via GET /api/1/products, filtering for entries where energy_site_id is present.
  4. Fetch current battery state via GET /api/1/energy_sites/<ENERGY_SITE_ID>/live_status to get battery percentage, grid status, power flows, and island mode.
  5. Query historical energy data via GET /api/1/energy_sites/<ENERGY_SITE_ID>/calendar_history with kind=energy and a specified period (e.g., day or month) to retrieve time-series export, import, solar, and battery charge/discharge values.

Known gotchas

Related routes

Retrieve historical Tesla charging session data and invoices through the Fleet API charging endpoints, separate from live charge-state polling
developer.tesla.com · 5 steps · unrated
Configure a Tesla Fleet API energy endpoint integration to aggregate residential Powerwall fleet state and receive availability signals for VPP dispatch
developer.tesla.com · 6 steps · unrated
Retrieve site battery storage telemetry (state of energy, charge/discharge power) via the SolarEdge monitoring API's storageData endpoint
monitoringapi.solaredge.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans