> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lonescale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a list

> Delete a list. The list must not be actively used by any workflows.



## OpenAPI

````yaml DELETE /lists/{listId}
openapi: 3.1.0
info:
  title: OpenAPI Lonescale
  description: A sample API for Lonescale
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://public-api.lonescale.com
security:
  - ApiKeyAuth: []
paths:
  /lists/{listId}:
    delete:
      description: Delete a list. The list must not be actively used by any workflows.
      parameters:
        - name: listId
          in: path
          required: true
          description: The ID of the list to delete.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The deleted list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List'
        '401':
          description: Invalid or missing authentication credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
              example:
                message: Invalid API Key
                error: Unauthorized
                statusCode: 401
        '403':
          description: List is currently used by one or more active workflows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: 'List is used by workflows: My Workflow'
                error: Forbidden
                statusCode: 403
        '404':
          description: List not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: List not found
                error: Not Found
                statusCode: 404
components:
  schemas:
    List:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the list.
        name:
          type: string
          description: Name of the list.
        entity:
          type: string
          enum:
            - COMPANY
            - PEOPLE
          description: The entity type of the list.
        description:
          type: string
          description: Description of the list.
        organizationId:
          type: string
          description: The organization this list belongs to.
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp.
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp.
    AuthError:
      required:
        - message
        - error
        - statusCode
      type: object
      properties:
        message:
          type: string
          example: Invalid API Key
        error:
          type: string
          example: Unauthorized
        statusCode:
          type: integer
          example: 401
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Provide your API key in the x-api-key header.

````