Send a lead
https://secure.alterestate.com/api/v1/leads/Sends a lead into your AlterEstate account. Connect website forms, landing pages, ads or any other source where you capture leads.
Each request creates (or reuses) a contact and opens a deal for the agent who receives the lead. The minimum valid body is a name, a phone and an email.
{
"full_name": "John Doe",
"phone": "8091234567",
"email": "johndoe@email.com"
}Authentication
Send Authorization: Token your_api_key_here. Account token. Keep it on your server.
Standard fields
| Field | Type | Description |
|---|---|---|
full_namerequired | string | Lead’s full name. Example: John Doe. |
phonerequired | string | Phone number in any local format. Normalized to E.164 (+18091234567). Example: 8091234567. |
emailrequired | string | Email address. Stored lowercase. Example: johndoe@email.com. |
property_uid | string | uid of the property the lead is interested in. The deal inherits its price, currency, sector and category. Example: JSORJ9S5AY. |
notes | string | Message the lead wrote, form comment, etc. Example: I would like to see the property this weekend.. |
via | integer | Channel ID. Falls back to a default channel when missing. |
related | string | Email or uid of the user to assign the lead to. Ignored when round_robin is sent. Example: john@agency.com. |
round_robin | string | uid of a Round Robin rule. Takes precedence over related. |
listing_type | string | Accepted for compatibility. Deals created through this endpoint are currently always saved as buying (1). Example: 1. |
currency | string | ISO currency code. Defaults to the agency’s currency, or the property’s when property_uid is sent. Example: USD. |
budget | number | Budget. Defaults to 0, or to the property price when property_uid is sent. Example: 185000. |
UTM & attribution fields
| Field | Type | Description |
|---|---|---|
utm_source | string | Source of the lead (e.g. facebook, google). |
utm_campaign | string | Campaign name. Example: june_promo. |
utm_content | string | Ad creative or content identifier. |
utm_medium | string | Medium (e.g. cpc, email, organic). |
utm_term | string | Search keyword. |
adset_name | string | Ad set name. |
campaign_name | string | Campaign display name. |
form_name | string | Identifier of the form that captured the lead. |
platform | string | Platform of origin (facebook, instagram, website, etc.). |
Extra data
| Field | Type | Description |
|---|---|---|
custom_fields | object | Values for your custom fields, keyed by field key. List the keys first on the Custom fields page. |
metadata | object | Free-form JSON object saved to the contact and deal timeline. Not indexed or filterable. Any other type returns 400. |
Example request
curl --request POST \
--url 'https://secure.alterestate.com/api/v1/leads/' \
--header 'Authorization: Token your_api_key_here' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"full_name": "John Doe",
"email": "johndoe@email.com",
"phone": "8091234567",
"property_uid": "KNM6135T3B",
"utm_source": "facebook",
"utm_campaign": "june_promo",
"round_robin": "RR_UID_HERE",
"notes": "I would like to see the property this weekend.",
"custom_fields": {
"lead_score": 90,
"client_type": "investor",
"original_source": "instagram",
"has_financing": true,
"visit_date": "2026-06-15"
}
}'Example response
{
"status": 201,
"message": "Lead created successfully.",
"data": {
"id": 1238837,
"uid": "D9dEML2g39",
"full_name": "John Doe",
"email": "johndoe@email.com",
"phone": "+18091234567",
"ctype": 37,
"via": 104
},
"log_id": 453995,
"deal_id": 640682,
"deal_uid": "AB12cdEF34",
"contact_uid": "D9dEML2g39",
"contact": {
"id": 1238837,
"uid": "D9dEML2g39",
"full_name": "John Doe",
"email": "johndoe@email.com",
"phone": "+18091234567"
},
"deal": {
"id": 640682,
"uid": "AB12cdEF34",
"name": "Negocio de John Doe",
"assigned_to": {
"uid": "IZHIZ6C3Z6",
"email": "agent@agency.com",
"full_name": "Jane Agent"
}
},
"duplicate": false,
"custom_fields": {
"deals": {
"lead_score": 90,
"client_type": "investor",
"visit_date": "2026-06-15"
},
"contacts": {
"original_source": "instagram",
"has_financing": true
}
}
}{
"status": 200,
"message": "This contact already exists. The existing deal was reused.",
"log_id": 453996,
"deal_id": 640682,
"deal_uid": "AB12cdEF34",
"contact_uid": "D9dEML2g39",
"contact": {
"id": 1238837,
"uid": "D9dEML2g39",
"full_name": "John Doe",
"email": "johndoe@email.com",
"phone": "+18091234567"
},
"deal": {
"id": 640682,
"uid": "AB12cdEF34",
"name": "Negocio de John Doe",
"assigned_to": {
"uid": "IZHIZ6C3Z6",
"email": "agent@agency.com",
"full_name": "Jane Agent"
}
},
"duplicate": true,
"deal_reused": true,
"custom_fields": {
"deals": {},
"contacts": {
"original_source": "instagram",
"has_financing": true
}
}
}{
"phone": [
"This field is required."
]
}{
"custom_fields": {
"lead_score": [
"Debe ser un número."
],
"client_type": [
"Opción inválida."
]
}
}{
"error": "metadata debe ser un objeto JSON."
}Assignment and duplicates
- Without related or round_robin, the lead goes to the owner of the API key.
- round_robin always wins over related.
- The contact belongs to whoever registered it. The deal belongs to whoever generated this lead.
- If the agency does not allow duplicates and the phone, email or WhatsApp username matches an existing contact, that contact is kept and is not reassigned. The generator’s deal with that contact is reused in any status (open, won, closed or lost, open first). The response is 200 with duplicate: true and deal_reused: true. If the generator has no deal with that contact, AlterEstate creates one and responds 201 with duplicate: true and deal_reused: false. Contact custom fields you send still update the existing contact.
- If the agency allows duplicates (Settings → Company configuration), each inquiry creates a new contact record and a new deal.
- Use duplicate to see whether the contact already existed. deal_reused is true when an existing deal was kept. Store log_id to trace the request with support.
- Agencies in prospect mode get the deal created as a prospect automatically.
Custom fields
List your company’s field keys first, then send the values in custom_fields. Formats, types and validation live on the Custom fields page.
Free-form metadata
For attribution or debugging data you don’t want to model as a custom field, send metadata. It is saved as a timeline activity on the contact and deal, but it is not indexed or filterable.
{
"full_name": "John Doe",
"phone": "8091234567",
"email": "johndoe@email.com",
"metadata": {
"landing_page": "https://example.com/june-promo",
"user_agent": "Mozilla/5.0...",
"session_id": "abc-123"
}
}Best practices
- Send any local phone format; AlterEstate normalizes it to E.164.
- Always send UTMs when you have them. They drive attribution reports.
- Send property_uid when the lead comes from a listing page so the deal is pre-filled.
- Use custom_fields for data you want to filter and report on; use metadata for raw payloads.
- With duplicates disabled, repeating a request reuses the generator’s deal when one exists and creates a deal only when that person has none.
- Call this endpoint from your server. Never expose the account token in browser code.
Status codes
| Status | Meaning |
|---|---|
| 201 | The resource was created. |
| 400 | A parameter or the body is invalid. The response names the field. |
| 401 | The token is missing or invalid. |
| 404 | The resource or route does not exist. |
| 429 | Too many requests. Wait and retry. |
| 500 | Server error while processing the request. |
Frequently asked questions
What happens when I send a lead for a contact that already exists in AlterEstate?
If the agency does not allow duplicates, AlterEstate keeps the existing contact. It reuses the generator’s deal in any status, or creates one when that person has none. duplicate is true. deal_reused is true only when an existing deal was kept. If duplicates are allowed, each inquiry creates a new contact and a new deal.
Who is an API lead assigned to?
round_robin assigns it through a Round Robin rule. Otherwise related assigns it to a specific user. Without either, it goes to the owner of the API key.
Can I send UTM parameters and custom fields with a lead?
Yes. utm_source, utm_medium, utm_campaign, utm_content and utm_term feed attribution reports, and custom_fields fills your agency’s custom fields on the contact and deal.
Last updated . Questions? Emailengineering@alterestate.com.