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

# Publish Web Template

> Publishes the **current draft** for this `key`, making it the latest **published** version and the one resolved when creating inquiries with **`template_key`**. Unsets the previous `is_latest` on other rows for the same key. If there is no draft, the server returns **500** `INTERNAL_ERROR` (for example `No draft template found`). See [Inquiry templates](/web/templates).



## OpenAPI

````yaml /api-reference/openapi.json POST /web/template/{key}/publish
openapi: 3.0.3
info:
  title: API 2.0
  version: 1.0.0
  contact: {}
servers:
  - url: https://platform.inklink.com/api/v1
security: []
tags: []
paths:
  /web/template/{key}/publish:
    post:
      summary: Publish Web template
      description: >-
        Publishes the **current draft** for this `key`, making it the latest
        **published** version and the one resolved when creating inquiries with
        **`template_key`**. Unsets the previous `is_latest` on other rows for
        the same key. If there is no draft, the server returns **500**
        `INTERNAL_ERROR` (for example `No draft template found`). See [Inquiry
        templates](/web/templates).
      operationId: publishWebTemplate
      parameters:
        - name: api-key
          in: header
          schema:
            type: string
            example: secret_live_xxx
          required: true
        - name: key
          in: path
          required: true
          description: Template `key` (`web_tpl_key_...`).
          schema:
            type: string
      responses:
        '200':
          description: >-
            Template published (response body is the published row; check
            `is_latest` and `status`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webTemplateObject'
        '400':
          description: Validation error (`VALIDATION_ERROR`).
        '500':
          description: Server error, including no draft to publish (`INTERNAL_ERROR`).
components:
  schemas:
    webTemplateObject:
      type: object
      description: >-
        Web inquiry template row. Responses omit `ai_instruction`,
        `login_methods`, and `allowed_modes` even if set in the request body.
      properties:
        id:
          type: string
          description: Row id (`web_tpl_...`).
        key:
          type: string
          description: Use as `template_key` on Create Web inquiry.
        version:
          type: integer
        is_latest:
          type: boolean
        status:
          type: string
          enum:
            - draft
            - published
        name:
          type: string
        description:
          type: string
        query:
          type: string
        fields:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
              required:
                type: boolean
            required:
              - name
              - required
        user_instruction:
          type: string
        acceptance_guide:
          type: string
        start_url:
          type: string
        return_url:
          type: string
        capture_type:
          type: string
          enum:
            - screenshot
            - document
        settings:
          type: object
          properties:
            show_acceptance_guide:
              type: boolean
            show_cover_page:
              type: boolean
          additionalProperties: true
        metadata:
          type: object
          nullable: true
          additionalProperties:
            type: string
        theme_id:
          type: string
          nullable: true
        org_id:
          type: string
        created_by:
          type: string
        published_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: true

````