Skip to content

How Do I Customize the Webhook Payload?

When you set up a Webhook connection, the JSON Payload Template controls exactly what LeadSync sends to your endpoint.

Field placeholders

Use %field_name% tags that match your lead form's field names:

{"name": "%full_name%", "email": "%email%", "phone": "%phone_number%"}

Metadata placeholders

These work in any template without mapping: %leadgen_id%, %form_id%, %form_name%, %page_id%, %page_name%, %ad_account_id%, %platform%, %created_time%, %created_at%.

Send everything with %all_fields%

Use %all_fields% to include every field the lead contains, without listing each one. It expands to a JSON object of all form answers plus the metadata above:

{"client": "%page_id%", "fields": "%all_fields%"}

delivers something like:

{"client": "112233445566", "fields": {"full_name": "Jane Doe", "email": "jane@example.com", "moving_date": "08/01/2026", "page_id": "112233445566", "page_name": "Acme Movers"}}

This is handy when many forms with different custom questions share one endpoint: each lead sends exactly the fields it has, and nothing is missed.

Tip

For GET requests, JSON keys become query parameters, so %all_fields% arrives as fields[full_name]=...&fields[email]=...

Good to know

  • A placeholder the form doesn't have passes through as literal text (e.g. %full_name%). Use %all_fields% if your forms vary.
  • Your endpoint should return a 2xx status code, or LeadSync marks the delivery as failed.