> ## 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.

# Delete a received email

> Removes the email and its attachments from storage.



## OpenAPI

````yaml /api-reference/endpoint/trigger/openapi.json delete /trigger/emails/{uid}
openapi: 3.0.3
info:
  title: quiva.ai Triggers API
  description: >-
    Manages the triggers that start automation in response to events — create,
    retrieve and delete gateway triggers (custom API endpoints that kick off a
    flow) and stream triggers (real-time data flowing from a source into a
    target).
  contact:
    name: quiva.ai Support
  version: '1.0'
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Triggers
    description: Gateway, stream and object store triggers
  - name: Email triggers
    description: Emails received by email triggers
paths:
  /trigger/emails/{uid}:
    delete:
      tags:
        - Email triggers
      summary: Delete a received email
      description: Removes the email and its attachments from storage.
      operationId: deleteEmail
      parameters:
        - name: uid
          in: path
          required: true
          description: Email uid
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Success message
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Email not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: >-
            Detailed error message explaining what went wrong and potential
            solutions.
          example: 'Invalid request: Missing required field'
        status_code:
          type: integer
          description: HTTP status code indicating the specific error type.
          example: 400
  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.