Skip to content

Submit a lead

POST
/leads/intake
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.

Media typeapplication/json
object
idempotencyKey

Repeating a key returns the first submission (200) instead of creating another.

string
>= 1 characters <= 200 characters

Example

form-2026-10-30-8f3a
channel

Where the lead came from. Defaults to webhook.

string
Allowed values: form ad webhook import manual
sourceId

Lead source ID, from Settings → Sources.

string | null format: uuid
campaignId

Campaign ID, from Campaigns. Without it, utmCampaign picks the campaign.

string | null format: uuid
productId

What the lead asked about (e.g. a development).

string | null format: uuid
productSku

The product’s SKU, instead of productId. Ignored if no product has it.

string | null

Example

CUM
firstName
string | null

Example

Ana
lastName
string | null

Example

López
email

Required unless phone is sent.

string | null format: email

Example

ana@example.com
phone

Required unless email is sent. Include the country code.

string | null

Example

+52 55 1234 5678
message
string | null
utmSource

Without sourceId, picks the source with this UTM code (unless the campaign has one).

string | null

Example

facebook
utmMedium
string | null
utmCampaign

Without campaignId, picks the campaign with this UTM code.

string | null

Example

cumbres-nov26
utmTerm
string | null
utmContent
string | null
fields

Any other form fields; stored with the submission.

object
key
additional properties

The idempotencyKey was already used; returns the first submission.

Media typeapplication/json
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
status
required
string
Allowed values: pending processed duplicate rejected
personId
required
Any of:
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
dealId
required
Any of:
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/

Example

{
"status": "pending"
}

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.

Media typeapplication/json
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
status
required
string
Allowed values: pending processed duplicate rejected
personId
required
Any of:
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
dealId
required
Any of:
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/

Example

{
"status": "pending"
}

Invalid body, or a sourceId or campaignId that doesn’t exist in the organization.

Media typeapplication/json
object
message
required
string
Allowed value: Validation failed
issues
required
Array<object>
object
path
required

Dotted path of the field; empty for the body.

string
message
required

Error code.

string

Example

{
"message": "Validation failed",
"issues": [
{
"path": "email",
"message": "validation.leadContactRequired"
}
]
}

Missing or invalid API key.

Media typeapplication/json
object
statusCode
required
integer
>= -9007199254740991 <= 9007199254740991
message
required
string
error
string

Example

{
"statusCode": 401,
"message": "Invalid API key",
"error": "Unauthorized"
}

Rate limit exceeded for this API key.

Media typeapplication/json
object
statusCode
required
integer
>= -9007199254740991 <= 9007199254740991
message
required
string
error
string

Example

{
"statusCode": 429,
"message": "Too many requests for this API key"
}