Skip to main content

Attestation API

Generate verifiable proof about a vehicle's data.

Overview

The DIMO Attestation API provides cryptographic, on-chain attestations for vehicle data and identity verification. This API enables developers to generate verifiable attestations.

Base URL

https://attestation-api.dimo.zone

Endpoints

Create a vehicle VIN attestation

Generates the VIN attestation for a given vehicle if it has never been created, or if it has expired. If an unexpired attestation is found, returns the attestation. After you've obtained the rawVC from the response, you can use it to perform queries on the Telemetry API, such as getting the VIN of a vehicle.

Parameters

vehicleJwtstringRequired
A valid JWT token that represents the vehicle's authentication credentials. This token must be obtained through the DIMO authentication flow.
tokenIdintegerRequired
The unique identifier of the vehicle token. This is provided in the URL path.
POST/v2/attestation/vin/:tokenId
const vinVc = await dimo.attestation.createVinVc({
vehicleJwt: "eyJhbGc...ILlujqw",
tokenId: 123456
})

Response

{
"vcUrl": "https://telemetry-api.dimo.zone/query",
"vcQuery": "query {vinVCLatest(tokenId: <TOKEN_ID>) {rawVC}}",
"message": "VC generated successfully. Retrieve using the provided GQL URL and query parameter."
}

Create a vehicle odometer statement VC

Generates the odometer statement attestation for a given vehicle if it has never been created, or if it has expired. If an unexpired attestation is found, returns the attestation. After you've obtained the rawVC from the response, you can use it to perform queries on the Telemetry API, such as getting the odometer of a vehicle.

Parameters

vehicleJwtstringRequired
A valid JWT token that represents the vehicle's authentication credentials. This token must be obtained through the DIMO authentication flow.
tokenIdintegerRequired
The unique identifier of the vehicle token. This is provided in the URL path.
timestamptimeOptional
Optional timestamp.
POST/v2/attestation/odometer-statement/:tokenId
const vinVc = await dimo.attestation.createOdometerStatementVC({
vehicleJwt: "eyJhbGc...ILlujqw",
tokenId: 123456,
timestamp: '2023-01-01T00:00:00Z' // Optional
})

Response

{
"message": "VC generated successfully, retrieve using the provided telemetry-api."
}

Create a vehicle health attestation

Generates the vehicle health attestation for a given vehicle if it has never been created, or if it has expired. If an unexpired attestation is found, returns the attestation. After you've obtained the rawVC from the response, you can use it to perform queries on the Telemetry API, such as getting the health status of a vehicle.

Parameters

vehicleJwtstringRequired
A valid JWT token that represents the vehicle's authentication credentials. This token must be obtained through the DIMO authentication flow.
tokenIdintegerRequired
The unique identifier of the vehicle token. This is provided in the URL path.
startTimetimeRequired
The start time of the vehicle health report.
endTimetimeRequired
The end time of the vehicle health report.
POST/v2/attestation/vehicle-health/:tokenId
const vinVc = await dimo.attestation.createVehicleHealthVc({
vehicleJwt: "eyJhbGc...ILlujqw",
tokenId: 123456,
startTime: '2023-01-01T00:00:00Z',
endTime: '2023-01-15T00:00:00Z'
})

Response

{
"message": "VC generated successfully, retrieve using the provided telemetry-api."
}

Create a vehicle position attestation

Generates the vehicle position attestation for a given vehicle if it has never been created, or if it has expired. If an unexpired attestation is found, returns the attestation. After you've obtained the rawVC from the response, you can use it to perform queries on the Telemetry API, such as getting the position of a vehicle.

Parameters

vehicleJwtstringRequired
A valid JWT token that represents the vehicle's authentication credentials. This token must be obtained through the DIMO authentication flow.
tokenIdintegerRequired
The unique identifier of the vehicle token. This is provided in the URL path.
timestamptimeRequired
The time of the vehicle position.
POST/v2/attestation/vehicle-position/:tokenId
const vinVc = await dimo.attestation.createVehiclePositionVc({
vehicleJwt: "eyJhbGc...ILlujqw",
tokenId: 123456,
timestamp: '2023-01-01T00:00:00Z'
})

Response

{
"message": "VC generated successfully, retrieve using the provided telemetry-api."
}