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

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

# Lead

## 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
components:
  schemas:
    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"
    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
    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
```
