Vehicle Endpoints
Lock and Unlock
Lock or unlock the vehicle.
POST
/v2.0/vehicles/{id}/security
Permission
control_security
Request
Path
idrequired
string
The vehicle id of the vehicle you are making a request to.
Body
actionrequired
string
LOCK
or UNLOCK
the vehicle’s doors.
curl "https://api.smartcar.com/v2.0/vehicles/{id}/security" \
-H "Authorization: Bearer {token}" \
-X "POST" \
-H "Content-Type: application/json" \
-d '{"action": "LOCK"}'
Response
status
string
If the request is successful, Smartcar will return “success” (HTTP 200 status).
message
string
If the request is successful, Smartcar will return a message (HTTP 200 status).
{
"message": "Successfully sent request to vehicle",
"status": "success"
}
curl "https://api.smartcar.com/v2.0/vehicles/{id}/security" \
-H "Authorization: Bearer {token}" \
-X "POST" \
-H "Content-Type: application/json" \
-d '{"action": "LOCK"}'
{
"message": "Successfully sent request to vehicle",
"status": "success"
}