> ## 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 a base

> Updates a base in your workspace.

At least one of `name`, `newDeveloperId`, or `githubRepo` must be provided. Changing a base's Developer ID changes how it's addressed in future requests, so any stored references to the old ID need updating too.

<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 patch /bases/{baseId}
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:
  /bases/{baseId}:
    patch:
      tags:
        - Bases
      summary: Update a base
      description: >-
        Updates a base in your workspace.


        At least one of `name`, `newDeveloperId`, or `githubRepo` must be
        provided. Changing a base's Developer ID changes how it's addressed in
        future requests, so any stored references to the old ID need updating
        too.


        <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 base to update
          required: true
          description: The Developer ID of the base to update
          name: baseId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  description: The new name of the base
                newDeveloperId:
                  type: string
                  minLength: 1
                  description: The new Developer ID of the base
                githubRepo:
                  type: string
                  minLength: 1
                  description: >-
                    The name of the GitHub repo to attach to the base, in the
                    form 'owner/repo'. Attaching a repo also kicks off a scan of
                    it.
              additionalProperties: false
              example:
                name: Web App
                newDeveloperId: web-app
                githubRepo: dittowords/web-app
      responses:
        '200':
          description: Returns the updated base
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The Developer ID of the base
                  name:
                    type: string
                    description: The name of the base
                  githubConnection:
                    type: object
                    nullable: true
                    properties:
                      repoId:
                        type: number
                        description: The stable ID of the GitHub repository
                      owner:
                        type: string
                        description: The owner of the GitHub repository
                      repo:
                        type: string
                        description: The name of the GitHub repository
                    required:
                      - repoId
                      - owner
                      - repo
                    description: The GitHub connection for the base, or null if none exists
                  scan:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                        description: The ID of the scan
                      url:
                        type: string
                        description: >-
                          Where to follow the scan's progress and review its
                          results in Ditto
                    required:
                      - id
                      - url
                    description: >-
                      The scan started by connecting a GitHub repo in this
                      request, or null if none was started
                required:
                  - id
                  - name
                  - githubConnection
                  - scan
                example:
                  name: Web App
                  id: web-app
                  githubConnection:
                    repoId: 123456789
                    owner: dittowords
                    repo: web-app
                  scan:
                    id: 6a1f3c9e2b7d4e0012a8f5c3
                    url: https://app.dittowords.com/scan/6a1f3c9e2b7d4e0012a8f5c3
        '400':
          description: >-
            Returned when the request body fails validation. Common causes
            include: no update field provided, an unrecognized field, or a
            `newDeveloperId` that's empty, too long, contains invalid
            characters, or is already taken in the workspace.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: At least one update field must be provided
        '404':
          description: >-
            Returned when `baseId` doesn't match any base in the workspace, or
            `githubRepo` doesn't match any repository installed in the
            workspace.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: 'Could not find base: web-app'
      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.