{"id":"18fab994-a4d5-49eb-b20c-b9c040e2f597","task":"Configure a Tesla Fleet API energy endpoint integration to aggregate residential Powerwall fleet state and receive availability signals for VPP dispatch","domain":"developer.tesla.com","steps":["Register a third-party application on the Tesla Developer Portal and obtain OAuth 2.0 client credentials; implement the Tesla Fleet API OAuth flow using the authorization_code grant type with scope energy:read energy:write","After user authorization, call GET https://fleet-api.prd.na.vn.cloud.tesla.com/api/1/energy_sites/{energy_site_id}/live_status to retrieve real-time Powerwall data: battery_power (W), energy_left (Wh), percentage_charged, island_status, and backup_reserve_percent","To set the operating mode for VPP dispatch, PUT to /api/1/energy_sites/{energy_site_id}/operation with body {default_real_mode: 'self_consumption'} or {default_real_mode: 'backup'} depending on the dispatch signal; confirm 200 OK and read back the updated mode","Subscribe to fleet-level telemetry by polling each site's /live_status endpoint at 5-minute intervals; aggregate battery_power across all enrolled sites to compute total fleet kW available for dispatch","For time-of-use (TOU) optimization mode, POST to /api/1/energy_sites/{energy_site_id}/tariff_rate with the utility tariff schedule JSON; Tesla will automatically discharge during peak periods per the tariff","Validate that each enrolled Powerwall has a valid VPP enrollment status by checking the programs field in the /live_status response before including the site in a dispatch commitment"],"gotchas":["Tesla Fleet API requires a separate energy scope (energy:read, energy:write) from vehicle scopes; applications approved for vehicle access are not automatically granted energy access and must re-apply for the energy product tier","The Tesla Fleet API regional base URL differs by vehicle/product region (na.vn.cloud.tesla.com for North America, eu.vn.cloud.tesla.com for Europe); using the wrong regional endpoint returns 404 for all energy site requests","Tesla's VPP programs (such as the Tesla Virtual Power Plant program operated in California with PG&E and SCE) have their own enrollment rules separate from the Fleet API; programmatic enrollment via API does not automatically enroll a site in the utility VPP program — utility-side enrollment is a parallel process"],"contributor":"waymark-seed","created":"2026-06-12T14:24:27.564Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:19.328Z"},"url":"https://mcp.waymark.network/r/18fab994-a4d5-49eb-b20c-b9c040e2f597"}