← Home Agency — SMS Views

Get SMS Views

GEThttps://api.bayut.com/v1/leads

Retrieves View leads received through SMS related to agency.The is_lead parameter determines whether to fetch actual leads or view (non-lead) inquiries within the specified date range.

🔐 Bearer Token: Provide your bearer token in the Authorization header when making requests to protected resources.
Query Parameters
NameTypeRequiredDescriptionExample
channelstringOptionalThe source channel of the lead (e.g., sms).sms
targetstringOptionalLead target type (e.g., agency).agency
is_leadbooleanOptional1 = Fetch actual leads, 0 = Fetch view (non-lead) inquiries.0
agency_ids[]stringOptionalList of agency IDs to filter leads by specific agencies.
created_fromstringOptionalStart date for filtering leads (YYYY-MM-DD).2025-10-01
created_tostringOptionalEnd date for filtering leads (YYYY-MM-DD).2025-10-08
pagestringOptionalPage number for pagination. Default: 1.1
per_pagestringOptionalNumber of items per page. max: 100.50
Response Schema
NameTypeRequiredDescriptionExample
dataarray[object]Optional
leadobjectOptional
agency_detailsobjectOptional
metaobjectOptional
current_pageintegerOptional
fromintegerOptional
tointegerOptional
totalintegerOptional
Responses
200
422⚠️
Code Examples
curl --location --globoff 'https://api.bayut.com/v1/leads?channel=sms&target=agency&is_lead=0&agency_ids[]=&created_from=2025-10-01&created_to=2025-10-08&page=1&per_page=50' \
--header 'Authorization: Bearer <token>'
{
    "data": [
        {
            "lead": {
                "id": "sms|74a38382-10b5-4eb7-a2d2-f82fdd767f30",
                "source": "bayut",
                "target": "agency",
                "channel": "sms",
                "date_time": "2025-09-02 13:02:23"
            },
            "agency_details": {
                "url": "https://www.bayut.com/companies/test-properties-branch-1-9953",
                "name": "Test Properties - Branch 1"
            }
        }
    ],
    "meta": {
        "current_page": 1,
        "from": 1,
        "to": 1,
        "per_page": 1,
        "total": 1
    }
}