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

# Add Charts to Dashboard

> Deep-copies charts onto a dashboard, below its existing charts — the v2 replacement for POST /v1/api/dashboard/add-charts. A project-user token can edit only dashboards in its own space; shared dashboards answer 409 SHARED_DASHBOARD_READ_ONLY (clone them first). Authenticate with an Upsolve API key or a project-user token (from /v1/api/projects/user-token, or /v1/api/tenant/register-tenant after migration).



## OpenAPI

````yaml post /v2/api/applications/{applicationId}/dashboards/{dashboardId}/charts
openapi: 3.1.0
info:
  title: Upsolve API
  version: 1.4.2
servers:
  - url: https://api.upsolve.ai
security: []
tags: []
paths:
  /v2/api/applications/{applicationId}/dashboards/{dashboardId}/charts:
    post:
      summary: Add charts to a dashboard
      description: >-
        Deep-copies charts onto a dashboard, below its existing charts — the v2
        replacement for POST /v1/api/dashboard/add-charts. A project-user token
        can edit only dashboards in its own space; shared dashboards answer 409
        SHARED_DASHBOARD_READ_ONLY (clone them first). Authenticate with an
        Upsolve API key or a project-user token (from
        /v1/api/projects/user-token, or /v1/api/tenant/register-tenant after
        migration).
      operationId: PostV2ApiApplicationsApplicationIdDashboardsDashboardIdCharts
      parameters:
        - name: applicationId
          in: path
          required: true
          description: >-
            ID of the application. List them with GET /v2/api/applications.
            After a v1 migration, each v1 workspace became one application —
            `legacyWorkspaceId` on the list says which.
          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: >-
              ID of the application. List them with GET /v2/api/applications.
              After a v1 migration, each v1 workspace became one application —
              `legacyWorkspaceId` on the list says which.
        - name: dashboardId
          in: path
          required: true
          description: ID of the dashboard to add charts to
          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: ID of the dashboard to add charts to
      requestBody:
        description: >-
          POST
          /v2/api/applications/:applicationId/dashboards/:dashboardId/charts
          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
                charts:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      chartId:
                        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: >-
                          ID of the chart to copy. Accepts a chart saved with
                          POST /v1/api/chart/save-from-chat, a chart on another
                          dashboard of this application, or a chart template of
                          this application.
                      chartVersion:
                        description: Version of the chart to copy. Defaults to the latest.
                        type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                    required:
                      - chartId
                  description: >-
                    Charts to add. Each is deep-copied (new ID) and appended
                    below the existing charts.
              required:
                - charts
        required: true
      responses:
        '200':
          description: >-
            POST
            /v2/api/applications/:applicationId/dashboards/:dashboardId/charts
            Positive response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    type: object
                    properties:
                      dashboardId:
                        type: string
                        description: ID of the updated dashboard
                      addedChartIds:
                        type: array
                        items:
                          type: string
                        description: >-
                          IDs of the chart copies now on the dashboard, in input
                          order
                    required:
                      - dashboardId
                      - addedChartIds
                    additionalProperties: false
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: >-
            POST
            /v2/api/applications/:applicationId/dashboards/:dashboardId/charts
            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_2: []
components:
  securitySchemes:
    APIKEY_2:
      type: apiKey
      in: header
      name: authorization

````