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

# Get email templates

> Get email templates with optional filters



## OpenAPI

````yaml /openapi.json get /api/email/template
openapi: 3.0.0
info:
  description: >-
    Public REST API for Benchmark Email.


    Authenticate every request by including your API key in the `X-API-Key`
    header.

    Each key is issued with one or more scopes that control which endpoints it
    may call.


    Rate limits: 60 requests per minute per account.

    Monthly quota: determined by your subscription plan.
  title: Benchmark Email API
  version: 1.0.0
servers:
  - description: >-
      Your account's API base URL. Copy the full URL shown on Settings > API
      Keys in your Benchmark Email account and paste it here.
    url: '{apiBaseUrl}'
    variables:
      apiBaseUrl:
        default: ''
        description: >-
          Your account's API base URL. Copy it from Settings > API Keys in your
          Benchmark Email account.
security:
  - apiKeyAuth: []
tags:
  - description: Contact related endpoints
    name: contact
  - description: Contact structure related endpoints
    name: contact-structure
  - description: List related endpoints
    name: lists
  - description: Email domain related endpoints
    name: email-domain
  - description: Email campaign related endpoints
    name: email-campaign
  - description: Email template related endpoints
    name: email-template
  - description: Report related endpoints
    name: reports
paths:
  /api/email/template:
    get:
      tags:
        - email-template
      summary: Get email templates
      description: Get email templates with optional filters
      operationId: get_api_email_template
      parameters:
        - description: Language code
          in: query
          name: lang
          required: true
          schema:
            type: string
        - description: Search term to filter templates
          in: query
          name: searchTerm
          schema:
            type: string
        - description: Template attribute IDs to filter by
          example:
            - 6b1234567890123456789012
          explode: false
          in: query
          name: attributeIds
          schema:
            items:
              type: string
            type: array
        - description: Flag to retrieve only internal templates (by default false)
          example: true
          in: query
          name: internal
          schema:
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  records:
                    items:
                      properties:
                        attributeIds:
                          items:
                            description: Template category attribute IDs
                            type: string
                          type: array
                        id:
                          description: Template ID
                          type: string
                        imageUrl:
                          description: Template image URL
                          type: string
                        lang:
                          description: Language code
                          type: string
                        name:
                          description: Template name
                          type: string
                        order:
                          description: >-
                            Display order (ascending, 1-indexed). Present only
                            when explicitly assigned.
                          minimum: 1
                          type: integer
                        subject:
                          description: Template subject
                          type: string
                        unlayerId:
                          description: Template Unlayer ID
                          type: string
                      type: object
                    type: array
                  total:
                    description: Total number of templates
                    type: number
                type: object
          description: Successful operation
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      description: API key authentication
      in: header
      name: X-API-Key
      type: apiKey

````