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

# Send Test Email

> Send a test email using the specified template.

Args:
    template_id: Template ID to use for test email.
    test_request: Test email request with recipient and variables.
    request: FastAPI request object for accessing app state.

Returns:
    Success message with email details.

Raises:
    HTTPException: 404 if template not found, 400 if no email provider configured,
                  500 if sending fails.



## OpenAPI

````yaml post /api/v1/admin/email/templates/{template_id}/test
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/templates/{template_id}/test:
    post:
      tags:
        - admin
        - email
        - admin
        - email
      summary: Send Test Email
      description: |-
        Send a test email using the specified template.

        Args:
            template_id: Template ID to use for test email.
            test_request: Test email request with recipient and variables.
            request: FastAPI request object for accessing app state.

        Returns:
            Success message with email details.

        Raises:
            HTTPException: 404 if template not found, 400 if no email provider configured,
                          500 if sending fails.
      operationId: send_test_email_api_v1_admin_email_templates__template_id__test_post
      parameters:
        - name: template_id
          in: path
          required: true
          schema:
            type: string
            title: Template Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailTemplateTestRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Send Test Email Api V1 Admin Email Templates 
                  Template Id  Test Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EmailTemplateTestRequest:
      properties:
        recipient_email:
          type: string
          format: email
          title: Recipient Email
        variables:
          additionalProperties:
            type: string
          type: object
          title: Variables
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
      type: object
      required:
        - recipient_email
      title: EmailTemplateTestRequest
      description: |-
        Request schema for sending a test email.

        Attributes:
            recipient_email: Email address to send test email to.
            variables: Optional dictionary of variables for template rendering.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````