Skip to main content
POST
/
webhooks
Create a webhook
curl --request POST \
  --url https://api.samsara.com/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Webhook-123",
  "url": "https://www.Webhook-123.com/webhook/listener",
  "customHeaders": [
    {
      "key": "format",
      "value": "xcmol-532"
    }
  ],
  "eventTypes": [
    "DriverCreated",
    "DriverCreated"
  ],
  "version": "2018-01-01"
}
'
{
  "id": "23918",
  "name": "Webhook-123",
  "secretKey": "11121-31231-1231212",
  "url": "https://www.webhook-123.com/webhook/listener",
  "version": "2018-01-01",
  "customHeaders": [
    {
      "key": "format",
      "value": "xcmol-532"
    }
  ],
  "eventTypes": [
    "AddressCreated",
    "AddressCreated"
  ]
}

Documentation Index

Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

This is the body of the webhook POST request.

name
string
required

The name of the webhook. This will appear in both Samsara’s cloud dashboard and the API. It can be set or updated through the Samsara Dashboard or through the API at any time.

Maximum string length: 255
Example:

"Webhook-123"

url
string
required

The url of the webhook. This will appear in both Samsara’s cloud dashboard and the API. It can be set or updated through the Samsara Dashboard or through the API at any time.

Maximum string length: 2047
Example:

"https://www.Webhook-123.com/webhook/listener"

customHeaders
object[]

The list of custom headers that users can include with their request

Maximum array length: 5
eventTypes
enum<string>[]

[beta] The list of event types associated with a particular event type

event type name Valid values: AddressCreated, AddressDeleted, AddressUpdated, AlertIncident, AlertObjectEvent, DocumentSubmitted, DriverCreated, DriverUpdated, DvirSubmitted, EngineFaultOff, EngineFaultOn, FormSubmitted, FormUpdated, GatewayUnplugged, GeofenceEntry, GeofenceExit, IssueCreated, MissingDvirPastDue, PredictiveMaintenanceAlert, RouteStopArrival, RouteStopDeparture, RouteStopEarlyLateArrival, RouteStopEtaUpdated, RouteStopResequence, SevereSpeedingEnded, SevereSpeedingStarted, SpeedingEventEnded, SpeedingEventStarted, SuddenFuelLevelDrop, SuddenFuelLevelRise, VehicleCreated, VehicleUpdated

Available options:
AddressCreated,
AddressDeleted,
AddressUpdated,
AlertIncident,
AlertObjectEvent,
DocumentSubmitted,
DriverCreated,
DriverUpdated,
DvirSubmitted,
EngineFaultOff,
EngineFaultOn,
FormSubmitted,
FormUpdated,
GatewayUnplugged,
GeofenceEntry,
GeofenceExit,
IssueCreated,
MissingDvirPastDue,
PredictiveMaintenanceAlert,
RouteStopArrival,
RouteStopDeparture,
RouteStopEarlyLateArrival,
RouteStopEtaUpdated,
RouteStopResequence,
SevereSpeedingEnded,
SevereSpeedingStarted,
SpeedingEventEnded,
SpeedingEventStarted,
SuddenFuelLevelDrop,
SuddenFuelLevelRise,
VehicleCreated,
VehicleUpdated
Example:
["DriverCreated", "DriverCreated"]
version
enum<string>

The version of the webhook. Valid values: 2018-01-01, 2021-06-09, 2022-09-13, 2024-02-27

Available options:
2018-01-01,
2021-06-09,
2022-09-13,
2024-02-27
Example:

"2018-01-01"

Response

OK response.

id
string
required

The ID of the webhook. This will appear in both Samsara’s cloud dashboard and the API. This is the id of the webhook. This is system generated.

Example:

"23918"

name
string
required

The name of the webhook. This will appear in both Samsara’s cloud dashboard and the API. It can be set or updated through the Samsara Dashboard or through the API at any time.

Example:

"Webhook-123"

secretKey
string
required

The secret key of the webhook. This will appear in both Samsara’s cloud dashboard and the API.

Example:

"11121-31231-1231212"

url
string
required

The url of the webhook. This will appear in both Samsara’s cloud dashboard and the API. It can be set or updated through the Samsara Dashboard or through the API at any time.

Example:

"https://www.webhook-123.com/webhook/listener"

version
enum<string>
required

The version of the webhook. Valid values: 2018-01-01, 2021-06-09

Available options:
2018-01-01,
2021-06-09
Example:

"2018-01-01"

customHeaders
object[]

The list of custom headers that users can include with their request

Maximum array length: 5
eventTypes
enum<string>[]

The list of event types associated with a particular webhook.

This is the name of the event type. Valid values: AddressCreated, AddressDeleted, AddressUpdated, AlertIncident, AlertObjectEvent, DocumentSubmitted, DriverCreated, DriverUpdated, DvirSubmitted, EngineFaultOff, EngineFaultOn, FormSubmitted, FormUpdated, GatewayUnplugged, GeofenceEntry, GeofenceExit, IssueCreated, MissingDvirPastDue, PredictiveMaintenanceAlert, RouteStopArrival, RouteStopDeparture, RouteStopEarlyLateArrival, RouteStopEtaUpdated, RouteStopResequence, SevereSpeedingEnded, SevereSpeedingStarted, SpeedingEventEnded, SpeedingEventStarted, SuddenFuelLevelDrop, SuddenFuelLevelRise, VehicleCreated, VehicleUpdated

Available options:
AddressCreated,
AddressDeleted,
AddressUpdated,
AlertIncident,
AlertObjectEvent,
DocumentSubmitted,
DriverCreated,
DriverUpdated,
DvirSubmitted,
EngineFaultOff,
EngineFaultOn,
FormSubmitted,
FormUpdated,
GatewayUnplugged,
GeofenceEntry,
GeofenceExit,
IssueCreated,
MissingDvirPastDue,
PredictiveMaintenanceAlert,
RouteStopArrival,
RouteStopDeparture,
RouteStopEarlyLateArrival,
RouteStopEtaUpdated,
RouteStopResequence,
SevereSpeedingEnded,
SevereSpeedingStarted,
SpeedingEventEnded,
SpeedingEventStarted,
SuddenFuelLevelDrop,
SuddenFuelLevelRise,
VehicleCreated,
VehicleUpdated
Example:
["AddressCreated", "AddressCreated"]