Submit a lead
const url = 'https://crm.tropicalrealty.com.mx/api/leads/intake';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"idempotencyKey":"form-2026-10-30-8f3a","channel":"form","sourceId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","campaignId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","productId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","productSku":"CUM","firstName":"Ana","lastName":"López","email":"ana@example.com","phone":"+52 55 1234 5678","message":"example","utmSource":"facebook","utmMedium":"example","utmCampaign":"cumbres-nov26","utmTerm":"example","utmContent":"example","fields":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://crm.tropicalrealty.com.mx/api/leads/intake \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "idempotencyKey": "form-2026-10-30-8f3a", "channel": "form", "sourceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "campaignId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "productId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "productSku": "CUM", "firstName": "Ana", "lastName": "López", "email": "ana@example.com", "phone": "+52 55 1234 5678", "message": "example", "utmSource": "facebook", "utmMedium": "example", "utmCampaign": "cumbres-nov26", "utmTerm": "example", "utmContent": "example", "fields": { "additionalProperty": "example" } }'Stores the lead as received, then finds or creates the person (by email, then phone) and opens a deal. Send email, phone or both. Fields not listed here can go in fields.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Repeating a key returns the first submission (200) instead of creating another.
Example
form-2026-10-30-8f3aWhere the lead came from. Defaults to webhook.
Lead source ID, from Settings → Sources.
Campaign ID, from Campaigns. Without it, utmCampaign picks the campaign.
What the lead asked about (e.g. a development).
The product’s SKU, instead of productId. Ignored if no product has it.
Example
CUMExample
AnaExample
LópezRequired unless phone is sent.
Example
ana@example.comRequired unless email is sent. Include the country code.
Example
+52 55 1234 5678Without sourceId, picks the source with this UTM code (unless the campaign has one).
Example
facebookWithout campaignId, picks the campaign with this UTM code.
Example
cumbres-nov26Any other form fields; stored with the submission.
object
Responses
Section titled “Responses”The idempotencyKey was already used; returns the first submission.
Lead received. status is processed when it was added to a deal (a new one, or the person’s open deal), pending when it needs a review in the leads inbox, or rejected when the contact belongs to a partner.
Invalid body, or a sourceId or campaignId that doesn’t exist in the organization.
object
object
Dotted path of the field; empty for the body.
Error code.
Example
{ "message": "Validation failed", "issues": [ { "path": "email", "message": "validation.leadContactRequired" } ]}Missing or invalid API key.
object
Example
{ "statusCode": 401, "message": "Invalid API key", "error": "Unauthorized"}Rate limit exceeded for this API key.
object
Example
{ "statusCode": 429, "message": "Too many requests for this API key"}