# List invites

Operation ID: `patient.commsListInvites`

Return CareConnect invites for the caller's tenant. Requires a Bearer JWT (any authenticated pool type).

## Public method

`listInvites`

Signature: `patient.listInvites()`

Return type: `Promise<ListInvitesResponse>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`GET /communications/invites`

## Path parameters

None.

## Query parameters

None.

## Body parameters

None.

Request model: None.

## Request example

None declared in canonical OpenAPI.

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`CommsListInvitesResponse`](../models/CommsListInvitesResponse.md) | application/json | Invites |

## Success response examples

### 200

```json
{
  "invites": [
    {
      "channel": "email",
      "createdAt": "2026-08-10T23:37:17Z",
      "destination": "test.user@example.com",
      "id": "invite-example-001",
      "inviteCode": "INVITE-EXAMPLE-001",
      "name": "Test User",
      "role": "patient",
      "status": "sent"
    }
  ],
  "total": 1
}
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
| `403` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The caller's token carries no tenant context |

## Error examples

### 401 — Missing or invalid access token

```json
{
  "error": "Authorization required"
}
```

### 403 — Tenant context unavailable

```json
{
  "error": "Tenant context unavailable"
}
```

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
```

```ts
const result = await patient.listInvites();
```

## cURL

```bash
curl -X GET \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  'https://dev-api-patient.health.cloud/communications/invites'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
