Vehicle Commands
Vehicle commands allow direct interaction with a vehicle. To accept commands, a vehicle must have an application's Fleet Key installed. The command must be sent through the Vehicle Commands Proxy to send commands.
The Vehicle Commands Proxy exposes endpoints identical to the ones described below. When it receives a request, it signs the command with a Fleet Key key before passing the request to Fleet API. If a command is not signed, the vehicle will reject the request and perform no action. This ensures unauthorized parties are not able to send commands.
Note: The Vehicle Commands Proxy is not required for business vehicles and Pre-2021 S and X vehicles.
Generating a Fleet Key
Steps to generate a Fleet Key are available on the Fleet API introduction page.
Key Pairing
To pair an application public key to a vehicle:
- Ensure the user has authorized the application and granted the
vehicle_device_data
orvehicle_cmds
scopes. - Direct the user to:
https://tesla.com/_ak/*developer-domain.com*
This will allow the user to add the key to their vehicle through the Tesla mobile app.
Troubleshooting:
- If receiving a message stating the user has not granted this third party app access, ensure the user is logged into the Tesla app with the same email used when authorizing the third party application.
- If receiving a message stating the application has not registered with Tesla, ensure the register endpoint has been called for the region the user is located in.
POST /api/1/vehicles/{vehicle_tag}/command/actuate_trunk
Controls the front (which_trunk: "front") or rear (which_trunk: "rear") trunk.
POST /api/1/vehicles/{vehicle_tag}/command/add_charge_schedule
Add a schedule for vehicle charging. To view existing schedules, call the vehicle_data endpoint and request charge_schedule_data
.
Related: remove charge schedule
POST /api/1/vehicles/{vehicle_tag}/command/add_precondition_schedule
Add or modify a preconditioning schedule. To view existing schedules, call the vehicle_data endpoint and request preconditioning_schedule_data
.
Related: remove precondition schedule
POST /api/1/vehicles/{vehicle_tag}/command/adjust_volume
Adjusts vehicle media playback volume.
POST /api/1/vehicles/{vehicle_tag}/command/auto_conditioning_start
Starts climate preconditioning.
POST /api/1/vehicles/{vehicle_tag}/command/auto_conditioning_stop
Stops climate preconditioning.
POST /api/1/vehicles/{vehicle_tag}/command/cancel_software_update
Cancels the countdown to install the vehicle software update. This operation will no longer work after the vehicle begins the software installation.
POST /api/1/vehicles/{vehicle_tag}/command/charge_max_range
Charges in max range mode -- we recommend limiting the use of this mode to long trips.
POST /api/1/vehicles/{vehicle_tag}/command/charge_port_door_close
Closes the charge port door.
POST /api/1/vehicles/{vehicle_tag}/command/charge_port_door_open
Opens the charge port door.
POST /api/1/vehicles/{vehicle_tag}/command/clear_pin_to_drive_admin
Deactivates PIN to Drive and resets the associated PIN for vehicles running firmware versions 2023.44+. This command is only accessible to fleet managers or owners.
POST /api/1/vehicles/{vehicle_tag}/command/erase_user_data
Erases user's data from the user interface. Requires the vehicle to be parked and in Guest Mode.
POST /api/1/vehicles/{vehicle_tag}/command/flash_lights
Briefly flashes the vehicle headlights. Requires the vehicle to be in park.
POST /api/1/vehicles/{vehicle_tag}/command/guest_mode
- Restricts certain vehicle UI functionality from guest users:
- PIN to Drive
- Speed Limit Mode
- Glovebox PIN
- Add/Remove keys
- Change vehicle name
- Allows erase_user_data on the vehicle.
- Allows a user to set up Tesla mobile app access with the vehicle key card:
- If a user unlocks a vehicle or authenticates it for drive with a key card, they will receive a prompt to set up their phone as key by scanning a QR code on the vehicle touchscreen.
- The QR code is single-use and expires after 10 minutes.
- Requires vehicle firmware version 2024.14+.
- Any account that scans the QR code will gain Tesla app access to the vehicle, and download that account's Tesla profile to the vehicle.
- Tesla app access allows a user to view live vehicle location, issue remote commands, and set up their phone as key within Bluetooth proximity of the vehicle.
- Guest access will not have certain driver access features such as Service and Roadside.
- Guest access is automatically removed when:
- A key card is used to drive the vehicle.
- A new QR code is scanned (only one guest is allowed at a time).
- Guest Mode is disabled.
- In addition, one can use the drivers remove endpoint to remotely revoke guest access.
- If a user does not have the app installed, they will see this webpage (https://www.tesla.com/_gs/test) to guide them through the process.
POST /api/1/vehicles/{vehicle_tag}/command/honk_horn
Honks the vehicle horn. Requires the vehicle to be in park.
POST /api/1/vehicles/{vehicle_tag}/command/media_next_fav
Advances media player to next favorite track.
POST /api/1/vehicles/{vehicle_tag}/command/media_next_track
Advances media player to next track.
POST /api/1/vehicles/{vehicle_tag}/command/media_prev_fav
Advances media player to previous favorite track.
POST /api/1/vehicles/{vehicle_tag}/command/media_prev_track
Advances media player to previous track.
POST /api/1/vehicles/{vehicle_tag}/command/media_toggle_playback
Toggles current play/pause state.
POST /api/1/vehicles/{vehicle_tag}/command/media_volume_down
Turns the volume down by one.
POST /api/1/vehicles/{vehicle_tag}/command/navigation_gps_request
Start navigation to given coordinates. Order can be used to specify order of multiple stops.
POST /api/1/vehicles/{vehicle_tag}/command/navigation_request
Sends a location to the in-vehicle navigation system.
POST /api/1/vehicles/{vehicle_tag}/command/navigation_sc_request
Start navigation to a supercharger.
POST /api/1/vehicles/{vehicle_tag}/command/navigation_waypoints_request
Sends a list of waypoints to the vehicle's navigation system.
POST /api/1/vehicles/{vehicle_tag}/command/remote_auto_seat_climate_request
Sets automatic seat heating and cooling.
POST /api/1/vehicles/{vehicle_tag}/command/remote_auto_steering_wheel_heat_climate_request
Sets automatic steering wheel heating on/off.
POST /api/1/vehicles/{vehicle_tag}/command/remote_boombox
Plays a sound through the vehicle external speaker.
Sound IDs:
0
: random fart2000
: locate ping
POST /api/1/vehicles/{vehicle_tag}/command/remote_seat_cooler_request
Sets seat cooling.
POST /api/1/vehicles/{vehicle_tag}/command/remote_seat_heater_request
Sets seat heating.
POST /api/1/vehicles/{vehicle_tag}/command/remote_start_drive
Starts the vehicle remotely. Requires keyless driving to be enabled.
POST /api/1/vehicles/{vehicle_tag}/command/remote_steering_wheel_heat_level_request
Sets steering wheel heat level.
POST /api/1/vehicles/{vehicle_tag}/command/remote_steering_wheel_heater_request
Sets steering wheel heating on/off. For vehicles that do not support auto steering wheel heat.
POST /api/1/vehicles/{vehicle_tag}/command/remove_charge_schedule
Remove a charge schedule by ID. To view existing schedules, call the vehicle_data endpoint and request charge_schedule_data
.
Related: add charge schedule
POST /api/1/vehicles/{vehicle_tag}/command/remove_precondition_schedule
Remove a precondition schedule by ID. To view existing schedules, call the vehicle_data endpoint and request preconditioning_schedule_data
.
Related: add precondition schedule
POST /api/1/vehicles/{vehicle_tag}/command/reset_pin_to_drive_pin
Removes PIN to Drive. Requires the car to be in Pin to Drive mode and not in Valet mode. Note that this only works if PIN to Drive is not active. This command is only accessible to fleet managers or owners. This command also requires the Tesla Vehicle Command Protocol - for more information, refer to the documentation here.
POST /api/1/vehicles/{vehicle_tag}/command/reset_valet_pin
Removes PIN for Valet Mode. To use this command, valet mode must be disabled. See set_valet_mode.
POST /api/1/vehicles/{vehicle_tag}/command/schedule_software_update
Schedules a vehicle software update (over the air "OTA") to be installed in the future.
POST /api/1/vehicles/{vehicle_tag}/command/set_bioweapon_mode
Turns Bioweapon Defense Mode on and off.
POST /api/1/vehicles/{vehicle_tag}/command/set_cabin_overheat_protection
Sets the vehicle overheat protection.
POST /api/1/vehicles/{vehicle_tag}/command/set_charge_limit
Sets the vehicle charge limit.
POST /api/1/vehicles/{vehicle_tag}/command/set_charging_amps
Sets the vehicle charging amps.
POST /api/1/vehicles/{vehicle_tag}/command/set_climate_keeper_mode
Enables climate keeper mode. Accepted values are: 0
,1
,2
,3
. Mapping to respectively Off, Keep Mode, Dog Mode, Camp Mode.
POST /api/1/vehicles/{vehicle_tag}/command/set_cop_temp
Adjusts the Cabin Overheat Protection temperature (COP). This command will not activate COP. The precise target temperature depends on if the user has selected C or F. Accepted values are: 0
,1
,2
. Mapping to respectively Low (90F/30C), Medium (95F/35C), High (100F/40C).
POST /api/1/vehicles/{vehicle_tag}/command/set_pin_to_drive
Sets a four-digit passcode for PIN to Drive. This PIN must then be entered before the vehicle can be driven. Once a PIN is set, the vehicle remembers its value even when PIN to Drive is disabled and it will discard any new PIN provided using this method. To change an existing PIN, first call reset_pin_to_drive_pin. This command is only accessible to fleet managers or owners. This command also requires the Tesla Vehicle Command Protocol - for more information, refer to the documentation here.
POST /api/1/vehicles/{vehicle_tag}/command/set_preconditioning_max
Sets an override for preconditioning — it should default to empty if no override is used.
POST /api/1/vehicles/{vehicle_tag}/command/set_scheduled_charging
This endpoint is not recommended beginning with firmware version 2024.26. The add charge schedule command should be used instead.
Sets a time at which charging should be completed. The time
parameter is minutes after midnight (e.g: time=120 schedules charging for 2:00am vehicle local time).
POST /api/1/vehicles/{vehicle_tag}/command/set_scheduled_departure
This endpoint is not recommended beginning with firmware version 2024.26. The add precondition schedule command should be used instead.
Sets a time at which departure should be completed. The departure_time
and end_off_peak_time
parameters are minutes after midnight (e.g: departure_time=120 schedules departure for 2:00am vehicle local time).
POST /api/1/vehicles/{vehicle_tag}/command/set_sentry_mode
Enables and disables Sentry Mode. Sentry Mode allows customers to watch the vehicle cameras live from the mobile app, as well as record sentry events.
POST /api/1/vehicles/{vehicle_tag}/command/set_temps
Sets the driver and/or passenger-side cabin temperature (and other zones if sync is enabled).
POST /api/1/vehicles/{vehicle_tag}/command/set_valet_mode
Turns on Valet Mode and sets a four-digit passcode that must then be entered to disable Valet Mode.
POST /api/1/vehicles/{vehicle_tag}/command/set_vehicle_name
Changes the name of a vehicle. This command also requires the Tesla Vehicle Command Protocol - for more information, refer to the documentation here.
POST /api/1/vehicles/{vehicle_tag}/command/speed_limit_activate
Activates Speed Limit Mode with a four-digit PIN.
POST /api/1/vehicles/{vehicle_tag}/command/speed_limit_clear_pin
Deactivates Speed Limit Mode and resets the associated PIN.
POST /api/1/vehicles/{vehicle_tag}/command/speed_limit_clear_pin_admin
Deactivates Speed Limit Mode and resets the associated PIN for vehicles running firmware versions 2023.38+. This command is only accessible to fleet managers or owners.
POST /api/1/vehicles/{vehicle_tag}/command/speed_limit_deactivate
Deactivates Speed Limit Mode.
POST /api/1/vehicles/{vehicle_tag}/command/speed_limit_set_limit
Sets the maximum speed (in miles per hours) for Speed Limit Mode.
POST /api/1/vehicles/{vehicle_tag}/command/sun_roof_control
Control the sunroof on sunroof-enabled vehicles.
Supported states: stop, close, and vent.
POST /api/1/vehicles/{vehicle_tag}/command/trigger_homelink
Turns on HomeLink (used to open and close garage doors).
POST /api/1/vehicles/{vehicle_tag}/command/upcoming_calendar_entries
Upcoming calendar entries stored on the vehicle.