canonical: https://jentic.com/apis/tesla.com/tesla

# Tesla Fleet API

The Tesla Fleet API provides endpoints to manage Tesla vehicles and energy products, including vehicle commands, telemetry, energy site management, and fleet configuration. The API exposes 58 endpoints secured with bearer authentication.

## For AI agents

Programmatically adjusts the site backup reserve, returns aggregated site energy measurements. Covers 58 operations with bearer authentication.

## Scope

Does not handle payments, communications, or crm - use for e-commerce only.

## Capabilities

- Adjusts the site backup reserve
- Returns aggregated site energy measurements
- Controls grid charging and energy export permissions
- Modifies backup reserve for vehicle charging during outages
- Sets site operating mode

## Use cases

### E-Commerce Operations

Use the Tesla Fleet API to perform e commerce operations programmatically. The API provides 58 endpoints covering core functionality including adjusts the site backup reserve, returns aggregated site energy measurements, returns wall connector charging history.

Example prompt: Call POST /api/1/energy_sites/{energy_site_id}/backup to adjusts the site backup reserve

### Automated Energy Management

Automate energy operations by combining multiple Tesla Fleet API endpoints. Agents can returns aggregated site energy measurements and then returns wall connector charging history in a single workflow.

Example prompt: Call GET /api/1/energy_sites/{energy_site_id}/calendar_history to returns aggregated site energy measurements, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call Tesla Fleet API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle bearer tokens manually.

Example prompt: Search Jentic for 'adjusts the site backup reserve', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /api/1/energy_sites/{energy_site_id}/backup | Adjusts the site backup reserve |
| GET | /api/1/energy_sites/{energy_site_id}/calendar_history | Returns aggregated site energy measurements |
| GET | /api/1/energy_sites/{energy_site_id}/telemetry_history | Returns wall connector charging history |
| POST | /api/1/energy_sites/{energy_site_id}/grid_import_export | Controls grid charging and energy export permissions |
| GET | /api/1/energy_sites/{energy_site_id}/live_status | Returns real-time site status |
| POST | /api/1/energy_sites/{energy_site_id}/off_grid_vehicle_charging_reserve | Modifies backup reserve for vehicle charging during outages |
| POST | /api/1/energy_sites/{energy_site_id}/operation | Sets site operating mode |
| GET | /api/1/energy_sites/{energy_site_id}/site_info | Provides site details including assets and settings |

## Key resources

- **Energy** — Operations related to Energy
- **Fleet** — Operations related to Fleet
- **Products** — Operations related to Products
- **Vehicle Commands** — Operations related to Vehicle Commands
- **Vehicles** — Operations related to Vehicles

## Why Jentic

- **Setup:** Wiring the Tesla Fleet API by hand means learning its OAuth2 bearer auth, pointing at the regional fleet-api.prd.na.vn.cloud.tesla.com host, and coding each energy-site call yourself. Through Jentic you install once, import the Tesla Fleet API from the API Directory, store the bearer token once, and your agent calls it.
- **Permission scoping:** The Tesla Fleet API puts the energy site id in the URL path (/api/1/energy_sites/{energy_site_id}/...), so a rule can pin your agent to one energy site: it can read live status and history for that site and nothing else. You choose the operations it may call, so changing grid import/export or backup settings is not included unless you add it.
- **Credential handling:** Your Tesla Fleet API bearer token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'read energy site live status' or 'fetch calendar history', and Jentic returns the matching Tesla Fleet API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Shopify** — Alternative e commerce API
- **Stripe** — Alternative e commerce API

## FAQ

### What authentication does the Tesla Fleet API use?

The Tesla Fleet API uses a Bearer token in the Authorization header. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I adjusts the site backup reserve with the Tesla Fleet API?

Yes. Use the POST /api/1/energy_sites/{energy_site_id}/backup endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the Tesla Fleet API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I adjusts the site backup reserve through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'adjusts the site backup reserve'. Jentic returns the matching Tesla Fleet API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the Tesla Fleet API have?

The Tesla Fleet API exposes 58 endpoints covering energy, fleet, products operations.

### Can I limit what my agent is allowed to do with the Tesla Fleet API?

Yes. Because you run Jentic One yourself and set its rules, you decide which Tesla Fleet API operations and which stored credentials your agent may use. Since the energy site id sits in the URL path (/api/1/energy_sites/{energy_site_id}/...), you can pin the agent to a single site and allow only read calls such as live status and calendar history. Write operations like changing grid import and export or adjusting the backup reserve stay off limits unless you explicitly grant them.
