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

# Update availability

> Replace a listing's availability windows and, optionally, its minimum stay.

Replaces every availability window on the listing with the windows you send. Windows you leave out are removed. Dates already taken by a booking are tracked separately and aren't affected.

Send the full set each time. To add a window, read the listing, append to `availability.windows`, and send the result.

The update is checked the same way as an edit in your dashboard:

* Windows can't overlap, and each `end_date` must be after its `start_date`.
* Each window must be at least as long as the listing's minimum stay.
* Windows must allow stays that meet the minimum-stay rules for the listing's city or region.

The listing in the URL is the only one updated. On a property with several rooms, update each room's listing separately.

Search results pick up the change within a few minutes.

> [!WARNING]
>
> If `availability.synced_from_website` is `true`, Ohana also syncs this listing's availability from your website, and the next sync may replace what you send here.

## Path parameters

**id** `string` *required*

The listing `id`.

## Body

Send JSON with `Content-Type: application/json`.

**windows** `Window[]` *required*

The listing's new availability, from 1 to 99 windows.

**Window**

**start\_date** `string` *required*

Earliest move-in date, `YYYY-MM-DD`.

**end\_date** `string | null`

Latest move-out date, `YYYY-MM-DD`. Omit it or send `null` for an open-ended window.

**minimum\_stay** `integer | null`

Shortest stay you accept, in days. Send `null` or `0` to remove the minimum. Omit it to keep the current value. Only professional host profiles can set a minimum stay.

## Response

**data** `Listing` *required*

The updated [Listing](https://docs.liveohana.ai/api-reference/listings/list.md#response).

## Errors

| Status | Code | When |
| - | - | - |
| 400 | `invalid_request` | The body isn't JSON, has an unknown field, or a date isn't a real `YYYY-MM-DD` date. |
| 404 | `not_found` | The listing doesn't exist or isn't on your host profile. |
| 409 | `conflict` | The listing syncs availability from Airbnb, is managed by a partner feed, or is archived. |
| 422 | `validation_failed` | Windows overlap, are too short for the minimum stay, or break a local stay regulation. |

```bash cURL theme={null}
curl -X PUT https://liveohana.ai/api/v1/listings/0b9f1a52-2d6e-4c7b-9a0e-6f2d4c1b8a33/availability \
  -H "Authorization: Bearer ohk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "windows": [
      { "start_date": "2026-12-01", "end_date": "2027-05-31" },
      { "start_date": "2027-07-01", "end_date": null }
    ],
    "minimum_stay": 30
  }'
```

```javascript Node.js theme={null}
const response = await fetch(
  `https://liveohana.ai/api/v1/listings/${listingId}/availability`,
  {
    method: "PUT",
    headers: {
      Authorization: `Bearer ${process.env.OHANA_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      windows: [
        { start_date: "2026-12-01", end_date: "2027-05-31" },
        { start_date: "2027-07-01", end_date: null },
      ],
      minimum_stay: 30,
    }),
  }
);
const { data: listing } = await response.json();
```

```python Python theme={null}
import os, requests

response = requests.put(
    f"https://liveohana.ai/api/v1/listings/{listing_id}/availability",
    headers={"Authorization": f"Bearer {os.environ['OHANA_API_KEY']}"},
    json={
        "windows": [
            {"start_date": "2026-12-01", "end_date": "2027-05-31"},
            {"start_date": "2027-07-01", "end_date": None},
        ],
        "minimum_stay": 30,
    },
)
listing = response.json()["data"]
```

```json 200 theme={null}
{
  "data": {
    "id": "0b9f1a52-2d6e-4c7b-9a0e-6f2d4c1b8a33",
    "title": "Sunny 1BR near Union Square",
    "status": "published",
    "url": "https://liveohana.ai/listing/sunny-1br-near-union-square",
    "property_id": "7d2e9c41-8a3b-4f6e-b1c0-5e4d3c2b1a09",
    "address": "450 Post St, Apt 5C, San Francisco, CA 94102",
    "managed_by_partner_feed": false,
    "availability": {
      "synced_from_airbnb": false,
      "synced_from_website": false,
      "minimum_stay": 30,
      "windows": [
        { "start_date": "2026-12-01", "end_date": "2027-05-31" },
        { "start_date": "2027-07-01", "end_date": null }
      ]
    },
    "pricing": {
      "type": "fixed",
      "synced_from_website": false,
      "rent": { "amount": "2450.00", "currency": "USD" },
      "guest_rent": { "amount": "2695.00", "currency": "USD" },
      "monthly_rents": null
    },
    "updated_at": "2026-10-28T18:04:10.000Z"
  }
}
```

```json 409 theme={null}
{
  "error": {
    "code": "conflict",
    "message": "Availability for this listing syncs from Airbnb. Turn off Airbnb sync in Ohana to manage it through the API."
  }
}
```

```json 422 theme={null}
{
  "error": {
    "code": "validation_failed",
    "message": "A window is shorter than the listing's minimum stay of 30 days."
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.