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

# Update Persona Template

> Updates the details of a specific template by ID.



## OpenAPI

````yaml PUT /ext/template/{id}
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/template/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Unique identifier for the template
    put:
      summary: Update an existing Template
      description: Updates the details of a specific template by ID.
      operationId: updateTemplate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                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 should be active or not
                  example: true
            example:
              template_name: Updated Name
              template_system_prompt: Updated system prompt
              config:
                conversationalContext: Updated conversational context
                maxCallDuration: 2
              knowledge_base: null
              record: true
              is_active: true
      responses:
        '200':
          description: Template details updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Unique identifier of the updated template
                    example: d22e4b02-3a47-46f2-b0cd-5420f277eaf9
                  message:
                    type: string
                    example: Template details updated successfully
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Invalid request body
        '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'
        '404':
          description: Template not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                message: Template not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Failed to retrieve template details
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````