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

> Creates one or more bases in your workspace.

Pass `githubRepo` to attach a GitHub repository to a base as it's created. The repository must already be available to Ditto's GitHub app in your workspace, and each repository can only be attached to one base. Attaching a repository also kicks off an initial scan of it.

<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 /bases
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:
    post:
      tags:
        - Bases
      summary: Create bases
      description: >-
        Creates one or more bases in your workspace.


        Pass `githubRepo` to attach a GitHub repository to a base as it's
        created. The repository must already be available to Ditto's GitHub app
        in your workspace, and each repository can only be attached to one base.
        Attaching a repository also kicks off an initial scan of it.


        <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: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    minLength: 1
                    description: The name of the new base
                  developerId:
                    type: string
                    minLength: 1
                    description: >-
                      Optional preconfigured Developer ID for the base. Must be
                      unique within the workspace. If omitted, one is generated
                      from the name.
                  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.
                required:
                  - name
              minItems: 1
              description: The bases to create
              example:
                - name: Web App
                  developerId: web-app
                  githubRepo: dittowords/web-app
                - name: Mobile App
      responses:
        '200':
          description: Returns the created bases
          content:
            application/json:
              schema:
                type: array
                items:
                  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
                  - name: Mobile App
                    id: mobile-app
                    githubConnection: null
                    scan: null
        '400':
          description: >-
            Returned when the request body fails validation. Common causes
            include: a Developer ID repeated within the request, a Developer ID
            that's already taken in the workspace, or the same GitHub repository
            requested for more than one base.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: 'Duplicate developer ID found: web-app'
        '404':
          description: >-
            Returned when `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 GitHub repository with name
                  'dittowords/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.