POST request to that URL each time one of those events fires, delivering a structured JSON payload with the full event context. You can register multiple webhooks with different URLs and event sets to fan events out to several downstream systems simultaneously.
Endpoint
Authorization
All requests must include a valid API key in theAuthorization header as a Bearer token.
Request Body
The HTTPS URL that Leadterra will
POST event payloads to. Must use the https:// scheme. Plain HTTP URLs are rejected to protect the integrity of event data in transit.An array of event type strings that this webhook should subscribe to. At least one event must be specified. Valid values are:
campaign.started— fires when a campaign transitions to active and begins sending.message.sent— fires each time an individual outbound email is successfully handed off to the mail provider.message.bounced— fires when a sent message receives a hard or soft bounce notification.reply.received— fires when an inbound reply is received and classified by Leadterra.
Example Request
Response Fields
The unique identifier assigned to this webhook registration. Store this value if you need to reference or delete the webhook later.
The HTTPS URL you registered, echoed back for confirmation.
The list of event type strings this webhook is subscribed to, echoed back for confirmation.
The current status of the webhook. A newly registered webhook always returns
active.ISO 8601 timestamp indicating when the webhook was registered.
Example Response
Webhook Payload Structure
Every event Leadterra delivers to your endpoint shares a common envelope with anevent type field, a timestamp, and an data object whose shape depends on the event type. Below is a sample payload for the reply.received event — the most commonly used event in agent-driven workflows.
2xx status code within 10 seconds to acknowledge receipt. Any non-2xx response or a timeout is treated as a delivery failure and triggers the retry schedule described below.
Retry Behavior
If Leadterra does not receive a2xx response from your endpoint, the delivery is considered failed and will be retried automatically using exponential backoff. The retry schedule is as follows:
| Attempt | Delay after previous attempt |
|---|---|
| 1st retry | 30 seconds |
| 2nd retry | 5 minutes |
| 3rd retry | 30 minutes |
| 4th retry | 2 hours |
| 5th retry | 8 hours |
replyId, campaignId, or other stable identifiers in the payload to detect and discard re-delivered events.
Error Codes
| Code | Meaning |
|---|---|
400 | Bad Request — the request body is malformed, required fields are missing, or the url does not use the https:// scheme. |
401 | Unauthorized — your API key is missing, invalid, or revoked. |
404 | Not Found — the requested resource could not be located. |
422 | Unprocessable Entity — one or more events values are not recognized event types. |