Script to capture leads from website forms – Single form

Sample form html: 

<!DOCTYPE html>
<html>
<head>
<title>Capture Lead: Single Form</title>
</head>
<body>
<form id=”myLandingPageForm”>
<table align=”center” border=”1″ cellspacing=”5″ cellpadding=”5″ width=”400px” style=”margin:20px auto; background: #eff8ff; border: 1px solid #a0a0a0; border-collapse: collapse; “>
<tr align=”left” valign=”top”>
<td><label for=’firstname’>Name *</label></td>
<td><input type=’text’ id=’firstname’ name=’fname’ maxlength=’100′ value=” autocomplete=’off’ required=’required’ /></td>
</tr>
<tr>
<td><label for=’lastname’>Last Name</label></td>
<td><input type=’text’ id=’lastname’ name=’lname’ maxlength=’100′ value=” autocomplete=’off’ /></td>
</tr>
<tr>
<td><label for=’emailaddress’>Email *</label></td>
<td><input type=’text’ id=’emailaddress’ name=’email’ maxlength=’100′ value=” autocomplete=’off’ required=’required’ /></td>
</tr>
<tr>
<td><label for=’mobile’>Mobile Number</label></td>
<td><input type=’text’ id=’mobile’ name=’mobile’ maxlength=’20’ value=” autocomplete=’off’ /></td>
</tr>
<tr>
<td><label for=’city’>City</label></td>
<td>
<input type=’text’ id=’city’ name=’city’ maxlength=’30’ value=” autocomplete=’off’ />
</td>
</tr>
<tr>
<td></td>
<td>
<button id=”form-submit-button” type=”submit”>Submit</button>
</td>
</tr>
</table>
</form>

API URL

GET
accessKey=AccessKey&secretKey=SecretKey
Copy URL

Response

200 OK

Content-Type: application/json



			

HTTP Response Code

Code Description
200 OK

This is the status code for successful API call.

401 Unauthorized

The API call was made with invalid access credentials. Check your AccessKey and SecretKey.

400 Bad Request

The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure.

404 Not Found

The API could not be found. Please check the API signature.

429 Too Many Requests

API calls exceeded the limit of 25 in 5 second(s)

500 Internal Server Error

The API called failed. There could be many reasons for it. Check the exception message to get more details.