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

# List All Persona Templates

> Fetches a list of all templates.



## OpenAPI

````yaml GET /ext/templates
openapi: 3.0.3
info:
  title: TruGen Developer Platform API
  version: 1.0.0
  description: OpenAPI specification for MCP endpoint
servers:
  - url: https://api.trugen.ai/v1
security: []
paths:
  /ext/templates:
    get:
      summary: Retrieve all Template details
      description: Fetches a list of all templates.
      operationId: getAllTemplates
      responses:
        '200':
          description: List of template details retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                      description: Unique identifier for the template
                      example: ff152cd9-efb6-4367-ae34-917f7c735f1d
                    template_name:
                      type: string
                      description: Name of the template
                      example: Default Calling Template
                    template_system_prompt:
                      type: string
                      description: System prompt text used by the template
                      example: You are a helpful AI assistant.
                    config:
                      type: object
                      description: Settings and configuration for the template
                      properties:
                        maxCallDuration:
                          type: integer
                          description: Maximum allowed call duration in seconds
                          example: 900
                        conversationalContext:
                          type: string
                          description: Context for maintaining conversation across calls
                          example: ''
                    knowledge_base:
                      type: array
                      description: List of knowledge bases attached to this agent.
                      nullable: true
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                            description: Knowledge base identifier.
                            example: ac79226e-73e1-41fe-8cde-469ae4e244fa
                          name:
                            type: string
                            description: Name of the knowledge base.
                            example: Product Support Articles
                          description:
                            type: string
                            description: Short summary of the knowledge base content.
                            example: >-
                              Contains FAQs and troubleshooting guides for
                              product lines.
                    record:
                      type: boolean
                      description: Whether the call should be recorded
                      example: true
                    is_active:
                      type: boolean
                      description: Whether the record is be active or not
                      example: true
                    created_at:
                      type: string
                      format: date-time
                      description: Timestamp when the template was created
                      example: '2025-12-03T10:15:30.000Z'
                    updated_at:
                      type: string
                      format: date-time
                      description: Timestamp when the template was last updated
                      example: '2025-12-03T12:00:00.000Z'
              example:
                - config:
                    maxCallDuration: 5
                    conversationalContext: The following is a conversation with a user named `Lisa`.
                  created_at: '2025-10-16T15:09:53.876051Z'
                  id: d22e4b02-3a47-46f2-b0cd-5420f277eaf9
                  knowledge_base: null
                  record: true
                  template_name: HR Assistant
                  template_system_prompt: You are a helpful AI assistant.
                  updated_at: '2025-10-16T15:09:53.876051Z'
        '401':
          description: Unauthorized – missing or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: 'Unauthorized: not a valid authorization api key'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Failed to create template details
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````