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

# Get an HTML block's render URL

> Returns the API-relative `path` an HTML block renders from: a page for an iframe, signed for one hour, and `widget`: whether the caller may run the widget's connected data on the document `documentId` (by default the HTML's own document), or null for a widget without connections.

Requires access to the document the HTML belongs to.



## OpenAPI

````yaml get /media/html/{htmlId}/render-url
openapi: 3.1.0
info:
  title: HERO API
  version: current
  description: |-
    The HERO REST API.

    See https://developers.myhero.so for the rendered docs.
servers:
  - url: https://app.myhero.so
security: []
paths:
  /media/html/{htmlId}/render-url:
    get:
      tags:
        - Media
      summary: Get an HTML block's render URL
      description: >-
        Returns the API-relative `path` an HTML block renders from: a page for
        an iframe, signed for one hour, and `widget`: whether the caller may run
        the widget's connected data on the document `documentId` (by default the
        HTML's own document), or null for a widget without connections.


        Requires access to the document the HTML belongs to.
      operationId: getHtmlRenderUrl
      parameters:
        - schema:
            type: string
            minLength: 1
          required: true
          name: htmlId
          in: path
        - schema:
            type: string
            minLength: 1
          required: false
          name: documentId
          in: query
      responses:
        '200':
          description: 200 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      path:
                        type: string
                      widget:
                        anyOf:
                          - type: object
                            properties:
                              status:
                                type: string
                                enum:
                                  - ok
                              viewer:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  name:
                                    type: string
                                required:
                                  - name
                              connections:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    alias:
                                      type: string
                                    kind:
                                      type: string
                                      enum:
                                        - table
                                    tableId:
                                      type: string
                                    name:
                                      type: string
                                    columns:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                          name:
                                            type: string
                                        required:
                                          - id
                                          - name
                                    uses:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - read
                                          - add
                                          - edit
                                          - delete
                                  required:
                                    - alias
                                    - kind
                                    - tableId
                                    - name
                                    - columns
                                    - uses
                              switches:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - createUnreachable
                                    - showUnreachable
                              setterName:
                                type: string
                              isSetter:
                                type: boolean
                            required:
                              - status
                              - viewer
                              - connections
                              - switches
                              - setterName
                              - isSetter
                          - type: object
                            properties:
                              status:
                                type: string
                                enum:
                                  - disabled
                                  - needs-setup
                              reason:
                                type: string
                              connections:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    alias:
                                      type: string
                                    kind:
                                      type: string
                                      enum:
                                        - table
                                    tableId:
                                      type: string
                                    name:
                                      type: string
                                    columns:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                          name:
                                            type: string
                                        required:
                                          - id
                                          - name
                                    uses:
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - read
                                          - add
                                          - edit
                                          - delete
                                  required:
                                    - alias
                                    - kind
                                    - tableId
                                    - name
                                    - columns
                                    - uses
                              switches:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - createUnreachable
                                    - showUnreachable
                              setterName:
                                type: string
                              isSetter:
                                type: boolean
                            required:
                              - status
                              - reason
                              - connections
                              - switches
                              - setterName
                              - isSetter
                          - type: 'null'
                    required:
                      - path
                      - widget
                required:
                  - data
        '403':
          description: 403 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: |-
                      Error class name (e.g.

                      ValidationError, NotFound)
                  message:
                    type: string
                    description: Human-readable error message
                  details:
                    type: array
                    items: {}
                required:
                  - error
                  - message
        '404':
          description: 404 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: |-
                      Error class name (e.g.

                      ValidationError, NotFound)
                  message:
                    type: string
                    description: Human-readable error message
                  details:
                    type: array
                    items: {}
                required:
                  - error
                  - message
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: HERO personal access token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.