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

# Remove an earlier email template version

> Removes a version from one template's version list for good. The version's sends are kept in your organization-wide counts, but the template never lists or activates it again. Saving identical copy later creates a new version with zero counts.

Pass `untracked` as `versionId` to remove the row for sends made before AI Presentations recorded template versions. Removing the Demand IQ default copy affects only this template.

You can't remove the template's active version. Doing so returns `409`. Returns `404` when email template performance isn't enabled for your organization, or the template or version isn't on the list, including a template that belongs to another organization.



## OpenAPI

````yaml /openapi.json delete /api/delivery/template-performance/{versionId}
openapi: 3.0.0
info:
  title: AI Presentations API
  version: 1.0.0
  description: >-
    REST API for AI Presentations — an AI-powered presentation platform with
    narrated slides, live Q&A, and deck management.


    **Authentication**: Most endpoints require a session cookie obtained from
    `POST /api/auth/login`. Presentation playback endpoints (`/api/qa`,
    `/api/narration/*`) also accept a `presentationId` for unauthenticated
    viewer access.
  contact:
    name: Demand IQ
    url: https://demand-iq.com
servers:
  - url: https://app.demand-iq.com
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: Decks
    description: Manage presentation decks
  - name: Slides
    description: Manage slides within a deck
  - name: FAQs
    description: Manage pre-built Q&A pairs
  - name: Branding
    description: Colors, logo, and call-to-action configuration
  - name: Q&A
    description: Live question answering and Q&A settings
  - name: Narration
    description: Text-to-speech synthesis
  - name: Presentations
    description: Create and manage personalized presentation instances
  - name: Generation
    description: AI-powered content generation from slide images
  - name: Images
    description: Image upload and management
  - name: Voices
    description: Available TTS voices
  - name: Utility
    description: Health check and diagnostics
  - name: Authentication
    description: Session-based login, logout, and identity
  - name: Company
    description: Organization contact info and knowledge base
  - name: Notifications
    description: Event subscriptions and delivery log
  - name: Contracts
    description: Contract template import and e-signature
  - name: Fonts
    description: Available Google Fonts for branding
  - name: Roof Measurements
    description: Request and track automated roof measurements
  - name: Actions
    description: Voice/text command detection for presentation control
  - name: Appointments
    description: Appointment scheduling for presentation viewers
  - name: Activity
    description: Recent presentation activity feed
  - name: Engagement
    description: Presentation engagement analytics
  - name: Onboarding
    description: >-
      Per-user product onboarding milestones (ENG-641). Milestone endpoints are
      idempotent and are called by the app UI — they should not be treated as
      tenant-integration surface.
paths:
  /api/delivery/template-performance/{versionId}:
    delete:
      tags:
        - Engagement
      summary: Remove an earlier email template version
      description: >-
        Removes a version from one template's version list for good. The
        version's sends are kept in your organization-wide counts, but the
        template never lists or activates it again. Saving identical copy later
        creates a new version with zero counts.


        Pass `untracked` as `versionId` to remove the row for sends made before
        AI Presentations recorded template versions. Removing the Demand IQ
        default copy affects only this template.


        You can't remove the template's active version. Doing so returns `409`.
        Returns `404` when email template performance isn't enabled for your
        organization, or the template or version isn't on the list, including a
        template that belongs to another organization.
      parameters:
        - in: path
          name: versionId
          required: true
          schema:
            oneOf:
              - type: string
                format: uuid
              - type: string
                enum:
                  - untracked
          example: 3f1c9a2e-7b4d-4e8a-9c21-5d6f0a8b1e47
          description: >-
            The template version ID, or `untracked` for the row of sends made
            before AI Presentations recorded template versions.
        - in: query
          name: deckId
          required: true
          schema:
            type: string
            format: uuid
          example: 8b2e4f10-3c6a-4d9e-a1f7-62c0b5d9e384
          description: The template whose version list to remove the version from.
      responses:
        '204':
          description: The version was removed from the template's list
        '400':
          description: Invalid `versionId` or `deckId`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            Email template performance isn't enabled for your organization, or
            the template or version isn't on the list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The version is the template's active version and can't be removed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
        - sessionCookie: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Demand IQ API key or service token, passed in the `Authorization:
        Bearer` header.
    sessionCookie:
      type: apiKey
      in: cookie
      name: session
      description: Session cookie obtained from `POST /api/auth/login`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.