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

# Discard the draft

> Root and administrators. Drops the draft and keeps the published version.



## OpenAPI

````yaml /api-reference/endpoint/accounts/openapi.json post /accounts/email-template-discard
openapi: 3.0.3
info:
  title: quiva.ai Accounts API
  description: >-
    API for managing accounts, users, authentication, and payments in the
    quiva.ai platform
  version: 1.0.0
  contact:
    name: quiva.ai Support
    url: https://app.quiva.ai
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Account Management
    description: Operations related to account creation, updating, and deletion
  - name: User Management
    description: Operations related to user creation, updating, and deletion
  - name: Authentication
    description: Operations related to authentication and session management
  - name: API Keys
    description: Operations related to API key management
  - name: Multi-Factor Authentication
    description: Operations related to MFA setup and verification
  - name: Payment
    description: Operations related to subscription and payment management
  - name: Mesh Nodes
    description: Operations related to mesh node management
  - name: Integrations
    description: Machine identities and client credentials for task sync
  - name: Task Subscriptions
    description: Webhook subscriptions that push task events to your endpoint
  - name: Email Templates
    description: Account email templates used by flows, Abbie and the client sign-in email
  - name: Branding
    description: Sign-in branding and account images
  - name: Client Access
    description: Passwordless sign-in and invitations for client users
  - name: Sync Packages
    description: Install, upgrade and remove sync packages for an account
  - name: Terms
    description: Terms documents, provider terms and the acceptance log
  - name: Email Sending
    description: Sending identity and outbound email
  - name: Usage and Billing
    description: Cost events, billing events, credit budget and spend guard
  - name: Notifications
    description: In-app notifications for the signed-in user
  - name: Resource Access
    description: Per-user grants on resources such as spaces
  - name: Document Branding
    description: Account theme and logo used on generated documents
paths:
  /accounts/email-template-discard:
    post:
      tags:
        - Email Templates
      summary: Discard the draft
      description: >-
        Root and administrators. Drops the draft and keeps the published
        version.
      operationId: discardEmailTemplateDraft
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailTemplateKeyRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/EmailTemplate'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    EmailTemplateKeyRequest:
      type: object
      required:
        - key
      properties:
        key:
          type: string
    EmailTemplate:
      type: object
      description: >-
        One per account and key. A template holds a draft and a published
        version.
      properties:
        key:
          type: string
          description: Slug that flows and Abbie reference. Never changes after creation.
        name:
          type: string
        description:
          type: string
        draft:
          $ref: '#/components/schemas/EmailTemplateVersion'
        published:
          $ref: '#/components/schemas/EmailTemplateVersion'
        data:
          $ref: '#/components/schemas/EmailTemplateData'
        sample_data:
          type: object
          additionalProperties: true
          description: What the preview renders against
        tags:
          type: array
          items:
            type: string
          description: Every {tag} in the draft's subject, html and text
        source:
          type: string
          enum:
            - abbie
            - api
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
        published_at:
          type: string
          format: date-time
        published_by:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
    EmailTemplateVersion:
      type: object
      properties:
        subject:
          type: string
        html:
          type: string
        text:
          type: string
          description: Derived from the HTML at render time when empty
        notes:
          type: string
        data:
          $ref: '#/components/schemas/EmailTemplateData'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/EmailTemplateAttachment'
        saved_at:
          type: string
          format: date-time
        saved_by:
          type: string
    EmailTemplateData:
      type: object
      description: >-
        Record data a template merges. The caller loads it; a declared tag with
        no value renders blank.
      properties:
        record_configs:
          type: array
          items:
            type: string
          description: Whole record sets by config id
        fields:
          type: array
          items:
            type: string
          description: Exact `<config id>.<payload path>` fields
    EmailTemplateAttachment:
      type: object
      properties:
        key:
          type: string
        filename:
          type: string
          description: May hold {tags}
        size:
          type: integer
        type:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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