Available events
| Event | Description |
|---|---|
campaign.started | A campaign has transitioned from draft to running and is actively queueing messages |
message.sent | A single sequence step has been successfully delivered to a recipient’s mail server |
message.bounced | A delivery attempt failed permanently (hard bounce) or temporarily exceeded retry limits |
reply.received | An inbound reply has been received and classified by Leadterra |
Register a webhook
CallPOST /v1/webhooks with your endpoint URL and the list of events you want to receive. Your URL must be publicly reachable over HTTPS.
id if you need to update or delete the webhook registration later.
Webhook payload format
Every event Leadterra sends to your endpoint follows the same envelope structure: a top-levelevent type, an ISO 8601 timestamp, and an event-specific data object. Here is an example payload for the reply.received event:
message.bounced events, the data object includes a bounceType field (hard or soft) and a bounceReason string from the receiving mail server. For message.sent, it includes the sequenceStep index and the messageId for tracing.
Webhook security
Leadterra signs every outbound webhook request with anX-Leadterra-Signature header. The value is an HMAC-SHA256 digest of the raw request body, keyed with your webhook’s signing secret. Always verify this signature before processing the payload to ensure the request genuinely originated from Leadterra and hasn’t been tampered with.
Retries and delivery
If your endpoint returns a non-2xx HTTP status code or fails to respond within 10 seconds, Leadterra marks the delivery as failed and retries it automatically using exponential backoff. The retry schedule is approximately:- 1st retry — 1 minute after the initial failure
- 2nd retry — 5 minutes
- 3rd retry — 30 minutes
- 4th retry — 2 hours
- 5th retry — 8 hours
data.reply.id or data.messageId field as an idempotency key in your handler.