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

# List Email Logs

> List email logs with optional filters and pagination.

Args:
    status_filter: Optional filter by status ('sent', 'failed', 'pending').
    template_type: Optional filter by template type.
    start_date: Optional filter by start date (ISO format).
    end_date: Optional filter by end date (ISO format).
    page: Page number (default: 1).
    page_size: Number of logs per page (default: 25, max: 100).

Returns:
    Paginated list of email logs.



## OpenAPI

````yaml get /api/v1/admin/email/logs
openapi: 3.1.0
info:
  title: SnackBase
  description: Open-source Backend-as-a-Service (BaaS)
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/admin/email/logs:
    get:
      tags:
        - admin
        - email
        - admin
        - email
      summary: List Email Logs
      description: |-
        List email logs with optional filters and pagination.

        Args:
            status_filter: Optional filter by status ('sent', 'failed', 'pending').
            template_type: Optional filter by template type.
            start_date: Optional filter by start date (ISO format).
            end_date: Optional filter by end date (ISO format).
            page: Page number (default: 1).
            page_size: Number of logs per page (default: 25, max: 100).

        Returns:
            Paginated list of email logs.
      operationId: list_email_logs_api_v1_admin_email_logs_get
      parameters:
        - name: status_filter
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status Filter
        - name: template_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Template Type
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Start Date
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: End Date
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
            title: Page
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            default: 25
            title: Page Size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailLogListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EmailLogListResponse:
      properties:
        logs:
          items:
            $ref: '#/components/schemas/EmailLogResponse'
          type: array
          title: Logs
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
      type: object
      required:
        - logs
        - total
        - page
        - page_size
      title: EmailLogListResponse
      description: |-
        Response schema for paginated email log list.

        Attributes:
            logs: List of email logs.
            total: Total number of logs matching the filters.
            page: Current page number.
            page_size: Number of logs per page.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EmailLogResponse:
      properties:
        id:
          type: string
          title: Id
        account_id:
          type: string
          title: Account Id
        template_type:
          type: string
          title: Template Type
        recipient_email:
          type: string
          title: Recipient Email
        provider:
          type: string
          title: Provider
        status:
          type: string
          title: Status
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        variables:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Variables
        sent_at:
          type: string
          format: date-time
          title: Sent At
      type: object
      required:
        - id
        - account_id
        - template_type
        - recipient_email
        - provider
        - status
        - sent_at
      title: EmailLogResponse
      description: |-
        Response schema for email log data.

        Attributes:
            id: Log ID (UUID string).
            account_id: Account ID this log belongs to.
            template_type: Template type used (e.g., 'email_verification').
            recipient_email: Email address of the recipient.
            provider: Email provider used (e.g., 'smtp', 'ses', 'resend').
            status: Delivery status ('sent', 'failed', 'pending').
            error_message: Error message if status is 'failed' (nullable).
            variables: Template variables used for rendering (nullable).
            sent_at: Timestamp when the email was sent or attempted.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````