Events method

POST /v1/Webhooks

Create a new webhook

Uri parameters

None

Body parameters

Name Description Type Additional description
eventValue The value that the webhook triggers on String Required
eventValueType A number indicating the type of value the webhook triggers on. See Event Value Types Integer Required
url The full URL our service calls when all conditions are satisfied. Must be a POST endpoint. String Required
customHeaders A Dictionary containing any custom headers that should be appended to the webhook post request. String
secret A custom secret returned unmodified in the 'x-dsv-signature' header on every webhook call, so you can verify the request came from us. Sent as plain text, not a cryptographic signature. String Required
expires The date and time the webhook will expire. Default is two months. String

Request sample:

{
  "eventValue": "370726545000000170",
  "eventValueType": 1,
  "url": "https://example.com/MyWebhookEndpoint",
  "customHeaders": "{\"CustomHeader1\":\"CustomHeaderValue1\",\"CustomHeader2\":\"CustomHeaderValue2\"}",
  "secret": "Custom secret used for personal validation",
  "expires": "2026-12-04T00:40:59.522443+01:00"
}

Response sample:

200

{
  "uuid": "76c8b8d4-f1dc-49a7-b21c-f40c6ee035de",
  "eventValue": "370726545000000170",
  "eventValueType": 1,
  "url": "https://example.com/MyWebhookEndpoint",
  "customHeaders": "{\"CustomHeader1\":\"CustomHeaderValue1\",\"CustomHeader2\":\"CustomHeaderValue2\"}",
  "secret": "Custom secret used for personal validation",
  "expires": "2026-12-04T00:40:59.5225638+01:00"
}

400

{
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
  "title": "One or more validation errors occured",
  "state": 400,
  "traceId": null,
  "errors": {
    "request": [
      "The parcel number cannot be empty"
    ]
  }
}

401

Access denied

403

Forbidden