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

# Create Canvas Link

> Make your own passkey-protected link to a canvas you own, or change its passkey or the saved version it shows. Visitors see the canvas as you see it, live.



## OpenAPI

````yaml put /v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/link
openapi: 3.1.0
info:
  title: Upsolve API
  version: 1.5.0
servers:
  - url: https://api.upsolve.ai
security: []
tags: []
paths:
  /v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/link:
    put:
      summary: Make your own passkey-protected link to a canvas …
      description: >-
        Make your own passkey-protected link to a canvas you own, or change its
        passkey or the saved version it shows. Visitors see the canvas as you
        see it, live.
      operationId: PutV2ApiProjectsProjectIdWorkspacesWorkspaceIdCanvasesCanvasIdLink
      parameters:
        - name: projectId
          in: path
          required: true
          description: The project in the URL. The caller's project user is read from it.
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
            description: The project in the URL. The caller's project user is read from it.
        - name: workspaceId
          in: path
          required: true
          description: >-
            PUT
            /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/link
            Parameter
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
        - name: canvasId
          in: path
          required: true
          description: >-
            PUT
            /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/link
            Parameter
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
      requestBody:
        description: >-
          PUT
          /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/link
          Request body
        content:
          application/json:
            schema:
              type: object
              properties:
                apiKey:
                  description: >-
                    Upsolve API key, generated under Account → Developer
                    settings in the Upsolve Hub. Keys are user-scoped: pass
                    organizationId alongside the key to select which org to act
                    on.
                  type: string
                  minLength: 1
                organizationId:
                  type: string
                  description: >-
                    The ID of the organization. Required when using Supabase JWT
                    authentication.
                connectionId:
                  type: string
                  description: The ID of the connection a guest has access to
                forProjectUserId:
                  description: >-
                    With an organization credential: the owner of the canvas
                    whose link this is (the Playground's previewed user).
                    Omitted, it is the builders' link on a canvas no project
                    user owns, which can only show saved rows. A project-user
                    token always acts on its own link.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                mode:
                  description: >-
                    What a visitor sees: `snapshot` (the charts' saved rows),
                    `live` (every chart run as you) or `both`. Defaults to
                    `snapshot` when making a link. Live and both need a passkey.
                  type: string
                  enum:
                    - live
                    - snapshot
                    - both
                passkey:
                  description: >-
                    The passkey a visitor must type, 6 to 72 bytes. Required for
                    a live or both link; optional on a snapshot one. On an
                    existing link, sets a new one. Never returned.
                  type: string
                  minLength: 6
                removePasskey:
                  description: >-
                    Remove the passkey, so anyone with the address can open the
                    link. A snapshot link's alone.
                  type: boolean
                version:
                  description: >-
                    The saved version of the canvas the link shows. Defaults to
                    the latest saved version when making a link; a canvas with
                    none must save one first.
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 9007199254740991
                aiChat:
                  description: >-
                    Whether the link offers its visitors a read-only AI chat
                    about the canvas, run as the link's owner. Only on a live or
                    both link, which has an owner and a passkey. Off when making
                    a link unless set; absent leaves it as it is.
                  type: boolean
              required: []
      responses:
        '200':
          description: >-
            PUT
            /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/link
            Positive response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    type: object
                    properties:
                      link:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                            description: The link's ID.
                          token:
                            type: string
                            description: >-
                              The link's secret part: the link opens at
                              /shared/canvas/<token> on the share host (or on
                              `customShareDomain` as /<token>).
                          mode:
                            type: string
                            enum:
                              - live
                              - snapshot
                              - both
                            description: >-
                              What a visitor sees: `snapshot`, the charts' saved
                              rows (no query runs); `live`, every chart run when
                              the link is opened, as the link's owner; `both`, a
                              toggle between the two. Live and both need a
                              passkey.
                          hasPasskey:
                            type: boolean
                            description: >-
                              Whether a visitor must type a passkey. Always, on
                              a live link.
                          version:
                            type:
                              - integer
                              - 'null'
                            exclusiveMinimum: 0
                            maximum: 9007199254740991
                          aiChat:
                            type: boolean
                            description: >-
                              Whether the link offers its visitors a read-only
                              AI chat about the canvas. Only on a live or both
                              link: the chat's queries run as the link's owner,
                              like its live charts, and can read any data the
                              owner can, so it is off until the owner turns it
                              on.
                          expiresAt: {}
                          createdAt:
                            description: When the link was made.
                          updatedAt:
                            description: >-
                              When its passkey, mode, version or AI chat last
                              changed.
                        required:
                          - id
                          - token
                          - mode
                          - hasPasskey
                          - version
                          - aiChat
                          - expiresAt
                          - createdAt
                          - updatedAt
                        additionalProperties: false
                      customShareDomain:
                        type:
                          - string
                          - 'null'
                      liveAllowed:
                        type: boolean
                        description: >-
                          Whether this link can be live: only one a project user
                          owns, since a live link runs as them.
                    required:
                      - link
                      - customShareDomain
                      - liveAllowed
                    additionalProperties: false
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: >-
            PUT
            /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/link
            Negative response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: error
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                    required:
                      - message
                    additionalProperties: false
                required:
                  - status
                  - error
                additionalProperties: false
      security:
        - APIKEY_3: []
components:
  securitySchemes:
    APIKEY_3:
      type: apiKey
      in: header
      name: authorization

````

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