List webhooks
Response
Returns an array of webhook objects.HMAC signing secret used to verify delivery. See Verifying signatures.
Get a webhook
404 if it does not exist or belongs to a different company.
Path parameters
Create a webhook
Request body
HMAC signing secret. If you omit this, a UUID is generated automatically and returned in the response. Store it — it is not shown again.
201 with the created webhook object on success. The secretKey is included in the response body only at creation time.
Update a webhook
Path parameters
Request body
Delete a webhook
Path parameters
Returns{ "id": <number> } on success.
Event registrations
Each webhook can subscribe to one or more events through registrations. Registrations let you fine-tune which events trigger delivery, add optional filters, delay delivery, and choose between automatic and manual trigger modes.Registration fields
Key/value criteria that the event payload must match before delivery is triggered. Pass
null to receive all events of this type.Integer number of minutes to wait before delivering the event. Minimum
0 (immediate). Use delays to batch or debounce rapid status changes.automatic — delivered automatically when the event fires. manual — a button appears in the LeadScout UI for a rep to trigger the delivery. Defaults to automatic.Verifying signatures
LeadScout signs every delivery with an HMAC-SHA256 signature computed from the raw request body and your webhook’ssecretKey. Verify the signature on your server before processing the payload to confirm the request originated from LeadScout.
1
Read the signature header
The signature is sent in the
X-LeadScout-Signature header as a hex-encoded HMAC-SHA256 digest.2
Compute the expected signature
Compute
HMAC-SHA256(secretKey, rawBody) on your server using the secretKey you received when the webhook was created.3
Compare signatures
Use a constant-time comparison to compare your computed signature against the header value. Reject the request if they do not match.
JavaScript
