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

# Delete variables

> Permanently deletes variables from your workspace. This can't be undone. A variable still used by a text item or library component can't be deleted, and one such variable rejects the whole request, so either every variable is deleted or none is.



## OpenAPI

````yaml openapi.json delete /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:
    delete:
      tags:
        - Variables
      summary: Delete variables
      description: >-
        Permanently deletes variables from your workspace. This can't be undone.
        A variable still used by a text item or library component can't be
        deleted, and one such variable rejects the whole request, so either
        every variable is deleted or none is.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                names:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  description: >-
                    Names of the variables to delete, which are also their
                    developer IDs. All must exist, and none can still be used by
                    a text item or library component.
              required:
                - names
              example:
                names:
                  - user_name
                  - help_link
      responses:
        '200':
          description: Returns the names of the deleted variables
          content:
            application/json:
              schema:
                type: object
                properties:
                  names:
                    type: array
                    items:
                      type: string
                    description: Names of the deleted variables
                required:
                  - names
                example:
                  names:
                    - user_name
                    - help_link
        '400':
          description: >-
            Returned when a variable is still used by a text item or library
            component.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: Returned when a name doesn't match any variable in the workspace.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: 'Variable name not found: user_name'
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````