Client Webhooks
Create, list, test, and delete webhooks for batch clients. Receive real-time notifications when batches complete or items fail.
https://api.leadmagic.io/v1/batch/clients/{clientId}/webhooksTry this endpointOpen the API playground
Endpoint Details
Manage webhooks that fire on batch events for a specific client:
POST /v1/batch/clients/{clientId}/webhooks: create a webhookGET /v1/batch/clients/{clientId}/webhooks: list webhooksDELETE /v1/batch/clients/{clientId}/webhooks/{webhookId}: delete a webhookPOST /v1/batch/clients/{clientId}/webhooks/{webhookId}/test: send a test event
Webhooks are delivered with an HMAC-SHA256 signature in the X-LeadMagic-Signature header. Verify this signature using your webhook's secret.
- Pricing
| Metric | Value |
|---|---|
| Cost | FREE |
Create Webhook
batch.completed, batch.failed, item.failed. Empty or omitted = all events.true on creation.Test Webhook
POST /v1/batch/clients/{clientId}/webhooks/{webhookId}/test sends a test payload to the webhook URL.
true if delivery was attempted.Webhook Payload
Webhooks deliver JSON payloads with the following structure:
Verify the X-LeadMagic-Signature header using HMAC-SHA256 with your webhook secret.
Status Codes
201
200
401
404
429
Best Practices
Verify the HMAC signature
Verify the HMAC signature
Every webhook includes an X-LeadMagic-Signature header. Verify it with HMAC-SHA256 using the secret returned on creation. This confirms the payload originated from LeadMagic and was not tampered with.
Test before relying on it
Test before relying on it
Use the test endpoint to verify your webhook URL is reachable, returns the expected status code, and receives the payload format correctly before going into production.
Subscribe only to the events you need
Subscribe only to the events you need
Use event_types to filter which events trigger the webhook. For example, subscribe only to batch.failed if you only care about errors.
Was this page helpful?
We value your feedback.