Tesla Fleet API

Tesla Data → Insurance Risk Score API

Connect a Tesla account, ingest fleet data, and store normalized payloads in D1. This build focuses on the ingestion pipeline (OAuth → vehicle list → telemetry snapshots).

No app login in this phase. Use Tesla OAuth to grant access, then sync vehicles on demand.

Connection Status

Track Tesla authorization, token expiry, and last sync time.

Connection
Checking...
Token Expiry
--
Last Sync
--
1

OAuth Connect

Redirect to Tesla OAuth, exchange code for tokens, store refresh token in D1.

2

Vehicle List

Pull `/api/1/vehicles`, upsert vehicle metadata, track update timestamps.

3

Telemetry Snapshot

Optionally pull `/vehicle_data` and persist raw payloads for risk modeling.

Sync Controls

Trigger Tesla data ingestion and persist results into D1.

D1 Storage

  • `tesla_tokens` → access + refresh tokens
  • `tesla_vehicles` → vehicle metadata
  • `tesla_vehicle_data` → raw telemetry snapshots

Next Steps

  • Map telemetry → underwriting risk features
  • Score generation + insurer API endpoints
  • Fleet Telemetry streaming (optional)

Vehicles