Skip to content

Leads⚓︎

Leads Webhook⚓︎

A notification via webhook is sent whenever a new lead is received, provided the CRM subscribes to this functionality. To receive these notifications, the CRM must provide a designated endpoint where the webhook can be directed.

When a new lead is captured, the system triggers a webhook notification. This notification is then sent to the specified endpoint, allowing the CRM to process and respond to the lead in real-time. By subscribing to this feature and supplying the necessary endpoint, the CRM ensures it is updated with the latest lead information, enabling prompt and effective lead management.


Method POST⚓︎

Headers⚓︎

NameTypeDescription
tokenstringToken supplied by CasaYes to the CRM for identifying requests sent to the CRM API.

Body application/json WebhookEndpoint⚓︎

NameTypeDescription
EntityTypestring['Listing', 'Office', 'BusinessForm', 'User', 'EvaluationForm']
EntityPublicIdstringEntity CasaYes publicId.
EntityReferencestringEntity external reference.
LeadReferencestringLead publicId.
Sourcestring'CasaYes'
CreatedDatedatetimeLead created date.
MessagestringLead message.
SenderNamestringSender name.
SenderEmailstringSender email.
SenderPhonestringSender phone.
NumberResidentsintegerProjected residents for the apartment .
HasPetsboolHas pets
EstimatedDateToMovestring['Soon', 'Flexible', 'ExactDate']
MonthlyIncomeintegerMonthly income .
PresentationLetterstringPresentation letter .

Requests⚓︎

Example

Method: POST
Headers:
    {
        "token": "0b4ba9b1-8e04-44cc-84ec-eb0579c0bb20"
    }
Body:
    {
        "CreatedDate": "2024-08-09T15:05:44.6131515Z",
        "EntityPublicId": "A3bT7Y2xL6w",
        "EntityReference": "857632194-6",
        "EntityType": "Listing",
        "EstimatedDateToMove": "2024-12-09T15:05:44.6131515Z",
        "HasPets": false,
        "LeadReference": "CY-Listing-A3bT7Y2xL6w-b24e6f80-17c9-4a8f-92b3-7e123d4bcf90",
        "Message": "Hi, I’m interested in this listing and would like to schedule a viewing. Please contact me. Thanks",
        "MonthlyIncome": 2000,
        "NumberResidents": 2,
        "PresentationLetter": "",
        "SenderEmail": "[email protected]",
        "SenderName": "John Smith",
        "SenderPhone": "919111222",
        "Source": "CasaYes"
    }

[^1]: additional information included in the user's CasaYes profile (may be missing)