How to create a webhook

📘

Webhooks can only be created by users with Platform Admin role

See the guide on Users to learn more about this role.

To create a webhook, start by clicking on the Admin menu in the top navigation bar and then clicking on Settings tab in the secondary menu.

The settings menu item

The settings menu item

Scroll down to the bottom of the page until you find the "Webhooks" section.

Next, click on the "Add Webhook" button.

Form for adding a new webhook

Form for adding a new webhook

The form that appears contains three fields that you'll need to fill out in order to create a webhook:

  • Payload URL: This is the URL of the downstream application, service, or website that will receive a message every time a certain event happens. For instance, if you're connecting Modzy to an automation platform like Zapier, the Payload URL may look something like this: https://hooks.zapier.com/hooks/catch/14264383/465j2cq/
  • Secret (optional): This is an optional field that lets you add a secret to your webhook. This secret will be encrypted and then sent along in the header of each webhook message. When your service receives this message, you can verify it's coming from Modzy by comparing your encrypted Secret with what's returned in the response header.
  • Webhook Triggering Event: This is the type of event that your Payload URL will be notified about every time it occurs. As of the release of v1.8, the only supported event is Job Completion.

Once you've filled out these fields, click "Create New Webhook".

Your webhook is instantly live! :tada:

As soon as the next triggering event takes place, a message will be sent to your downstream application that looks something like this:

{
   "job":{
      "identifier":"c2500b86-868d-4dd4-ad2b-e232c1bb7c6a",
      "model":{
         "identifier":"ed542963de",
         "version":"1.0.1",
         "name":"Sentiment Analysis"
      },
      "team":{
         "identifier":"Team-Name"
      }
   }
}

You can then use the identifier field within the job object to Get results or to Get job details.