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

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

# Retrieve a lead

`GET` `/leads/{leadId}`

Operation ID: `getLead`

## Path parameters

- `leadId` (string, required)

## Responses

- `200` - Lead
- `404` - Record not found

## 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/{leadId}:
    parameters:
      - name: leadId
        in: path
        required: true
        schema:
          type: string
          example: lead_71ab
    get:
      tags:
        - Leads
      summary: Retrieve a lead
      operationId: getLead
      responses:
        "200":
          description: Lead
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Lead"
        "404":
          $ref: "#/components/responses/NotFound"
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
    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:
    NotFound:
      description: Record not found
      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`.
```
