---
title: "Create an estate diagnostic"
method: POST
path: "/places/{place_id}/estates/{estate_id}/diagnostics"
tags: ["Estate Diagnostics"]
---

# Create an estate diagnostic

`POST /places/{place_id}/estates/{estate_id}/diagnostics`

## Request

- Base URL: `https://api.faireplace.com/api`
- URL: `https://api.faireplace.com/api/places/{place_id}/estates/{estate_id}/diagnostics`
- Auth: HTTP bearer

Creates a new diagnostic for a property.

If an active diagnostic of the same type already exists for this estate,
the previous one is automatically deactivated.

## Path parameters

- `place_id` string, uuid, required
- `estate_id` string, uuid, required

## Request body

- CreateEstateDiagnostic: Data for creating a new estate diagnostic
  - `estate_id` string, uuid, required: Property (estate) ID this diagnostic belongs to
  - `diagnostic_type` 'DIAGNOSTIC_PLOMB' | 'DIAGNOSTIC_AMIANTE' | 'DIAGNOSTIC_ELECTRICITE' | 'DIAGNOSTIC_GAZ' | 'ETAT_RISQUES' | 'REGLEMENT_COPROPRIETE' | 'PERMIS_LOUER' | 'CUSTOM', required: Type of estate diagnostic
  - `media_id` string, uuid, required: Media ID of the uploaded diagnostic PDF document
  - `name` string, required: Name/title of the diagnostic
  - `description` string, nullable: Optional description or notes
  - `performed_at` string, date, nullable: Date when the diagnostic was performed
  - `expires_at` string, date, nullable: Expiry date of the diagnostic

## Response `201`

Estate diagnostic created successfully

- EstateDiagnostic: Estate diagnostic document (lead, asbestos, electrical, gas, risk assessment, co-ownership rules)
  - `id` string, uuid, required: Unique identifier of the diagnostic
  - `estate_id` string, uuid, required: Property (estate) ID this diagnostic belongs to
  - `diagnostic_type` 'DIAGNOSTIC_PLOMB' | 'DIAGNOSTIC_AMIANTE' | 'DIAGNOSTIC_ELECTRICITE' | 'DIAGNOSTIC_GAZ' | 'ETAT_RISQUES' | 'REGLEMENT_COPROPRIETE' | 'PERMIS_LOUER' | 'CUSTOM', required: Type of estate diagnostic
  - `media_id` string, uuid, required: Media ID of the uploaded diagnostic PDF document
  - `name` string, required: Name/title of the diagnostic
  - `description` string, nullable: Optional description or notes
  - `performed_at` string, date, nullable: Date when the diagnostic was performed
  - `expires_at` string, date, nullable: Expiry date of the diagnostic
  - `is_active` boolean, required: Whether this diagnostic is currently active
  - `created_at` string, date-time, required: Creation date
  - `updated_at` string, date-time, required: Last modification date

## Other responses

- `400`: Invalid data
- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal Server Error

---

[API](https://skmtc.dev/faireplace/apis/faireplace-property-management-api.md) · [All operations](https://skmtc.dev/faireplace/apis/faireplace-property-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/faireplace/apis/faireplace-property-management-api/revisions/69de39762919?raw)
