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

# Get Draft Diff

> Diff the draft against its base version



## OpenAPI

````yaml get /v2/api/projects/{projectId}/workspaces/{workspaceId}/draft/diff
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}/draft/diff:
    get:
      summary: Diff the draft against its base version
      description: Diff the draft against its base version
      operationId: GetV2ApiProjectsProjectIdWorkspacesWorkspaceIdDraftDiff
      parameters:
        - name: apiKey
          in: query
          required: false
          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.
          schema:
            type: string
            minLength: 1
            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.
            examples:
              - up_embed_************
          examples:
            example1:
              value: up_embed_************
        - name: organizationId
          in: query
          required: false
          description: >-
            Your Upsolve organization's UUID — the org that owns the API key and
            project. This is NOT a project organization: do not pass a value
            registered via /projects/register-organization, and do not pass an
            `externalId` (only `projectOrganizationId` accepts those). Omit it
            when using an org-bound API key — the org is read from the key and
            any value sent here is ignored. Required only for user-scoped API
            keys (created under Account → Developer settings) and for the
            Supabase JWT path, where the org is ambiguous and membership is
            verified against it.
          schema:
            description: >-
              Your Upsolve organization's UUID — the org that owns the API key
              and project. This is NOT a project organization: do not pass a
              value registered via /projects/register-organization, and do not
              pass an `externalId` (only `projectOrganizationId` accepts those).
              Omit it when using an org-bound API key — the org is read from the
              key and any value sent here is ignored. Required only for
              user-scoped API keys (created under Account → Developer settings)
              and for the Supabase JWT path, where the org is ambiguous and
              membership is verified against it.
            examples:
              - 123e4567-e89b-12d3-a456-426614174000
            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})$
          examples:
            example1:
              value: 123e4567-e89b-12d3-a456-426614174000
        - name: projectId
          in: path
          required: true
          description: >-
            GET /v2/api/projects/:projectId/workspaces/:workspaceId/draft/diff
            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: workspaceId
          in: path
          required: true
          description: >-
            GET /v2/api/projects/:projectId/workspaces/:workspaceId/draft/diff
            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})$
      responses:
        '200':
          description: >-
            GET /v2/api/projects/:projectId/workspaces/:workspaceId/draft/diff
            Positive response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    type: object
                    properties:
                      baseVersion:
                        type:
                          - number
                          - 'null'
                      hasChanges:
                        type: boolean
                      tables:
                        type: object
                        properties:
                          added:
                            type: array
                            items:
                              type: string
                          removed:
                            type: array
                            items:
                              type: string
                          modified:
                            type: array
                            items:
                              type: object
                              properties:
                                table:
                                  type: string
                                fields:
                                  type: array
                                  items:
                                    type: string
                                columns:
                                  type: object
                                  properties:
                                    added:
                                      type: array
                                      items:
                                        type: string
                                    removed:
                                      type: array
                                      items:
                                        type: string
                                    modified:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          column:
                                            type: string
                                          fields:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - column
                                          - fields
                                        additionalProperties: false
                                  required:
                                    - added
                                    - removed
                                    - modified
                                  additionalProperties: false
                              required:
                                - table
                                - fields
                                - columns
                              additionalProperties: false
                        required:
                          - added
                          - removed
                          - modified
                        additionalProperties: false
                      rls:
                        type: object
                        properties:
                          added:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                              required:
                                - id
                                - name
                              additionalProperties: false
                          removed:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                              required:
                                - id
                                - name
                              additionalProperties: false
                          modified:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                              required:
                                - id
                                - name
                              additionalProperties: false
                        required:
                          - added
                          - removed
                          - modified
                        additionalProperties: false
                      knowledgeBase:
                        type: object
                        properties:
                          added:
                            type: array
                            items:
                              type: string
                          removed:
                            type: array
                            items:
                              type: string
                          modified:
                            type: array
                            items:
                              type: string
                        required:
                          - added
                          - removed
                          - modified
                        additionalProperties: false
                      settings:
                        type: object
                        properties:
                          prompts:
                            type: array
                            items:
                              type: string
                              enum:
                                - systemPrompt
                                - sqlGenPrompt
                                - chartGenPrompt
                                - workingMemoryPrompt
                          skills:
                            type: object
                            properties:
                              added:
                                type: array
                                items:
                                  type: string
                              removed:
                                type: array
                                items:
                                  type: string
                              modified:
                                type: array
                                items:
                                  type: string
                            required:
                              - added
                              - removed
                              - modified
                            additionalProperties: false
                          assets:
                            type: object
                            properties:
                              added:
                                type: array
                                items:
                                  type: string
                              removed:
                                type: array
                                items:
                                  type: string
                            required:
                              - added
                              - removed
                            additionalProperties: false
                            description: >-
                              Golden-asset membership: what the agent retrieves
                              from.
                          testCases:
                            type: object
                            properties:
                              added:
                                type: array
                                items:
                                  type: string
                              removed:
                                type: array
                                items:
                                  type: string
                            required:
                              - added
                              - removed
                            additionalProperties: false
                            description: 'Test-suite membership: what a test run replays.'
                          theme:
                            type: array
                            items:
                              type: string
                              enum:
                                - prompt
                                - url
                                - logo
                                - files
                                - design
                            description: The parts of the theme the draft changed
                          defaultView:
                            type: array
                            items:
                              type: string
                              enum:
                                - canvasId
                            description: >-
                              The parts of the default view the draft changed:
                              `canvasId` when it opens on a different canvas, or
                              on the AI chat instead of one
                          canvasTimeZone:
                            type: array
                            items:
                              type: string
                              enum:
                                - timeZone
                                - followsViewer
                            description: >-
                              The parts of the canvases' time zone the draft
                              changed: `timeZone` when it names another zone,
                              `followsViewer` when it starts or stops following
                              each viewer's own
                        required:
                          - prompts
                          - skills
                          - assets
                          - testCases
                          - theme
                        additionalProperties: false
                    required:
                      - baseVersion
                      - hasChanges
                      - tables
                      - rls
                      - knowledgeBase
                      - settings
                    additionalProperties: false
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: >-
            GET /v2/api/projects/:projectId/workspaces/:workspaceId/draft/diff
            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: query
      name: apiKey

````

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