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

# Unpublished changes diff

> Compare the variant's draft state (files, settings, quizzes, A/B traffic weights) against its live published state and return a git-like diff: added, modified and deleted entries, with unified hunks and per-line changes for text content. Returns 400 if the lander is not published or has no changes to be published.



## OpenAPI

````yaml https://backend-v2.landerlab.workers.dev/api/v2/openapi.json get /api/v2/workspaces/{workspaceId}/editors/{variantId}/changes
openapi: 3.1.0
info:
  title: LanderLab API
  version: 2.0.0
  description: >-
    LanderLab public API. Authenticate with an API key using the X-API-Key
    header.
servers:
  - url: https://api.landerlab.dev
    description: Production
security: []
tags:
  - name: Account
    description: >-
      Discover the organization and workspaces your API key can access. Start
      here.
  - name: Workspaces
    description: List and manage workspaces.
  - name: Landers
    description: Create, update, publish and manage landers.
  - name: A/B Testing
    description: Manage variants and split-test weights.
  - name: Editor
    description: Load and save lander content and settings.
  - name: Analytics
    description: Query unified analytics across workspaces, landers and variants.
  - name: Leads
    description: Retrieve captured leads.
  - name: Integrations
    description: Manage account-level integrations.
  - name: Lander Integrations
    description: Attach and toggle integrations on landers.
  - name: Domains
    description: Manage custom domains.
  - name: Folders
    description: Organize landers into folders.
paths:
  /api/v2/workspaces/{workspaceId}/editors/{variantId}/changes:
    get:
      tags:
        - Editor
      summary: Unpublished changes diff
      description: >-
        Compare the variant's draft state (files, settings, quizzes, A/B traffic
        weights) against its live published state and return a git-like diff:
        added, modified and deleted entries, with unified hunks and per-line
        changes for text content. Returns 400 if the lander is not published or
        has no changes to be published.
      parameters:
        - name: variantId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: File changes between draft and published
          content:
            application/json:
              schema:
                type: object
                properties:
                  summary:
                    type: object
                    properties:
                      added:
                        type: number
                      modified:
                        type: number
                      deleted:
                        type: number
                      additions:
                        type: number
                      deletions:
                        type: number
                      settingsChanged:
                        type: boolean
                      quizzesChanged:
                        type: number
                      abTestChanged:
                        type: number
                    required:
                      - added
                      - modified
                      - deleted
                      - additions
                      - deletions
                      - settingsChanged
                      - quizzesChanged
                      - abTestChanged
                    additionalProperties: false
                  files:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        status:
                          type: string
                          enum:
                            - added
                            - modified
                            - deleted
                        binary:
                          type: boolean
                        additions:
                          type: number
                        deletions:
                          type: number
                        diffTooLarge:
                          type: boolean
                        hunks:
                          type: array
                          items:
                            type: object
                            properties:
                              oldStart:
                                type: number
                              oldLines:
                                type: number
                              newStart:
                                type: number
                              newLines:
                                type: number
                              lines:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - context
                                        - add
                                        - del
                                    content:
                                      type: string
                                    oldLine:
                                      anyOf:
                                        - type: number
                                        - type: 'null'
                                    newLine:
                                      anyOf:
                                        - type: number
                                        - type: 'null'
                                    ranges:
                                      type: array
                                      items:
                                        type: array
                                        prefixItems:
                                          - type: number
                                          - type: number
                                  required:
                                    - type
                                    - content
                                    - oldLine
                                    - newLine
                                  additionalProperties: false
                            required:
                              - oldStart
                              - oldLines
                              - newStart
                              - newLines
                              - lines
                            additionalProperties: false
                      required:
                        - path
                        - status
                        - binary
                        - additions
                        - deletions
                        - diffTooLarge
                        - hunks
                      additionalProperties: false
                  settings:
                    anyOf:
                      - type: object
                        properties:
                          status:
                            type: string
                            enum:
                              - added
                              - modified
                          additions:
                            type: number
                          deletions:
                            type: number
                          diffTooLarge:
                            type: boolean
                          hunks:
                            type: array
                            items:
                              type: object
                              properties:
                                oldStart:
                                  type: number
                                oldLines:
                                  type: number
                                newStart:
                                  type: number
                                newLines:
                                  type: number
                                lines:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - context
                                          - add
                                          - del
                                      content:
                                        type: string
                                      oldLine:
                                        anyOf:
                                          - type: number
                                          - type: 'null'
                                      newLine:
                                        anyOf:
                                          - type: number
                                          - type: 'null'
                                      ranges:
                                        type: array
                                        items:
                                          type: array
                                          prefixItems:
                                            - type: number
                                            - type: number
                                    required:
                                      - type
                                      - content
                                      - oldLine
                                      - newLine
                                    additionalProperties: false
                              required:
                                - oldStart
                                - oldLines
                                - newStart
                                - newLines
                                - lines
                              additionalProperties: false
                        required:
                          - status
                          - additions
                          - deletions
                          - diffTooLarge
                          - hunks
                        additionalProperties: false
                      - type: 'null'
                  quizzes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        status:
                          type: string
                          enum:
                            - added
                            - modified
                            - deleted
                        additions:
                          type: number
                        deletions:
                          type: number
                        diffTooLarge:
                          type: boolean
                        hunks:
                          type: array
                          items:
                            type: object
                            properties:
                              oldStart:
                                type: number
                              oldLines:
                                type: number
                              newStart:
                                type: number
                              newLines:
                                type: number
                              lines:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - context
                                        - add
                                        - del
                                    content:
                                      type: string
                                    oldLine:
                                      anyOf:
                                        - type: number
                                        - type: 'null'
                                    newLine:
                                      anyOf:
                                        - type: number
                                        - type: 'null'
                                    ranges:
                                      type: array
                                      items:
                                        type: array
                                        prefixItems:
                                          - type: number
                                          - type: number
                                  required:
                                    - type
                                    - content
                                    - oldLine
                                    - newLine
                                  additionalProperties: false
                            required:
                              - oldStart
                              - oldLines
                              - newStart
                              - newLines
                              - lines
                            additionalProperties: false
                      required:
                        - id
                        - name
                        - status
                        - additions
                        - deletions
                        - diffTooLarge
                        - hunks
                      additionalProperties: false
                  abTest:
                    type: array
                    items:
                      type: object
                      properties:
                        variantId:
                          anyOf:
                            - type: number
                            - type: 'null'
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        encryptedId:
                          type: string
                        liveWeight:
                          anyOf:
                            - type: number
                            - type: 'null'
                        draftWeight:
                          anyOf:
                            - type: number
                            - type: 'null'
                        status:
                          type: string
                          enum:
                            - added
                            - modified
                            - deleted
                      required:
                        - variantId
                        - name
                        - encryptedId
                        - liveWeight
                        - draftWeight
                        - status
                      additionalProperties: false
                required:
                  - summary
                  - files
                  - settings
                  - quizzes
                  - abTest
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key with ll_live_ prefix

````