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

# List WhatsApp Templates

> Retrieves a paginated list of WhatsApp templates for a specific WABA account.



## OpenAPI

````yaml GET /api/pub/wa/template/list/{whatsapp}
openapi: 3.1.0
info:
  title: AdsEra REST API
  description: >-
    Welcome to the AdsEra REST API. Use our API to integrate powerful,
    multi-channel communication (Email and WhatsApp) directly into your
    applications. Automate transactional messages, trigger marketing campaigns,
    manage your audience, and track performance programmatically.
  contact:
    name: Shubham
    email: shubham@adsera.in
  version: 1.0.0
servers:
  - url: https://app.adsera.in
    description: Production Server
security:
  - AppIdAuth: []
    AppSecretAuth: []
paths:
  /api/pub/wa/template/list/{whatsapp}:
    get:
      tags:
        - Templates
      summary: List WABA Templates
      description: >-
        Retrieves a paginated list of WhatsApp templates for a specific WABA
        account.
      parameters:
        - name: whatsapp
          in: path
          required: true
          description: The _id of the WABA account to fetch templates for.
          schema:
            type: string
            example: 60c72b2f9b1d8e001f8a1b2c
        - name: search
          in: query
          required: false
          description: Search query for template name.
          schema:
            type: string
            default: ''
        - name: page
          in: query
          required: false
          description: The page number for pagination.
          schema:
            type: integer
            default: 1
        - name: perPage
          in: query
          required: false
          description: The number of items to return per page.
          schema:
            type: integer
            default: 10
      responses:
        '200':
          description: A paginated list of templates.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WabaTemplateListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - AppIdAuth: []
          AppSecretAuth: []
components:
  schemas:
    WabaTemplateListResponse:
      type: object
      properties:
        status:
          type: integer
          example: 200
        success:
          type: boolean
          example: true
        error:
          type: 'null'
        templates:
          type: array
          items:
            $ref: '#/components/schemas/WabaTemplate'
        totalCount:
          type: integer
          example: 25
        currentPage:
          type: integer
          example: 1
        perPage:
          type: integer
          example: 10
    WabaTemplate:
      type: object
      description: A WhatsApp message template.
      properties:
        _id:
          type: string
          example: 60c72b2f9b1d8e001f8a1b2d
        company:
          type: string
          example: 60c72b2f9b1d8e001f8a1b2a
        whatsapp:
          type: string
          example: 60c72b2f9b1d8e001f8a1b2c
        templateId:
          type: string
          example: '8794876541213'
        wabaId:
          type: string
          example: '123456789012345'
        status:
          type: string
          enum:
            - APPROVED
            - PENDING
            - REJECTED
            - PAUSED
            - DISABLED
            - IN_APPEAL
            - REINSTATED
            - LIMIT_EXCEEDED
        format:
          type: string
          enum:
            - NAMED
            - POSITIONAL
        category:
          type: string
          enum:
            - AUTHENTICATION
            - MARKETING
            - UTILITY
        name:
          type: string
          example: order_confirmation
        language:
          type: string
          example: en_US
        libraryTempName:
          type: string
          nullable: true
        components:
          type: array
          items:
            $ref: '#/components/schemas/WabaTemplateComponent'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          example: 500
        success:
          type: boolean
          example: false
        error:
          type: string
          example: Internal Server Error!
    WabaTemplateComponent:
      type: object
      description: A component of a WhatsApp template (e.g., header, body, carousel).
      properties:
        type:
          type: string
          enum:
            - HEADER
            - BODY
            - FOOTER
            - BUTTONS
            - CALL_PERMISSION_REQUEST
            - CAROUSEL
            - LIMITED_TIME_OFFER
        format:
          type: string
          nullable: true
          enum:
            - TEXT
            - IMAGE
            - VIDEO
            - DOCUMENT
            - LOCATION
            - PRODUCT
        limited_time_offer:
          type: object
          nullable: true
          properties:
            text:
              type: string
            has_expiration:
              type: boolean
        text:
          type: string
          nullable: true
        add_security_recommendation:
          type: boolean
          nullable: true
        code_expiration_minutes:
          type: number
          nullable: true
        example:
          type: object
          nullable: true
          properties:
            header_handle:
              type: array
              items:
                type: string
            header_text:
              type: array
              items:
                type: string
            header_text_named_params:
              type: object
            body_text:
              type: array
              items:
                type: array
                items:
                  type: string
            body_text_named_params:
              type: object
        buttons:
          type: array
          items:
            $ref: '#/components/schemas/WabaTemplateButton'
          nullable: true
        cards:
          type: array
          items:
            $ref: '#/components/schemas/WabaTemplateCarouselCard'
          nullable: true
    WabaTemplateButton:
      type: object
      properties:
        type:
          type: string
          enum:
            - QUICK_REPLY
            - URL
            - PHONE_NUMBER
            - COPY_CODE
            - FLOW
            - VOICE_CALL
            - CATALOG
            - ORDER_DETAILS
            - MPM
            - SPM
            - OTP
        text:
          type: string
        url:
          type: string
          nullable: true
        example:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          nullable: true
        phoneNumber:
          type: string
          nullable: true
        flow_id:
          type: string
          nullable: true
        flow_action:
          type: string
          enum:
            - NAVIGATE
            - DATA_EXCHANGE
          nullable: true
        flow_name:
          type: string
          nullable: true
        flow_json:
          type: object
          nullable: true
          description: A mixed-type field for arbitrary JSON.
        navigate_screen:
          type: string
          nullable: true
        icon:
          type: string
          enum:
            - DOCUMENT
            - PROMOTION
            - REVIEW
          nullable: true
        otp_type:
          type: string
          enum:
            - COPY_CODE
            - ONE_TAP
          nullable: true
        supported_apps:
          type: array
          items:
            $ref: '#/components/schemas/WabaTemplateSupportedApp'
          nullable: true
    WabaTemplateCarouselCard:
      type: object
      description: A single card within a carousel component.
      properties:
        components:
          type: array
          items:
            $ref: '#/components/schemas/WabaTemplateComponent'
    WabaTemplateSupportedApp:
      type: object
      properties:
        package_name:
          type: string
        signature_hash:
          type: string
  responses:
    Unauthorized:
      description: Unauthorized. The API keys are missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: 401
            success: false
            error: 'Unauthorized: Please provide valid API credentials.'
    InternalServerError:
      description: Internal Server Error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    AppIdAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your application's unique ID.
    AppSecretAuth:
      type: apiKey
      in: header
      name: x-api-secret
      description: Your application's secret key.

````