Create a Webhook

This guide will demonstrate how to create a Webhook.

Prerequisites

Request

Make a request of the following structure to create a Webhook:

http
Copy to clipboard.
1POST https://YOUR_TENANT_URL/v1/webhooks
json
Copy to clipboard.
1{
2    "events": [
3        "{{event_type}}"
4    ],
5    "url": "https://example.com"
6}
  • events: This array includes the event types that will trigger this Webhook. Currently allowed types:

  • url: This is the URL that will receive the Webhook events data payload when they are triggered by MATTR VII for the specified events:

    • Must be a valid URL.

    • Must use the HTTPS protocol.

    • Must not be an IP address.

    • Must not include query parameters or has fragments.

    • Non-ASCII characters are normalised.

    • Must return a 2xx response, otherwise it will go through a retry cycle and eventually fail.

Response

json
Copy to clipboard.
1{
2    "id": "0c099611-19c4-4f29-8724-6b9e5ba1ef7c",
3    "events": [
4        "{{event_type}}"
5    ],
6    "url": "https://example.com",
7    "disabled": false
8}
  • id: Unique identifier for the created Webhook. You will need it to verify the Webhook.

  • events: As defined in the request above.

  • url: As defined in the request above.

  • disabled: Set to false by default, indicating the Webhook is active. When a webhook is disabled, notifications for the events associated with this webhook will not be sent.

    If you need to create a Webhook in an initial disabled state, you can override the default by including "disabled": true in the request body.

    You can also disable the Webhook by making an update request.