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

# Update text items from base

> Updates a project's text items to their base text item's version.

Each text item must be Outdated (only the base has changed) or in Conflict (both the project and the base have changed). Updating a text item in Conflict discards the project's changes to it. Text items in any other state are skipped rather than failing the request; the response lists each one with the reason.

<Badge color="blue" shape="pill">BETA</Badge> This endpoint is part of a feature that is still in development and will not be available until the feature has been released.



## OpenAPI

````yaml openapi.json post /projects/{projectId}/updateFromBase
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:
  /projects/{projectId}/updateFromBase:
    post:
      tags:
        - Projects
      summary: Update text items from base
      description: >-
        Updates a project's text items to their base text item's version.


        Each text item must be Outdated (only the base has changed) or in
        Conflict (both the project and the base have changed). Updating a text
        item in Conflict discards the project's changes to it. Text items in any
        other state are skipped rather than failing the request; the response
        lists each one with the reason.


        <Badge color="blue" shape="pill">BETA</Badge> This endpoint is part of a
        feature that is still in development and will not be available until the
        feature has been released.
      parameters:
        - schema:
            type: string
            description: The Developer ID of the project the text items are in
          required: true
          description: The Developer ID of the project the text items are in
          name: projectId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                textItemIds:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  description: >-
                    Developer IDs of the project text items to update to their
                    base text item's version. Each one must be Outdated or in
                    Conflict; any other text item is skipped.
              required:
                - textItemIds
              example:
                textItemIds:
                  - welcome-header
                  - welcome-subheader
      responses:
        '200':
          description: >-
            Returns the text items that were updated to the base's version, and
            those that were skipped
          content:
            application/json:
              schema:
                type: object
                properties:
                  updated:
                    type: array
                    items:
                      type: string
                    description: >-
                      Developer IDs of the text items updated to the base's
                      version
                  skipped:
                    type: array
                    items:
                      type: object
                      properties:
                        textItemId:
                          type: string
                          description: The Developer ID of the skipped text item
                        reason:
                          type: string
                          enum:
                            - unmodified
                            - modified
                            - new
                            - base_text_item_not_found
                          description: >-
                            One of: `unmodified` (already matches the base),
                            `modified` (the project has changes the base doesn't
                            have, so updating it would discard them. Publish it
                            with `POST /v2/projects/:projectId/publish` first,
                            then update it if the base changed other parts too),
                            `new` (not in the base yet, so there's no base
                            version to update to. Publish it with `POST
                            /v2/projects/:projectId/publish` to add it),
                            `base_text_item_not_found` (the base text item it
                            was linked to no longer exists).
                      required:
                        - textItemId
                        - reason
                    description: >-
                      Named text items that were not updated, each with the
                      reason
                required:
                  - updated
                  - skipped
                example:
                  updated:
                    - welcome-header
                  skipped:
                    - textItemId: welcome-subheader
                      reason: modified
        '400':
          description: >-
            Returned when the project doesn't exist, the project isn't connected
            to a base, or a requested text item isn't in the project.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: >-
                  1 text item with developer ID welcome-header not found in
                  project my-project
      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.