Creating Webhooks

Via Public API

To create a webhook via the API please refer to the Create a Webhook endpoint. However, when creating webhooks, there are a few things to keep in mind.

  1. At least one of these fields must be set to true: applyToAllTrackers, applyToAllShipments, applyToAllAlertPresets. These values are equivalent to the data streams that can be selected when creating a webhook on our platform. They dictate what type of event(s) will trigger a webhook.
  2. Custom templates can be created for webhooks. However, it is recommended to create these via the Tive Platform, not public API. When a template is not specified you will be provided with our default templates found here.
  3. accountIds is not a required field, but to actually receive a webhook, at least one must be specified.

Here is what an example payload could look like:

{
    "name": "Example Webhook",
    "url": "https://myWebsite.com/webhooksGoHere",
    "httpMethod": "POST",
    "contentType": "application/json",
    "enabled": true,
    "applyToAllTrackers": true,
    "applyToAllShipments": false,
    "applyToAllAlertPresets": false,
    "description": "This webook shows how to create a webhook",
    "accountIds": [
        1234, 0987
    ],
    "headers": [
        {
            "key": "myCompanyClientSecret",
            "value": "client-secret-value"
        }
    ],
    "template": null
}

Via Tive Platform

To create a new webhook on the Tive Platform, open the User menu on the top right corner of the platform and select Organization. Note that this menu item is restricted to Admin users. If you are not an Admin, contact one from your team who can upgrade your permissions.

From within the Organization section, navigate to the Webhooks tab and click Create New Webhook.

Next, fill out the fields on the page and once completed click Save. An overview of each field can be found here.