Skip to main content

Link webhooks

Subscribe an HTTPS endpoint to link lifecycle events. Webhooks live on the dashboard's Connect RPC transport — there is no REST route for any of this. The seven RPCs:

RPCDoes
CreateLinkWebhookRegister an endpoint; returns the signing secret once
ListLinkWebhooksList endpoints (never includes secrets)
ListLinkWebhookEventsThe event catalogue with display copy
SetLinkWebhookActivePause or resume an endpoint
RotateLinkWebhookSecretReplace the secret; returns the new one once
DeleteLinkWebhookRemove an endpoint
ListLinkWebhookDeliveriesThe delivery log for one endpoint

Events​

The fixed set — an unknown event is rejected rather than dropped:

EventFires when
link.createdA link is created (the default subscription)
link.updatedA link is edited
link.deletedA link is deleted
link.exhaustedA capped link serves its last click — exactly once

Scope​

An endpoint receives events for links belonging to the account that registered it — every link that account owns, not every link on the service. A webhook is a property of the account, so subscribing to link.created means "tell me when one of my links is created", never "tell me when anyone's is".

This holds for all four events, including link.deleted, which is emitted after the link and its URL are already gone; the owner is carried from the request that deleted it rather than recovered from the row. There is no per-link subscription and no way to narrow an endpoint to a particular link or subset of links.

Signing​

Every delivery is an application/json POST carrying three headers:

HeaderContent
X-Lsgbio-DeliveryDelivery id
X-Lsgbio-TimestampUnix timestamp, for replay rejection
X-Lsgbio-Signaturet= + base64 HMAC-SHA256 over {id}.{timestamp}.{body}

Verify with a constant-time compare against a signature you compute with the stored secret. The secret is returned exactly once — by create and by rotate — and is never readable again; a list response that included it would hand the signing key to anyone who can view the page. A lost secret is rotated, not recovered.

Deliveries, retries, log​

ListLinkWebhookDeliveries answers one endpoint's log for debugging "it does not work": each row carries event, status (pending, delivered, failed), attempts, and — when the endpoint answered — last_status plus last_error.

Retry policy: 2xx is delivered. 408, 429, 5xx, and network errors are retried; 410 Gone and other 4xx are permanent — the endpoint is saying it will not accept this. Past 5 attempts a delivery is marked failed and left alone, so one broken endpoint cannot tax every other customer's latency.