Webhooks API Reference
Last updated
Was this helpful?
Last updated
Was this helpful?
Webhooks can also be setup directly via the , but the options below provide a programmatic way of configuring vehicle events and subscribing vehicles to events you have configured.
Webhooks are currently available in public beta. If you have feedback to share, please reach out to
Webhooks that you configure are tied to a specific . If you have multiple Developer Licenses under a single account in the , please make sure to authenticate using the associated with the specific license.
https://vehicle-events-api.dimo.zone
When or a webhook, a request object is required as application/json
for raw body parameters. Below is a sample request, along with details of each key value pair:
service
The DIMO service that you're making the webhook event request for. At present, this will always be Telemetry
.
data
The Telemetry field that the webhook will listen for events on, for a given Token ID. In the example, we're checking powertrainTransmissionTravelledDistance
to get the odometer value.
trigger
The trigger that the webhook will be listening for. You can use the following condition statements:
>=
, <=
, >
, <
, =
You should always include valueNumber
. In the example above, we're checking when the odometer (valueNumber
) is greater than 10,000km.
setup
Should be one of the following:
Realtime
- continues firing as long as the condition remains true.
Hourly
- fires every hour as long as the condition remains true.
[Coming Soon]
Daily
- fires every day as long as the condition remains true.
description
A brief description of the webhook conditions for your own reference.
target_uri
The endpoint URI that will receive POST
requests from your webhook upon firing.
status
Should be one of the following:
Active
- the webhook is actively in use
Inactive
- the webhook exists, but is not actively in use.
verification_token
A plain/text
string that must be returned by your target_uri
webhook listener when creating or updating a webhook for verification purposes.
Retrieves a list of all the webhooks that have been created under your Developer License.
Authorization
*
String
Registers a new webhook with the specified configurations and conditions.
Use application/json
for raw body parameters.
Request
*
Object
The request payload for the webhook you're creating. The below sample registers a webhook for the Telemetry API that fires when a subscribed vehicle's odometer reads over 10000 km.
Authorization
*
String
Retrieves a list of signal names available for the data field.
Authorization
*
String
Updates the parameters or configurations of an existing webhook via the webhooks webhook_id
.
Use application/json
for raw body parameters.
webhook_id
*
String
The Webhook ID
Request
*
Object
The full request payload for the webhook you're updating. The below sample updates a webhook for the Telemetry API that fires when a subscribed vehicle's odometer reads over 15000 km.
Authorization
*
String
Deletes an existing webhook that was configured under your Developer License.
webhook_id
*
String
The Webhook ID
Authorization
*
String
Lists all of the vehicles that are subscribed to a specific webhook that you've created.
webhookId
*
String
The webhook ID from the registered webhook you created.
Authorization
*
String
Lists all the webhooks that a provided vehicle tokenId
is subscribed to.
tokenId
*
String
Vehicle token ID, this is the token ID of your vehicle NFT.
Authorization
*
String
Subscribes a vehicle tokenId
to a specified webhook.
webhookId
*
String
The webhook ID from the registered webhook you created.
tokenId
*
String
Vehicle token ID, this is the token ID of your vehicle NFT.
Authorization
*
String
Subscribes all vehicles that have shared permissions with your Developer License to a specific webhook.
webhookId
*
String
The webhook ID from the registered webhook you created.
Authorization
*
String
Unsubscribes a vehicle tokenId
from a specified webhook.
webhookId
*
String
The webhook ID from the registered webhook you created.
tokenId
*
String
Vehicle token ID, this is the token ID of your vehicle NFT.
Authorization
*
String
Unsubscribes all previously subscribed vehicles from a webhook you've created.
webhookId
*
String
The webhook ID from the registered webhook you created.
Authorization
*
String
When a vehicle that you have subscribed to an event meets the criteria you've configured in your webhook trigger, it will send a POST
request to your specified targetUri
. The response body will contain the information that you need to handle the event as required by your application.
Sample Configuration:
Sample Response:
tokenId
The tokenId of the vehicle the response is for.
timestamp
The time in UTC format that the event occurred on.
name
The data point that the trigger was setup for.
valueNumber
The recorded numerical value at the time of the event, if relevant (i.e. speed, odometer, etc.)
valueString
The recorded string value at the time of the event, if relevant (i.e. obdDTCList
)
source
The source of the recorded data: hardware devices (ie R1, Autopi) or software connection (Smartcar, Tesla).
producer
cloudEventId
The specific cloud event Id related to the event. Can be used for troubleshooting if necessary.
IMPORTANT: Keep in mind that the data type must match what is returned via the standard Telemetry API - either an int
, float
, or boolean
depending on the field. In this case, odometer values are always returned as a float
by the Telemetry API, so this must be specified for this trigger field.
GET
/v1/webhooks
Developer JWT from the .
POST
/v1/webhooks
Developer JWT from the .
GET
/v1/webhooks/signals
Developer JWT from the .
PUT
/v1/webhooks/{webhook_id}
Developer JWT from the .
DELETE
/v1/webhooks/{webhook_id}
Developer JWT from the .
GET
/v1/webhooks/{webhookId}
Developer JWT from the .
GET
/v1/webhooks/vehicles/{tokenId}
Developer JWT from the .
POST
/v1/webhooks/{webhookId}/subscribe/{tokenId}
Developer JWT from the .
POST
/v1/webhooks/{webhookId}/subscribe/all
Developer JWT from the .
DELETE
/v1/webhooks/{webhookId}/unsubscribe/{tokenId}
Developer JWT from the .
DELETE
/v1/webhooks/{webhookId}/unsubscribe/all
Developer JWT from the .
Decentralized identifier (DID) that refers to a specific on the network.