Skip to content

Set up webhooks

Add a webhook endpoint so Convut sends a signed POST to your server whenever a contact, company, deal or custom record changes.

Updated oct 16 · 3 min read

Webhooks send changes in your CRM to your own systems as they happen. Add a URL, choose the events you care about, and Convut sends a signed POST to that URL each time one of them happens, for example when a contact is created or a deal changes stage.

You need permission to manage integrations. If webhooks aren't included in your plan, the page shows an upgrade prompt instead.

Steps

  1. 1.Click the Settings gear at the bottom of the left sidebar, then open Webhooks in the Integrations & developers group.
  2. 2.Click Add endpoint.
  3. 3.Enter the Endpoint URL. It must be a public https address.
  4. 4.Optionally, add a Description, such as "Sync to data warehouse".
  5. 5.Under Events to send, tick the events you want, or click Select all.
  6. 6.Click Add endpoint.
  7. 7.Copy the Signing secret that's shown. Your server uses it to check each delivery came from Convut.

Deliveries start with the next matching change. Click Open endpoint to see its page.

Events

  • Contacts: contact.created, contact.updated, contact.deleted
  • Companies: company.created, company.updated, company.deleted
  • Deals: deal.created, deal.updated (including a stage change), deal.deleted
  • Custom objects: custom_record.created, custom_record.updated, custom_record.deleted, for a record of any custom object

What a delivery looks like

Each delivery is a JSON body with an id (the delivery id), the event, createdAt and data. The data is the same record you'd get from the REST API. Each request also carries the headers X-Convut-Event, X-Convut-Delivery and X-Convut-Signature.

Verify the signature

X-Convut-Signature is sha256= followed by an HMAC-SHA256 of the raw request body, using your signing secret as the key, in hex. Compute the same value on your server and compare before trusting the delivery.

const crypto = require("crypto")
const expected = "sha256=" + crypto.createHmac("sha256", secret).update(rawBody).digest("hex")
const a = Buffer.from(expected)
const b = Buffer.from(signatureHeader || "")
const valid = a.length === b.length && crypto.timingSafeEqual(a, b)

Test and monitor an endpoint

On the endpoint's page:

  • Send test event sends a ping event now and shows what your server answered. Tests don't appear in the log.
  • Deliveries lists the 25 most recent deliveries with their status, attempts and your server's response.
  • Under Signing secret, click Reveal to see the secret again, or Rotate to replace it. After rotating, deliveries are signed with the new secret straight away, so update your server first.

Retries and pausing

Reply with a 2xx status quickly to confirm a delivery. If your server doesn't, Convut retries several times over about a day and a half. Use the delivery id to ignore any duplicates. After many failed deliveries in a row, the endpoint is disabled automatically and shows Disabled; fix your server, then click Re-enable.

To stop deliveries for a while, click Pause in the Danger zone. Events that happen while paused aren't sent later. Click Resume to start again, or Delete endpoint to remove it and its delivery log.

Subscribe from code

Integrations can also create and remove subscriptions with an API key: POST /api/v1/webhooks with a url and events, GET /api/v1/webhooks to list them, and DELETE /api/v1/webhooks/{id} to remove one. The signing secret is returned once when you create it. These endpoints also appear on the Webhooks page.

Did this answer your question?

Still stuck? Get in touch