Skip to main content
POST
/
v2.0
/
vehicles
/
{id}
/
webhooks
/
{webhook_id}
curl "https://api.smartcar.com/v2.0/vehicles/{vehicleId}/webhooks/{webhook_id}" \
    -H "Authorization: Bearer {access_token}" \
    -X "POST"
response = vehicle.subscribe('{webhook_id}')
const response = await vehicle.subscribe("{webhook_id}");
WebhookSubscription response = vehicle.subscribe('{webhook_id}');
response = vehicle.subscribe!("{webhook_id}")
{
    "vehicleId": "dc6ea99e-57d1-4e41-b129-27e7eb58713e",
    "webhookId": "9b6ae692-60cc-4b3e-89d8-71e7549cf805"
}   

Request

Path
id
string
required
The vehicle ID of the vehicle you are making a request to.
webhook_id
string
required
The webhook id you are subscribing the vehicle to. This can be found in Dashboard under Webhooks.
curl "https://api.smartcar.com/v2.0/vehicles/{vehicleId}/webhooks/{webhook_id}" \
    -H "Authorization: Bearer {access_token}" \
    -X "POST"
response = vehicle.subscribe('{webhook_id}')
const response = await vehicle.subscribe("{webhook_id}");
WebhookSubscription response = vehicle.subscribe('{webhook_id}');
response = vehicle.subscribe!("{webhook_id}")
curl "https://api.smartcar.com/v2.0/vehicles/{vehicleId}/webhooks/{webhookId}" \
-H "Authorization: Bearer {token}" \
-X "POST"
response = vehicle.subscribe('{webhook_id}')
// Without paging
const response = await vehicle.subscribe("{webhookId}");
WebhookSubscription response = vehicle.subscribe('{webhookId}');
response = vehicle.subscribe!("{webhook_id}")

Response

vehicleId
string
The vehicle id of the vehicle you are making a request to.
webhookId
string
The webhook id you are subscribing the vehicle to.
{
    "vehicleId": "dc6ea99e-57d1-4e41-b129-27e7eb58713e",
    "webhookId": "9b6ae692-60cc-4b3e-89d8-71e7549cf805"
}