Create webhook

Create webhook

Body parameters

urlstringThe URL that Onfleet should issue a request against as soon as the trigger condition is met. It must be HTTPS and have a valid certificate.
namestringA name for the webhook for identification.
triggernumberThe number corresponding to the trigger condition on which the webhook should fire.
thresholdnumberOptional. For trigger 1, the time threshold in seconds; for trigger 2, the distance threshold in meters.

To create a new webhook, provide a verifiable url and trigger, see sidebar.

curl -X POST "" \
     -u "cd3b3de84cc1ee040bf06512d233719c:" \
     -d '{"url":"","trigger":0}'
    "id": "9zqMxI79mRcHpXE111nILiPn",
    "count": 0,
    "url": "",
    "trigger": 0
  "code": "InvalidContent",
  "message": {
    "error": 1008,
    "message": "The webhook URL provided did not pass our validation test.",
    "request": "0a15bc44-a39b-4040-8b48-a79295642e12"

As previously mentioned, you will need to respond to our validation request with the check query parameter value, as a simple string response in order to avoid validation failures. This applies if you're not using the automatic validation from Zapier.