Create a webhook
Rate limit: 100 requests/min (learn more about rate limits here).
To use this endpoint, select Write Webhooks under the Setup & Administration category when creating or editing an API token. Learn More.
Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.
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.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
This is the body of the webhook POST request.
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.
255"Webhook-123"
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.
2047"https://www.Webhook-123.com/webhook/listener"
The list of custom headers that users can include with their request
5Show child attributes
[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
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 ["DriverCreated", "DriverCreated"]The version of the webhook. Valid values: 2018-01-01, 2021-06-09, 2022-09-13, 2024-02-27
2018-01-01, 2021-06-09, 2022-09-13, 2024-02-27 "2018-01-01"
OK response.
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.
"23918"
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.
"Webhook-123"
The secret key of the webhook. This will appear in both Samsara’s cloud dashboard and the API.
"11121-31231-1231212"
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.
"https://www.webhook-123.com/webhook/listener"
The version of the webhook. Valid values: 2018-01-01, 2021-06-09
2018-01-01, 2021-06-09 "2018-01-01"
The list of custom headers that users can include with their request
5Show child attributes
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
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 ["AddressCreated", "AddressCreated"]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"
]
}