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

> ## Agent Instructions
> These are Ditto's developer docs. Ditto is a single source of truth for product copy across design, review, localization, and code.
> The first step on any codebase is a scan: https://developer.dittowords.com/get-started/scan-your-repo.md. That page also covers reviewing the style guide Ditto drafts from the scan. After it, the follow-on guides are Connect Figma files and Set up localization (under /guides/) and Connect the Ditto MCP (the Setup page of the MCP reference).
> Two different MCP servers: the Ditto MCP server at https://api.dittowords.com/v2/mcp gives an agent a workspace's text and style guide rules; the documentation MCP server at https://developer.dittowords.com/mcp searches these docs.
> Prefer logging in with a Ditto account (npx -y @dittowords/cli@latest login; OAuth in MCP clients) over API keys. API keys are for CI and headless clients only.
> Commands are complete as written and use npx -y @dittowords/cli@latest; nothing needs a global install.

# Fetch unpublished component changes

> Returns the components in your workspace that have unpublished changes, with those changes applied.

Only available in workspaces that have opted into library component versioning.



## OpenAPI

````yaml openapi.json get /components/staged
openapi: 3.0.0
info:
  version: 1.0.0
  title: Ditto API
  description: Programmatically read and write data in your Ditto workspace.
servers:
  - url: https://api.dittowords.com/v2
security: []
paths:
  /components/staged:
    get:
      tags:
        - Components
      summary: Fetch unpublished component changes
      description: >-
        Returns the components in your workspace that have unpublished changes,
        with those changes applied.


        Only available in workspaces that have opted into library component
        versioning.
      parameters:
        - schema:
            type: string
            description: >-
              Stringified JSON filter object. Supports the following filter
              fields:

              - `folders`: array of objects with `id` (folder developer ID or
              `root` for root-level components) and optional
              `excludeNestedFolders` (boolean)

              - `variants`: array of objects with `id` (variant developer ID,
              `base`, or `all`)

              - `statuses`: array of status strings (`NONE`, `WIP`, `REVIEW`,
              `FINAL`). These are stored status keys; by default the web app and
              Figma plugin display them as NONE = "Draft", WIP = "In Progress",
              REVIEW = "In Review", FINAL = "Final" (a workspace may rename
              these or replace the set entirely, so none of these keys are
              guaranteed to exist — read the workspace's actual statuses from
              GET /v2/statuses or the list_statuses MCP tool rather than
              assuming this set).

              - `tags`: object with `values` (array of tag strings) and optional
              `operator` (`AND` or `OR`, defaults to `OR`)

              - `assignee`: email string to match assigned components, or `null`
              for unassigned

              - `integrated`: boolean value to filter by components that are or
              are not marked as integrated into development


              By default, only base text will be returned. Provide a variants
              filter to specify which variants of the filtered components to
              include.


              When pairing variants with a status or assignee filter, variant
              data will only be returned if both the base and variant
              status/assignee match the filter.


              By default, folder filters search for components in that folder
              and its folder children. To skip searching folder children for a
              given folder, set `excludeNestedFolders` to `true`.


              Example: `{"folders":[{"id":"folder-id"}, {"id":"folder-id-2",
              "excludeNestedFolders":true}], "variants":[{"id":"french"}],
              "statuses":["NONE","WIP","FINAL","REVIEW"],
              "tags":{"values":["tag-1","tag-2"],"operator":"AND"},
              "assignee":"user@example.com", "integrated":true}`
          required: false
          description: >-
            Stringified JSON filter object. Supports the following filter
            fields:

            - `folders`: array of objects with `id` (folder developer ID or
            `root` for root-level components) and optional
            `excludeNestedFolders` (boolean)

            - `variants`: array of objects with `id` (variant developer ID,
            `base`, or `all`)

            - `statuses`: array of status strings (`NONE`, `WIP`, `REVIEW`,
            `FINAL`). These are stored status keys; by default the web app and
            Figma plugin display them as NONE = "Draft", WIP = "In Progress",
            REVIEW = "In Review", FINAL = "Final" (a workspace may rename these
            or replace the set entirely, so none of these keys are guaranteed to
            exist — read the workspace's actual statuses from GET /v2/statuses
            or the list_statuses MCP tool rather than assuming this set).

            - `tags`: object with `values` (array of tag strings) and optional
            `operator` (`AND` or `OR`, defaults to `OR`)

            - `assignee`: email string to match assigned components, or `null`
            for unassigned

            - `integrated`: boolean value to filter by components that are or
            are not marked as integrated into development


            By default, only base text will be returned. Provide a variants
            filter to specify which variants of the filtered components to
            include.


            When pairing variants with a status or assignee filter, variant data
            will only be returned if both the base and variant status/assignee
            match the filter.


            By default, folder filters search for components in that folder and
            its folder children. To skip searching folder children for a given
            folder, set `excludeNestedFolders` to `true`.


            Example: `{"folders":[{"id":"folder-id"}, {"id":"folder-id-2",
            "excludeNestedFolders":true}], "variants":[{"id":"french"}],
            "statuses":["NONE","WIP","FINAL","REVIEW"],
            "tags":{"values":["tag-1","tag-2"],"operator":"AND"},
            "assignee":"user@example.com", "integrated":true}`
          name: filter
          in: query
        - schema:
            type: string
            enum:
              - html
              - html_paragraphs
            description: >-
              When set to `html` or `html_paragraphs`, includes HTML-formatted
              rich text in the response.

              - `html_paragraphs` wraps all text in `<p>` tags. Matches legacy
              behavior.

              - `html` exports without wrapping tags and uses `<br />` for line
              breaks.
          required: false
          description: >-
            When set to `html` or `html_paragraphs`, includes HTML-formatted
            rich text in the response.

            - `html_paragraphs` wraps all text in `<p>` tags. Matches legacy
            behavior.

            - `html` exports without wrapping tags and uses `<br />` for line
            breaks.
          name: richText
          in: query
      responses:
        '200':
          description: >-
            Returns an array of the components with unpublished changes that
            match the filter criteria
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: The Developer ID of the component
                    text:
                      type: string
                      description: >-
                        The plaintext content of the component. Returns the
                        variant's text when variantId is not null.
                    richText:
                      type: string
                      description: >-
                        If a `richText` parameter is provided, this field
                        contains the HTML-formatted version of the text,
                        generated according to the specified format option. Not
                        present if `richText` is omitted.
                    notes:
                      type: string
                      description: >-
                        The notes on the component. Returns the variant's notes
                        when variantId is not null.
                    characterLimit:
                      type: number
                      nullable: true
                      description: >-
                        The character limit set on this component, or null if no
                        limit is set. Returns the variant's character limit when
                        variantId is not null.
                    tags:
                      type: array
                      items:
                        type: string
                      description: >-
                        Array of tags associated with the component. Returns the
                        base tags value in all responses; variants do not have
                        their own tags.
                    integrated:
                      type: boolean
                      description: >-
                        Whether this component has been marked as integrated
                        into development
                    variableIds:
                      type: array
                      items:
                        type: string
                      description: >-
                        Array of Developer IDs of variables used in this base or
                        variant text
                    variantId:
                      type: string
                      nullable: true
                      description: The Developer ID of this variant, or null for base text
                    pluralForm:
                      type: string
                      nullable: true
                      enum:
                        - one
                        - two
                        - few
                        - many
                        - zero
                        - other
                        - null
                    folderId:
                      type: string
                      nullable: true
                      description: The Developer ID of the folder this component belongs to
                    name:
                      type: string
                      description: The name of the component
                    status:
                      type: string
                      description: >-
                        The status of the component. Returns the variant's
                        status when variantId is not null. These are stored
                        status keys; by default the web app and Figma plugin
                        display them as NONE = "Draft", WIP = "In Progress",
                        REVIEW = "In Review", FINAL = "Final" (a workspace may
                        rename these or replace the set entirely, so none of
                        these keys are guaranteed to exist — read the
                        workspace's actual statuses from GET /v2/statuses or the
                        list_statuses MCP tool rather than assuming this set).
                    assignee:
                      type: string
                      nullable: true
                      format: email
                      description: >-
                        The email of the user assigned to this component, or
                        null if unassigned. Returns the variant's assignee when
                        variantId is not null.
                    hasUnpublishedChanges:
                      type: boolean
                      description: >-
                        Whether the component has unpublished changes. Only
                        included in workspaces that have opted into library
                        component versioning.
                  required:
                    - id
                    - text
                    - notes
                    - characterLimit
                    - tags
                    - integrated
                    - variableIds
                    - variantId
                    - pluralForm
                    - folderId
                    - name
                    - status
                    - assignee
                example:
                  - id: component-id-1
                    name: Checkout Button
                    text: Place order
                    status: NONE
                    notes: Unpublished notes
                    characterLimit: null
                    tags:
                      - checkout
                    assignee: null
                    integrated: true
                    variableIds: []
                    folderId: null
                    variantId: null
                    pluralForm: null
                    richText: Place order
                    hasUnpublishedChanges: true
                  - id: component-id-1
                    name: Checkout Button
                    text: Passer la commande
                    status: WIP
                    notes: Unpublished notes
                    characterLimit: null
                    tags:
                      - checkout
                    assignee: null
                    integrated: true
                    variableIds: []
                    folderId: null
                    variantId: french
                    pluralForm: null
                    richText: Passer la commande
                    hasUnpublishedChanges: true
        '400':
          description: Returned when the filter isn't valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing why the request failed
                  details:
                    type: object
                    description: Optional additional error details
                required:
                  - message
              example:
                message: Invalid filter
        '404':
          description: >-
            Returned when the workspace hasn't opted into library component
            versioning
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing why the request failed
                  details:
                    type: object
                    description: Optional additional error details
                required:
                  - message
              example:
                message: This workspace hasn't opted into library component versioning
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````

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