Webhooks
Signed event endpoints: alarms, trips, geofences and jobs, with a delivery log and redelivery.
Base URLhttps://api.ping.nml.sa/v110 operations
Jump to an operation
Common errors
Operations on this page answer these errors in one shape; each operation lists the ones it returns.
400The request is invalid (code: invalid_request), with field errors.401The API key is missing, unknown, expired or revoked (code: unauthorized).403The API key lacks the scope this operation needs (code: forbidden).404No such resource in this account, or outside the key's data scope (code: not_found).409The resource is not in a state that allows this (code: conflict), or the idempotency key is in use.429The key's rate limit is reached (code: rate_limited). Retry after the Retry-After header's seconds.
The account's webhook deliveries, newest first
GET/v1/webhook-deliveries
Deliveries are kept 30 days.
Scopewebhooks:read
Parameters
endpoint_idstringqueryOne endpoint's deliveries.
e.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8cstatestringqueryOnly deliveries in this state.
e.g.
succeededtypestringqueryOnly deliveries of this event type.
e.g.
trip.endedlimitintegerqueryItems per page, 1 to 200 (default 50).
cursorstringqueryThe next_cursor of the previous page.
Response 200
dataobject[]Fields of data
idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8cendpoint_idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8cevent_idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8ctypestringA delivered event's type: a WebhookEventType, or webhook.test.
one of
alarm.openedalarm.clearedtrip.endedgeofence.enteredgeofence.exitedjob.dispatchedjob.startedjob.completedjob.cancelledwebhook.testredelivery_ofstring | nullThe delivery this one sends again.
statestringone of
pendingsucceededfailedfailurestring | nullWhy it failed: every attempt failed, or the endpoint was disabled first.
one of
exhaustedendpoint_disablednullattemptsintegernext_attempt_atstring | null (date-time)When it is tried next (pending only).
created_atstring (date-time)done_atstring | null (date-time)
next_cursorstring | null
Errors
curl "https://api.ping.nml.sa/v1/webhook-deliveries" \
-H "Authorization: Bearer $PING_API_KEY"{
"data": [
{
"id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"endpoint_id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"event_id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"type": "trip.ended",
"redelivery_of": "string",
"state": "succeeded",
"failure": "exhausted",
"attempts": 0,
"next_attempt_at": "string",
"created_at": "string",
"done_at": "string"
}
],
"next_cursor": "string"
}One delivery with every attempt
GET/v1/webhook-deliveries/{deliveryId}
Scopewebhooks:read
Parameters
deliveryIdstringpath requirede.g.
019ac0d2-3c4d-7e5f-8a6b-7c8d9e0f1a2b
Response 200
deliveryobjectFields of delivery
idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8cendpoint_idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8cevent_idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8ctypestringA delivered event's type: a WebhookEventType, or webhook.test.
one of
alarm.openedalarm.clearedtrip.endedgeofence.enteredgeofence.exitedjob.dispatchedjob.startedjob.completedjob.cancelledwebhook.testredelivery_ofstring | nullThe delivery this one sends again.
statestringone of
pendingsucceededfailedfailurestring | nullWhy it failed: every attempt failed, or the endpoint was disabled first.
one of
exhaustedendpoint_disablednullattemptsintegernext_attempt_atstring | null (date-time)When it is tried next (pending only).
created_atstring (date-time)done_atstring | null (date-time)
payloadalarm.opened | alarm.cleared | trip.ended | geofence.entered | geofence.exited | job.dispatched | job.started | job.completed | job.cancelled | webhook.testOne webhook body: the payload of its type.
attempt_logobject[]Every attempt, first first.
Fields of attempt_log
nintegeratstring (date-time)urlstringThe URL it went to (the endpoint's at the time).
addressstring | nullThe address dialled.
e.g.
203.0.113.7outcomestringdelivered: 2xx; http_error: another status (redirects are not followed); unreachable: DNS, connection or TLS; refused_address: the host resolved to a non-public address.
one of
deliveredhttp_errortimeoutunreachablerefused_addressstatusinteger | nullduration_msintegererrorstring | nullWhat went wrong, for people.
Errors
curl "https://api.ping.nml.sa/v1/webhook-deliveries/019ac0d2-3c4d-7e5f-8a6b-7c8d9e0f1a2b" \
-H "Authorization: Bearer $PING_API_KEY"{
"delivery": {
"id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"endpoint_id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"event_id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"type": "trip.ended",
"redelivery_of": "string",
"state": "succeeded",
"failure": "exhausted",
"attempts": 0,
"next_attempt_at": "string",
"created_at": "string",
"done_at": "string"
},
"payload": {
"id": "019ac0d1-7a2b-7c3d-8e4f-5a6b7c8d9e0f",
"type": "alarm.opened",
"occurred_at": "2026-11-17T08:30:00Z",
"data": {
"alarm_id": "019ac0c6-2c3d-7e4f-8a5b-6c7d8e9f0a1b",
"rule_id": "string",
"vehicle_id": "string",
"kind": "overspeed",
"severity": "info",
"opened_at": "string",
"lat": 24.7136,
"lon": 46.6753
}
},
"attempt_log": [
{
"n": 0,
"at": "string",
"url": "string",
"address": "203.0.113.7",
"outcome": "delivered",
"status": 0,
"duration_ms": 0,
"error": "string"
}
]
}Send a finished delivery's event to its endpoint again, as a new delivery (same event id)
POST/v1/webhook-deliveries/{deliveryId}/redeliver
Only a delivery that succeeded or failed, to an enabled endpoint (else 409).
Scopewebhooks:write
Parameters
deliveryIdstringpath requirede.g.
019ac0d2-3c4d-7e5f-8a6b-7c8d9e0f1a2b
Response 202
idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8cendpoint_idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8cevent_idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8ctypestringA delivered event's type: a WebhookEventType, or webhook.test.
one of
alarm.openedalarm.clearedtrip.endedgeofence.enteredgeofence.exitedjob.dispatchedjob.startedjob.completedjob.cancelledwebhook.testredelivery_ofstring | nullThe delivery this one sends again.
statestringone of
pendingsucceededfailedfailurestring | nullWhy it failed: every attempt failed, or the endpoint was disabled first.
one of
exhaustedendpoint_disablednullattemptsintegernext_attempt_atstring | null (date-time)When it is tried next (pending only).
created_atstring (date-time)done_atstring | null (date-time)
Errors
curl -X POST "https://api.ping.nml.sa/v1/webhook-deliveries/019ac0d2-3c4d-7e5f-8a6b-7c8d9e0f1a2b/redeliver" \
-H "Authorization: Bearer $PING_API_KEY"{
"id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"endpoint_id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"event_id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"type": "trip.ended",
"redelivery_of": "string",
"state": "succeeded",
"failure": "exhausted",
"attempts": 0,
"next_attempt_at": "string",
"created_at": "string",
"done_at": "string"
}List the account's webhook endpoints, oldest first
GET/v1/webhook-endpoints
Scopewebhooks:read
Parameters
limitintegerqueryItems per page, 1 to 200 (default 50).
cursorstringqueryThe next_cursor of the previous page.
Response 200
dataobject[]Fields of data
idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8curlstringe.g.
https://erp.example.com/ping/webhooksdescriptionstring | nulle.g.
ERP alarms feedevent_typesstring[]enabledbooleandisabled_reasonstring | nullowner: turned off by a person; failing: disabled after repeated failure; account_ended: the account left PING (its exit).
one of
ownerfailingaccount_endednulldisabled_atstring | null (date-time)secret_hintstringThe secret's last four characters.
e.g.
x7Qasecret_rotated_atstring (date-time)consecutive_failuresintegerDeliveries in a row that failed for good.
created_atstring (date-time)updated_atstring (date-time)
next_cursorstring | null
Errors
curl "https://api.ping.nml.sa/v1/webhook-endpoints" \
-H "Authorization: Bearer $PING_API_KEY"{
"data": [
{
"id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"url": "https://erp.example.com/ping/webhooks",
"description": "ERP alarms feed",
"event_types": [
"alarm.opened"
],
"enabled": false,
"disabled_reason": "owner",
"disabled_at": "string",
"secret_hint": "x7Qa",
"secret_rotated_at": "string",
"consecutive_failures": 0,
"created_at": "string",
"updated_at": "string"
}
],
"next_cursor": "string"
}Add a webhook endpoint: an https URL and the event types it receives. Its signing secret is answered once
POST/v1/webhook-endpoints
The URL must be https and its host a name or a public address (private, loopback, link-local and reserved addresses are refused, and checked again on every delivery). At most 10 endpoints per account.
Scopewebhooks:write Accepts Idempotency-Key
Parameters
Idempotency-KeystringheaderA unique key per create request. A retry with the same key within 24 hours returns the first result instead of creating again.
Request body
urlstringrequiredhttps only; no credentials, no private, loopback or link-local address.
e.g.
https://erp.example.com/ping/webhooksdescriptionstringe.g.
ERP alarms feedevent_typesstring[]requirede.g.
["alarm.opened","alarm.cleared"]enabledboolean
Response 201
endpointobjectFields of endpoint
idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8curlstringe.g.
https://erp.example.com/ping/webhooksdescriptionstring | nulle.g.
ERP alarms feedevent_typesstring[]enabledbooleandisabled_reasonstring | nullowner: turned off by a person; failing: disabled after repeated failure; account_ended: the account left PING (its exit).
one of
ownerfailingaccount_endednulldisabled_atstring | null (date-time)secret_hintstringThe secret's last four characters.
e.g.
x7Qasecret_rotated_atstring (date-time)consecutive_failuresintegerDeliveries in a row that failed for good.
created_atstring (date-time)updated_atstring (date-time)
secretstringThe signing secret, shown only in this answer.
e.g.
whsec_4fJ9kQ2mX7pL1sV8nR3tY6wZ0aB5cD7x
Errors
curl -X POST "https://api.ping.nml.sa/v1/webhook-endpoints" \
-H "Authorization: Bearer $PING_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://erp.example.com/ping/webhooks", "description": "ERP alarms feed", "event_types": ["alarm.opened", "alarm.cleared"]}'{
"endpoint": {
"id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"url": "https://erp.example.com/ping/webhooks",
"description": "ERP alarms feed",
"event_types": [
"alarm.opened"
],
"enabled": false,
"disabled_reason": "owner",
"disabled_at": "string",
"secret_hint": "x7Qa",
"secret_rotated_at": "string",
"consecutive_failures": 0,
"created_at": "string",
"updated_at": "string"
},
"secret": "whsec_4fJ9kQ2mX7pL1sV8nR3tY6wZ0aB5cD7x"
}One webhook endpoint
GET/v1/webhook-endpoints/{endpointId}
Scopewebhooks:read
Parameters
endpointIdstringpath requirede.g.
019ac0d0-1a2b-7c3d-8e4f-5a6b7c8d9e0f
Response 200
idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8curlstringe.g.
https://erp.example.com/ping/webhooksdescriptionstring | nulle.g.
ERP alarms feedevent_typesstring[]enabledbooleandisabled_reasonstring | nullowner: turned off by a person; failing: disabled after repeated failure; account_ended: the account left PING (its exit).
one of
ownerfailingaccount_endednulldisabled_atstring | null (date-time)secret_hintstringThe secret's last four characters.
e.g.
x7Qasecret_rotated_atstring (date-time)consecutive_failuresintegerDeliveries in a row that failed for good.
created_atstring (date-time)updated_atstring (date-time)
Errors
curl "https://api.ping.nml.sa/v1/webhook-endpoints/019ac0d0-1a2b-7c3d-8e4f-5a6b7c8d9e0f" \
-H "Authorization: Bearer $PING_API_KEY"{
"id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"url": "https://erp.example.com/ping/webhooks",
"description": "ERP alarms feed",
"event_types": [
"alarm.opened"
],
"enabled": false,
"disabled_reason": "owner",
"disabled_at": "string",
"secret_hint": "x7Qa",
"secret_rotated_at": "string",
"consecutive_failures": 0,
"created_at": "string",
"updated_at": "string"
}Change an endpoint's URL, description, event types or enabled flag
PATCH/v1/webhook-endpoints/{endpointId}
Fields given replace the stored ones; event_types replaces the list whole. enabled false stops deliveries (pending ones fail as endpoint_disabled); enabled true turns a disabled endpoint back on and clears its failure count.
Scopewebhooks:write
Parameters
endpointIdstringpath requirede.g.
019ac0d0-1a2b-7c3d-8e4f-5a6b7c8d9e0f
Request body
urlstringe.g.
https://erp.example.com/ping/webhooksdescriptionstringAn empty description clears it.
event_typesstring[]enabledboolean
Response 200
idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8curlstringe.g.
https://erp.example.com/ping/webhooksdescriptionstring | nulle.g.
ERP alarms feedevent_typesstring[]enabledbooleandisabled_reasonstring | nullowner: turned off by a person; failing: disabled after repeated failure; account_ended: the account left PING (its exit).
one of
ownerfailingaccount_endednulldisabled_atstring | null (date-time)secret_hintstringThe secret's last four characters.
e.g.
x7Qasecret_rotated_atstring (date-time)consecutive_failuresintegerDeliveries in a row that failed for good.
created_atstring (date-time)updated_atstring (date-time)
Errors
curl -X PATCH "https://api.ping.nml.sa/v1/webhook-endpoints/019ac0d0-1a2b-7c3d-8e4f-5a6b7c8d9e0f" \
-H "Authorization: Bearer $PING_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://erp.example.com/ping/webhooks"}'{
"id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"url": "https://erp.example.com/ping/webhooks",
"description": "ERP alarms feed",
"event_types": [
"alarm.opened"
],
"enabled": false,
"disabled_reason": "owner",
"disabled_at": "string",
"secret_hint": "x7Qa",
"secret_rotated_at": "string",
"consecutive_failures": 0,
"created_at": "string",
"updated_at": "string"
}Remove an endpoint with its deliveries
DELETE/v1/webhook-endpoints/{endpointId}
Scopewebhooks:write
Parameters
endpointIdstringpath requirede.g.
019ac0d0-1a2b-7c3d-8e4f-5a6b7c8d9e0f
Response 204
Removed.
Errors
curl -X DELETE "https://api.ping.nml.sa/v1/webhook-endpoints/019ac0d0-1a2b-7c3d-8e4f-5a6b7c8d9e0f" \
-H "Authorization: Bearer $PING_API_KEY"Replace an endpoint's signing secret; the new one is answered once and signs every delivery from now on
POST/v1/webhook-endpoints/{endpointId}/rotate-secret
Scopewebhooks:write
Parameters
endpointIdstringpath requirede.g.
019ac0d0-1a2b-7c3d-8e4f-5a6b7c8d9e0f
Response 200
endpointobjectFields of endpoint
idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8curlstringe.g.
https://erp.example.com/ping/webhooksdescriptionstring | nulle.g.
ERP alarms feedevent_typesstring[]enabledbooleandisabled_reasonstring | nullowner: turned off by a person; failing: disabled after repeated failure; account_ended: the account left PING (its exit).
one of
ownerfailingaccount_endednulldisabled_atstring | null (date-time)secret_hintstringThe secret's last four characters.
e.g.
x7Qasecret_rotated_atstring (date-time)consecutive_failuresintegerDeliveries in a row that failed for good.
created_atstring (date-time)updated_atstring (date-time)
secretstringThe signing secret, shown only in this answer.
e.g.
whsec_4fJ9kQ2mX7pL1sV8nR3tY6wZ0aB5cD7x
Errors
curl -X POST "https://api.ping.nml.sa/v1/webhook-endpoints/019ac0d0-1a2b-7c3d-8e4f-5a6b7c8d9e0f/rotate-secret" \
-H "Authorization: Bearer $PING_API_KEY"{
"endpoint": {
"id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"url": "https://erp.example.com/ping/webhooks",
"description": "ERP alarms feed",
"event_types": [
"alarm.opened"
],
"enabled": false,
"disabled_reason": "owner",
"disabled_at": "string",
"secret_hint": "x7Qa",
"secret_rotated_at": "string",
"consecutive_failures": 0,
"created_at": "string",
"updated_at": "string"
},
"secret": "whsec_4fJ9kQ2mX7pL1sV8nR3tY6wZ0aB5cD7x"
}Send the endpoint a webhook.test event (signed, retried like any other); the delivery is answered
POST/v1/webhook-endpoints/{endpointId}/test
Scopewebhooks:write
Parameters
endpointIdstringpath requirede.g.
019ac0d0-1a2b-7c3d-8e4f-5a6b7c8d9e0f
Response 202
idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8cendpoint_idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8cevent_idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8ctypestringA delivered event's type: a WebhookEventType, or webhook.test.
one of
alarm.openedalarm.clearedtrip.endedgeofence.enteredgeofence.exitedjob.dispatchedjob.startedjob.completedjob.cancelledwebhook.testredelivery_ofstring | nullThe delivery this one sends again.
statestringone of
pendingsucceededfailedfailurestring | nullWhy it failed: every attempt failed, or the endpoint was disabled first.
one of
exhaustedendpoint_disablednullattemptsintegernext_attempt_atstring | null (date-time)When it is tried next (pending only).
created_atstring (date-time)done_atstring | null (date-time)
Errors
curl -X POST "https://api.ping.nml.sa/v1/webhook-endpoints/019ac0d0-1a2b-7c3d-8e4f-5a6b7c8d9e0f/test" \
-H "Authorization: Bearer $PING_API_KEY"{
"id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"endpoint_id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"event_id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"type": "trip.ended",
"redelivery_of": "string",
"state": "succeeded",
"failure": "exhausted",
"attempts": 0,
"next_attempt_at": "string",
"created_at": "string",
"done_at": "string"
}