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

# Propose a prompt template

> Proposes a trusted prompt template for an app: version 1 of a new name, or the next version of an existing one. It has no effect until an administrator approves it.



## OpenAPI

````yaml /swagger/5.16/ai-studio-swagger.yml post /apps/{id}/prompt-templates
openapi: 3.0.1
info:
  title: Midsommar API
  description: This is the API for the Midsommar user and group management system.
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: //localhost:8080/api/v1
security: []
paths:
  /apps/{id}/prompt-templates:
    post:
      tags:
        - apps
      summary: Propose a prompt template
      description: >-
        Proposes a trusted prompt template for an app: version 1 of a new name,
        or the next version of an existing one. It has no effect until an
        administrator approves it.
      parameters:
        - name: id
          in: path
          description: App ID
          required: true
          schema:
            type: integer
      requestBody:
        description: Template
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api.AppPromptTemplateInput'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.AppPromptTemplateResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api.AppPromptTemplateInput:
      type: object
      properties:
        expires_after_days:
          type: integer
        name:
          type: string
        parts:
          type: array
          items:
            $ref: '#/components/schemas/templates.Part'
        placement:
          $ref: '#/components/schemas/templates.Placement'
    api.AppPromptTemplateResponse:
      type: object
      properties:
        app_id:
          type: integer
        approved_at:
          type: string
        approved_by:
          type: integer
        content_hash:
          type: string
          description: |-
            ContentHash identifies this version's reviewed content (name,
            version, placement, parts, expiry). Approving takes it back.
        created_at:
          type: string
        created_by:
          type: integer
        expires_after_days:
          type: integer
        id:
          type: integer
        last_matched_at:
          type: string
        name:
          type: string
        parts:
          type: array
          items:
            $ref: '#/components/schemas/templates.Part'
        placement:
          $ref: '#/components/schemas/templates.Placement'
        ref:
          type: string
        status:
          type: string
        updated_at:
          type: string
        version:
          type: integer
    templates.Part:
      type: object
      properties:
        const:
          type: string
        slot:
          type: string
    templates.Placement:
      type: object
      properties:
        anchor:
          type: string
        message:
          type: string
        role:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````