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

> Returns a list of the variables in the workspace.



## OpenAPI

````yaml openapi.json get /variables
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:
  /variables:
    get:
      tags:
        - Variables
      summary: Fetch variables
      description: Returns a list of the variables in the workspace.
      responses:
        '200':
          description: Returns an array of variables in the workspace
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - type: object
                      properties:
                        name:
                          type: string
                          pattern: ^[A-Za-z0-9_]+$
                        type:
                          type: string
                          enum:
                            - number
                        data:
                          type: object
                          properties:
                            example:
                              anyOf:
                                - type: number
                                  title: Number
                                - type: string
                                  title: String
                            fallback:
                              anyOf:
                                - type: number
                                  title: Number
                                - type: string
                                  title: String
                          required:
                            - example
                        id:
                          type: string
                      required:
                        - name
                        - type
                        - data
                        - id
                      title: Number
                    - type: object
                      properties:
                        name:
                          type: string
                          pattern: ^[A-Za-z0-9_]+$
                        type:
                          type: string
                          enum:
                            - string
                        data:
                          type: object
                          properties:
                            example:
                              type: string
                            fallback:
                              type: string
                          required:
                            - example
                        id:
                          type: string
                      required:
                        - name
                        - type
                        - data
                        - id
                      title: String
                    - type: object
                      properties:
                        name:
                          type: string
                          pattern: ^[A-Za-z0-9_]+$
                        type:
                          type: string
                          enum:
                            - hyperlink
                        data:
                          type: object
                          properties:
                            text:
                              type: string
                            url:
                              type: string
                          required:
                            - text
                            - url
                        id:
                          type: string
                      required:
                        - name
                        - type
                        - data
                        - id
                      title: Hyperlink
                    - type: object
                      properties:
                        name:
                          type: string
                          pattern: ^[A-Za-z0-9_]+$
                        type:
                          type: string
                          enum:
                            - list
                        data:
                          type: array
                          items:
                            type: string
                        id:
                          type: string
                      required:
                        - name
                        - type
                        - data
                        - id
                      title: List
                    - type: object
                      properties:
                        name:
                          type: string
                          pattern: ^[A-Za-z0-9_]+$
                        type:
                          type: string
                          enum:
                            - map
                        data:
                          type: object
                          additionalProperties:
                            type: string
                        id:
                          type: string
                      required:
                        - name
                        - type
                        - data
                        - id
                      title: Map
                example:
                  - id: Age
                    name: Age
                    type: number
                    data:
                      example: 21
                      fallback: '18'
                  - id: Jobs
                    name: Jobs
                    type: string
                    data:
                      example: Engineer
                      fallback: Designer
                  - id: Link
                    name: Link
                    type: hyperlink
                    data:
                      text: View
                      url: https://www.google.com/
                  - id: List
                    name: List
                    type: list
                    data:
                      - 'true'
                      - 'false'
                  - id: Map
                    name: Map
                    type: map
                    data:
                      '0': Zero
                      '1': One
                      '2': Two
      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.