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

# Availabilities

> List, view, create, and update availabilities.

An availability is a reusable schedule of weekly periods and date overrides. See the [API reference](/api-reference/availabilities/list) for the full resource shape.

## List availabilities

```bash theme={"system"}
neetocal availabilities list
neetocal availabilities list --emails alice@co.com,bob@co.com
```

| Flag          | Type     | Required | Default | Description                         |
| ------------- | -------- | -------- | ------- | ----------------------------------- |
| `--emails`    | `string` |          |         | Comma-separated emails to filter by |
| `--page`      | `int`    |          | `0`     | Page number                         |
| `--page-size` | `int`    |          | `0`     | Items per page (max 100)            |

```json Sample output (--json) theme={"system"}
{
  "data": [
    {
      "id": "01ea5ddf-ed00-4bed-bfa3-ba8ea80a856a",
      "sid": "2nq7q5c",
      "name": "Working hours",
      "default": true,
      "periods": [
        { "id": "21c812a7-3859-4f01-b214-850e6f11caad", "wday": "monday", "start_time": "09:00 AM", "end_time": "05:00 PM" },
        { "id": "6f5a1e2b-77c4-4a0d-9c3e-1b2f3a4d5e6f", "wday": "tuesday", "start_time": "09:00 AM", "end_time": "05:00 PM" }
      ],
      "overrides": [],
      "user": { "id": "b6d02dfa-8ef6-453d-b9f7-67a6f20bcaa6", "name": "Oliver Smith", "email": "oliver@example.com" }
    }
  ],
  "pagination": { "total_records": 1, "total_pages": 1, "current_page_number": 1, "page_size": 30 }
}
```

Mirrors [List availabilities](/api-reference/availabilities/list) in the API.

## Show an availability

```bash theme={"system"}
neetocal availabilities show <id>
```

```json Sample output (--json) theme={"system"}
{
  "data": {
    "availability": {
      "id": "01ea5ddf-ed00-4bed-bfa3-ba8ea80a856a",
      "sid": "2nq7q5c",
      "name": "Working hours",
      "default": true,
      "periods": [
        { "id": "21c812a7-3859-4f01-b214-850e6f11caad", "wday": "monday", "start_time": "09:00 AM", "end_time": "05:00 PM" },
        { "id": "6f5a1e2b-77c4-4a0d-9c3e-1b2f3a4d5e6f", "wday": "tuesday", "start_time": "09:00 AM", "end_time": "05:00 PM" }
      ],
      "overrides": [
        { "date": "2026-04-20", "periods": [] }
      ],
      "user": { "id": "b6d02dfa-8ef6-453d-b9f7-67a6f20bcaa6", "name": "Oliver Smith", "email": "oliver@example.com" }
    }
  }
}
```

Returns the availability's periods and overrides. Mirrors [Get availability](/api-reference/availabilities/get) in the API.

## Create an availability

```bash theme={"system"}
neetocal availabilities create \
  --email alice@co.com --name "Work hours" --time-zone "America/New_York" \
  --json-file periods.json
```

| Flag          | Type     | Required | Default | Description                              |
| ------------- | -------- | -------- | ------- | ---------------------------------------- |
| `--email`     | `string` |          |         | Email address                            |
| `--json-file` | `string` |          |         | Path to JSON file with periods/overrides |
| `--name`      | `string` |          |         | Availability name                        |
| `--time-zone` | `string` |          |         | Time zone                                |

The `--json-file` describes the weekly `periods` and any date `overrides`:

```json periods.json theme={"system"}
{
  "periods": [
    { "wday": "monday",  "start_time": "09:00", "end_time": "17:00" },
    { "wday": "tuesday", "start_time": "09:00", "end_time": "17:00" }
  ],
  "overrides": [
    { "date": "2026-04-20", "start_time": "00:00", "end_time": "00:00", "disabled": true }
  ]
}
```

```json Sample output (--json) theme={"system"}
{
  "data": {
    "availability": {
      "id": "01ea5ddf-ed00-4bed-bfa3-ba8ea80a856a",
      "sid": "2nq7q5c",
      "name": "Work hours",
      "default": false,
      "periods": [
        { "id": "21c812a7-3859-4f01-b214-850e6f11caad", "wday": "monday", "start_time": "09:00 AM", "end_time": "05:00 PM" },
        { "id": "6f5a1e2b-77c4-4a0d-9c3e-1b2f3a4d5e6f", "wday": "tuesday", "start_time": "09:00 AM", "end_time": "05:00 PM" }
      ],
      "overrides": [],
      "user": { "id": "b6d02dfa-8ef6-453d-b9f7-67a6f20bcaa6", "name": "Oliver Smith", "email": "oliver@example.com" }
    }
  }
}
```

Mirrors [Create availability](/api-reference/availabilities/create) in the API.

## Update an availability

```bash theme={"system"}
neetocal availabilities update <id> --name "Updated hours" --json-file periods.json
```

| Flag          | Type     | Required | Default | Description                        |
| ------------- | -------- | -------- | ------- | ---------------------------------- |
| `--json-file` | `string` |          |         | Path to JSON file with update data |
| `--name`      | `string` |          |         | Availability name                  |

```json Sample output (--json) theme={"system"}
{
  "data": {
    "message": "Availability updated successfully.",
    "availability": {
      "id": "01ea5ddf-ed00-4bed-bfa3-ba8ea80a856a",
      "sid": "2nq7q5c",
      "name": "Updated hours",
      "default": false,
      "periods": [
        { "id": "21c812a7-3859-4f01-b214-850e6f11caad", "wday": "monday", "start_time": "09:00 AM", "end_time": "05:00 PM" }
      ],
      "overrides": [],
      "user": { "id": "b6d02dfa-8ef6-453d-b9f7-67a6f20bcaa6", "name": "Oliver Smith", "email": "oliver@example.com" }
    }
  }
}
```

Only the fields you pass are changed. Mirrors [Update availability](/api-reference/availabilities/update) in the API.
