---
title: "Archive a property"
url: "https://real-estate-agency.apim.eu/apis/property-management/versions/0192f0a1-654d-4abd-aa88-6716d49df69f/operations/archiveProperty"
---

> Full API specification: https://real-estate-agency.apim.eu/apis/property-management/versions/0192f0a1-654d-4abd-aa88-6716d49df69f.md

# Archive a property

`DELETE` `/properties/{propertyId}`

Operation ID: `archiveProperty`

Takes the property off the market. The record remains readable.

## Path parameters

- `propertyId` (string, required)

## Responses

- `204` - Archived
- `404` - Record not found

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Property Management
  version: 1.0.0
servers:
  - url: https://api.realestateagency.example/v1
    description: Production
  - url: https://sandbox.api.realestateagency.example/v1
    description: Sandbox
paths:
  /properties/{propertyId}:
    parameters:
      - name: propertyId
        in: path
        required: true
        schema:
          type: string
          example: prop_8f2c1a
    delete:
      tags:
        - Properties
      summary: Archive a property
      description: Takes the property off the market. The record remains readable.
      operationId: archiveProperty
      security:
        - apiKey: []
      responses:
        "204":
          description: Archived
        "404":
          $ref: "#/components/responses/NotFound"
security:
  - apiKey: []
components:
  responses:
    NotFound:
      description: Record not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
  schemas:
    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: Mandatory disclosures from the energy certificate are missing for
            publication.
        details:
          type: array
          items:
            $ref: "#/components/schemas/ErrorDetail"
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
          example: energy_certificate.final_energy_demand_kwh
        reason:
          type: string
          example: missing
  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`.
```
