# Whiteboards

Whiteboards and their canvas contents, optionally linked to an opportunity.

**Base URL:** `https://api.trustpager.com/functions/v1/api/v1`

## Endpoints

### POST /whiteboards/:whiteboard_id/elements

Append elements to the current whiteboard canvas without wiping what is already there.

**Scopes:** `whiteboards:write` — [full detail](./whiteboards/post-whiteboards-whiteboard-id-elements.md)

### POST /whiteboards

Create a whiteboard. Starts empty; use set_whiteboard_content to add a diagram.

**Scopes:** `whiteboards:write` — [full detail](./whiteboards/post-whiteboards.md)

### DELETE /whiteboards/:whiteboard_id

Delete a whiteboard and its canvas.

**Scopes:** `whiteboards:delete` — [full detail](./whiteboards/delete-whiteboards-whiteboard-id.md)

### POST /whiteboards/:whiteboard_id/duplicate

Clone a whiteboard and its current canvas into a new board.

**Scopes:** `whiteboards:write` — [full detail](./whiteboards/post-whiteboards-whiteboard-id-duplicate.md)

### GET /whiteboards/:whiteboard_id

Fetch a whiteboard with its current canvas elements, appState and files.

**Scopes:** `whiteboards:read` — [full detail](./whiteboards/get-whiteboards-whiteboard-id.md)

### GET /whiteboards

List whiteboards in the workspace. Filter by opportunity_id or search by name.

**Scopes:** `whiteboards:read` — [full detail](./whiteboards/get-whiteboards.md)

### PUT /whiteboards/:whiteboard_id/content

Replace the entire whiteboard canvas with an array of Excalidraw elements (rectangle, ellipse, diamond, arrow, line, text). Minimal elements are auto-completed. NOTE: an open builder tab reads content on load and auto-saves over external changes — close/reopen the board to see the result.

**Scopes:** `whiteboards:write` — [full detail](./whiteboards/put-whiteboards-whiteboard-id-content.md)

### PATCH /whiteboards/:whiteboard_id

Update a whiteboard name, description, or linked opportunity.

**Scopes:** `whiteboards:write` — [full detail](./whiteboards/patch-whiteboards-whiteboard-id.md)
