# Handbook API

> Read handbook pages and who confirmed reading them. GET /api/v1/handbook, GET /api/v1/handbook/{id}, GET /api/v1/handbook/{id}/confirmations.

3 operations. Each needs an API key with the permission shown; see [API keys and permissions](https://staffedly.com/docs/developers/api-keys).

| Operation | Permission |
| --- | --- |
| [`GET /api/v1/handbook`](#get-api-v1-handbook) | `handbook:read` |
| [`GET /api/v1/handbook/{id}`](#get-api-v1-handbook-id) | `handbook:read` |
| [`GET /api/v1/handbook/{id}/confirmations`](#get-api-v1-handbook-id-confirmations) | `handbook:read` |

## GET /api/v1/handbook

Handbook pages: who they are for, must-read, and the version that counts.

- **Permission:** `handbook:read`
- **Returns:** a page of records: `{ data, hasMore, nextCursor }`, status 200

**Query parameters** (all optional)

| Name | Description |
| --- | --- |
| `status` | draft or published. |
| `mustRead` | true for must-read pages only. |
| `includeArchived` | true to include archived pages. |
| `limit` | Rows per page, 1 to 200. Default 50. |
| `cursor` | The nextCursor value from the previous page. |

**Fields in each record:** `id`, `title`, `section`, `status`, `mustRead`, `version`, `readVersion`, `forStaff`, `forProviders`, `forContacts`, `staffRoles`, `roles`, `skills`, `facilityId`, `archived`, `publishedAt`, `updatedAt`

```bash
curl "https://app.staffedly.com/api/v1/handbook?limit=50" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY"
```

## GET /api/v1/handbook/{id}

One handbook page with its words (light markdown).

- **Permission:** `handbook:read`
- **Returns:** one record: `{ data }`, status 200

**Path**

| Name | Description |
| --- | --- |
| `id` | The record's id. |

**Fields in each record:** `id`, `title`, `section`, `status`, `mustRead`, `version`, `readVersion`, `forStaff`, `forProviders`, `forContacts`, `staffRoles`, `roles`, `skills`, `facilityId`, `archived`, `publishedAt`, `updatedAt`, `body`

```bash
curl "https://app.staffedly.com/api/v1/handbook/<id>" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY"
```

## GET /api/v1/handbook/{id}/confirmations

Who confirmed reading the page, and which version. One row per person per version.

- **Permission:** `handbook:read`
- **Returns:** a page of records: `{ data, hasMore, nextCursor }`, status 200

**Path**

| Name | Description |
| --- | --- |
| `id` | The record's id. |

**Query parameters** (all optional)

| Name | Description |
| --- | --- |
| `current` | true for confirmations that still count (the version everyone was last asked to confirm, or later). |
| `limit` | Rows per page, 1 to 200. Default 50. |
| `cursor` | The nextCursor value from the previous page. |

**Fields in each record:** `id`, `pageId`, `userId`, `providerId`, `name`, `version`, `via`, `confirmedAt`

```bash
curl "https://app.staffedly.com/api/v1/handbook/<id>/confirmations?limit=50" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY"
```

