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

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

# Record an inquiry

`POST` `/inquiries`

Operation ID: `createInquiry`

Typically called from the contact form on the agency's own website.

## Request body (required)

Content types: `application/json`

## Responses

- `201` - Recorded

## 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:
  /inquiries:
    post:
      tags:
        - Inquiries
      summary: Record an inquiry
      description: Typically called from the contact form on the agency's own website.
      operationId: createInquiry
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - property_id
                - lead_id
              properties:
                property_id:
                  type: string
                  example: prop_8f2c1a
                lead_id:
                  type: string
                  example: lead_71ab
                message:
                  type: string
                  maxLength: 2000
                channel:
                  type: string
                  enum:
                    - website
                    - portal
                    - phone
                    - trade_fair
      responses:
        "201":
          description: Recorded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Inquiry"
security:
  - apiKey: []
components:
  schemas:
    Inquiry:
      type: object
      properties:
        id:
          type: string
          example: inq_5c02
        property_id:
          type: string
          example: prop_8f2c1a
        lead_id:
          type: string
          example: lead_71ab
        status:
          $ref: "#/components/schemas/InquiryStatus"
        channel:
          type: string
          example: website
        message:
          type: string
          example: Hello, is the apartment still available? We would like to view it.
        received_at:
          type: string
          format: date-time
          example: 2026-08-19T17:05:31Z
    InquiryStatus:
      type: string
      enum:
        - new
        - scored
        - invited
        - declined
        - closed
      example: scored
  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`.
```
