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

# Create text items from a base

> Copies text items from a base into a project connected to that base.

The target project must already be connected to a base, and every ID in `baseTextItemIds` must belong to that base. Each base text item can only be copied into a project once; the request fails if any of them is already in the project.

By default the new text items will be placed in the project root. Pass `blockId` to place them in an existing block, or `newBlockName` to create a block for them. The two are mutually exclusive.

<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 /textItems/fromBase
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:
  /textItems/fromBase:
    post:
      tags:
        - Text Items
      summary: Create text items from a base
      description: >-
        Copies text items from a base into a project connected to that base.


        The target project must already be connected to a base, and every ID in
        `baseTextItemIds` must belong to that base. Each base text item can only
        be copied into a project once; the request fails if any of them is
        already in the project.


        By default the new text items will be placed in the project root. Pass
        `blockId` to place them in an existing block, or `newBlockName` to
        create a block for them. The two are mutually exclusive.


        <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.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                projectId:
                  type: string
                  description: >-
                    Developer ID of the Ditto project to add the new text items
                    to.
                baseTextItemIds:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  description: >-
                    Array of developer IDs of the base text items to copy into
                    the project.
                blockId:
                  type: string
                  description: >-
                    Optional: Developer ID of an existing block in the target
                    project to place the new text items in. Cannot be used with
                    `newBlockName`.
                newBlockName:
                  type: string
                  minLength: 1
                  description: >-
                    If provided, will create a new block in the project with
                    this name and place the new text items inside it. Cannot be
                    used with `blockId`.
              required:
                - projectId
                - baseTextItemIds
              example:
                projectId: my-project
                baseTextItemIds:
                  - welcome-header
                  - welcome-subheader
                newBlockName: Onboarding
      responses:
        '200':
          description: >-
            Returns a success flag once the text items have been created in the
            project
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether the text items were successfully
                      created.
                required:
                  - success
                example:
                  success: true
        '400':
          description: >-
            Returned when the target project isn't connected to a base, when
            both `blockId` and `newBlockName` are provided, or when a base text
            item has already been copied into the project.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: >-
                  Text items already exist in the target project for base text
                  items: welcome-header
        '404':
          description: >-
            Returned when `projectId` doesn't match any project in the
            workspace, or when a requested text item isn't in the project's
            connected base.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: 'Text items not found in the connected base: welcome-header'
      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.