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

# Delete Template Section

> Delete a section from a template with optional cascading of child sections. Database CASCADE handles deletion of associated rules.



## OpenAPI

````yaml /api-reference/openapi-v1.json delete /api/v1/templates/{template_id}/sections/{section_id}
openapi: 3.0.0
info:
  title: Artos API
  description: API for document generation, template management, and document organization
  version: 1.0.0
  contact:
    name: Artos Support
    email: internal@artosai.com
servers:
  - url: https://api.artosai.com
    description: Production server
  - url: http://localhost:8000
    description: Local development server
security:
  - bearerAuth: []
paths:
  /api/v1/templates/{template_id}/sections/{section_id}:
    delete:
      tags:
        - Templates
      summary: Delete Template Section
      description: >-
        Delete a section from a template with optional cascading of child
        sections. Database CASCADE handles deletion of associated rules.
      operationId: deleteTemplateSection
      parameters:
        - name: template_id
          in: path
          required: true
          description: UUID of template
          schema:
            type: string
        - name: section_id
          in: path
          required: true
          description: UUID of section to delete
          schema:
            type: string
        - name: cascade_children
          in: query
          required: false
          description: 'Whether to delete child sections with higher levels (default: true)'
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: Section deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteTemplateSectionResponse'
        '400':
          description: Invalid parameters
        '403':
          description: Not authorized
        '404':
          description: Template or section not found
components:
  schemas:
    DeleteTemplateSectionResponse:
      type: object
      properties:
        message:
          type: string
          description: Success message
        deleted_section_id:
          type: string
          description: UUID of deleted section
        deleted_count:
          type: integer
          default: 1
          description: Total sections deleted (including cascaded children)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token authentication. Token provides organization-scoped access.

````