Send Events with Webhooks

5 min read

Send orders, invoices, tickets and more to Zapier or your own server the moment they happen, signed so you can trust them.

Webhooks send your workspace’s events to another app the moment they happen. When an order is placed or an invoice is paid, Clientish POSTs the details to a URL you choose: Zapier, Make or your own server.

Overview

This guide shows how to add an endpoint, choose its events, check that deliveries really come from your workspace, and follow each delivery in the log.

Who Can Access

Agency Admin

Only the workspace owner can add and manage webhooks, under Webhooks & API in the sidebar.

Prerequisites

  • An HTTPS URL that can receive a POST request, for example a Zapier “Catch Hook” URL or an endpoint on your own server

Step-by-Step Guide

  1. Open Webhooks

    In the sidebar, click Webhooks & API and open the Webhooks tab. Click Add endpoint.

    Connect Zapier and Add endpoint buttons on the Clientish Webhooks tab
  2. Enter the endpoint URL

    Paste the URL that should receive the events. It must start with https://. Add a description so you know later what it is for, such as “Zapier: new orders to Google Sheets”.

    Endpoint URL and description when adding a Clientish webhook
  3. Choose the events

    Tick the events this endpoint should receive. Each group shows how many you picked.

    Clientish webhook events: orders, invoices, tickets, clients and leads
  4. Save and send a test

    Tick Send a test event after saving if you want to check the URL straight away, then click Add endpoint.

    Send a test event after saving and Add endpoint button in Clientish
  5. Copy the signing secret

    The signing secret is shown only once. Click Copy and store it with your app. Every delivery is signed with it, so your app can check that it really came from your workspace. The ready-made code shows how (Node.js).

    Lost it? Issue a new secret from Edit endpoint.

    Clientish webhook signing secret shown once, with code to check the signature
  6. Follow the deliveries

    Deliveries lists every event sent to your endpoints, with filters for Delivered, Retrying and Failed. Failed deliveries are retried 5 times over about 15 hours, and the log is kept for 30 days.

    Clientish webhook deliveries log with delivered, retrying and failed filters

Events You Can Send

  • order.created: A new order is placed
  • order.status_changed: An order moves to another status
  • order.completed: An order is completed
  • invoice.created: An invoice is created
  • invoice.paid: An invoice is paid
  • invoice.overdue: An invoice passes its due date
  • ticket.created: A client opens a ticket
  • ticket.replied: Someone replies on a ticket
  • client.created: A client is added
  • lead.created: A lead comes in

Checking the Signature

Each delivery carries two headers: clientish-timestamp and clientish-signature. Build an HMAC-SHA256 of the timestamp, a dot and the raw request body, using your signing secret. If it matches clientish-signature, the delivery is genuine. If not, reject it.

Using Zapier

In Zapier, start a Zap with Webhooks by Zapier → Catch Hook and copy the URL it gives you. Add that URL as an endpoint here, tick the events, and keep Send a test event after saving ticked. Back in Zapier, press Test trigger and map the fields. The Zapier tab walks through these steps.

Tips & Best Practices

i

Tick only the events an app needs. One endpoint per app keeps the delivery log easy to read.

Common Issues

!

Deliveries keep failing: open the endpoint’s deliveries to see the response your server sent. Your URL must answer with a 2xx status. Failed deliveries are retried automatically.

Frequently Asked Questions

How many endpoints can I add?⌄
Up to 10 per workspace. The counter above the Endpoints list shows how many you have used.
Can I pause an endpoint?⌄
Yes. Use the buttons on the endpoint’s row to pause it, edit it or view its deliveries.
Do webhooks send my data anywhere else?⌄
No. Events go only to the URLs you add, and each delivery is signed with that endpoint’s secret.