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

# Get Availability

> Query open slots for one or more agents

## Endpoint

`GET https://api.apifycloud.io/api/v1/video/{appId}/availability`

## Authentication

Bearer token required.

Scope: `scheduling:read`

## Path parameters

* `appId` (UUID, required)

## Query parameters

| Name                  | Type    | Required | Notes                                                                                                                                                                                                                                                     |
| --------------------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fromUtc`             | string  | yes      | Window start (ISO-8601 UTC).                                                                                                                                                                                                                              |
| `toUtc`               | string  | yes      | Window end (ISO-8601 UTC).                                                                                                                                                                                                                                |
| `durationMinutes`     | number  | yes      | 5–480. Size of each candidate slot.                                                                                                                                                                                                                       |
| `agentId`             | string  | no       | Limit to a single agent. Defaults to every member with configured working hours.                                                                                                                                                                          |
| `stepMinutes`         | number  | no       | Grid resolution. Defaults to `durationMinutes`.                                                                                                                                                                                                           |
| `bufferBeforeMinutes` | number  | no       | Default 0.                                                                                                                                                                                                                                                |
| `bufferAfterMinutes`  | number  | no       | Default 0.                                                                                                                                                                                                                                                |
| `respectWorkingHours` | boolean | no       | Default `true`. When `true`, only slots inside an agent's configured working hours (or inside an `available_extra` exception) are returned — matches the console UI. Set to `false` to include slots outside those windows (conflict checks still apply). |

## Behavior

* Respects existing scheduled calls, blocked `agent_availability_exceptions`, and `agent_dnd_windows`.
* `available_extra` exceptions are honored as positive availability.
* Working hours are enforced by default (`respectWorkingHours=true`). Pass `respectWorkingHours=false` if your integration owns its own hours model and only wants the raw conflict data.

## Caps

* Max 400 candidate slots per request (time window × step × agents). Larger queries return `400 invalid_request`.
* No cached results — each call is fresh off the database.

## Response

```json theme={null}
{
  "data": {
    "slots": [
      {
        "startUtc": "2026-05-01T14:00:00.000Z",
        "endUtc": "2026-05-01T14:30:00.000Z",
        "agentId": "user_abc"
      },
      {
        "startUtc": "2026-05-01T14:30:00.000Z",
        "endUtc": "2026-05-01T15:00:00.000Z",
        "agentId": "user_abc"
      }
    ]
  }
}
```

## Errors

* `400 invalid_request` invalid range, duration out of bounds, or too many candidate slots
* `403 forbidden` unauthorized for app or missing scope
* `429 rate_limit_exceeded`
* `500 server_error`

## Example

```bash theme={null}
curl "https://api.apifycloud.io/api/v1/video/{appId}/availability?fromUtc=2026-05-01T12:00:00Z&toUtc=2026-05-01T20:00:00Z&durationMinutes=30&agentId=user_abc" \
  -H "Authorization: Bearer {access_token}"
```
