## Search colleagues to share my calendar with (tenant:access)

`GET /api/hr/v1/calendar/shares/candidates`

Module: HR · operationId: `searchCalendarShareCandidates` · Tag: Work entries · Auth: access token (`Authorization: Bearer <accessToken>`)

Active employees of the tenant whose name matches `q` (case-insensitive, part of the name; never matched on the e-mail address), the caller excluded,
sorted by name, at most 20. Only `id` and `name` are returned. Needs no `hr:read`. `q` has at least 2 characters
(else `400`); without an employee record `403 no_employee`.

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `q` | query | string | yes | Part of the name, at least 2 characters |

### Responses

- **200** The colleagues (`application/json`)
- **400** Error (`application/json`)
- **403** Error (`application/json`)

Fields of the 200 answer:

- `items` (array of CalendarShareCandidate, required): Matching colleagues, sorted by name (at most 20)
  - `id` (string (uuid), required): Id of the employee
  - `name` (string, required): Display name of the employee

Example 200 answer:

```json
{
  "items": [
    {
      "id": "c7e9a1b3-5d7f-4b2c-8e4a-6f8b0d2c4e06",
      "name": "Elias Gruber"
    },
    {
      "id": "2c4e6a8c-0e2a-4c4e-9a6c-0e2a4c6e8a60",
      "name": "Emma Maier"
    }
  ]
}
```

### Example request

```bash
curl -X GET 'https://api.mbcom.cloud/api/hr/v1/calendar/shares/candidates?q=string' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
