> For the complete documentation index, see [llms.txt](https://teamleader-sdk.mcore-services.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://teamleader-sdk.mcore-services.dev/api-reference/calendar/meetings.md).

# Meetings

Manage meetings in Teamleader Focus Calendar.

```php
Teamleader::meetings()
```

|                          |                                                                       |
| ------------------------ | --------------------------------------------------------------------- |
| Class                    | `McoreServices\TeamleaderSDK\Resources\Calendar\Meetings`             |
| Create / update / delete | ✓ / ✓ / ✓                                                             |
| Pagination               | `page_size` / `page_number`; no totals — a short page is the last one |

## Endpoints

* `meetings.complete`
* `meetings.createReport`
* `meetings.delete`
* `meetings.info`
* `meetings.list`
* `meetings.schedule`
* `meetings.update`

## Filters

Passed as the first argument to `list()`. Any other key throws.

| Filter          | Description                                                                  |
| --------------- | ---------------------------------------------------------------------------- |
| `employee_id`   | Filter by assigned employee UUID                                             |
| `end_date`      | Filter meetings up to this date (YYYY-MM-DD)                                 |
| `group_id`      | Filter by nextgen project group UUID (cannot be combined with milestone\_id) |
| `ids`           | Array of meeting UUIDs to filter by                                          |
| `milestone_id`  | Filter by legacy project milestone UUID (cannot be combined with group\_id)  |
| `recurrence_id` | Filter by recurring meeting series UUID                                      |
| `start_date`    | Filter meetings from this date (YYYY-MM-DD)                                  |
| `term`          | Search meetings by title or description                                      |

## Sorting

Pass `sort` (and optionally `sort_order`) in the options. Any other field throws.

| Field          | Description     |
| -------------- | --------------- |
| `scheduled_at` | Scheduled start |

## Includes

`list()` and `info()` accept the same includes:

`estimated_time`, `tracked_time`

## Accepted values

Public constants on the class. Body fields and enum values outside these lists throw before the request is sent.

| Constant               | Values                                                                                                                                                                     |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ATTENDEE_TYPES`       | `user`, `contact`                                                                                                                                                          |
| `CUSTOMER_TYPES`       | `contact`, `company`                                                                                                                                                       |
| `INCLUDES`             | `tracked_time`, `estimated_time`                                                                                                                                           |
| `REPORT_FIELDS`        | `attach_to`, `summary`, `custom_fields`                                                                                                                                    |
| `REPORT_TARGET_TYPES`  | `contact`, `company`, `deal`                                                                                                                                               |
| `REQUIRED_ON_SCHEDULE` | `title`, `starts_at`, `ends_at`, `attendees`                                                                                                                               |
| `SCHEDULE_FIELDS`      | `title`, `starts_at`, `ends_at`, `description`, `attendees`, `customer`, `location`, `project_id`, `group_id`, `milestone_id`, `deal_id`, `work_order_id`, `custom_fields` |
| `UPDATE_FIELDS`        | `title`, `starts_at`, `ends_at`, `description`, `attendees`, `customer`, `location`, `project_id`, `group_id`, `milestone_id`, `deal_id`, `custom_fields`                  |

## Methods

### `list()`

```php
list(array $filters = [], array $options = []): array
```

List meetings

* `$filters` — ids, employee\_id, start\_date, end\_date, milestone\_id, group\_id, term, recurrence\_id. group\_id (nextgen project group) cannot be combined with milestone\_id (legacy).
* `$options` — page\_size, page\_number, sort (scheduled\_at), sort\_order, include(s)

**Throws** `InvalidArgumentException` On an unknown filter key, option, sort field or include

### `info()`

```php
info($id, $includes = null): array
```

Get one meeting

* `$id` — Meeting UUID
* `$includes` — tracked\_time and/or estimated\_time

**Throws** `InvalidArgumentException` On an include meetings.info does not accept

### `schedule()`

```php
schedule(array $data): array
```

Schedule a meeting

Requires title, starts\_at, ends\_at and attendees, with at least one user attendee. `customer` is optional; until v2.2.12 the SDK required it.

project\_id and milestone\_id are mutually exclusive, and group\_id requires project\_id.

**Throws** `InvalidArgumentException` When a required field is missing, or a field or value is not accepted

### `update()`

```php
update($id, array $data): array
```

Update a meeting

If attendees is given it must include at least one user. customer, description, deal\_id, project\_id, group\_id and milestone\_id take null to clear them.

**Throws** `InvalidArgumentException` When a field or value is not accepted

### `delete()`

```php
delete($id, ...$additionalParams): array
```

Delete a meeting

### `complete()`

```php
complete($id): array
```

Mark meeting as complete

### `createReport()`

```php
createReport($meetingId, array $reportData): array
```

Create a report for a meeting

* `$reportData` — attach\_to \[type => contact|company|deal, id] (required), summary, custom\_fields

**Throws** `InvalidArgumentException`

### `withTrackedTime()`

```php
withTrackedTime(): self
```

Include tracked time in the next request

### `withEstimatedTime()`

```php
withEstimatedTime(): self
```

Include estimated time in the next request

### `forEmployee()`

```php
forEmployee($employeeId, array $options = []): array
```

Get meetings for a specific employee

### `today()`

```php
today(array $options = []): array
```

Get meetings for today

### `inDateRange()`

```php
inDateRange(string $startDate, string $endDate, array $options = []): array
```

Get meetings in date range

### `search()`

```php
search(string $term, array $options = []): array
```

Search meetings by term

## Examples

Get list of meetings with filtering:

```php
$meetings = Teamleader::meetings()->list(['employee_id' => 'employee-uuid']);
```

Get meeting details with tracked time:

```php
$meeting = Teamleader::meetings()->withTrackedTime()->info('meeting-uuid');
```

Schedule a new meeting:

```php
$meeting = Teamleader::meetings()->schedule([...]);
```

Mark a meeting as complete:

```php
Teamleader::meetings()->complete('meeting-uuid');
```

Create a report for completed meeting:

```php
$report = Teamleader::meetings()->createReport('meeting-uuid', [...]);
```
