> ## 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.

# Update a workspace iframe embed

> Update a workspace iframe embed by ID, from an embed snippet (JSON `customCode`), raw HTML (JSON `html`), or an HTML file sent as the request body (`Content-Type: text/html`). HTML input behaves exactly like the in-app Upload HTML button: full documents are wrapped in a sandboxed srcdoc iframe. Updates the embed code rendered in the workspace and directly in the published workspace view — no new publication is created and no publish side effects run. Returns 404 if the embed's iframe is no longer placed in a section on an existing workspace page (unless it backs a task action).

export const RateLimit = ({perMinute = 120}) => <Info>
    This endpoint is rate limited to <strong>{perMinute} requests per minute</strong> per
    company. See <a href="/api-reference/rate-limits">Rate limits</a> for details.
  </Info>;

<RateLimit />


## OpenAPI

````yaml patch /workspace-iframe-embeds/{id}
openapi: 3.1.0
info:
  title: Dock API
  description: >-
    The Dock API is a RESTful API that allows you to interact with Dock in a
    programmatic way
  termsOfService: https://www.dock.us/legal/terms
  contact:
    name: API Support
    email: developers@dock.us
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://api.dock.us/{version}
    description: Production server
    variables:
      version:
        default: v1
        enum:
          - v1
security:
  - bearerAuth: []
tags:
  - name: Status check
    description: API to check if the API is up
  - name: Accounts
    description: API to manage accounts
  - name: Assets
    description: API to manage assets
  - name: Asset share links
    description: API to retrieve asset share links
  - name: Files
    description: API to manage files
  - name: Forms
    description: API to retrieve forms and their responses
  - name: Meetings
    description: API to manage meetings and call transcripts
  - name: Tags
    description: API to manage tags
  - name: Users
    description: API to manage users
  - name: Workspaces
    description: API to manage workspaces
  - name: Templates
    description: API to manage templates
  - name: Workspace pages
    description: API to manage workspace pages
  - name: Workspace plans
    description: API to manage workspace plans
  - name: Workspace plan tasks
    description: API to manage workspace plan tasks
  - name: Workspace sections
    description: API to manage workspace sections
paths:
  /workspace-iframe-embeds/{id}:
    patch:
      tags:
        - Workspace iframe embeds
      description: >-
        Update a workspace iframe embed by ID, from an embed snippet (JSON
        `customCode`), raw HTML (JSON `html`), or an HTML file sent as the
        request body (`Content-Type: text/html`). HTML input behaves exactly
        like the in-app Upload HTML button: full documents are wrapped in a
        sandboxed srcdoc iframe. Updates the embed code rendered in the
        workspace and directly in the published workspace view — no new
        publication is created and no publish side effects run. Returns 404 if
        the embed's iframe is no longer placed in a section on an existing
        workspace page (unless it backs a task action).
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/workspaceIframeEmbedProperties'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Provide exactly one of `customCode` or `html`.
              properties:
                customCode:
                  type: string
                  maxLength: 200000
                  description: >-
                    An already-formed embed snippet (iframe HTML), stored
                    verbatim. Provide exactly one of `customCode` or `html`.
                  example: >-
                    <iframe src="https://example.com/embed" width="100%"
                    height="400"></iframe>
                html:
                  type: string
                  maxLength: 1048576
                  description: >-
                    Raw HTML for the embed — the API equivalent of the in-app
                    Upload HTML button. The markup is structurally validated
                    (400 on broken markup, with line/column), and a full HTML
                    document (`<!doctype html>`, `<html>`, `<head>` or `<body>`)
                    is wrapped in a sandboxed `srcdoc` iframe before being
                    stored as the embed code; fragments are stored as-is. Max
                    1MB. Provide exactly one of `customCode` or `html`.
                  example: <!doctype html><html><body><h1>Q3 Report</h1></body></html>
          text/html:
            schema:
              type: string
              maxLength: 1048576
              description: >-
                An HTML file sent as the raw request body (e.g. `curl
                --data-binary @index.html -H 'Content-Type: text/html'`).
                Equivalent to sending the file's contents in the JSON `html`
                field: validated, and full documents are wrapped in a sandboxed
                `srcdoc` iframe. Max 1MB (413 above).
              example: <!doctype html><html><body><h1>Q3 Report</h1></body></html>
      responses:
        '200':
          description: Update a workspace iframe embed by ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      workspaceIframeEmbed:
                        $ref: '#/components/schemas/WorkspaceIframeEmbed'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: >-
            The iframe embed belongs to a synced or collaborative section and
            cannot be updated via the API
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
components:
  parameters:
    id:
      name: id
      in: path
      example: RiHO4e0Ju3DS
      required: true
      description: Unique identifier
      schema:
        type: string
        example: RiHO4e0Ju3DS
    workspaceIframeEmbedProperties:
      name: properties
      in: query
      description: Select the workspace iframe embed properties that should be returned
      schema:
        type: array
        items:
          type: string
          enum:
            - customCode
            - thumbnailUrl
            - workspaceId
            - templateIframeEmbedId
            - createdAt
            - updatedAt
  schemas:
    WorkspaceIframeEmbed:
      allOf:
        - $ref: '#/components/schemas/BaseObject'
        - type: object
          properties:
            object:
              type: string
              description: Type of the object
              enum:
                - workspace-iframe-embed
              example: workspace-iframe-embed
              readOnly: true
            url:
              type: string
              example: https://api.dock.us/v1/workspace-iframe-embeds/RiHO4e0Ju3DS
              description: URL to the resource
              readOnly: true
            customCode:
              type: string
              description: The embed code (iframe HTML) rendered in the workspace
              example: >-
                <iframe src="https://example.com/embed" width="100%"
                height="400"></iframe>
            thumbnailUrl:
              type: string
              description: Thumbnail image of the rendered embed
              example: https://cdn.dock.us/thumbnails/RiHO4e0Ju3DS.png
              nullable: true
              readOnly: true
            workspaceId:
              type: string
              description: ID of the workspace the iframe embed belongs to
              example: RiHO4e0Ju3DS
              readOnly: true
            templateIframeEmbedId:
              type: string
              description: >-
                ID of the template iframe embed this workspace embed was created
                from
              example: RiHO4e0Ju3DS
              nullable: true
              readOnly: true
    BaseObject:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Id'
        updatedAt:
          type: string
          format: date-time
          description: Last updated date
          example: '2021-01-01T00:00:00.000Z'
          readOnly: true
        createdAt:
          type: string
          format: date-time
          description: Created at date
          example: '2021-01-01T00:00:00.000Z'
          readOnly: true
    Id:
      type: string
      description: Id of the object
      example: RiHO4e0Ju3DS
      readOnly: true
  responses:
    '400':
      description: >-
        The server cannot or will not process the request due to something that
        is perceived to be a client error (e.g., malformed request syntax,
        invalid request message framing, or deceptive request routing)
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    description: A short code indicating the error code returned
                    example: BAD_REQUEST
                  message:
                    type: string
                    description: A human readable explanation of what went wrong
                    example: >-
                      The request could not be understood or was missing
                      required parameters
                required:
                  - code
                  - message
            required:
              - error
    '401':
      description: >-
        Although the HTTP standard specifies "unauthorized", semantically this
        response means "unauthenticated". That is, the client must authenticate
        itself to get the requested response
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - UNAUTHORIZED
                    description: A short code indicating the error code returned
                    example: UNAUTHORIZED
                  message:
                    type: string
                    description: A human readable explanation of what went wrong
                    example: >-
                      Access denied. You are not authorized to access this
                      resource
                required:
                  - code
                  - message
            required:
              - error
    '403':
      description: >-
        The client does not have access rights to the content; that is, it is
        unauthorized, so the server is refusing to give the requested resource.
        Unlike 401 Unauthorized, the client's identity is known to the server
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - FORBIDDEN
                    description: A short code indicating the error code returned
                    example: FORBIDDEN
                  message:
                    type: string
                    description: A human readable explanation of what went wrong
                    example: Access to this resource is restricted
                required:
                  - code
                  - message
            required:
              - error
    '404':
      description: The server cannot find the requested resource
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - NOT_FOUND
                    description: A short code indicating the error code returned
                    example: NOT_FOUND
                  message:
                    type: string
                    description: A human readable explanation of what went wrong
                    example: The requested resource could not be found
                required:
                  - code
                  - message
            required:
              - error
    '429':
      description: >-
        The user has sent too many requests in a given amount of time ("rate
        limiting")
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - RATE_LIMIT_EXCEEDED
                    description: A short code indicating the error code returned
                    example: RATE_LIMIT_EXCEEDED
                  message:
                    type: string
                    description: A human readable explanation of what went wrong
                    example: Rate limit exceeded. Please try again later
                required:
                  - code
                  - message
            required:
              - error
    '500':
      description: The server has encountered a situation it does not know how to handle
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - INTERNAL_SERVER_ERROR
                    description: A short code indicating the error code returned
                    example: INTERNAL_SERVER_ERROR
                  message:
                    type: string
                    description: A human readable explanation of what went wrong
                    example: >-
                      The server has encountered a situation it does not know
                      how to handle
                required:
                  - code
                  - message
            required:
              - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````