openapi: 3.0.1 info: title: Tesla API description: API for controlling Tesla vehicles version: "1.0" servers: - url: https://owner-api.teslamotors.com/ paths: /oauth/token: post: tags: - Authentication summary: Tesla Get an Access Token description: |- Performs the login. Takes in an plain text email and password, matching the owner's login information for [https://my.teslamotors.com/user/login](https://my.teslamotors.com/user/login). Returns a `access_token` which is passed along as a header with all future requests to authenticate the user. You must provide the `Authorization: Bearer {access_token}` header in all other requests. The current client ID and secret are [available here](http://pastebin.com/YiLPDggh) operationId: CreateOauthToken requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateAccessTokenRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CreateAccessTokenResponse' x-codegen-request-body-name: body /api/1/vehicles: get: tags: - Vehicles summary: Tesla List all Vehicles description: Retrieve a list of your owned vehicles (includes vehicles not yet shipped!) operationId: GetVehicles responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/GetVehiclesResponse' /api/1/vehicles/{vehicle_id}: get: tags: - Vehicles summary: Tesla Retrieve a vehicle description: Retrieve a specific vehicle operationId: GetVehicle parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/VehicleResponse' example: response: id: 321 option_codes: MS01,RENA,TM00,DRLH,PF00,BT85,PBCW,RFPO,WT19,IBMB,IDPB,TR00,SU01,SC01,TP01,AU01,CH00,HP00,PA00,PS00,AD02,X020,X025,X001,X003,X007,X011,X013 user_id: 123 vehicle_id: 1234567890 vin: 5YJSA1CN5CFP01657 tokens: - x - x state: online /api/1/vehicles/{vehicle_id}/mobile_enabled: get: tags: - Vehicles summary: Tesla Mobile Access description: Determines if mobile access to the vehicle is enabled. operationId: GetVehicleMobileEnabled parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/MobileAccessResponse' /api/1/vehicles/{vehicle_id}/data_request/charge_state: get: tags: - Vehicles summary: Tesla Charge State description: Returns the state of charge in the battery. operationId: GetVehicleChargeState parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/ChargeStateResponse' /api/1/vehicles/{vehicle_id}/data_request/climate_state: get: tags: - Vehicles summary: Tesla Climate Settings description: Returns the current temperature and climate control state. operationId: GetVehicleClimateState parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/ClimateSettingsResponse' /api/1/vehicles/{vehicle_id}/data_request/drive_state: get: tags: - Vehicles summary: Tesla Driving and Position description: Returns the driving and position state of the vehicle. operationId: GetVehicleDriveState parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/DriveStateResponse' /api/1/vehicles/{vehicle_id}/data_request/gui_settings: get: tags: - Vehicles summary: Tesla GUI Settings description: Returns various information about the GUI settings of the car, such as unit format and range display. operationId: GetVehilceGuiSettings parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/GuistateResponse' /api/1/vehicles/{vehicle_id}/data_request/vehicle_state: get: tags: - Vehicles summary: Tesla Vehicle State description: Returns the vehicle's physical state, such as which doors are open. operationId: GetVehicleState parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/VehicleStateResponse' /api/1/vehicles/{vehicle_id}/data_request/vehicle_config: get: tags: - Vehicles summary: Tesla Vehicle Config description: Returns the vehicle's configuration operationId: GetVehicleConfig parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/VehicleConfigResponse' /api/1/vehicles/{vehicle_id}/vehicle_data: get: tags: - Vehicles summary: Tesla Vehicle Data description: Returns all vehicle ∂ata, potentially cached operationId: GetVehicleData parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string - name: endpoints in: query schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/VehicleDataResponse' /api/1/vehicles/{vehicle_id}/wake_up: post: tags: - Vehicle Commands summary: Tesla Wake Up Car description: Wakes up the car from the sleep state. Necessary to get some data from the car. operationId: WakeUpVehicle parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/WakeUpResponse' /api/1/vehicles/{vehicle_id}/command/wake_up: post: tags: - Vehicle Commands summary: Tesla Wake Up Car description: Wakes up the car from the sleep state. Necessary to get some data from the car. operationId: WakeUpVehicleCommand parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/set_valet_mode: post: tags: - Vehicle Commands summary: Tesla Set Valet Mode description: |- Sets valet mode on or off with a PIN to disable it from within the car. Reuses last PIN from previous valet session. Valet Mode limits the car's top speed to 70MPH and 80kW of acceleration power. It also disables Homelink, Bluetooth and Wifi settings, and the ability to disable mobile access to the car. It also hides your favorites, home, and work locations in navigation. operationId: ToggleValetMode parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SetValetRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/reset_valet_pin: post: tags: - Vehicle Commands summary: Tesla Reset Valet PIN description: Resets the PIN set for valet mode, if set. operationId: ResetValetPin parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/charge_port_door_open: post: tags: - Vehicle Commands summary: Tesla Open Charge Port description: Opens and unlocks the charge port. operationId: OpenChargePort parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/charge_port_door_close: post: tags: - Vehicle Commands summary: Tesla Close Charge Port description: Closes the charge port. operationId: CloseChargePort parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/charge_standard: post: tags: - Vehicle Commands summary: Tesla Set Charge Limit to Standard description: Set the charge mode to standard (90% under the new percentage system introduced in 4.5). operationId: SendStandardChargeLimit parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/charge_max_range: post: tags: - Vehicle Commands summary: Tesla Set Charge Limit to Max Range description: Set the charge mode to max range (100% under the new percentage system introduced in 4.5). Use sparingly! operationId: SetMaxChargeLimit parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/set_charge_limit: post: tags: - Vehicle Commands summary: Tesla Set Charge Limit description: Set the charge limit to a custom percentage. operationId: SetChargeLimit parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SetChargeLimitRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/set_charging_amps: post: tags: - Vehicle Commands summary: Tesla Set Charge Current description: Set the maximum Charge Current in Amps operationId: SetChargingAmps parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SetChargingAmpsRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/set_scheduled_departure: post: tags: - Vehicle Commands summary: Tesla Set Scheduled Departure description: Set Scheduled Departure settings operationId: SetScheduledDeparture parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ScheduledDepartureRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/set_scheduled_charging: post: tags: - Vehicle Commands summary: Tesla Set Scheduled Charging description: Set Scheduled Charging settings operationId: SetScheduledCharging parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ScheduledChargingRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/charge_start: post: tags: - Vehicle Commands summary: Tesla Start Charging description: Start charging. Must be plugged in, have power available, and not have reached your charge limit. operationId: StartCharge parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/charge_stop: post: tags: - Vehicle Commands summary: Tesla Stop Charging description: Stop charging. Must already be charging. operationId: StopCharge parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/nearby_charging_sites: get: tags: - Vehicles summary: Tesla Get Nearby Chargers description: Get a list of nearby charging sites operationId: NearbyChargers parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/NearbyChargerResponse' /api/1/vehicles/{vehicle_id}/command/flash_lights: post: tags: - Vehicle Commands summary: Tesla Flash Lights description: Flash the lights once. operationId: FlashLights parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/honk_horn: post: tags: - Vehicle Commands summary: Tesla Honk Horn description: Honk the horn once. operationId: HonkHorn parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/door_unlock: post: tags: - Vehicle Commands summary: Tesla Unlock Doors description: Unlock the car's doors. operationId: UnlockDoors parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/door_lock: post: tags: - Vehicle Commands summary: Tesla Lock Doors description: Lock the car's doors. operationId: LockDoors parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/set_temps: post: tags: - Vehicle Commands summary: Tesla Set Temperature description: Set the temperature target for the HVAC system. operationId: SetTemperatures parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SetTempsRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/auto_conditioning_start: post: tags: - Vehicle Commands summary: Tesla Start HVAC System description: Start the climate control system. Will cool or heat automatically, depending on set temperature. operationId: StartHVAC parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/auto_conditioning_stop: post: tags: - Vehicle Commands summary: Tesla Stop HVAC System description: Stop the climate control system. operationId: StopHVAC parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/set_bioweapon_mode: post: tags: - Vehicle Commands summary: Tesla Toggle Bioweapon Defense Mode description: Enable or Disable Bioweapon Defense Mode on equipped vehicles. operationId: BioweaponDefense parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SetBioweaponModeRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/set_climate_keeper_mode: post: tags: - Vehicle Commands summary: Tesla Set the Climate Keeper mode description: Set the Climate Keeper mode. operationId: ClimateKeeper parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SetClimateKeeperRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/set_cabin_overheat_protection: post: tags: - Vehicle Commands summary: Tesla Enable or Disable Cabin Overheat Protection description: Enable or Disable Cabin Overheat Protection operationId: CabinOverheatProtection parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SetCabinOverheatProtectionRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/remote_seat_heater_request: post: tags: - Vehicle Commands summary: Tesla Set Seat Heater Level description: Set the heating level of a seat heater operationId: RemoteSeatHeaterRequest parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/RemoteSeatHeaterRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/remote_seat_cooler_request: post: tags: - Vehicle Commands summary: Tesla Set Seat Cooler Level description: Set the cooling level of a seat heater operationId: RemoteSeatCoolerRequest parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/RemoteSeatCoolerRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/remote_auto_seat_climate_request: post: tags: - Vehicle Commands summary: Tesla Toggle Automatic Seat Heater/Cooler description: Enables or disables automatic control of a seat heater/coooler operationId: RemoteAutoSeatClimateRequest parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/RemoteAutoSeatClimateRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/remote_steering_wheel_heater_request: post: tags: - Vehicle Commands summary: Tesla Toggle Steering Wheel Heater description: Toggle the steering wheel heater operationId: RemoteSteeringWheelHeaterRequest parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/RemoteSteeringWheelHeaterRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/sun_roof_control: post: tags: - Vehicle Commands summary: Tesla Move Pano Roof description: Controls the car's panoramic roof, if installed. operationId: OpenSunroof parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/MovePanoRoofRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/remote_start_drive: post: tags: - Vehicle Commands summary: Tesla Remote Start description: Start the car for keyless driving. Must start driving within 2 minutes of issuing this request. operationId: RemoteStart parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/RemoteStartRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/actuate_trunk: post: tags: - Vehicle Commands summary: Tesla Open Trunk/Frunk description: Open the trunk or frunk. Currently inoperable. operationId: OpenTrunk parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/OpenTrunkRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' example: response: result: true reason: "" x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/speed_limit_activate: post: tags: - Vehicle Commands summary: Tesla Activate Speed Limit description: Activates Speed Limit operationId: ActivateSpeedLimit parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SpeedLimitRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/speed_limit_deactivate: post: tags: - Vehicle Commands summary: Tesla Deactivate Speed Limit description: Deactivates Speed Limit operationId: DeactivateSpeedLimit parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SpeedLimitRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/speed_limit_set_limit: post: tags: - Vehicle Commands summary: Tesla Set Speed Limit description: Sets Speed Limit operationId: SetSpeedLimit parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SetSpeedLimitRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/speed_limit_clear_pin: post: tags: - Vehicle Commands summary: Tesla Clear Speed Limit Pin description: Clears Speed Limit Pin operationId: ClearSpeedLimitPin parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SpeedLimitRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/navigation_request: post: tags: - Vehicle Commands summary: Tesla Send Navigation Request description: Sends Navigation Request to Vehicle operationId: NavigationRequest parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/NavigationRequestRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/share: post: tags: - Vehicle Commands summary: Tesla Share data to Vehicle description: Sends Data to Vehicle (v10 only) operationId: SharetoVehicle parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ShareRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/media_toggle_playback: post: tags: - Media Control summary: Tesla Pause/Play Media description: Pause/Play Media operationId: MediaTogglePlayback parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/media_next_track: post: tags: - Media Control summary: Tesla Next Track description: Next Track operationId: MediaNextTrack parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/media_prev_track: post: tags: - Media Control summary: Tesla Previous Track description: Previous Track operationId: MediaPrevTrack parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/media_next_fav: post: tags: - Media Control summary: Tesla Next Favorite description: Next Favorite operationId: MediaNextFavorite parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/media_prev_fav: post: tags: - Media Control summary: Tesla Previous Favorite description: Previous Favorite operationId: MediaPrevFavorite parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/media_volume_up: post: tags: - Media Control summary: Tesla Volume Up description: Volume Up operationId: MediaVolumeUp parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/media_volume_down: post: tags: - Media Control summary: Tesla Volume Down description: Volume Down operationId: MediaVolumeDown parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/adjust_volume: post: tags: - Media Control summary: Tesla Adjust Volume description: Adjust Volume operationId: MediaAdjustVolume parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/AdjustVolumeRequest' required: true responses: 200: description: "" content: application/josn: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/schedule_software_update: post: tags: - Vehicle Commands summary: Tesla Start Software Update description: Start Software Update operationId: StartSoftwareUpdate parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/cancel_software_update: post: tags: - Vehicle Commands summary: Tesla Cancel Software Update description: Cancel Software Update operationId: CancelSoftwareUpdate parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' /api/1/vehicles/{vehicle_id}/command/set_sentry_mode: post: tags: - Vehicle Commands summary: Tesla Toggle Sentry Mode description: Toggle Sentry Mode operationId: SetSentryMode parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SentryModeRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/set_preconditioning_max: post: tags: - Vehicle Commands summary: Tesla Set Max Defrost description: Set Max Defrost operationId: SetMaxDefrost parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/MaxDefrostRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/window_control: post: tags: - Vehicle Commands summary: Tesla Window Control description: Window Control operationId: WindowControl parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/WindowControlRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/trigger_homelink: post: tags: - Vehicle Commands summary: Tesla Trigger Homelink description: Trigger Homelink operationId: TriggerHomelink parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/TriggerHomelinkRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/set_vehicle_name: post: tags: - Vehicle Commands summary: Tesla Set Vehicle Name description: Set Vehicle Name operationId: SetVehicleName parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SetVehicleNameRequest' required: true responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body /api/1/vehicles/{vehicle_id}/command/remote_boombox: post: tags: - Vehicle Commands summary: Tesla Remote Boombox description: Remote Boombox operationId: RemoteBoombox parameters: - name: vehicle_id in: path description: The id of the Vehicle. required: true schema: type: string responses: 200: description: "" content: application/json: schema: $ref: '#/components/schemas/CommandResponse' x-codegen-request-body-name: body components: schemas: CreateAccessTokenRequest: title: Get an Access Token request type: object properties: grant_type: type: string description: The type of oAuth grant. "password" or "refresh_token" example: password client_id: type: string description: The oAuth client ID example: abc client_secret: type: string description: The oAuth client secret example: "123" email: type: string description: The email for my.teslamotors.com. Only used with "password" grant type. example: elon@teslamotors.com password: type: string description: The password for my.teslamotors.com. Only used with "password" grant type. example: edisonsux refresh_token: type: string description: A refresh token from a previous CreateAccessTokenResponse example: 0f0f0f0f0f0ff0f0f0f0f0f0f0f0f0f0f0f0f0f0f0ff0f0f0f0f0f0f0f0f0f CreateAccessTokenResponse: title: Get an Access Token response required: - access_token - created_at - expires_in - refresh_token - token_type type: object properties: access_token: type: string description: "" example: abc123 token_type: type: string description: "" example: bearer expires_in: type: integer description: "" format: int32 example: 7776000 created_at: type: integer description: "" format: int32 example: 1457385291 refresh_token: type: string description: "" example: cba321 example: access_token: abc123 token_type: bearer expires_in: 7776000 created_at: 1457385291 refresh_token: cba321 SetValetRequest: title: Set Valet Mode type: object properties: "on": type: boolean description: Whether to enable or disable valet mode. password: type: string description: (optional) A 4 digit PIN code to unlock the car. example: "on": true password: 1234 SpeedLimitRequest: title: Speed Limit Request type: object properties: pin: type: string description: The current, or if activating, new, speed limit PIN example: pin: 1234 SetSpeedLimitRequest: title: Set Speed Limit Request type: object properties: limit_mph: type: integer description: The speed limit to set, in Miles per Hour format: int32 example: limit_mph: 75 MovePanoRoofRequest: title: Move Panoramic Roof type: object properties: state: type: string description: The desired state of the panoramic roof. The approximate percent open values for each state are `open` = 100%, `close` = 0%, `comfort` = 80%, and `vent` = ~15% enum: - open - close - comfort - vent - move x-enum-elements: - name: open description: "" - name: close description: "" - name: comfort description: "" - name: vent description: "" - name: move description: "" percent: type: number description: The percentage to move the roof to. format: double example: state: vent RemoteSeatHeaterRequest: title: Remote Seat Heater type: object properties: heater: type: integer description: 'The desired seat to adjust the heater for. SeatHeaterFrontLeft: 0, SeatHeaterFrontRight: 1, SeatHeaterRearLeft: 2, SeatHeaterRearLeftBack: 3, SeatHeaterRearCenter: 4, SeatHeaterRearRight: 5, SeatHeaterRearRightBack: 6, SeatHeater3rdRowLeft: 7, SeatHeater3rdRowRight: 8' format: int32 enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 level: type: integer description: Seat heater level format: int32 enum: - 1 - 2 - 3 example: heater: 0 level: 2 RemoteSeatCoolerRequest: title: Remote Seat Cooler type: object properties: seat_position: type: integer description: 'The desired seat to adjust the cooler for. SeatHeaterFrontLeft: 0, SeatHeaterFrontRight: 1, SeatHeaterRearLeft: 2, SeatHeaterRearLeftBack: 3, SeatHeaterRearCenter: 4, SeatHeaterRearRight: 5, SeatHeaterRearRightBack: 6, SeatHeater3rdRowLeft: 7, SeatHeater3rdRowRight: 8' format: int32 enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 seat_cooler_level: type: integer description: Seat cooler level format: int32 enum: - 1 - 2 - 3 example: seat_position: 0 seat_cooler_level: 2 RemoteAutoSeatClimateRequest: title: Remote Auto Seat Climate type: object properties: auto_seat_position: type: integer description: 'The desired seat to toggle auto mode for. SeatHeaterFrontLeft: 0, SeatHeaterFrontRight: 1, SeatHeaterRearLeft: 2, SeatHeaterRearLeftBack: 3, SeatHeaterRearCenter: 4, SeatHeaterRearRight: 5, SeatHeaterRearRightBack: 6, SeatHeater3rdRowLeft: 7, SeatHeater3rdRowRight: 8' format: int32 enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 auto_climate_on: type: boolean description: Whether to enable or disable auto climate mode example: auto_seat_position: 0 auto_climate_on: true RemoteSteeringWheelHeaterRequest: title: Remote Steering Wheel Heater type: object properties: "on": type: boolean example: "on": true SetTempsRequest: title: Set SetTemperatures type: object properties: driver_temp: type: number description: The desired temperature on the driver's side in celcius. format: double passenger_temp: type: number description: The desired temperature on the passenger's side in celcius. format: double example: driver_temp: 70.0 passenger_temp: 72.0 SetChargeLimitRequest: title: Set Charge Limit type: object properties: percent: type: integer description: Percentage to set Charge Limit to. format: int32 example: percent: 80 SetChargingAmpsRequest: title: Set Charging Amps type: object properties: charging_amps: type: integer description: Charging Current in Amps format: int32 example: charging_amps: 40 ScheduledDepartureRequest: title: Scheduled Departure Request type: object properties: departure_time: type: integer description: Integer representing the desired departure time. Value is number of minutes from midnight in intervals of 15 format: int32 enable: type: boolean preconditioning_enabled: type: boolean preconditioning_weekdays_only: type: boolean off_peak_charging_enabled: type: boolean off_peak_charging_weekdays_only: type: boolean end_off_peak_time: type: integer description: Integer representing the desired off peak end time. Value is number of minutes from midnight in intervals of 15 format: int32 example: departure_time: 180 enable: true preconditioning_enabled: true preconditioning_weekdays_only: true off_peak_charging_enabled: false off_peak_charging_weekdays_only: false end_off_peak_time: 60 ScheduledChargingRequest: title: Scheduled Charging Request type: object properties: time: type: integer description: Integer representing the desired charging start time. Value is number of minutes from midnight in intervals of 15 format: int32 enable: type: boolean example: time: 60 enable: true RemoteStartRequest: title: Remote Start type: object properties: password: type: string description: The password to the authenticated my.teslamotors.com account. example: password: hunter2 OpenTrunkRequest: type: object properties: which_trunk: type: string description: The trunk to open. `front` or `rear NavigationRequestRequest: title: Navigation Request request type: object properties: type: type: string description: Do not change example: share_ext_content_raw default: share_ext_content_raw value: type: object properties: android.intent.extra.TEXT: type: string description: Must match this syntax "DATA_TO_SEND_TO_NAV_SYSTEM\n\nhttps://goo.gl/maps/X" example: |- 45500 Fremont Blvd, Fremont, CA 94538 https://goo.gl/maps/X locale: type: string description: Do not change example: en-us default: en-us timestamp_ms: type: string description: Unix timestamp ShareRequest: title: Share request (v10 only) type: object properties: type: type: string description: Change to "share_dest_content_coords" if using lat/long example: share_ext_content_raw default: share_ext_content_raw value: type: object properties: android.intent.extra.TEXT: type: string description: Must match this syntax "DATA_TO_SEND_TO_NAV_SYSTEM\n\nhttps://goo.gl/maps/X" example: |- 45500 Fremont Blvd, Fremont, CA 94538 https://goo.gl/maps/X lat: type: number description: Latitude of destination to send. Only send with 'long' format: double example: 123.456 long: type: number description: Longitude of destination to send. Only send with 'lat' format: double example: -123.456 locale: type: string description: Locale this request should be treated as example: en-US timestamp: type: number description: UNIX timestamp indicating when this request was sent example: 1574041714569 AdjustVolumeRequest: title: Adjust Volume request type: object properties: volume: type: number description: Volume level, from 0-11 format: int32 example: 1 SetVehicleNameRequest: title: Set Vehicle Name type: object properties: vehicle_name: type: string description: Vehicle name example: My Cool Car SentryModeRequest: title: Sentry Mode type: object properties: "on": type: boolean example: "on": true MaxDefrostRequest: title: Max Defrost type: object properties: "on": type: boolean example: "on": true WindowControlRequest: title: Window Control type: object properties: lat: type: number format: double lon: type: number format: double command: type: string enum: - vent - close example: lat: 123.456 lng: -123.456 command: vent TriggerHomelinkRequest: title: Trigger Homelink type: object properties: lat: type: number format: double lon: type: number format: double example: lat: 123.456 lng: -123.456 SetBioweaponModeRequest: title: Set Bioweapon Mode type: object properties: "on": type: boolean example: "on": true SetClimateKeeperRequest: title: Set Climate Keeper type: object properties: climate_keeper_mode: description: 0 = off, 1 = Climate Keeper, 2 = Dog Mode, 3 = Camp Mode format: int32 type: integer enum: - 0 - 1 - 2 - 3 example: climate_keeper_mode: 1 SetCabinOverheatProtectionRequest: title: Set Cabin Overheat Protection type: object properties: "on": type: boolean fan_only: type: boolean description: Only supported by some vehicles. Must be false on unsupported vehicles. example: "on": true fan_only: false GetVehiclesResponse: title: List all Vehicles response required: - count - response type: object properties: response: type: array items: $ref: '#/components/schemas/Vehicle' count: type: integer description: "" format: int32 example: 1 example: response: - id: 321 option_codes: MS01,RENA,TM00,DRLH,PF00,BT85,PBCW,RFPO,WT19,IBMB,IDPB,TR00,SU01,SC01,TP01,AU01,CH00,HP00,PA00,PS00,AD02,X020,X025,X001,X003,X007,X011,X013 user_id: 123 vehicle_id: 1234567890 vin: 5YJSA1CN5CFP01657 tokens: - x - x state: online count: 1 Vehicle: type: object properties: color: type: string display_name: type: string id: type: string option_codes: type: string vehicle_id: type: string vin: type: string tokens: type: array items: type: string state: type: string VehicleResponse: type: object properties: response: $ref: '#/components/schemas/Vehicle' MobileAccessResponse: title: Mobile Access response required: - response type: object properties: response: type: boolean description: "" example: true example: response: true ChargeStateResponse: title: Charge State response required: - response type: object properties: response: $ref: '#/components/schemas/ChargeState' ChargeState: type: object properties: charging_state: type: string fast_charger_type: type: string fast_charger_brand: type: string charge_limit_soc: type: integer charge_limit_soc_std: type: integer charge_limit_soc_min: type: integer charge_limit_soc_max: type: integer charge_to_max_range: type: boolean max_range_charge_counter: type: integer fast_charger_present: type: boolean battery_range: type: number format: double est_battery_range: type: number format: double ideal_battery_range: type: number format: double battery_level: type: integer usable_battery_level: type: integer charge_energy_added: type: number format: double charge_miles_added_rated: type: number format: double charge_miles_added_ideal: type: number format: double charger_voltage: type: integer charger_pilot_current: type: integer charger_actual_current: type: integer charger_power: type: integer time_to_full_charge: type: number format: double trip_charging: type: boolean charge_rate: type: number format: double charge_port_door_open: type: boolean conn_charge_cable: type: string scheduled_charging_start_time: type: string scheduled_charging_pending: type: boolean user_charge_enable_request: type: boolean charge_enable_request: type: boolean charger_phases: type: integer charge_port_latch: type: string charge_current_request: type: integer charge_current_request_max: type: integer managed_charging_active: type: boolean managed_charging_user_canceled: type: boolean managed_charging_start_time: type: number format: long battery_heater_on: type: boolean not_enough_power_to_heat: type: boolean timestamp: type: number ClimateSettingsResponse: title: Climate Settings response required: - response type: object properties: response: $ref: '#/components/schemas/ClimateState' ClimateState: type: object properties: inside_temp: type: number format: double outside_temp: type: number format: double driver_temp_setting: type: number format: double passenger_temp_setting: type: number format: double left_temp_direction: type: integer right_temp_direction: type: integer is_front_defroster_on: type: boolean is_rear_defroster_on: type: boolean fan_status: type: integer is_climate_on: type: boolean min_avail_temp: type: integer max_avail_temp: type: integer seat_heater_left: type: string seat_heater_right: type: string seat_heater_rear_left: type: string seat_heater_rear_right: type: string seat_heater_rear_center: type: string seat_heater_rear_right_back: type: string seat_heater_rear_left_back: type: string battery_heater: type: boolean battery_heater_no_power: type: boolean steering_wheel_heater: type: boolean wiper_blade_heater: type: boolean side_mirror_heaters: type: boolean is_preconditioning: type: boolean smart_preconditioning: type: boolean is_auto_conditioning_on: type: boolean defrost_mode: type: integer timestamp: type: number DriveStateResponse: title: Driving and Position response required: - response type: object properties: response: $ref: '#/components/schemas/DriveState' DriveState: type: object properties: shift_state: type: string speed: type: number format: double power: type: number format: double latitude: type: number format: double longitude: type: number format: double heading: type: integer gps_as_of: type: number native_location_supported: type: integer native_latitude: type: number format: double native_longitude: type: number format: double native_type: type: string timestamp: type: number GuistateResponse: title: GUI Settings response required: - response type: object properties: response: $ref: '#/components/schemas/GuiState' GuiState: type: object properties: gui_distance_units: type: string gui_temperature_units: type: string gui_charge_rate_units: type: string gui_24_hour_time: type: boolean gui_range_display: type: string gui_tirepressure_units: type: string timestamp: type: number VehicleStateResponse: title: Vehicle State response required: - response type: object properties: response: $ref: '#/components/schemas/VehicleState' VehicleState: type: object properties: api_version: type: integer autopark_state: type: string autopark_state_v2: type: string autopark_style: type: string calendar_supported: type: boolean car_version: type: string center_display_state: type: integer df: type: integer dr: type: integer ft: type: integer homelink_nearby: type: boolean last_autopark_error: type: string locked: type: boolean media_state: type: object properties: remote_control_enabled: type: boolean notifications_supported: type: boolean odometer: type: number format: double parsed_calendar_supported: type: boolean pf: type: integer pr: type: integer remote_start: type: boolean remote_start_supported: type: boolean rt: type: integer sentry_mode: type: boolean software_update: type: object properties: expected_duration_sec: type: integer status: type: string download_perc: type: integer install_perc: type: integer version: type: string sun_roof_percent_open: type: integer sun_roof_state: type: string timestamp: type: number valet_mode: type: boolean vehicle_name: type: string speed_limit_mode: type: object properties: active: type: boolean current_limit_mph: type: number format: double max_limit_mph: type: number format: double min_limit_mph: type: number format: double pin_code_set: type: boolean fd_window: type: integer fp_window: type: integer homelink_device_count: type: integer rd_window: type: integer rp_window: type: integer smart_summon_available: type: boolean summon_standby_mode_enabled: type: boolean VehicleConfigResponse: title: Vehicle Config response required: - response type: object properties: response: $ref: '#/components/schemas/VehicleConfig' VehicleConfig: type: object properties: can_actuate_trunks: type: boolean can_accept_navigation_requests: type: boolean car_special_type: type: string car_type: type: string charge_port_type: type: string eu_vehicle: type: boolean exterior_color: type: string has_ludicrous_mode: type: boolean motorized_charge_port: type: boolean perf_config: type: string plg: type: boolean rear_seat_heaters: type: number rear_seat_type: type: number rhd: type: boolean roof_color: type: string seat_type: type: number spoiler_type: type: string sun_roof_installed: type: number third_row_seats: type: string timestamp: type: number trim_badging: type: string wheel_type: type: string VehicleDataResponse: title: Vehicle Data Response type: object properties: response: type: object properties: color: type: string display_name: type: string id: type: string option_codes: type: string vehicle_id: type: string vin: type: string user_id: type: number tokens: type: array items: type: string state: type: string in_service: type: boolean id_s: type: string calendar_enabled: type: boolean backseat_token: type: string backseat_token_updated_at: type: number gui_settings: $ref: '#/components/schemas/GuiState' climate_state: $ref: '#/components/schemas/ClimateState' drive_state: $ref: '#/components/schemas/DriveState' vehicle_state: $ref: '#/components/schemas/VehicleState' charge_state: $ref: '#/components/schemas/ChargeState' vehicle_config: $ref: '#/components/schemas/VehicleConfig' WakeUpResponse: title: Wake Up Response type: object properties: response: type: object properties: id: type: string user_id: type: number vehicle_id: type: number vin: type: string display_name: type: string option_codes: type: string color: type: string tokens: type: array items: type: string state: type: string in_service: type: boolean id_s: type: string calendar_enabled: type: boolean api_version: type: string backseat_token: type: string backseat_token_updated_at: type: number CommandResponse: title: CommandResponse required: - response type: object properties: response: type: object properties: result: type: boolean reason: type: string description: "" NearbyChargerResponse: title: NearbyChargerResponse type: object properties: response: type: object properties: congestion_sync_time_utc_secs: type: number destination_charging: type: array items: $ref: '#/components/schemas/DestinationCharger' superchargers: type: array items: $ref: '#/components/schemas/Supercharger' DestinationCharger: title: DestinationCharger type: object properties: location: type: object properties: lat: type: number format: double long: type: number format: double name: type: string type: type: string default: destination distance_miles: type: number format: double Supercharger: title: Supercharger type: object properties: location: type: object properties: lat: type: number format: double long: type: number format: double name: type: string type: type: string default: supercharger distance_miles: type: number format: double available_stalls: type: number total_stalls: type: number site_closed: type: boolean State: title: state type: string example: open enum: - open - close - comfort - vent - move x-enum-elements: - name: open description: "" - name: close description: "" - name: comfort description: "" - name: vent description: "" - name: move description: "" tags: - name: Authentication - name: Media Control - name: Vehicle Commands - name: Vehicles