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

# Upload a template

> Write ``content`` to the template store under ``path`` (create or overwrite).

The write target is guarded against a root escape before it reaches the store.



## OpenAPI

````yaml /openapi.json post /api/upload-template
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 0.1.1
servers: []
security: []
paths:
  /api/upload-template:
    post:
      tags:
        - templates
      summary: Upload a template
      description: >-
        Write ``content`` to the template store under ``path`` (create or
        overwrite).


        The write target is guarded against a root escape before it reaches the
        store.
      operationId: post_api_upload_template
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateUpload'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                required:
                  - data
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Malformed request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TemplateUpload:
      description: Upload (create or overwrite) a template at ``path``.
      properties:
        content:
          title: Content
          type: string
        path:
          title: Path
          type: string
      required:
        - path
        - content
      title: TemplateUpload
      type: object
    Error:
      properties:
        error:
          type: string
      required:
        - error
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````