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

# Publish template version

> Sets this version as the published version of the template.



## OpenAPI

````yaml /api-reference/auto-generated-openapi.yml post /documents/templates/{templateID}/versions/{versionID}/publish
openapi: 3.0.0
info:
  title: Corti API
  version: 2.0.0
servers:
  - url: https://api.{environment}.corti.app/v2/
    variables:
      environment:
        default: eu
        enum:
          - us
          - eu
security:
  - AuthorizationHeader:
      - bearer
tags:
  - name: Interactions
  - name: Recordings
  - name: Transcripts
  - name: Facts
  - name: Codes
  - name: Languages
  - name: Guided Documents
  - name: Guided Templates
  - name: Guided Sections
  - name: Documents (Classic)
  - name: Templates (Classic)
paths:
  /documents/templates/{templateID}/versions/{versionID}/publish:
    parameters:
      - $ref: '#/components/parameters/Tenant-Name'
      - $ref: '#/components/parameters/GuidedTemplateId'
      - $ref: '#/components/parameters/GuidedVersionId'
    post:
      tags:
        - Guided Templates
      summary: Publish template version
      description: Sets this version as the published version of the template.
      operationId: guided_templates_versions_publish
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonStatusResponse'
        '404':
          $ref: '#/components/responses/NotFound'
      x-codeSamples:
        - lang: csharp
          label: C# .NET SDK
          source: >
            using Corti;


            var client = new CortiClient(
                "TENANT_NAME",
                CortiClientEnvironment.Eu,
                new CortiClientAuth.ClientCredentials("client_id", "client_secret")
            );

            await client.Documents.Templates.Versions.PublishAsync("templateID",
            "versionID");
        - lang: javascript
          label: JavaScript SDK
          source: >
            import { CortiClient, CortiEnvironment } from "@corti/sdk";


            const client = new CortiClient({
                environment: CortiEnvironment.Eu,
                auth: {
                    clientId: "YOUR_CLIENT_ID",
                    clientSecret: "YOUR_CLIENT_SECRET"
                },
                tenantName: "YOUR_TENANT_NAME"
            });

            await client.documents.templates.versions.publish("templateID",
            "versionID");
components:
  parameters:
    Tenant-Name:
      name: Tenant-Name
      in: header
      description: >-
        Identifies a distinct entity within Corti's multi-tenant system. Ensures
        correct routing and authentication of the request.
      required: true
      example: base
      schema:
        type: string
        description: >-
          Identifies a distinct entity within Corti's multi-tenant system.
          Ensures correct routing and authentication of the request.
        example: base
    GuidedTemplateId:
      name: templateID
      in: path
      required: true
      schema:
        type: string
        format: uuid
    GuidedVersionId:
      name: versionID
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    CommonStatusResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
        evidence:
          $ref: '#/components/schemas/CommonDocumentationEvidence'
          type: object
    CommonDocumentationEvidence:
      type: object
      properties:
        evidenceId:
          $ref: '#/components/schemas/UUID'
          type: string
          items: {}
        type:
          type: string
          example: transcript
        quote:
          type: string
    ErrorResponse:
      type: object
      required:
        - requestid
        - status
        - type
        - detail
      properties:
        requestid:
          type: string
        status:
          type: integer
        type:
          type: string
        detail:
          type: string
        validationErrors:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
    UUID:
      type: string
      items: {}
      format: uuid
      example: f47ac10b-58cc-4372-a567-0e02b2c3d479
  responses:
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    AuthorizationHeader:
      type: http
      description: Input your token
      scheme: bearer

````