> ## Documentation Index
> Fetch the complete documentation index at: https://kapso-1adbad2d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List WhatsApp templates

> Returns a list of WhatsApp templates available for the project



## OpenAPI

````yaml api/legacy/openapi-whatsapp.yaml get /whatsapp_templates
openapi: 3.0.3
info:
  title: Kapso External API - WhatsApp API
  description: >-
    API for programmatically interacting with Kapso agents, executions, and
    WhatsApp conversations. This specification includes only WhatsApp API
    endpoints.
  version: 1.0.0
  contact:
    name: Kapso Support
servers:
  - url: https://app.kapso.ai/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /whatsapp_templates:
    get:
      tags:
        - WhatsApp Templates
      summary: List WhatsApp templates
      description: Returns a list of WhatsApp templates available for the project
      operationId: listWhatsappTemplates
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: per_page
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: customer_id
          in: query
          description: Filter templates by customer ID
          schema:
            type: string
            format: uuid
        - name: q[name_cont]
          in: query
          description: Filter templates by name (contains)
          schema:
            type: string
        - name: q[language_code_eq]
          in: query
          description: Filter templates by exact language code match
          schema:
            type: string
        - name: q[category_eq]
          in: query
          description: Filter templates by category
          schema:
            type: string
            enum:
              - MARKETING
              - UTILITY
              - AUTHENTICATION
        - name: q[status_eq]
          in: query
          description: Filter templates by status
          schema:
            type: string
            enum:
              - draft
              - submitted
              - approved
              - rejected
              - disabled
        - name: q[customer_id_eq]
          in: query
          description: Filter templates by customer ID (Ransack syntax)
          schema:
            type: string
            format: uuid
        - name: business_account_id
          in: query
          description: Filter templates by WhatsApp Business Account ID
          schema:
            type: string
          example: '123456789012345'
        - name: q[business_account_id_eq]
          in: query
          description: Filter templates by WhatsApp Business Account ID (Ransack syntax)
          schema:
            type: string
          example: '123456789012345'
        - name: whatsapp_config_id
          in: query
          description: Filter templates by WhatsApp configuration ID
          schema:
            type: string
            format: uuid
        - name: q[whatsapp_config_id_eq]
          in: query
          description: Filter templates by WhatsApp configuration ID (Ransack syntax)
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: A list of WhatsApp templates
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WhatsappTemplate'
                  meta:
                    type: object
                    properties:
                      page:
                        type: integer
                      per_page:
                        type: integer
                      total_pages:
                        type: integer
                      total_count:
                        type: integer
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WhatsappTemplate:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: template-123abc
        name:
          type: string
          example: appointment_reminder
        language_code:
          type: string
          example: en_US
        category:
          type: string
          enum:
            - MARKETING
            - UTILITY
            - AUTHENTICATION
          example: UTILITY
        status:
          type: string
          enum:
            - draft
            - submitted
            - approved
            - rejected
            - disabled
            - removed
          example: approved
        content:
          type: string
          example: Hello {{1}}, your appointment is confirmed for {{2}}.
        parameter_count:
          type: integer
          example: 2
        business_account_id:
          type: string
          nullable: true
          example: '123456789012345'
          description: WhatsApp Business Account ID this template belongs to
        whatsapp_config_ids:
          type: array
          items:
            type: string
            format: uuid
          example:
            - config-123abc
            - config-456def
          description: Array of WhatsApp config IDs this template is associated with
        components:
          type: array
          description: Raw WhatsApp template components structure
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - HEADER
                  - BODY
                  - FOOTER
                  - BUTTONS
              format:
                type: string
                enum:
                  - TEXT
                  - IMAGE
                  - VIDEO
                  - DOCUMENT
                  - LOCATION
              text:
                type: string
              example:
                type: object
              buttons:
                type: array
                items:
                  type: object
        metadata:
          type: object
          description: Additional metadata about the template
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
          example: Resource not found
        status:
          type: integer
          example: 404
        message:
          type: string
          example: The requested resource could not be found
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key required for all endpoints

````