---
title: "List leads"
url: "https://real-estate-agency.apim.eu/apis/leads/versions/d1fa19e4-3a7d-4b6b-aac0-9ec016571b4b/operations/listLeads"
---

> Full API specification: https://real-estate-agency.apim.eu/apis/leads/versions/d1fa19e4-3a7d-4b6b-aac0-9ec016571b4b.md

# List leads

`GET` `/leads`

Operation ID: `listLeads`

## Query parameters

- `search_profile_active` (boolean, optional)
- `limit` (integer, optional)
- `cursor` (string, optional)

## Responses

- `200` - Results list
- `401` - Key is missing, revoked or invalid

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Leads & Inquiries
  version: 1.0.0
servers:
  - url: https://api.realestateagency.example/v1
    description: Production
  - url: https://sandbox.api.realestateagency.example/v1
    description: Sandbox
paths:
  /leads:
    get:
      tags:
        - Leads
      summary: List leads
      operationId: listLeads
      parameters:
        - name: search_profile_active
          in: query
          schema:
            type: boolean
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        - name: cursor
          in: query
          schema:
            type: string
      responses:
        "200":
          description: Results list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Lead"
                  page:
                    $ref: "#/components/schemas/Page"
        "401":
          $ref: "#/components/responses/NotAuthenticated"
security:
  - apiKey: []
components:
  schemas:
    Lead:
      allOf:
        - $ref: "#/components/schemas/LeadInput"
        - type: object
          properties:
            id:
              type: string
              example: lead_71ab
            retention_until:
              type: string
              format: date
              description: Automatically set deletion deadline. Anonymized after it passes.
              example: 2027-02-18
            created_at:
              type: string
              format: date-time
              example: 2026-08-18T10:22:04Z
    Page:
      type: object
      description: Cursor-based pagination.
      properties:
        count:
          type: integer
          example: 25
        total:
          type: integer
          example: 138
        next_cursor:
          type: string
          nullable: true
          example: eyJzIjoyNX0
    LeadInput:
      type: object
      required:
        - last_name
        - email
        - consent
      properties:
        first_name:
          type: string
          example: Anna
        last_name:
          type: string
          example: Bergmann
        email:
          type: string
          format: email
          example: a.bergmann@example.org
        phone:
          type: string
          example: +1 217 555 0142
        consent:
          $ref: "#/components/schemas/Consent"
        search_profile:
          $ref: "#/components/schemas/SearchProfile"
    Error:
      type: object
      description: Uniform error format across all Real Estate Agency APIs.
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: validation_failed
        message:
          type: string
          example: Consent is required to create a lead.
        details:
          type: array
          items:
            $ref: "#/components/schemas/ErrorDetail"
    Consent:
      type: object
      description: Record of consent under applicable data protection law.
      required:
        - purpose
        - granted_at
      properties:
        purpose:
          type: string
          enum:
            - property_referral
            - newsletter
        granted_at:
          type: string
          format: date-time
          example: 2026-08-18T10:22:00Z
        revoked_at:
          type: string
          format: date-time
          nullable: true
          example: null
    SearchProfile:
      type: object
      properties:
        type:
          type: array
          items:
            type: string
            enum:
              - apartment
              - house
              - land
              - commercial
        locations:
          type: array
          items:
            type: string
            example: Springfield
        rooms_min:
          type: number
          format: float
          example: 3
        living_area_min_sqm:
          type: number
          format: float
          example: 75
        purchase_price_max_eur:
          type: integer
          example: 700000
        cold_rent_max_eur:
          type: integer
          example: 1600
        financing_proof:
          type: boolean
          example: false
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
          example: consent.purpose
        reason:
          type: string
          example: missing
  responses:
    NotAuthenticated:
      description: Key is missing, revoked or invalid
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: |
        Every call carries an API key in the `apikey` header. You generate the
        key in the Real Estate portal under "My Apps"; it's shown exactly once.

        Each key has the scopes it's allowed to use attached to it. If one is
        missing, the API responds with `403` and `code: "scope_missing"`; the
        missing scope is in `details[].field`.
```
