> ## Documentation Index
> Fetch the complete documentation index at: https://developers.dock.us/llms.txt
> Use this file to discover all available pages before exploring further.

# Programmatic iFrame Updates

> Use an iFrame API ID to identify and update the corresponding iFrame widget in any workspace created from a template. This allows you to programmatically populate personalized or dynamic content across many workspaces.

Common use cases

* Client dashboards
* HTML Slides
* ROI calculators
* Custom content

## Setup Instructions

### Get iFrame API ID

1. In Dock, open the relevant workspace template.
2. Select **Add content**, then choose **iFrame**.
3. Add an empty iFrame widget to the template.
4. Hover over the iFrame widget and select the three-dot menu.
5. Select **Copy API ID**.

<img style={{ borderRadius: '8px' }} src="https://mintcdn.com/docklabsinc/21joUI_Uop5u8Hbo/images/iframe-embed-copy-api-id.png?fit=max&auto=format&n=21joUI_Uop5u8Hbo&q=85&s=44301116b1b226b2b24308574f3dadac" alt="Copy API ID for iFrame embed" width="1999" height="344" data-path="images/iframe-embed-copy-api-id.png" />

### Populate or update the iFrame

1. [Find an existing Workspace](https://developers.dock.us/api-reference/endpoint/workspaces/retrieve-a-workspace) or [create new Workspace](https://developers.dock.us/api-reference/endpoint/workspaces/create-a-workspace) from the template
2. [Find the iFrame embed](https://developers.dock.us/api-reference/endpoint/workspace-iframe-embeds/retrieve-a-workspace-iframe-embed) using its API ID
3. [Update the iFrame embed](https://developers.dock.us/api-reference/endpoint/workspace-iframe-embeds/update-a-workspace-iframe-embed) with your code or HTML file
