Generate Prefilled Forms on Landing Pages Pro
This API generates a short Landing Page Pro URL using LeadSquared’s API. The generated URL dynamically prefills lead and activity data on the landing page form, allowing you to send personalized links to leads without requiring them to re-enter information.
You can use this API to share personalized pages for use cases such as CSAT collection, feedback requests, surveys, or follow-ups, where lead context needs to be retained automatically.
Triggering the API Using Automations
You can also use LeadSquared Automations to trigger this API dynamically using a Webhook action.
For example, you can trigger the API when:
- A CSAT or feedback request is sent.
- A specific activity is created
- A lead reaches a particular stage
- Any other manual or event-based automation trigger
In such cases, the automation invokes this API via a webhook and sends the generated Landing Page Pro URL to the lead automatically (for example, through email or SMS).
To learn how to configure webhook-based API calls in Automations, see: Lead Automation Actions – Custom.
Note:
- The expiry time for the generated URL is calculated in UTC.
- Include “
x-lsq-request-source:dotnet-core” as a header in this request. - You must use the correct API host to make successful calls.
API URL
Request
Content-Type: application/json{
"PortalId": "8a31093e-f84c-11f0-8ecd-02eda0793197",
"LeadId": "90fe71ae-25e3-468d-8b0f-55258e31ff13",
"ActivityId": "886f5cdf-571a-4e9e-a274-267b4984b5b6",
"OpportunityId": "9eca8ccb-1598-43e5-984e-895e4d77f",
"QueryParams": [
]
}
Request Parameters
| Parameter | Description |
|---|---|
| PortalId | The unique identifier of your Landing Pages Pro ID from which the request is made. |
| ActivityId | The unique identifier of the activity associated with the lead. This allows activity-level data to be prefilled or tracked. |
| OpportunityId | The unique identifier of the opportunity associated with the lead. Use this to prefill or track opportunity-related data on the landing page’s form. |
| QueryParams | An optional list of additional query parameters to be appended to the generated landing page URL for passing extra context. The API will not work if |
Response
{
"EncryptedUrl": "https://lsq.mx/LEADSQ/zzz4o",
"LinkExpiryDate": "4/27/2026 10:21:40 AM"
}
HTTP Response Codes
| 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. |

