Tesla has recently unveiled its first API documentation to support the integration of third-party applications. While primarily designed for fleet management, these APIs have captured the interest of developers, who see it as a potential starting point for the development of an app ecosystem.
Using the new APIs, an application can request vehicle owners' permission to view account information, get vehicle status, and issue remote commands. Vehicle owners maintain control over which application they grant access to, and can change these settings at any time.
While reverse-engineered APIs have been used for many years, an official option was not available even if the car manufacturer discussed in the past the option of a software development kit and creating a third-party app ecosystem. Frédéric Lambert, editor-in-chief of Electrek, writes:
The move has likely something to do with Tesla recently releasing new in-car fleet management and rental software with Hertz (..) It likely had to make access official through an API for the project, and now it is making it available to everyone. That’s good news because there were a few thriving businesses that were created around making third-party apps for Tesla, but they operated in a grey zone making them a bit shaky. Now if those apps can operate with the official API, they will become legitimate businesses, and it could encourage more to come.
The following API endpoints are currently documented: charging endpoints, partner endpoints, user endpoints, vehicle endpoints, and vehicle commands. The documentation provides examples for cURL, JavaScript, Python, and Ruby requests. For example, the following curl request performs a navigation_gps_request command to start navigation to the given coordinates:
curl --header 'Content-Type: application/json' \
--header "Authorization: Bearer $TESLA_API_TOKEN" \
--data '{"lat":45.65292317088107,"lon":13.765238974015045,"order":"integer"}' \
'https://fleet-api.prd.na.vn.cloud.tesla.com/api/1/vehicles/{id}/command/navigation_gps_request'
Mark Gerban, connected car strategist at Mercedes-Benz, comments:
Curious if this will help developers generate any revenue, since if they want significant traction and pick up some big players with bigger features, they’ll need to offer something in return.
In a popular thread on Hacker News, many developers are excited but James Darpinian, graphics and computer vision engineer, warns:
Almost all of this functionality has been available for many years through the reverse-engineered API used by the official Tesla app (...) The difference here is that Tesla is creating a new, officially supported API explicitly for third parties, with official documentation, scoped authentication, and a developer program that requires registration (and in the future, payment). Presumably, once the SDK is finalized they will start cracking down on apps using the older reverse-engineered API.
Earlier this year, Tesla introduced Fleet Telemetry, a server reference implementation for Tesla's telemetry protocol. The service allows developers to connect directly to their vehicles, handling device connectivity and receiving and storing transmitted data. A configured device establishes a WebSocket connection to push configurable telemetry records and the Fleet Telemetry provides clients with ack, error, or rate limit responses.
To get an API key and interact with the API endpoints, developers must create a Tesla account, follow the onboarding process, and request approval.