Account webhooks
Your account can have one webhook endpoint. Pingdex sends a signed POST request to it when a lead reaches a terminal status. This page covers the settings and how to verify requests. For the lifecycle context, see Lead webhooks.
Configure the webhook
Section titled “Configure the webhook”- Open Settings, then Webhooks, and confirm your password if asked.
- Enter the Endpoint URL of your receiver.
- Enter a Signing secret, or choose Generate to create a random one. Copy it into your receiver’s configuration.
- Choose Save webhook.
| Setting | Rules |
|---|---|
| Endpoint URL | Required. Must be an https URL, up to 2,048 characters. |
| Signing secret | Between 32 and 255 characters. Required the first time. If a secret is already saved, you can leave the field blank to keep it. |
Pingdex never shows a saved secret again. To rotate it, enter or generate a new value and save. Update your receiver at the same time.
Choose Remove webhook to stop all events. You can configure a new destination later.
A webhook only sends when both a URL and a secret are saved.
Events
Section titled “Events”| Event | Sent when |
|---|---|
lead.delivered |
A lead reaches delivered. |
lead.failed |
A lead reaches failed. |
lead.indeterminate |
A lead reaches indeterminate. |
Pingdex sends no event while a lead is received or processing. See Lifecycle and statuses.
Payload
Section titled “Payload”The body is a JSON object. It contains identifiers and outcomes only, never the lead payload.
{ "event_id": "e7b2c9d4-1f36-4a58-8c0d-3b5a6e7f8091", "event": "lead.delivered", "lead_id": "a91d3f6e-2b7c-4c85-8e10-d4f5a6b7c8d9", "external_id": "web-2026-000123", "status": "delivered", "campaign_id": "3e1a7c52-9b04-4d68-a2f1-6c8d0e5b7a93", "commercial_status": "accepted", "sale_amount": "18.50", "reporting_currency": "GBP", "provider_id": "0b6f1e2a-3c4d-4e5f-8a9b-1c2d3e4f5a6b", "occurred_at": "2026-12-04T14:32:07Z"}| Field | Description |
|---|---|
event_id |
Unique ID of this event. It stays the same on every retry. |
event |
lead.delivered, lead.failed or lead.indeterminate. |
lead_id |
The Pingdex lead ID. |
external_id |
The external_id you supplied when you submitted the lead. |
status |
The lead status that triggered the event. |
campaign_id |
The campaign the lead belongs to. |
commercial_status |
accepted, rejected, unknown or null. |
sale_amount |
The confirmed sale amount, or null. |
reporting_currency |
The account’s reporting currency. |
provider_id |
The provider that received the commit, or null if the lead never reached a post. |
occurred_at |
When the event occurred. |
A lead.failed event with no post attempt, for example after no_eligible_provider, has a provider_id of null.
Verify the signature
Section titled “Verify the signature”Every request carries a Signature header. Its value is the lowercase hexadecimal HMAC-SHA256 digest of the raw request body, calculated with your signing secret. There is no prefix, and the digest is not base64 encoded.
To verify a request:
- Read the raw body exactly as received, before any JSON parsing.
- Compute the HMAC-SHA256 of that body with your secret, as a hex digest.
- Compare it with the
Signatureheader using a constant-time comparison. - Reject the request with a
4xxresponse if it does not match.
import crypto from 'node:crypto';import express from 'express';
const app = express();const secret = process.env.PINGDEX_WEBHOOK_SECRET;
app.post('/pingdex', express.raw({ type: 'application/json' }), (req, res) => { const expected = crypto .createHmac('sha256', secret) .update(req.body) .digest('hex'); const received = req.get('Signature') ?? '';
const valid = received.length === expected.length && crypto.timingSafeEqual(Buffer.from(received), Buffer.from(expected));
if (!valid) { return res.status(401).send('Invalid signature'); }
const event = JSON.parse(req.body.toString('utf8')); // Handle the event, using event.event_id to ignore repeats. res.status(200).send('ok');});import hashlibimport hmacimport os
from flask import Flask, request, abort
app = Flask(__name__)SECRET = os.environ["PINGDEX_WEBHOOK_SECRET"].encode()
@app.post("/pingdex")def pingdex_webhook(): raw_body = request.get_data() expected = hmac.new(SECRET, raw_body, hashlib.sha256).hexdigest() received = request.headers.get("Signature", "")
if not hmac.compare_digest(received, expected): abort(401)
event = request.get_json() # Handle the event, using event["event_id"] to ignore repeats. return "ok", 200If verification fails, see Troubleshooting webhook signatures.
Delivery and retries
Section titled “Delivery and retries”- Pingdex waits up to 10 seconds for your endpoint to respond.
- If the response is not successful, or the request fails, Pingdex retries with increasing delays. It makes up to 3 attempts in all.
- Every retry of an event has the same
event_id, the same body and the same signature. - A failed webhook never changes the lead. The lead keeps its status whether or not your endpoint receives the event.
- Delivery is at least once, so your receiver can see the same event more than once.
Respond with a 2xx status as soon as you have stored the event, and do slow work afterwards. De-duplicate on event_id.