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

# Update Web Template Draft

> Updates the **current draft** row for this `key` only. Partial body; any subset of mutable fields. **`settings`** and **`metadata`** are shallow-merged with the existing row (sibling keys in those objects are preserved). If there is no draft, the server returns **500** `INTERNAL_ERROR` (for example `Draft template not found`). **Do not** send a `key` in the body – the path defines the key. See [Inquiry templates](/web/templates).



## OpenAPI

````yaml /api-reference/openapi.json PATCH /web/template/{key}
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}:
    patch:
      summary: Update Web template draft
      description: >-
        Updates the **current draft** row for this `key` only. Partial body; any
        subset of mutable fields. **`settings`** and **`metadata`** are
        shallow-merged with the existing row (sibling keys in those objects are
        preserved). If there is no draft, the server returns **500**
        `INTERNAL_ERROR` (for example `Draft template not found`). **Do not**
        send a `key` in the body – the path defines the key. See [Inquiry
        templates](/web/templates).
      operationId: updateWebTemplateDraft
      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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                query:
                  type: string
                start_url:
                  type: string
                return_url:
                  type: string
                capture_type:
                  type: string
                  enum:
                    - screenshot
                    - document
                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
                ai_instruction:
                  type: string
                login_methods:
                  type: array
                  items:
                    type: object
                    properties:
                      provider:
                        type: string
                      config:
                        type: object
                        additionalProperties: true
                    required:
                      - provider
                allowed_modes:
                  type: array
                  items:
                    type: string
                    enum:
                      - manual
                      - auto
                settings:
                  type: object
                  additionalProperties: true
                metadata:
                  type: object
                  nullable: true
                  additionalProperties:
                    type: string
                theme_id:
                  type: string
                  nullable: true
      responses:
        '200':
          description: Draft updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webTemplateObject'
        '400':
          description: Validation error (`VALIDATION_ERROR`).
        '500':
          description: Server error, including no draft for this key (`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

````