Documentation Index Fetch the complete documentation index at: https://docs.keenpartner.com/llms.txt
Use this file to discover all available pages before exploring further.
Some external CRMs still reference leads by the original numeric ID from the legacy Xano system rather than the current Supabase UUID. Use this action to look up a lead by that integer and retrieve the full lead object. The returned lead.id is the UUID you should use for all subsequent actions such as update_status , update_status_id , and create_purchase .
Authentication
Request
Must be "get_lead_by_legacy_id".
The original integer ID from the legacy system.
Response
Returns the full lead object, including nested property_values with their property_definitions — the same shape as leads returned by get_leads .
Lead ID (UUID). Use this for all subsequent API calls.
The original integer ID from the legacy system.
When the lead was created.
Company name of the lead.
Employee associated with the lead.
External business identifier.
Channel this lead belongs to.
Custom property values set on this lead. Show Property value object
ID of the property definition.
The property definition this value belongs to.
Example
Request
curl -X POST https://data.keenpartner.com/functions/v1/keen-api \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_API_KEY" \
-d '{
"action": "get_lead_by_legacy_id",
"legacy_id": 12345
}'
Response
{
"lead" : {
"id" : "99887766-5544-3322-1100-aabbccddeeff" ,
"legacy_id" : 12345 ,
"created_at" : "2025-04-01T14:22:00.000Z" ,
"email" : "jane@example.com" ,
"first_name" : "Jane" ,
"last_name" : "Smith" ,
"phone" : "+1-555-0199" ,
"company_name" : "Smith Consulting" ,
"source" : "Website" ,
"employee" : null ,
"status" : "Qualified" ,
"lead_status_id" : "bbbbbbbb-cccc-dddd-eeee-ffffffffffff" ,
"notes" : "Interested in enterprise plan" ,
"business_id" : null ,
"channels_id" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ,
"property_values" : [
{
"id" : "77665544-3322-1100-aabb-ccddeeff0011" ,
"value" : "50000" ,
"property_definitions_id" : "11111111-2222-3333-4444-555555555555" ,
"property_definitions" : {
"id" : "11111111-2222-3333-4444-555555555555" ,
"name" : "Deal size" ,
"type" : "number"
}
}
]
}
}
Errors
Status Error Cause 400"legacy_id required"The legacy_id field is missing or not a valid number. 401"Invalid API key"Missing or invalid X-Api-Key header. 403"Lead not accessible"The lead belongs to a channel your company does not have access to. 404"Lead not found"No lead exists with the given legacy_id.