---
agentTools:
  projectIndex: https://developer-docs.gomotive.com/llms.txt
---

# Overview - Webhooks v2

> 📘 NOTE
>
> To enable the V2 version of the Motive Webhooks, you can ask your Motive partner to activate it for you. Upon request, the V2 payload is explicitly enabled for your company.

As mentioned earlier, *Webhooks v1*, allow you to be notified whenever certain actions occur within your fleet via an HTTP POST request to an endpoint of your choosing.

One common use-case is vehicle location updates. If you want to be notified whenever a vehicle’s current location updates, you could subscribe to the vehicle\_location\_updated action and you will receive a request whenever any vehicle’s location changes.

With *Webhooks v2* , you can configure the Motive's Webhook platform to deliver the data to AWS SQS or SNS services, for better security and reliability.

To configure Webhooks v2, take the following steps:

1. Update the URL with the AWS SQS url or the AWS SNS Topic ARN.
2. Explicitly assign the webhook\_type.\
   The Webhook requests contain a JSON payload that includes the action and its attributes. Below are the currently supported actions and their payloads.

## Verifying Authenticity

Each Webhook has a shared secret that Motive will use to sign the requests. The computed signature is included in the X-KT-Webhook-Signature HTTP header and can be used to verify that the request originated at Motive servers and has not been modified in-flight. You can respond with 403 if the signature does not match your computed expected value.

To compute the webhook signature, take the HMAC-SHA1 hex digest of the JSON payload using the shared secret.

```Text Example Payload
["fault_code_closed"]
```

```Text Example Secret Shared
"d9d36bea41c44ae49d1bfc4a48ba2abe"
```

This would have an X-KT-Webhook-Signature HTTP header value of "f04a8386a21a6cba0447024e83b3f0983352bb72".

```Text Example Using Bash
echo -n '["fault_code_closed"]' | openssl dgst -sha1 -hmac "f04a8386a21a6cba0447024e83b3f0983352bb72"
```

```Text Example Using RUBY
OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), 'f04a8386a21a6cba0447024e83b3f0983352bb72', '["fault_code_closed"]')
```

## Expected Responses

Motive servers expect specific responses from your server to indicate the successful receipt of a webhook. Make sure that your endpoint handler responds with the appropriate response code. Additionally, your server must accept the connection and respond within 3 seconds or the request will be assumed to have failed. It is up to the endpoint handler to ensure that requests are only processed once.

* 200 or 201 - Indicates the webhook was processed successfully. Motive will consider the request final and will not retry.
* 403 - Indicates the HMAC signature could not be verified. Motive will consider the request invalid and will not retry.
* 4XX or 5XX - Indicates the webhook was not processed and should be retried. Motive will retry the request based on the schedule below.

## Possible Error Scenarios during webhook activation

* Only one active webhook can be present with same action and url. Trying to activate one more webhook with same action and url will result in failure.
* Only two active webhooks can be present for an action. Trying to activate more than two webhooks with same action will result in failure.

## Timeouts

Motive servers expect specific responses from your server to indicate the successful receipt of a webhook within 3 seconds. If the Motive servers didn't get any response within 3 seconds, we timeout and put the webhook for retries.

## Retry Schedule

Motive will make several attempts to retry failed requests using the following delays between attempts.

* 1 minute
* 1 hour
* 6 hours

## Enabling Webhooks (Test Requests)

Whenever you enable a webhook, change the URL, or change the shared secret, Motive will perform a test request to verify a successful response is received. The webhook will only be enabled if a response code of 200 or 201 is received. The test request payload is always the same:

```Text payload
[vehicle_location_updated]
```

> 📘 NOTE
>
> For Webhooks that are sent to SQS and SNS, ensure to allow the role **arn:aws:iam::933794580186:role/wds--prod--use1--push-sender-role** with **sqs:SendMessage** and **sns:Publish** actions respectively.

Add the following policy to your role to allow it to perform the below necessary actions:

```json JSON Policy
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::933794580186:role/wds--prod--use1--push-sender-role"
      },
      "Action": [
         "sqs:SendMessage",
         "sqs:ReceiveMessage"
      ],
      "Resource": "arn:aws:<service>:<region>:<your-account-id>:<resource-name>"
    }
  ]
}
```

## Supported Actions

### Vehicle Current Location Updated (vehicle\_location\_updated)

Triggered whenever a vehicle location is received that is more recent than the current location.

```json Example
{
  "action": "vehicle_location_updated",
  "trigger": "updated",
  "id": "5d3d5cf6-501f-4566-ad07-a80c05c743a7",    // unique identifier for the location object
  "vehicle_id": 123,                               // the vehicle id (foreign key)
  "vehicle_number": "sample",                      // the vehicle number present in motive
  "located_at": "2017-01-01T12:00:00Z",            // time when the location was recorded (ISO8601 format)
  "lat": 34.123,                                   // latitude
  "lon": -84.123,                                  // longitude
  "bearing": 90.0,                                 // the direction of travel (0-360 degrees)
  "engine_hours": 123.56,                          // engine hours reported by the vehicle's ECU
  "speed": 123.5,                                  // speed reported by the vehicle's ECU
  "odometer": 2343232.23,                          // odometer reading reported by the vehicle's ECU
  "fuel": 23423.23,                                // amount of fuel used reported by the vehicle's ECU
  "type": "vehicle_moving",                        // indicates whether the location was captured when the vehicle started moving, stopped moving, the engine started or stopped, or while already in motion
  "description": "3.2 mi SE of San Francisco, CA", // description of the location
  "primary_fuel_level": 30.0,                      // indicates primary tank fuel level
  "secondary_fuel_level": 20.0                     // indicates secondary tank fuel level
}
```

### Vehicle Location Received (vehicle\_location\_received)

Triggered for all vehicle locations received regardless of whether they are the most recent or not.

```json Example
{
  "action": "vehicle_location_received",
  "trigger": "created",
  "id": "5d3d5cf6-501f-4566-ad07-a80c05c743a7",    // unique identifier for the location object
  "vehicle_id": 123,                               // the vehicle id (foreign key)
  "vehicle_number": "sample",                      // the vehicle number present in motive
  "located_at": "2017-01-01T12:00:00Z",            // time when the location was recorded (ISO8601 format)
  "lat": 34.123,                                   // latitude
  "lon": -84.123,                                  // longitude
  "bearing": 90.0,                                 // the direction of travel (0-360 degrees)
  "engine_hours": 123.56,                          // engine hours reported by the vehicle's ECU
  "speed": 123.5,                                  // speed reported by the vehicle's ECU
  "odometer": 2343232.23,                          // odometer reading reported by the vehicle's ECU
  "fuel": 23423.23,                                // amount of fuel used reported by the vehicle's ECU
  "type": "vehicle_moving",                        // indicates whether the location was captured when the vehicle started moving, stopped moving, the engine started or stopped, or while already in motion
  "description": "3.2 mi SE of San Francisco, CA", // description of the location
  "primary_fuel_level": 30.0,                      // indicates primary tank fuel level
  "secondary_fuel_level": 20.0                     // indicates secondary tank fuel level
}
```

### Vehicle Created or Updated (vehicle\_upserted)

Triggered whenever a vehicle is created or updated.

```json Example
{
  "action": "vehicle_upserted",
  "trigger": "created",                   // possible values (created, updated) indicates whether vehicle was created or updated
  "updated_at": "2026-04-10T08:40:12Z",   // RFC 3339 / ISO 8601 UTC timestamp for when the vehicle was last updated
  "id": 123,
  "company_id": 456,
  "number": "T123",
  "status": "active",
  "ifta": true,
  "vin": "ABC12345678909876",
  "make": "Kenworth",
  "model": "379",
  "year": "2008",
  "license_plate_state": "CA",
  "license_plate_number": "7ABD123",
  "metric_units": false,
  "fuel_type": "diesel",
  "prevent_auto_odometer_entry": false,
  "eld_device_id": 1,
  "eld_device": {
    "id": 1,
    "identifier": "00000001",
    "model": "lbb-2"
  },
  "current_driver": {
    "id": 1,
    "first_name": "Bob",
    "last_name": "Smith",
    "driver_company_id": "1223"
  }
}

```

### Fault Code Opened (fault\_code\_opened)

Triggered whenever a new fault code is opened on a vehicle.

```json Example
{
  "action": "fault_code_opened",
  "trigger": "created",
  "id": 123,
  "code_description": "Cargo Securement",
  "status": "open",
  "first_observed_at": "2017-01-01T12:45:33Z",
  "last_observed_at": "2017-01-05T12:45:33Z",
  "type": "constant",
  "fmi": 5,
  "code_label": "SPN-5610",
  "source_address_label": "Fuel System",
  "vehicle": {
    "id": 1,
    "number": "T123",
    "make": "Kenworth",
    "model": "379",
    "year": "2008",
    "vin": "ABC12345678909876"
  },
  "eld_device": {
    "id": 1,
    "identifier": "00000001",
    "model": "lbb-2"
  }
}
```

### Fault Code Closed (fault\_code\_closed)

Triggered whenever an existing fault code is closed on a vehicle.

```json Example
{
  "action": "fault_code_closed",
  "trigger": "updated",
  "id": 123,
  "code_description": "Cargo Securement",
  "status": "closed",
  "first_observed_at": "2017-01-01T12:45:33Z",
  "last_observed_at": "2017-01-05T12:45:33Z",
  "type": "constant",
  "fmi": 5,
  "code_label": "SPN-5610",
  "source_address_label": "Fuel System",
  "vehicle": {
    "id": 1,
    "number": "T123",
    "make": "Kenworth",
    "model": "379",
    "year": "2008",
    "vin": "ABC12345678909876"
  },
  "eld_device": {
    "id": 1,
    "identifier": "00000001",
    "model": "lbb-2"
  }
}
```

### User Created or Updated (user\_upserted)\\

Triggered whenever a user is created or updated in your fleet.

```json Example
{
  "action": "user_upserted",
  "trigger": "updated",                // possible values (created, updated) indicates whether user was created or updated
  "id": 123,
  "role": "driver",
  "status": "active",
  "email": "test.driver@example.com",
  "username": "",
  "first_name": "Test",
  "last_name": "Driver",
  "driver_company_id": "ABC123",
  "phone": "(650) 555-5555",
  "phone_ext": null,
  "carrier_name": "My Fleet",
  "carrier_street": "123 Main St",
  "carrier_city": "San Francisco",
  "carrier_state": "CA",
  "carrier_zip": "94104",
  "terminal_street": null,
  "terminal_city": null,
  "terminal_state": null,
  "terminal_zip": null,
  "time_zone": "Pacific Time (US & Canada)",
  "cycle": "70_8",
  "exception_24_hour_restart": false,
  "exception_8_hour_break": false,
  "exception_wait_time": false,
  "exception_short_haul": false,
  "exception_ca_farm_school_bus": false,
  "cycle2": "70_7",
  "exception_24_hour_restart2": false,
  "exception_8_hour_break2": false,
  "exception_wait_time2": false,
  "exception_short_haul2": false,
  "exception_ca_farm_school_bus2": false,
  "eld_mode": "logs",
  "drivers_license_number": "",
  "drivers_license_state": "",
  "yard_moves_enabled": true,
  "personal_conveyance_enabled": false
}
```

<br />

### Inspection Report Created or Updated (inspection\_report\_upserted)

Triggered whenever a vehicle inspection report (DVIR) is created or updated.

Depending upon the features enabled for your company you will receive variations in the response payload as per the details given below:

If you have Custom Defect List feature enabled and the driver has used the inspection form with Custom Defect List enabled, you will receive defects object inside every object in inspected\_parts array which specifies the type of defect. title specifies the name of the defect selected by the driver for a part, whereas severity defines if the selected defect is a major or minor defect. If any of the defect selected for a part by the driver has severity as major the part will be considered to have a major defect.

If you have Defect Level Resolution feature enabled you will receive mechanic\_details in objects inside theinspected\_parts array along with the status of the part. Please note mechanic\_signed\_at value at the inspection\_report object level will be null, since the mechanic details are contained inside every inspected\_part. The status of a part can be one of these values open, repaired, no\_repair\_needed and good. Also note that, you will receive mechanic object inside the mechanic\_details object and a mechanic\_name inside mechanic\_details separately, here resolver\_idspecifies the ID of logged in user(dispatcher/fleet manager/driver) where as mechanic\_name is the name entered(could be different from the logged in user) while resolving the defect.

If you have Defect Level Resolution enabled, the external\_resolver\_id serves as an identifier for the resolver within your system. This will be supplied back in Motive's public APIs related to inspection reports only and will not be visible on the dashboard.

```json Default
{
  "action": "inspection_report_upserted",
  "trigger": "created",          // possible values (created, updated, deleted) indicates whether inspection report was created, updated or deleted
  "id": 123,
  "date": "2023-09-28",
  "time": "13:45:00",
  "odometer": 50000,
  "carrier_name": "My Fleet",
  "location": "New York",
  "status": "satisfactory",
  "mechanic_signed_at": "2023-09-28 14:00:00",
  "driver_signed_at": "2023-09-28T21:33:07Z",
  "reviewer_signed_at": "2023-09-28T21:33:07Z",
  "inspection_type": "pre_trip",
  "vehicle_number": "T123",
  "defects": [
    {
      "id": 123,
      "category": "Coupling Pin",
      "notes": "jlikjopj"
    }
  ],
  "vehicle": {
    "id": 101,
    "make": "Toyota",
    "metric_units": true,
    "model": "Camry",
    "number": "V123",
    "vin": "ABC123456XYZ789",
    "year": 2022
  },
  "mechanic": {
    "id": 20575,
    "first_name": "Russ",
    "last_name": "Jones"
  },
  "driver": {
    "id": 22601,
    "first_name": "Bob",
    "last_name": "Smith",
    "driver_company_id": "01"
  },
  "reviewer": {
    "id": 22601,
    "first_name": "John",
    "last_name": "Doe",
    "username": "johndoe",
    "email": "johndoe@myfleet.com",
    "driver_company_id": "",
    "status": "active",
    "role": "driver"
  },
  "inspected_parts": [
    {
      "id": 123,
      "category": "Coupling Pin",
      "notes": "jlikjopj"
    }
  ],
  "asset": {
    "id": 101,
    "make": "Toyota",
    "model": "Camry",
    "name": "V123",
    "year": 2022
  },
  "entity_num": "XYZ",
  "entity_type": "vehicle",
  "is_rejected": false
}
```
```json Custom Defect List
{
  "action": "inspection_report_upserted",
  "trigger": "created",          // possible values (created, updated, deleted) indicates whether inspection report was created, updated or deleted
  "id": 123,
  "date": "2023-09-28",
  "time": "13:45:00",
  "odometer": 50000,
  "carrier_name": "My Fleet",
  "location": "New York",
  "status": "satisfactory",
  "mechanic_signed_at": "2023-09-28 14:00:00",
  "driver_signed_at": "2023-09-28T21:33:07Z",
  "reviewer_signed_at": "2023-09-28T21:33:07Z",
  "inspection_type": "pre_trip",
  "vehicle_number": "T123",
  "defects": [
    {
      "id": 123,
      "category": "Coupling Pin",
      "notes": null
    }
  ],
  "vehicle": {
    "id": 101,
    "make": "Toyota",
    "metric_units": true,
    "model": "Camry",
    "number": "V123",
    "vin": "ABC123456XYZ789",
    "year": 2022
  },
  "mechanic": {
    "id": 20575,
    "first_name": "Russ",
    "last_name": "Jones"
  },
  "driver": {
    "id": 22601,
    "first_name": "Bob",
    "last_name": "Smith",
    "driver_company_id": "01"
  },
  "reviewer": {
    "id": 22601,
    "first_name": "John",
    "last_name": "Doe",
    "username": "johndoe",
    "email": "johndoe@myfleet.com",
    "driver_company_id": "",
    "status": "active",
    "role": "driver"
  },
  "inspected_parts": [
    {
      "id": 123,
      "category": "Coupling Pin",
      "notes": "jlikjopj",
      "defects": [
        {
          "title": "Air pressure gauge failure",
          "severity": "major"
        },
        {
          "title": "Slow air pressure build up rate",
          "severity": "major"
        },
        {
          "title": "Air loss rate exceeds prescribed limit",
          "severity": "minor"
        }
      ]
    }
  ],
  "asset": {
    "id": 101,
    "make": "Toyota",
    "model": "Camry",
    "name": "V123",
    "year": 2022
  },
  "entity_num": "XYZ",
  "entity_type": "vehicle",
  "is_rejected": false
}
```
```json Defect Level Resolution
{
  "action": "inspection_report_upserted",
  "trigger": "created",          // possible values (created, updated, deleted) indicates whether inspection report was created, updated or deleted
  "id": 123,
  "date": "2023-09-28",
  "time": "13:45:00",
  "odometer": 50000,
  "carrier_name": "My Fleet",
  "location": "New York",
  "status": "satisfactory",
  "mechanic_signed_at": "2023-09-28 14:00:00",
  "driver_signed_at": "2023-09-28T21:33:07Z",
  "reviewer_signed_at": "2023-09-28T21:33:07Z",
  "inspection_type": "pre_trip",
  "vehicle_number": "T123",
  "defects": [
    {
      "id": 123,
      "category": "Coupling Pin",
      "notes": "jlikjopj"
    }
  ],
  "vehicle": {
    "id": 101,
    "make": "Toyota",
    "metric_units": true,
    "model": "Camry",
    "number": "V123",
    "vin": "ABC123456XYZ789",
    "year": 2022
  },
  "mechanic": {
    "id": 20575,
    "first_name": "Russ",
    "last_name": "Jones"
  },
  "driver": {
    "id": 22601,
    "first_name": "Bob",
    "last_name": "Smith",
    "driver_company_id": "01"
  },
  "reviewer": {
    "id": 22601,
    "first_name": "John",
    "last_name": "Doe",
    "username": "johndoe",
    "email": "johndoe@myfleet.com",
    "driver_company_id": "",
    "status": "active",
    "role": "driver"
  },
  "inspected_parts": [
    {
      "id": 123,
      "category": "Coupling Pin",
      "notes": "jlikjopj",
      "status": [
        "open"
      ],
      "mechanic_name": "john",
      "mechanic_note": "abcnote",
      "resolver_id": 2345,
      "external_resolver_id": "111",
      "mechanic_signed_at": "2024-02-0718: 50: 04.112239UTC"
    }
  ],
  "asset": {
    "id": 101,
    "make": "Toyota",
    "model": "Camry",
    "name": "V123",
    "year": 2022
  },
  "entity_num": "XYZ",
  "entity_type": "vehicle",
  "is_rejected": false
}
```
```json Defect Level Resolution and Custom Defect List
{
  "action": "inspection_report_upserted",
  "trigger": "created",          // possible values (created, updated, deleted) indicates whether inspection report was created, updated or deleted
  "id": 123,
  "date": "2023-09-28",
  "time": "13:45:00",
  "odometer": 50000,
  "carrier_name": "My Fleet",
  "location": "New York",
  "status": "satisfactory",
  "mechanic_signed_at": "2023-09-28 14:00:00",
  "driver_signed_at": "2023-09-28T21:33:07Z",
  "reviewer_signed_at": "2023-09-28T21:33:07Z",
  "inspection_type": "pre_trip",
  "vehicle_number": "T123",
  "defects": [
    {
      "id": 123,
      "category": "Coupling Pin",
      "notes": "jlikjopj"
    }
  ],
  "vehicle": {
    "id": 101,
    "make": "Toyota",
    "metric_units": true,
    "model": "Camry",
    "number": "V123",
    "vin": "ABC123456XYZ789",
    "year": 2022
  },
  "mechanic": {
    "id": 20575,
    "first_name": "Russ",
    "last_name": "Jones"
  },
  "driver": {
    "id": 22601,
    "first_name": "Bob",
    "last_name": "Smith",
    "driver_company_id": "01"
  },
  "reviewer": {
    "id": 22601,
    "first_name": "John",
    "last_name": "Doe",
    "username": "johndoe",
    "email": "johndoe@myfleet.com",
    "driver_company_id": "",
    "status": "active",
    "role": "driver"
  },
  "inspected_parts": [
    {
      "id": 123,
      "category": "Coupling Pin",
      "notes": "jlikjopj",
      "status": [
        "open"
      ],
      "mechanic_name": "john",
      "mechanic_note": "abcnote",
      "resolver_id": 2345,
      "external_resolver_id": "111",
      "mechanic_signed_at": "2024-02-0718: 50: 04.112239UTC",
      "defects": [
        {
          "title": "Air pressure gauge failure",
          "severity": "major"
        },
        {
          "title": "Slow air pressure build up rate",
          "severity": "major"
        },
        {
          "title": "Air loss rate exceeds prescribed limit",
          "severity": "minor"
        }
      ]
    }
  ],
  "asset": {
    "id": 101,
    "make": "Toyota",
    "model": "Camry",
    "name": "V123",
    "year": 2022
  },
  "entity_num": "XYZ",
  "entity_type": "vehicle",
  "is_rejected": false
}
```

### HOS Violation Created or Updated (hos\_violation\_upserted)

Triggered whenever a HOS violation is created or updated.

```json Example
{
  "action": "hos_violation_upserted",
  "trigger": "updated",                 // possible values (created, updated, deleted) indicates whether inspection report was created, updated or deleted
  "id": 123,
  "type": "driving_11",
  "name": "11 Hour Driving Limit",
  "start_time": "2017-01-04T17:23:00Z",
  "end_time": "2017-01-04T18:00:00Z",
  "driver": {
    "id": 1,
    "first_name": "Bob",
    "last_name": "Smith",
    "driver_company_id", "1223"
  }
}
```

### Vehicle Enter/Exit Geofence (vehicle\_geofence\_event)

Triggered whenever a Vehicle Enters or Exits into a Geofence.

```json Example
{
  "event_type": "geofence_exit", // possible values: geofence_entry, geofence_exit
  "id": 45055326,
  "geofence_id": 213308,
  "start_time": "2021-10-12T02:53:15Z",
  "end_time": "2021-10-12T19:30:45Z",
  "duration": 59850, 
  "vehicle": {
    "id": 740263,
    "number": "sivanesh_AI_car",
    "year": "2010",
    "make": "",
    "model": "",
    "vin": "WMWMF7C52ATX43675"
  },
  "start_driver": {
    "id": 2689212,
    "first_name": "Sivanesh_ai",
    "last_name": "Manoharan_ai",
    "username": "sivaneshai",
    "email": "sivanesh.manoharan+ai@keeptruckin.com",
    "driver_company_id": "",
    "role": "driver"
  },
  "end_driver": {
    "id": 2689212,
    "first_name": "Sivanesh_ai",
    "last_name": "Manoharan_ai",
    "username": "sivaneshai",
    "email": "sivanesh.manoharan+ai@keeptruckin.com",
    "driver_company_id": "",
    "role": "driver"
  },
  "action": "vehicle_geofence_event"
}
```

### Asset Enter/Exit Geofence (asset\_geofence\_event)

Triggered whenever an Asset Enters or Exits into a Geofence.

```json Example
{
  "action": "asset_geofence_event",
  "event_type": "geofence_exit", // possible values: geofence_entry, geofence_exit
  "id": 3123212,
  "geofence_id": 110882,
  "start_time": "2021-10-12T13:39:55Z",
  "end_time": "2021-10-12T13:43:19Z",
  "duration": 204,
  "asset_details": {
    "asset_id": 220,
    "name": "AG552_AT4-Q1G-ZKD",
    "type": "curtain_side",
    "vin": "AG-11111111111112",
    "make": "Great Dane",
    "model": "Champion CL",
    "year": "2015",
    "company_id": 160,
    "asset_gateway": {
      "id": 349,
      "identifier": "AT4-Q1G-ZKD"
    }
  }
}
```

### Engine Toggle Event (engine\_toggle\_event)

Triggered whenever a vehicle starts or stops its engine.

```json Example
{
  "action": "engine_toggle_event",
  "trigger": "on",                   // possible values (on, off) indicates engine status
  "vehicle_id": 123,
  "company_id": 456,
  "vehicle_number": "T123",
  "vin": "ABC12345678909876",
  "make": "Kenworth",
  "model": "379",
  "year": "2008",
  "license_plate_state": "CA",
  "license_plate_number": "7ABD123",
  "metric_units": false,
  "fuel_type": "diesel",
  "eld_device_id": 1,
  "eld_device": {
    "id": 1,
    "identifier": "00000001",
    "model": "lbb-2"
  },
  "current_driver": {
    "id": 1,
    "first_name": "Bob",
    "last_name": "Smith",
    "driver_company_id": "1223"
  }
}
```

<br />

### Driver Performance Event (driver\_performance\_event\_created and driver\_performance\_event\_updated)

Triggered when driver performance event is created or updated. Note: it would take minutes after the event has occurred for the payload to be eventually sent to the url.

```json Example
{
  "action":"driver_performance_event_updated",
  "id":123,
  "acceleration":32.23,
  "end_bearing":110.95,
  "end_speed":23.868,
  "end_time":"2023-04-12T01:28:12Z",
  "lat":37.4121698,
  "lon":-121.9286528,
  "m_gps_heading":[
    114.53,
    113.91,
    113.15
  ],
  "m_gps_lat":[
    37.4119784,
    37.4119346,
    37.4118874
  ],
  "m_gps_lon":[
    -121.9282081,
    -121.9281022,
    -121.9279839
  ],
  "m_veh_odo":"nil",
  "m_veh_spd":[
    31.0,
    35.0,
    41.0
  ],
  "start_bearing":111.45,
  "start_speed":32.22,
  "start_time":"2023-04-12T01:28:11Z",
  "type":"hard_brake",
  "driver_id":1,
  "vehicle_id":12,
  "eld_device_id":123,
  "camera_media":{
    "id":321,
    "available":true,
    "cam_positions":[
      "front_facing",
      "driver_facing"
    ],
    "cam_type":"dc54",
    "uploaded_at":"2023-04-12T01:30:50Z",
    "start_time":"2023-04-12T01:28:04Z",
    "duration":15,
    "downloadable_videos":{
      "front_facing_enhanced_url":"nil",
      "front_facing_enhanced_ai_viz_url":"nil",
      "dual_facing_enhanced_url":"https://keep-truckin-preview.s3.amazonaws.com/uploads/camera_media/media/2436118/mp4-dual_facing-enhanced-7fa92a01-d7d1a59b",
      "dual_facing_enhanced_ai_viz_url":"nil",
      "front_facing_plain_url":"https://keep-truckin-preview.s3.amazonaws.com/uploads/camera_media/media/2436118/mp4-front_facing-7fa92a01-38c6-493b-ba3e27aa",
      "driver_facing_plain_url":"https://keep-truckin-preview.s3.amazonaws.com/uploads/camera_media/media/2436118/mp4-driver_facing-7fa92a01-38c6-493b-ba0b-5f3468c90c4a1de1f81e527bbaea69176acd25cce16c0968310"
    },
    "auto_transcode_status":"success",
    "downloadable_images":{
      "front_facing_jpg_url":"nil",
      "driver_facing_jpg_url":"nil"
    }
  },
  "m_gps_spd":[
    33.012,
    38.7,
    43.416
  ],
  "location":"San Jose, CA",
  "intensity":"-7.1 mph/s",
  "coaching_status":"pending_review",
  "coached_at":"nil",
  "coachable_behaviors":[
    "hard_brake"
  ],
  "coached_behaviors":"nil",
  "primary_behavior":[
    "hard_brake"
  ],
  "secondary_behaviors":[
    "no_tag_applies"
  ],
  "max_speed":58.86,
  "min_speed":0.0,
  "event_intensity":{
    "name":"Braking Intensity",
    "value":11.5,
    "unit_type":"acceleration"
  },
  "current_vehicle":{
    "id":117800,
    "number":"Sample"
  },
  "current_driver":{
    "id":983335,
    "first_name":"john",
    "last_name":"doe",
    "email":"john_doe@gmail.com",
    "driver_company_id":"john"
  },
  "metadata":{
    "additional_context":"nil",
    "annotation_tags":[
      "no_tag_applies"
    ],
    "severity":"low",
    "trigger":"nil"
  },
  "edited_by_fm":false
}
```

<br />

### Aggregated Driver Performance Event (created and updated)

This Webhook is triggered when a driver performance event is either created or updated.\
Note: It will take a few minutes after the event has occurred for the payload to be sent to the URL

**IMPORTANT**: The following payload will only be available if the Driver Performance Event is an aggregated one. For example, if the type of the Driver Performance Event is “Lane Swerving”.

```json Sample Payload
{
  "id": 1359698678,
  "action": "driver_performance_event_updated",
  "type": "aggregated_lane_swerving",
  "driver_id": 4033173,
  "vehicle_id": 1300181,
  "eld_device_id": 1160458,
  "company_id": 5799,
  "company_name": "TEST FLEET",

  "start_time": "2025-09-25T08:52:52Z",
  "end_time": "2025-09-25T08:52:58Z",
  "start_speed": 99.0196,
  "end_speed": 101.407005,
  "start_bearing": 130.24654,
  "end_bearing": 126.64,
  "acceleration": 0.0,

  "lat": 37.764701,
  "lon": -122.477367,
  "location": "San Francisco, CA",

  "m_gps_heading": [333.63205, 332.61752, 329.09915],
  "m_gps_lat": [37.764701, 37.764690, 37.764680],
  "m_gps_lon": [-122.477367, -122.477380, -122.477395],
  "m_gps_spd": [64.62766, 64.548744, 64.548744],
  "m_veh_spd": [64.99029, 64.89647, 64.91925],
  "m_veh_odo": null,

  "coaching_status": "coachable",
  "coached_at": null,
  "coachable_behaviors": ["aggregated_lane_swerving"],

  "sub_events": [
    {
      "acceleration": 0.0,
      "end_bearing": 126.64,
      "end_speed": 101.407005,
      "end_time": "2025-09-25T08:52:58Z",
      "lat": 37.764701,
      "lon": -122.477367,
      "m_gps_heading": [333.63205, 332.61752, 329.09915],
      "m_gps_lat": [43.452685, 43.452685, 43.452685],
      "m_gps_lon": [-80.553609, -80.553609, -80.553609],
      "m_veh_odo": [],
      "m_veh_spd": [64.99029, 64.89647, 64.91925],
      "start_bearing": 130.24654,
      "start_speed": 99.0196,
      "start_time": "2025-09-25T08:52:52Z",
      "type": "individual_lane_swerving",
      "m_gps_spd": [64.62766, 64.548744, 64.548744],
      "max_speed": 68.775276,
      "min_speed": 64.49415,
      "camera_media": {
        "id": 4473535,
        "available": true,
        "cam_positions": ["front_facing", "driver_facing"],
        "cam_type": "dc54",
        "uploaded_at": "2025-09-25T09:48:21Z",
        "start_time": "2025-09-25T08:52:52Z",
        "duration": 6,
        "downloadable_images": {
          "driver_facing_jpg_url": null,
          "front_facing_jpg_url": null
        },
        "downloadable_videos": {
          "front_facing_enhanced_url": null,
          "front_facing_enhanced_ai_viz_url": null,
          "dual_facing_enhanced_url": "https://keep-truckin-preview.s3.amazonaws.com/uploads/camera_media/media/2436118/mp4-dual_facing-enhanced-7fa92a01-d7d1a59b",
          "dual_facing_enhanced_ai_viz_url": null,
          "front_facing_plain_url": "https://keep-truckin-preview.s3.amazonaws.com/uploads/camera_media/media/2436118/mp4-front_facing-7fa92a01-38c6-493b-ba3e27aa",
          "driver_facing_plain_url": "https://keep-truckin-preview.s3.amazonaws.com/uploads/camera_media/media/2436118/mp4-driver_facing-7fa92a01-38c6-493b-ba0b-5f3468c90c4a1de1f81e527bbaea69176acd25cce16c0968310"
        },
        "auto_transcode_status": "success"
      }
    }
  ]
}

```

<br />

<br />

### Speeding Event (speeding\_event\_created and speeding\_event\_updated)

Triggered when speeding event is created or updated. Note: it would take minutes after the event has occurred for the payload to be eventually sent to the url.

```json Example
{
    "action": "speeding_event_created",
    "id": 435681,
    "max_over_speed_in_kph": 15.715800000000002,
    "avg_over_speed_in_kph": 12.358282941176471,
    "min_posted_speed_limit_in_kph": 48.2802,
    "max_posted_speed_limit_in_kph": 48.2802,
    "avg_vehicle_speed": 60.59663658536588,
    "min_vehicle_speed": 58.0001,
    "max_vehicle_speed": 63.996,
    "duration": 83,
    "start_lat": 43.0301183,
    "start_lon": -78.8308857,
    "end_lat": 43.0217879,
    "end_lon": -78.843557,
    "type": "posted",
    "start_time": "2023-04-17T13:46:04Z",
    "end_time": "2023-04-17T13:47:27Z",
    "coaching_status": "pending_review",
    "status": "invalid",
   "driver_id": 1,
   "vehicle_id":12,
   "eld_device_id": 123,
    "metadata": {
        "severity": "medium",
        "trigger": "speeding",
        "is_manually_changed": false
    }
}

```

### User Duty Status (user\_duty\_status\_updated)

This Webhook is triggered when the status of the driver's timecard is changed or updated.

```json Example
{
  "action": "user_duty_status_updated",
  "id": 123456,
  "role": "driver",
  "email": null,
  "username": "test-driver-name",
  "first_name": "Test",
  "last_name": "Driver-name",
  "driver_company_id": null,
  "phone": null,
  "phone_ext": null,
  "carrier_name": null,
  "carrier_street": null,
  "carrier_city": null,
  "carrier_state": null,
  "carrier_zip": null,
  "terminal_street": null,
  "terminal_city": null,
  "terminal_state": null,
  "terminal_zip": null,
  "time_zone": "Pacific Time (US & Canada)",
  "cycle": "Other",
  "exception_24_hour_restart": false,
  "exception_8_hour_break": false,
  "exception_wait_time": false,
  "exception_short_haul": false,
  "exception_ca_farm_school_bus": false,
  "cycle2": null,
  "exception_24_hour_restart2": false,
  "exception_8_hour_break2": false,
  "exception_wait_time2": false,
  "exception_short_haul2": false,
  "exception_ca_farm_school_bus2": false,
  "eld_mode": "exempt",
  "time_tracking_mode": "timecards",
  "drivers_license_number": null,
  "drivers_license_state": null,
  "yard_moves_enabled": false,
  "personal_conveyance_enabled": false,
  "status": "active",
  "trigger": "updated",
  "duty_status": "on_duty",
  "updated_at": "2025-02-19T11:04:09Z"
}
```