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

# Delete a template directory

> Delete every stored template under the directory ``path``.

Unlike the idempotent single-template delete, a directory matching nothing is a loud
``404`` (the provider's ``FileNotFoundError``). A key resolving to the template ROOT
would wipe the whole store, so it is refused with a ``400`` HERE, ahead of the provider;
a provider reporting a root violation as ``ValueError`` maps to ``400`` too.



## OpenAPI

````yaml /openapi.json post /api/delete-template-dir
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 0.6.2
servers: []
security: []
paths:
  /api/delete-template-dir:
    post:
      tags:
        - templates
      summary: Delete a template directory
      description: >-
        Delete every stored template under the directory ``path``.


        Unlike the idempotent single-template delete, a directory matching
        nothing is a loud

        ``404`` (the provider's ``FileNotFoundError``). A key resolving to the
        template ROOT

        would wipe the whole store, so it is refused with a ``400`` HERE, ahead
        of the provider;

        a provider reporting a root violation as ``ValueError`` maps to ``400``
        too.
      operationId: post_api_delete_template_dir
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateDirDelete'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                required:
                  - data
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Malformed request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Resource not found.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TemplateDirDelete:
      description: Delete every stored template under the directory ``path``.
      properties:
        path:
          title: Path
          type: string
      required:
        - path
      title: TemplateDirDelete
      type: object
    Error:
      properties:
        code:
          description: >-
            Stable machine-readable reason a client keys a dedicated error state
            on, present on refusals that opt in (e.g. a 501 not-configured
            refusal). Optional: absent when the error carries only a
            human-readable message.
          type: string
        error:
          type: string
      required:
        - error
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````