Client API Documentation
Integrate seamlessly with our CRM to sync regions, real estate programmes, and automatically pull the latest generated contacts.
Introduction
Welcome to the CRM Client API. This API provides a single webhook endpoint designed for clients to programmatically fetch data securely. We utilize a highly optimized backend to deliver enriched datasets in real-time.
Base URL
POST https://api.marketing-lab.immo/api/v1
Authentication
All API requests are authenticated using an API Key. This key is securely mapped to your authorized database, regions, and pull statuses.
You can authenticate by passing your key in the request headers (recommended) or in the JSON body.
Authentication Header
x-api-key: YOUR_API_KEY
Fetch Regions
POSTRetrieves a list of all geographical regions your API key is authorized to access.
Request Body
Provide the operation parameter.
{
"operation": "getRegions"
}
Response 200 OK
[
{
"id": 30,
"nom": "Occitanie"
},
{
"id": 62,
"nom": "Provence-Alpes-Côte d'Azur"
}
]
Fetch Programmes
POSTFetches a list of real estate programmes belonging to your authorized regions.
Request Body
{
"operation": "getProgrammes"
}
Response 200 OK
[
{
"id": 145,
"idRegion": 30,
"nom": "Les Jardins de l'Aube"
}
]
Read Contacts
POSTRetrieves a list of up to 200 contacts that are currently marked as "Ready to Pull". This operation is completely read-only and will not change the status of the contacts.
Request Body
{
"operation": "readContacts"
}
Response 200 OK
[
{
"action_id": 1045,
"prospect_id": 5002,
"programme_id": 145,
"prospect_nom": "Dupont",
"prospect_prenom": "Jean",
"prospect_telephone": "+33612345678",
"prospect_email": "jean@email.com",
"programme_nom": "Les Jardins de l'Aube",
"region_nom": "Occitanie",
"origine_designation": "Website form",
"type_contact_designation": "Inbound Lead",
"type_action_designation": "Contact request"
// ... additional enriched fields
}
]
Pull Contacts
POSTRetrieves a list of contacts and immediately updates their status in the CRM to mark them as "Pulled". It also timestamps the exact moment of the pull.
Request Body
{
"operation": "pullContacts"
}
Response 200 OK
Returns the exact records that were just pulled and updated. Structure is identical to readContacts.
Get Pulled Contacts
POSTRetrieves a list of up to 500 contacts that have already been pulled within the last 30 days.
Request Body
{
"operation": "getPulledContacts"
}
Response 200 OK
Returns the records matching the post-pull status with a pull timestamp from the last 30 days. Structure is identical to readContacts.
Error Handling
If an invalid API Key is provided, or an unknown operation is requested, the API will return a 401 Unauthorized or 400 Bad Request status.
{
"valid": false,
"error": "Invalid API Key"
}