Webhooks

Overview

Webhooks allows you to subscribe to changes and be notified of these changes as and when they occur. Webhooks are basically an easy way to receive notification of changes (Events) via an HTTP POST instead of polling for them. For services accessible via HTTP this is vastly more convenient and efficient.

Ziflow currently sends one Event object per POST. We will later on extend this and send arrays of Event objects per POST which should be handled by the target.

Webhooks Setup

Webhook Subscriptions tell Ziflow what a particular app would like to get notified about. We currently support the following subscription types:

  • Proof events
    • Created
    • Processed (succeeded or failed)
    • Deleted
    • Updated
    • Status change
    • All comment events
    • All decisions events

Managing Subscriptions via the UI

You can create and manage webhooks via the UI:

  1. Log in to your Ziflow account and ensure you have Admin permissions
  2. Click on your Avatar (top right) -> Manage account -> Webhooks

Here you’ll be able to add, remove, update and activate/deactivate webhooks.

Managing Subscriptions via the API

The following endpoints allow you to create Subscriptions. The UI is the recommended way to manage your subscriptions.

Subscriptions have the following fields:

Field

Description

Read-only

id

Unique ID of a subscription

subscription-types

{

 'proof': {

   'all': true,

   'created': true,

   'processed': true,

   'changed': true,

   'deleted': true,

   'status-change': true,

   'comment': true,

   'decision': true

 }

}

 

name

The name for your subscription

 

target

The target for your subscription - must be a valid URL

 

active

Whether or not the subscription is active and trigger notifications

 

created at

When this subscription was created

 

 

 

Create a Subscription

Method Details
HTTP methods POST
Response format json
Requires authentication Yes
Rate limited Yes

POST /v1/webhooks

Creates a new subscription with a simple HTTP POST.

Required parameters How to use Description
API Token apikey=[key] query parameter Used to authenticate the request
subscription-types Used in the request body  
name Used in the request body  
target Used in the request body - must be a valid URL  
Optional parameters How to use Description
active Used in the request body Default is false