Subscribe
The response contains the subscription and its signing secret:
callbackUrl carries a query string (for example ?token=...) or uses http, the response also has a warnings array and the subscription is still created:
warnings key is absent when there is nothing to report.
Manage subscriptions
Verify webhook signatures
Deliveries of a signed subscription carry a signature, so your endpoint can check that the request really comes from Lofty and that nobody changed the body on the way. The signature follows the Standard Webhooks v1 scheme (HMAC-SHA256), so existing open-source verification libraries work with Lofty webhooks too. Do not rely on a secret in the callback URL for this. A URL ends up in server logs, proxies and browser history, and it does not prove that the body is unchanged.Headers on signed deliveries
Every new subscription is signed. A subscription created earlier is signed once you rotate its secret; until then it receives no signature headers.
The
Lofty-Webhook-Id header stays as it was.
How to verify
- Read the raw request body as bytes, before any JSON parsing. A parsed and re-serialized body no longer matches the signature.
- Build the signed content:
webhook-id+.+webhook-timestamp+.+ the raw body. - Take your secret without the
whsec_prefix, base64-decode it, and compute HMAC-SHA256 of the signed content with that key. - Base64-encode the result and compare it with each
v1signature inwebhook-signature. Use a constant-time comparison. One match is enough. - Reject the request if
webhook-timestampis more than 5 minutes away from your clock. This stops someone from replaying an old, valid request.
401 for a request that fails verification and do not process it.
Ping probes are signed in the same way, with a
webhook-id that starts with probe-. If you verify signatures, answer a valid ping with 2xx as usual.express.raw() on the webhook route instead of express.json(); see the example receiver.
Rotate the secret
CallPOST /v1.0/webhook/{subscribeId}/secret/rotate to get a new secret. An API key needs the Rotate a webhook signing secret permission (under Webhooks) for this call. It is a separate permission, and keys that can already create webhooks get it automatically. Do this when:
- the subscription was created before signing existed and you want to switch signing on for it, or
- a secret may have leaked.
secret is shown only in this response. The previous secret keeps signing for 7 days, until previousSecretExpiresAt. During that time every delivery carries a signature for both secrets, so you can switch without downtime: deploy the new secret, and the old one stops being needed. Only the user who created the subscription, or another user of the same integration (vendor) in the same team, can rotate its secret.
The rotate call has no request body, but like every non-GET call to the API it must still send
Content-Type: application/json. Without it the API answers 400 with code 20001 (“Content-type must be: application/json”). The same applies to DELETE /v1.0/webhook/{subscribeId}.previousSecretExpiresAt and each delivery carries a single signature.
Custom authentication header
Some receivers sit behind an API gateway that only accepts a fixed credential, such as anAuthorization header, and cannot check a signature. For them, add an authHeader when you create the subscription:
An invalid
authHeader is rejected with INVALID_PARAMETER.
What changes for existing integrations
Nothing, unless you choose it. A subscription created before signing existed keeps receiving exactly the requests it receives today: same body, same URL, same headers, no signature. Signing starts for it only when you rotate its secret. If your callback URL already carries a token, it keeps working, and so does everything else you rely on today, such asLofty-Webhook-Id for deduplication.
New subscriptions are signed from the start. Each signed request carries about 200 bytes of extra headers, so a gateway that allows only a fixed list of request headers must allow webhook-id, webhook-timestamp and webhook-signature. We recommend signature verification over a token in the URL, but nothing forces you to move.
Delivery timing
Events to a healthy endpoint are typically delivered within 1 minute of the triggering change. Actual delivery speed depends on your endpoint. Lofty delivers to each endpoint over a limited number of concurrent connections, so a slow handler queues its own events: an endpoint that responds in under a second keeps up with any volume, while one that takes several seconds per request can fall minutes behind at peak — see the throughput note under Best practices. Failed deliveries follow the retry schedule below. Deliveries to a disabled subscription pause and resume automatically after recovery — see Health probes.Retries and failure handling
A delivery counts as successful when your endpoint returns any 2xx status code. Any other response — an error status, a timeout, or a connection failure — is handled by the rules in this section.Retry schedule
Failed deliveries are retried up to 9 total attempts within 48 hours, with exponential backoff between attempts:
Each delay includes ±20% random jitter so retries from many events don’t arrive in synchronized bursts. An event that still cannot be delivered 48 hours after it was created is discarded.
Response handling
Idempotent delivery
Every delivery request carries aLofty-Webhook-Id header, and a signed subscription also receives the same value in webhook-id. It is unique per event and stable across retries. If a timeout caused your response to be lost, the retry arrives with the same id — use it to deduplicate instead of processing the event twice. The webhook-timestamp header is the exception: it changes on each attempt.
Endpoint health and automatic disabling
Lofty tracks delivery health per subscription and disables a subscription automatically when:- your endpoint returns 410 Gone — immediately, or
- deliveries fail continuously with no successes in between — within hours for high-volume endpoints, or after roughly a day of sustained failures otherwise.
Health probes and automatic recovery
Disabled subscriptions receive a ping probe approximately every 6 hours:Notification recipients
Which subscribed users receive a callback depends on the subscription’s delivery mode (permissionMode). In both modes, only users in the lead’s team who have subscribed to the event type are considered.
Assignment-based delivery — permissionMode: 0 (default)
A subscriber receives the callback only for leads assigned to them or that they administer:
- Hidden leads — only the assigned agent receives the notification.
- Other leads — the subscriber receives it if they are the assigned agent, or a Company Owner / Company Admin. All other subscribers are excluded.
Ownership-based delivery — permissionMode: 1
A subscriber receives the callback for any lead they manage, regardless of who it is assigned to:
- Every assignment-based case above still applies (assigned agent, Company Owner / Company Admin).
- In addition, the subscriber receives the callback for any lead within their ownership scope — owned by their team or office, or personally owned by them — even if it is assigned to someone else.
- Hidden leads are still delivered only to users who manage them.
permissionMode when creating the subscription; it defaults to 0, so existing subscriptions are unaffected.
Payload structure
Every callback body is a JSON object with two common fields plus one or more action keys that carry the events. There is no genericevents array: read the action keys for the subscription’s listId.
Action keys by event type. Only the keys for actions that happened in the batch are present:
A ping probe is the exception to this structure: its body is
{"eventType": "ping", "webhookId": 123456} (see Health probes).
Event types
Event payloads
1. Agent Info
Triggered when an agent is created or updated.2. Lead Info
Triggered when a lead is created, updated, or deleted. Only the relevant action fields are present.3. Lead Activity
Triggered when a lead performs site activity (SiteBrowse, SiteFavorite, SiteSearch, etc.).4. Listing Alert
Triggered when a listing alert changes.5. Transaction
Triggered when a transaction is created, updated, or deleted. Only the relevant action fields are present.6. Call
Triggered on a call event.7. Email
Triggered on an email event.8. Text
Triggered on a text/SMS event.communicationType values —
MANUAL: agent-initiated communication. LOGGED: communication recorded after the fact. AUTO events are excluded from webhooks.9. Note
Triggered when a note is created, updated, or deleted. Only the relevant action fields are present.10. Task
Triggered when a task is created, updated, finished, or deleted. Multiple action fields may appear in a single payload.11. Appointment
Triggered when an appointment is created, updated, finished, or deleted. Multiple action fields may appear in a single payload.12. Pipeline Change
Triggered when a lead’s pipeline stage changes.13. Showing
Triggered when a property showing on a lead is created, changed or cancelled, and when feedback is added to one. Covers showings created throughPOST /v2.0/showings as well as showings created inside Lofty. The payload mirrors GET /v2.0/showings/{id}: statuses are the same strings, times are ISO 8601 UTC.
Exactly one of the three event keys is present per callback:
Showings created inside Lofty move from
scheduled to in_progress, completed or expired by the clock, not by an explicit action, and no webhook fires for those transitions. Showings created through the API never change status by the clock.Best practices
Respond immediately. Return a2xx before processing and move your logic to a background job. Lofty limits concurrent deliveries per endpoint, so a slow handler directly reduces your delivery throughput — at high event volume, synchronous processing is the most common cause of delayed webhooks.
Handle duplicates. The same event may be delivered more than once (for example, when a timeout swallowed your response). Deduplicate with the Lofty-Webhook-Id header — it is stable across retries of the same event.
Don’t assume ordering. Retries mean an older event can arrive after a newer one. Order by the updateTime field inside the payload, not by arrival time.
Acknowledge pings. Return 2xx to {"eventType": "ping"} probes — they are how a disabled subscription recovers automatically.
Decommission cleanly. When you shut an endpoint down for good, return 410 Gone so Lofty stops delivering immediately instead of retrying against a dead URL.
Verify signatures. Check webhook-signature against the raw body before you trust a request, and reject a stale webhook-timestamp. See Verify webhook signatures.
Validate payloads. Check that listId matches your expected event type before processing.
Use HTTPS. The callback carries lead data, so serve it over HTTPS from a publicly reachable host.
Example receiver
Resolving communication events to full records
After receiving a Call / Email / Text webhook, fetch the full record by passing the event’stimelineId as the communicationId path parameter of the v2 by-ID endpoint:
timelineId is the recommended round-trip key — it always points to the same lead_timeline row regardless of whether the event is MANUAL or LOGGED. The legacy callId / emailId / textId fields still ship for backward compatibility, but their underlying record changes between the two communicationType values, so they are not safe to pass to the v2 by-ID endpoints.
All IDs in webhook payloads are 64-bit integers. JavaScript clients must handle them carefully — see JS / TS Integration.