Access the Tessie API with managed authentication. Read the user's Tesla vehicles, their state, battery, location, drives, and charges, and send vehicle commands. Every command acts on a real car (unlocking, opening trunks, climate, charging, honking, keyless driving) and location data is precise personal history. All access runs through the Maton gateway and the maton CLI.
Permissions
Suggested read access
In the Console, Read limits the connection to these 24 read-only endpoints, plus deny rules for any write endpoint a broader rule would otherwise match. Endpoints Maton has found to return credentials, start jobs, or spend credits are left out; a few reads that can change state or return a secret depending on their parameters stay in, and their descriptions say how. It is a suggestion: the saved rules are exactly the ones you see, and you can change them with Custom. See Access policy.
Reference
Vehicles
List Vehicles
maton api '/tessie/vehicles?only_active=true'Query parameters: only_active (false by default; true leaves out vehicles that aren't active in Tessie).
Response:
{
"results": [
{
"vin": "5YJ3E1EA0KF000000",
"is_active": true,
"last_state": {
"display_name": "Seneca",
"state": "online",
"vin": "5YJ3E1EA0KF000000",
"charge_state": {"battery_level": 89, "charge_limit_soc": 90, "charging_state": "Complete", "battery_range": 269.01},
"drive_state": {"latitude": 37.4, "longitude": -122.1, "heading": 120, "shift_state": null, "speed": null},
"vehicle_state": {"locked": true, "odometer": 14096.49, "car_version": "2022.4 fae2af490933", "sentry_mode": true},
"climate_state": {"inside_temp": 21.5, "is_auto_conditioning_on": false}
}
}
]
}last_state is Tessie's latest cached state for each vehicle (about 20 top-level fields; the objects above are trimmed). It also contains a backseat_token, which is a credential: leave it out of anything you report.
Get Vehicle State
maton api '/tessie/5YJ3E1EA0KF000000/state'Query parameters: use_cache (true by default). For Model S and X made before 2021 only, use_cache=false asks the car itself, which can wake it.
Returns the same object as last_state above: charge_state, climate_state, drive_state, vehicle_state, vehicle_config, and gui_settings.
Get Historical States
maton api '/tessie/5YJ3E1EA0KF000000/states?from=1735689600&to=1735776000&interval=300'Query parameters: from and to (Unix seconds), interval (seconds between points), condense (true by default), timezone (UTC), distance_format (mi or km), temperature_format (c or f), format (json or csv).
Each result has timestamp, state, charging_state, shift_state, battery_level, usable_battery_level, and the location and climate fields recorded at that time.
Get Status
maton api '/tessie/5YJ3E1EA0KF000000/status'Response:
{"status": "asleep"}status is asleep, waiting_for_sleep, or awake. Reading it doesn't wake the car.
Battery
Get Battery
maton api '/tessie/5YJ3E1EA0KF000000/battery'Response:
{
"timestamp": 1710785350,
"battery_level": 89,
"battery_range": 273.47,
"ideal_battery_range": 273.47,
"phantom_drain_percent": 1,
"energy_remaining": 85.5,
"lifetime_energy_used": 3266.888,
"pack_current": -0.6,
"pack_voltage": 451.61,
"module_temp_min": 20.5,
"module_temp_max": 21
}Get Battery Health
maton api '/tessie/battery_health?only_active=true'
maton api '/tessie/5YJ3E1EA0KF000000/battery_health?from=1704067200&to=1735689600'The first covers every vehicle: vin, plate, odometer, max_range, capacity, original_capacity, degradation_percent, and health_percent. The second returns one vehicle's measurements over time. Both accept from, to, and distance_format.
Get Consumption Since Last Charge
maton api '/tessie/5YJ3E1EA0KF000000/consumption_since_charge'Response:
{
"last_charge_at": 1675940795,
"distance_driven": 10.4,
"battery_percent_used": 10,
"battery_percent_used_by_driving": 4,
"rated_range_used": 34.57,
"energy_used": 7.56,
"energy_used_by_driving": 3.66
}Location
Get Location
maton api '/tessie/5YJ3E1EA0KF000000/location'Response:
{
"latitude": 37.4,
"longitude": -122.1,
"address": "1 Example Street, Palo Alto, California 94301, United States",
"saved_location": "Work"
}saved_location is the name of a location saved in Tessie, or null.
Get Map Image
maton api '/tessie/5YJ3E1EA0KF000000/map?width=600&height=400&zoom=15' > map.pngReturns a PNG of the car's position. Query parameters: width and height (300 by default), zoom (13), marker_size (75), style (light or dark).
Get Weather
maton api '/tessie/5YJ3E1EA0KF000000/weather'Returns the weather where the car is: location, condition, temperature, feels_like, humidity, wind_speed, cloudiness, sunrise, and sunset.
Drives and Charges
List Drives
maton api '/tessie/5YJ3E1EA0KF000000/drives?from=1735689600&to=1736294400&limit=20'Query parameters: from, to, limit, minimum_distance, tag (and exclude_tag), driver_profile, origin_latitude/origin_longitude/origin_radius and the same for destination_ (with exclude_origin/exclude_destination), distance_format, temperature_format, timezone, format (json or csv).
Response:
{
"results": [
{
"id": 1363162,
"started_at": 1628960959,
"ended_at": 1628970656,
"starting_location": "1 Example Street, Palo Alto, California 94301, United States",
"starting_latitude": 37.4,
"starting_longitude": -122.1,
"ending_location": "2 Sample Avenue, San Jose, California 95110, United States",
"ending_latitude": 37.3,
"ending_longitude": -121.9,
"starting_battery": 97,
"ending_battery": 21,
"average_speed": 73,
"max_speed": 90,
"odometer_distance": 185.9,
"autopilot_distance": 174.6,
"energy_used": 73.28,
"tag": "Personal"
}
]
}Get Driving Path
maton api '/tessie/5YJ3E1EA0KF000000/path?from=1735689600&to=1735693200'Returns the points driven in the range (timestamp, latitude, longitude, heading, speed, battery_level, odometer, autopilot). Query parameters: from, to, separate (split by drive), simplify (true by default), details.
Tag Drives
maton api '/tessie/5YJ3E1EA0KF000000/drives/set_tag' -X POST -H 'Content-Type: application/json' --input - <<'JSON'
{"drives": "1363162,1363170", "tag": "Business"}
JSONdrives is a comma-separated list of drive IDs. Returns {"result": true}.
List Charges
maton api '/tessie/5YJ3E1EA0KF000000/charges?from=1735689600&to=1736294400&superchargers_only=true'Each charge has id, started_at, ended_at, location, latitude, longitude, is_supercharger, energy_added, miles_added, starting_battery, ending_battery, and cost. Query parameters: from, to, limit, superchargers_only, minimum_energy_added, the origin_ filters, distance_format, timezone, format.
Set a Charge's Cost
maton api '/tessie/5YJ3E1EA0KF000000/charges/434159/set_cost?cost=12.5' -X POSTList Charging Invoices
maton api '/tessie/charging_invoices?from=1735689600&to=1738368000'Returns Supercharger invoices for every vehicle, for Tesla fleet accounts only. Query parameters: from, to, vin, timezone, format.
List Idles
maton api '/tessie/5YJ3E1EA0KF000000/idles?from=1735689600&to=1736294400'
maton api '/tessie/5YJ3E1EA0KF000000/last_idle_state'An idle is a period parked: location, latitude, longitude, starting_battery, ending_battery, energy_used, and the share of time with climate (climate_fraction) or sentry (sentry_fraction) on. last_idle_state returns the state at the start of the current idle.
Tires, Plate, and Firmware
maton api '/tessie/5YJ3E1EA0KF000000/tire_pressure'
maton api '/tessie/5YJ3E1EA0KF000000/plate'
maton api '/tessie/5YJ3E1EA0KF000000/firmware_alerts'
maton api '/tessie/5YJ3E1EA0KF000000/release_notes/2024.26.7'tire_pressure returns each tire's pressure in bar (front_left, front_right, rear_left, rear_right) with a _status (such as low) and a timestamp; it needs firmware 2022.4.5 or later. plate returns {"result": "ABC1234"}, and POST /{vin}/plate with {"plate": "ABC1234"} sets it.
Commands
Send a Command
maton api '/tessie/5YJ3E1EA0KF000000/command/lock' -X POSTResponse:
{"result": true}Every command is POST /{vin}/command/{name}, with its settings in the query string. Query parameters on every command: wait_for_completion (true by default: the call returns once the car has done it) and max_attempts (1 to 3, default 3). Tessie wakes a sleeping car to run a command.
maton api '/tessie/5YJ3E1EA0KF000000/command/set_charge_limit?percent=80' -X POST
maton api '/tessie/5YJ3E1EA0KF000000/command/set_temperatures?temperature=21' -X POST
maton api '/tessie/5YJ3E1EA0KF000000/command/start_climate' -X POSTstart_climate also preconditions the battery. set_temperatures takes temperature (Celsius), or driver_temperature and passenger_temperature.
Commands by area:
| Area | Commands |
|---|---|
| Doors and access | lock, unlock, remote_start (keyless driving; driving must begin within 2 minutes), enable_guest, disable_guest |
| Trunks, windows, sunroof | activate_front_trunk, activate_rear_trunk, open_tonneau, close_tonneau, vent_windows, close_windows, vent_sunroof, close_sunroof |
| Climate | start_climate, stop_climate, set_temperatures, set_seat_heat, set_seat_cool, start_max_defrost, stop_max_defrost, start_steering_wheel_heater, stop_steering_wheel_heater, set_cabin_overheat_protection, set_cop_temp, set_bioweapon_mode, set_climate_keeper_mode |
| Charging | start_charging, stop_charging, set_charge_limit (percent), set_charging_amps (amps), open_charge_port, close_charge_port, add_charge_schedule, remove_charge_schedule, add_precondition_schedule, remove_precondition_schedule, set_scheduled_charging, set_scheduled_departure |
| Security and modes | enable_sentry, disable_sentry, enable_valet, disable_valet, enable_low_power_mode, disable_low_power_mode, enable_keep_accessory_power_mode, disable_keep_accessory_power_mode, set_speed_limit (mph), enable_speed_limit, disable_speed_limit, clear_speed_limit_pin |
| Other | flash, honk, remote_boombox (sound), trigger_homelink, share (value: an address, coordinates, or video URL), schedule_software_update (in_seconds), cancel_software_update |
The charge and precondition schedule commands need firmware 2024.26 or later and replace set_scheduled_charging and set_scheduled_departure there; remote_boombox needs 2022.40.25 or later.
Wake the Vehicle
maton api '/tessie/5YJ3E1EA0KF000000/wake' -X POSTReturns {"result": true} once the car is awake, or false after 90 seconds. Commands wake the car on their own.
Drivers and Invitations
maton api '/tessie/5YJ3E1EA0KF000000/drivers'Response:
{
"results": [
{
"my_tesla_unique_id": 123456789,
"user_id": 222222,
"driver_first_name": "Jane",
"driver_last_name": "Doe",
"granular_access": {"hide_private": false}
}
]
}POST /{vin}/drivers/{id}/delete removes a driver's access. GET /{vin}/invitations lists pending invitations, including each one's share_link and code, which let anyone who has them add the car; POST /{vin}/invitations creates one and POST /{vin}/invitations/{id}/revoke revokes it. GET/POST /{vin}/roles read and set payer roles and need a Tesla Business account.
Telemetry Configuration
maton api '/tessie/5YJ3E1EA0KF000000/fleet_telemetry_config'Returns whether the car's Fleet Telemetry configuration is synced, its config (hostname, port, fields, exp), and update_available. POST updates it, and DELETE removes it, which turns off Tessie's own data collection for the car.
Notes
- Connection. The connection holds a Tessie API token, which the user generates on the Developer page of the Tessie dashboard (https://dash.tessie.com/settings/developer). The token reaches every vehicle on the Tessie account; Tessie documents no scopes for it. Tessie has no account endpoint, so the connection's metadata carries no account name. Don't add the token to the query string; the gateway sends it for you.
- Most paths start with the vehicle's VIN (
/{vin}/...); list the vehicles first to find it. Tessie also proxies Tesla's Fleet API under/api/1/..., which needs Tesla credentials stored in Tessie and isn't covered here. - Times in query parameters and responses are Unix seconds. Distances default to miles and temperatures to Celsius; set
distance_format=kmortemperature_format=fto change them. - Data endpoints return Tessie's recorded data and don't wake the car; commands do. A command on a car that can't be reached (no signal, or firmware too old) fails after
max_attempts. format=csvonstates,drives,charges,idles, andcharging_invoicesreturns CSV instead of JSON.- Errors are JSON with an
errormessage; a401means the API token was deleted or is wrong, and the connection needs reauthorizing with a new one. - The read-only access policy leaves out
GET /{vin}/invitations, whose share links and codes grant access to the vehicle.