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

# Get Booking Availability

> Retrieve available time slots for a meeting type

Returns available time slots for booking a meeting with a specific meeting type and optional host selection.

## Endpoint

```
GET /v4/booking-availability
```

## Request Headers

| Header          | Required | Description             |
| --------------- | -------- | ----------------------- |
| `Authorization` | Yes      | `Bearer <your-api-key>` |

<Info>
  This endpoint does not require the `x-meetergo-api-user-id` header as it queries availability for a meeting type.
</Info>

## Query Parameters

| Parameter               | Type      | Required | Description                                                                                                                                              |
| ----------------------- | --------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `meetingTypeId`         | string    | Yes      | The ID of the meeting type to check availability for                                                                                                     |
| `start`                 | string    | Yes      | Start date in `YYYY-MM-DD` format                                                                                                                        |
| `end`                   | string    | Yes      | End date in `YYYY-MM-DD` format                                                                                                                          |
| `hostIds`               | string    | No       | Comma-separated host user IDs. For round-robin meeting types, pass all host IDs from the queue                                                           |
| `queueId`               | string    | No       | Queue ID for round-robin meeting types                                                                                                                   |
| `calculationMethod`     | string    | No       | `anyone` (default) or `everyone`. With `anyone`, a slot is available if **any** host is free. With `everyone`, **all** hosts must be free simultaneously |
| `meetingDuration`       | number    | No       | Duration in minutes (for meeting types with multiple duration options)                                                                                   |
| `timezone`              | string    | No       | Timezone for returned slots (e.g., `Europe/Berlin`)                                                                                                      |
| `channel`               | string    | No       | Meeting channel (e.g., `local`, `zoom`, `phone`). Uses channel-specific availability if configured                                                       |
| `existingAppointmentId` | string    | No       | Appointment ID when rescheduling (ignores its blocked time)                                                                                              |
| `resourceChannelIds`    | string\[] | No       | Filter by specific resource channels (e.g., meeting rooms)                                                                                               |
| `troubleshoot`          | boolean   | No       | When `true`, returns diagnostic information about blocked slots                                                                                          |

<Warning>
  For **round-robin / queue meeting types**, always pass `hostIds` with the team member IDs. Without `hostIds`, the API uses the queue's distribution logic which may return availability for only one host.
</Warning>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.meetergo.com/v4/booking-availability?meetingTypeId=abc123&start=2024-01-15&end=2024-01-20&timezone=Europe/Berlin&hostIds=user1,user2,user3&queueId=queue123" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    meetingTypeId: 'abc123',
    start: '2024-01-15',
    end: '2024-01-20',
    timezone: 'Europe/Berlin',
    hostIds: 'user1,user2,user3',
    queueId: 'queue123'
  });

  const response = await fetch(
    `https://api.meetergo.com/v4/booking-availability?${params}`,
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );

  const availability = await response.json();
  ```

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

  response = requests.get(
      'https://api.meetergo.com/v4/booking-availability',
      params={
          'meetingTypeId': 'abc123',
          'start': '2024-01-15',
          'end': '2024-01-20',
          'timezone': 'Europe/Berlin',
          'hostIds': 'user1,user2,user3',
          'queueId': 'queue123'
      },
      headers={'Authorization': 'Bearer YOUR_API_KEY'}
  )

  availability = response.json()
  ```
</CodeGroup>

## Response

### Success (200 OK)

```json theme={null}
{
  "timezone": "Europe/Berlin",
  "timeframes": [
    {
      "start": "2024-01-15T08:00:00.000Z",
      "end": "2024-01-15T16:00:00.000Z"
    },
    {
      "start": "2024-01-16T08:00:00.000Z",
      "end": "2024-01-16T16:00:00.000Z"
    }
  ],
  "dates": [
    {
      "date": "2024-01-15",
      "spots": [
        { "startTime": "2024-01-15T09:00:00.000+01:00" },
        { "startTime": "2024-01-15T09:30:00.000+01:00" },
        { "startTime": "2024-01-15T10:00:00.000+01:00" },
        { "startTime": "2024-01-15T14:00:00.000+01:00" },
        { "startTime": "2024-01-15T14:30:00.000+01:00" }
      ]
    },
    {
      "date": "2024-01-16",
      "spots": [
        { "startTime": "2024-01-16T09:00:00.000+01:00" },
        { "startTime": "2024-01-16T11:00:00.000+01:00" },
        { "startTime": "2024-01-16T15:00:00.000+01:00" }
      ]
    }
  ],
  "earliestAvailableDate": "2024-01-15"
}
```

| Field                       | Description                                           |
| --------------------------- | ----------------------------------------------------- |
| `timezone`                  | The timezone used for the response                    |
| `timeframes`                | Array of available time windows (UTC)                 |
| `timeframes[].start`        | Start of the available window in ISO 8601 (UTC)       |
| `timeframes[].end`          | End of the available window in ISO 8601 (UTC)         |
| `dates`                     | Array of available dates with bookable spots          |
| `dates[].date`              | The date in `YYYY-MM-DD` format                       |
| `dates[].spots`             | Array of bookable time slots for the date             |
| `dates[].spots[].startTime` | Start time in ISO 8601 with timezone offset           |
| `earliestAvailableDate`     | The earliest date with available spots (`YYYY-MM-DD`) |

### Error Responses

#### 400 Bad Request - Meeting Type Not Found

```json theme={null}
{
  "statusCode": 400,
  "message": "Meeting type not found",
  "error": "Bad Request"
}
```

#### 401 Unauthorized

```json theme={null}
{
  "statusCode": 401,
  "message": "Invalid API key",
  "error": "Unauthorized"
}
```

## Notes

* The response respects the meeting type's buffer times, minimum booking notice, and maximum advance booking settings
* For round-robin meeting types, pass `hostIds` with all team members and `queueId` to get the combined availability of the team
* When `hostIds` is provided, only those specific hosts' availability is considered
* Connected calendar events (Google Calendar, Outlook, etc.) automatically block the corresponding time slots

<Tip>
  Don't know your meeting type ID? Go to [my.meetergo.com/meeting-types](https://my.meetergo.com/meeting-types), click on a meeting type, and copy the ID from the URL.
</Tip>

## Related Endpoints

<CardGroup cols={2}>
  <Card title="Availability Concepts" icon="clock" href="/developer-docs/core-concepts/availability">
    Learn about availability schedules and configuration
  </Card>

  <Card title="Create Booking" icon="calendar-plus" href="/api-reference/bookings/create-booking">
    Book a time slot
  </Card>
</CardGroup>
