> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agd.sa/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Unit

> Update unit information

### Path Parameters

<ParamField path="id" type="integer" required>
  The ID of the unit to update
</ParamField>

### Headers

<ParamField header="Accept" type="string" required>
  Must be "application/json"
</ParamField>

### Body

<ParamField body="unit_number" type="string" required>
  Unique unit number
</ParamField>

<ParamField body="floor_number" type="integer" required>
  Floor number
</ParamField>

<ParamField body="rooms" type="integer" required>
  Number of rooms (minimum 1)
</ParamField>

<ParamField body="unit_usage" type="string" required>
  Usage type (residential\_families, residential\_singles)
</ParamField>

<ParamField body="unit_type" type="string" required>
  Type of unit (apartment, floor, villa, building, tower, duplex, studio, secondary\_apartment, apartment\_extension, floor\_extension, penthouse\_villa, drivers\_room, land\_lot, other)
</ParamField>

<ParamField body="area" type="number">
  Unit area
</ParamField>

<ParamField body="amenities_bedrooms" type="integer">
  Number of bedrooms \[0-10]
</ParamField>

<ParamField body="amenities_bathrooms_full" type="integer">
  Number of full bathrooms \[0-10]
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl --request PUT \
    --url /tenant/v1/units/2 \
    --header 'Accept: application/json' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer {access_token}' \
    --data '{
      "unit_number": "A-0005",
      "floor_number": 1,
      "rooms": 1,
      "unit_usage": "residential_families",
      "unit_type": "apartment",
      "area": 200,
      "amenities_bedrooms": 3,
      "amenities_bathrooms_full": 2
    }'
  ```
</RequestExample>
