> For the complete documentation index, see [llms.txt](https://chekin.gitbook.io/chekin-public-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chekin.gitbook.io/chekin-public-api/api-reference/housings/create-housing.md).

# Create Housing

## <mark style="color:green;">`POST`</mark> `/housings`

The "Create Housing" endpoint is utilized for adding new housing units to the system. This process involves specifying detailed information about the property, including its location, type, and features. It's an essential functionality for expanding the available housing options within your system

{% hint style="warning" %}
For Hotel property type housings (`HOT`), it is mandatory to:\
\- Fill `rooms_quantity` field with the total number of units in the property\
\- Create the Rooms for each unit. Please check [Create Multiple Rooms](/chekin-public-api/api-reference/rooms/create-multiple-rooms.md)
{% endhint %}

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `JWT <token>`      |

**Body**

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>string*</td><td>Name of the property.<br>It must be unique per account</td></tr><tr><td><code>external_id</code></td><td>string</td><td>Internal partner property ID.<br>It must be unique per account</td></tr><tr><td><code>booking_reference</code></td><td>string</td><td>OTA reservation ID. The one that is shared with the guest.</td></tr><tr><td><code>commercial_name</code></td><td>string</td><td>Property name for Guests</td></tr><tr><td><code>type</code></td><td>ENUM</td><td><code>HOU</code> for Apartments, <code>HOT</code> for Hotels</td></tr><tr><td><code>vatin</code></td><td>string</td><td>Company number</td></tr><tr><td><code>is_deactivated</code></td><td>boolean</td><td>actives/deactives the property</td></tr><tr><td><code>rooms_quantity</code></td><td>integer</td><td>Number of rooms inside the property</td></tr><tr><td><code>location</code></td><td><em>location</em> Object</td><td><p>Property location. Ex:</p><pre class="language-json"><code class="lang-json"><strong>"location": {
</strong>    "country": "ES", // ISO alpha-2 
    "city": "Barcelona" // Free string value
  },
</code></pre></td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "id": "1721c50d0ea14e8f8633f60f20c39028",
  "origin": "DEFAULT",
  "external_id": "some_external_id",
  "name": "some name",
  "commercial_name": "some commercial_name",
  "type": "HOT",
  "vatin": "some vatin",
  "is_deactivated": false,
  "location": {
    "country": {
      "code": "ES",
      "alpha_3": "ESP",
      "splitted": [
        "Spain"
      ],
      "name": "Spain"
    },
    "division_level_2": "ES-B",
    "city": "Barcelona"
  },
  "is_police_registration_enabled": false,
  "is_stat_registration_enabled": false,
  "is_smart_lock_enabled": false
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}
