Skip to main content
When something happens on an agent, NewLead sends a signed POST request to the URLs you register. Text agents send lead and message events and voice agents send call events.

Set up an endpoint

1

Create the endpoint

An endpoint belongs to one agent: send text_agent_id or voice_agent_id, and the events it listens for.
Store secret now. The API returns it only in this response, and you need it to verify every delivery.
2

Verify the signature

Check each delivery with the secret before you trust it. See Verify webhook signatures.
3

Send a test event

The API returns 202 with the queued delivery. The event carries fictional data and is signed like a real one.
You can also manage endpoints in the agent’s Webhooks panel in the dashboard.

Endpoint rules

  • URLs must use https and cannot point to a private address.
  • Each agent can have up to 3 active endpoints. Another one returns 409 webhook_endpoint_limit_reached, also when you reactivate a paused endpoint. Pause or delete one first.
  • Endpoints that an agency creates on an agent count toward those 3, even if your subaccount key cannot see them.

Manage endpoints

What your endpoint must do

  • Respond with a 2xx status within 10 seconds. Do slow work after you respond.
  • Respond directly. Redirects are not followed and count as failures.
  • Verify the signature of each delivery.
  • Deduplicate on the X-Webhook-Delivery header. Its value is the same on every retry of a delivery.
  • Do not rely on arrival order. Sort by occurred_at, which every event carries.
  • Ignore keys you do not recognize. New keys can appear at any time.

Delivery and retries

A delivery that does not get a 2xx response within 10 seconds is retried, including after a 4xx response. It gets 13 attempts in total over about 34 hours, with exponential waits starting at 30 seconds: After the last attempt, the delivery is marked failed. After 20 failed deliveries in a row, the endpoint pauses itself and active becomes false. A successful delivery resets that count, and so does reactivating the endpoint with PATCH and active: true. Test deliveries do not count, and a test delivery is sent once: it is not retried.
A paused endpoint receives nothing, and the events it misses are not sent when you reactivate it. A retry that comes due while the endpoint is paused is canceled. If you reactivate the endpoint first, pending retries are still sent.

Debug deliveries

GET /v1/webhook_endpoints/{webhook_endpoint_id}/deliveries lists each delivery for 30 days, newest first, with its status, attempts, response_status and failure_reason. It does not include the body sent or your server’s response.

Troubleshooting