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

# Create Web Template

> Creates a new Web inquiry template. The server assigns a unique **`key`** (for example `web_tpl_key_...`); you cannot choose the key. Request bodies may use snake_case or camelCase. The public API requires non-empty **`query`**, **`start_url`**, and **`return_url`**. Optional **`status`** defaults to `draft` (`draft` or `published`). If **`acceptance_guide`** is empty but **`query`** is set, the server may generate a guide. If **`name`** is omitted, it may be derived from **`query`**. **`settings`** and **`metadata`** on PATCH (not this create) merge with existing; on create, values are set as given. For the draft → publish workflow, see [Inquiry templates](/web/templates).



## OpenAPI

````yaml /api-reference/openapi.json POST /web/template
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:
    post:
      summary: Create Web template
      description: >-
        Creates a new Web inquiry template. The server assigns a unique
        **`key`** (for example `web_tpl_key_...`); you cannot choose the key.
        Request bodies may use snake_case or camelCase. The public API requires
        non-empty **`query`**, **`start_url`**, and **`return_url`**. Optional
        **`status`** defaults to `draft` (`draft` or `published`). If
        **`acceptance_guide`** is empty but **`query`** is set, the server may
        generate a guide. If **`name`** is omitted, it may be derived from
        **`query`**. **`settings`** and **`metadata`** on PATCH (not this
        create) merge with existing; on create, values are set as given. For the
        draft → publish workflow, see [Inquiry templates](/web/templates).
      operationId: createWebTemplate
      parameters:
        - name: api-key
          in: header
          schema:
            type: string
            example: secret_live_xxx
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Display name; may be auto-generated from `query` if omitted.
                description:
                  type: string
                query:
                  type: string
                  description: What the inquiry should establish (required, non-empty).
                start_url:
                  type: string
                  description: URL where the capture session starts (required, non-empty).
                return_url:
                  type: string
                  description: Redirect URL after capture (required, non-empty).
                capture_type:
                  type: string
                  enum:
                    - screenshot
                    - document
                  default: screenshot
                fields:
                  type: array
                  description: Fields to extract from evidence.
                  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
                  description: Not returned on GET responses; stored for processing.
                login_methods:
                  type: array
                  description: Not returned on template GET responses; optional on create.
                  items:
                    type: object
                    properties:
                      provider:
                        type: string
                      config:
                        type: object
                        additionalProperties: true
                    required:
                      - provider
                allowed_modes:
                  type: array
                  description: Not returned on template GET responses.
                  items:
                    type: string
                    enum:
                      - manual
                      - auto
                settings:
                  type: object
                  properties:
                    show_acceptance_guide:
                      type: boolean
                    show_cover_page:
                      type: boolean
                  additionalProperties: true
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                  description: String key-value metadata.
                status:
                  type: string
                  enum:
                    - draft
                    - published
                  default: draft
                theme_id:
                  type: string
                  description: Must reference a theme that belongs to your org.
              required:
                - query
                - start_url
                - return_url
      responses:
        '201':
          description: Template created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webTemplateObject'
        '400':
          description: Validation error (`VALIDATION_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

````