Skip to main content
To host the Lead Magnet form on your own website in your own design, build the form yourself and send its data to Telivy with a POST request. The endpoint and your Agent ID are on the API POST Call card under Account → Lead Magnet.
1

Set up the HTML form

Create a form with the method attribute set to POST and a submit button.
2

Listen for the submit event

Use addEventListener to handle the form’s submit event.
3

Collect and check the form data

Build a data object from the form fields with FormData, then add your agentId and, if you track campaigns, a utmSource.
Check these before sending, or the submission will be rejected:
The email must be a valid address, with an @ and a domain.
4

Send the POST request

Send the data as JSON with fetch. A complete example:
file.html