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

# Replace Canvas Items

> Replace the tiles on a canvas



## OpenAPI

````yaml put /v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items
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}/items:
    put:
      summary: Replace the tiles on a canvas
      description: Replace the tiles on a canvas
      operationId: PutV2ApiProjectsProjectIdWorkspacesWorkspaceIdCanvasesCanvasIdItems
      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/items
            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/items
            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/items
          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
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      favorite_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})$
                      x:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      'y':
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      w:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      h:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                    required:
                      - id
                      - favorite_id
                      - x
                      - 'y'
                      - w
                      - h
              required:
                - items
        required: true
      responses:
        '200':
          description: >-
            PUT
            /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/items
            Positive response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          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})$
                            canvas_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})$
                            favorite_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})$
                            x:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            'y':
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            w:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            h:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            created_at: {}
                            favorite:
                              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})$
                                organization_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})$
                                created_by_project_user_id:
                                  type:
                                    - string
                                    - 'null'
                                  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})$
                                type:
                                  type: string
                                  enum:
                                    - sql
                                    - chart
                                    - tool
                                name:
                                  type: string
                                thread_id:
                                  type:
                                    - string
                                    - 'null'
                                chart_config:
                                  type:
                                    - object
                                    - 'null'
                                  propertyNames:
                                    type: string
                                  additionalProperties: {}
                                chart:
                                  type: object
                                  properties:
                                    v:
                                      type: number
                                      const: 3
                                  required:
                                    - v
                                  additionalProperties: {}
                                  description: >-
                                    The chart as v3 (query, shape, render): its
                                    stored v3 chart, or its chartsV2 config
                                    converted
                                connection_id:
                                  type:
                                    - string
                                    - 'null'
                                  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})$
                                thumbnail_url:
                                  type:
                                    - string
                                    - 'null'
                                sql:
                                  type:
                                    - string
                                    - 'null'
                                snapshot_data:
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: object
                                    propertyNames:
                                      type: string
                                    additionalProperties: {}
                                is_archived:
                                  type: boolean
                                copied_from_favorite_id:
                                  description: >-
                                    For a canvas tile's own chart: the saved
                                    favorite it was copied from, if any
                                  type:
                                    - string
                                    - 'null'
                                  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})$
                                tool_call:
                                  description: >-
                                    For a tool tile (type tool): the API
                                    connector operation it calls (connectorKind,
                                    connectorId, toolName, pinnedArgs)
                                  type:
                                    - object
                                    - 'null'
                                  properties:
                                    connectorKind:
                                      type: string
                                      enum:
                                        - mcp
                                        - api
                                    toolName:
                                      type: string
                                  required:
                                    - connectorKind
                                    - toolName
                                  additionalProperties: {}
                                row_transform:
                                  description: >-
                                    For a tool tile: the BODY of the JavaScript
                                    function `transform(payload)` that turns the
                                    API's response into the tile's rows (a
                                    complete `function transform(payload) { ...
                                    }` is accepted too)
                                  type:
                                    - string
                                    - 'null'
                                row_columns:
                                  description: >-
                                    For a tool tile: the columns its transform
                                    returns
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                      type:
                                        type: string
                                    required:
                                      - name
                                      - type
                                    additionalProperties: {}
                                created_at: {}
                                updated_at: {}
                                workspace_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})$
                              required:
                                - id
                                - organization_id
                                - created_by_project_user_id
                                - type
                                - name
                                - thread_id
                                - chart_config
                                - chart
                                - connection_id
                                - thumbnail_url
                                - sql
                                - snapshot_data
                                - is_archived
                                - created_at
                                - updated_at
                                - workspace_id
                              additionalProperties: false
                          required:
                            - id
                            - canvas_id
                            - favorite_id
                            - x
                            - 'y'
                            - w
                            - h
                            - created_at
                          additionalProperties: false
                    required:
                      - items
                    additionalProperties: false
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: >-
            PUT
            /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/items
            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.