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

# Update a template

> Change any part of a template. `status: "paused"` stops the link; `"active"` resumes it.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/link-templates/{slug}
openapi: 3.1.0
info:
  title: rial API
  version: 0.1.0
  description: 'Prove a photo is real. Base URL: https://api.rial.io'
  contact:
    name: rial-platform team
    url: https://github.com/Rial-ventures-Inc/rial-platform
  license:
    name: UNLICENSED — proprietary, internal use only
servers:
  - url: https://api.rial.io
    description: Production
security: []
tags:
  - name: Verifications
    description: >-
      Create, fetch, list, and finalize verifications. The core of the API —
      every tenant integration starts here.
  - name: Templates
    description: >-
      Publish, update, revoke and inspect link templates — the reusable capture
      links behind `/l/{token}` (a compact JWT carrying the org and template
      slugs; the legacy `/l/{org}/{slug}` keeps resolving). Callable with a
      secret key; each publish snapshots a versioned capture spec (GET-83).
  - name: Databases
    description: >-
      Create, update, inspect and synchronize tenant-scoped databases used by
      reusable verification templates. Callable with a dashboard session or
      secret API key.
paths:
  /v1/link-templates/{slug}:
    patch:
      tags:
        - Templates
      summary: Update a template
      description: >-
        Change any part of a template. `status: "paused"` stops the link;
        `"active"` resumes it.
      parameters:
        - schema:
            type: string
            pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
            description: Template slug — lowercase `[a-z0-9-]`.
            example: warehouse-intake
          required: true
          name: slug
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                slug:
                  type: string
                  minLength: 2
                  maxLength: 40
                  pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
                status:
                  type: string
                  enum:
                    - draft
                    - active
                    - paused
                name:
                  type: string
                  minLength: 1
                  maxLength: 80
                mode:
                  type: string
                  enum:
                    - capture
                    - audit
                    - hybrid
                steps:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          label:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: Visible title of the step.
                          screen:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                              title:
                                type: string
                                minLength: 1
                                maxLength: 120
                              description:
                                type: string
                                maxLength: 8000
                            required:
                              - key
                              - title
                            additionalProperties: false
                            description: >-
                              Groups consecutive steps on one screen: `key` and
                              `title` shared by the group.
                          when:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                              value:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                            required:
                              - key
                              - value
                            additionalProperties: false
                            description: >-
                              Show this step only when the step `key` was
                              answered with `value`.
                          key:
                            type: string
                            minLength: 1
                            maxLength: 64
                            pattern: ^[a-z0-9][a-z0-9_-]*$
                            description: >-
                              Stable id of the step. Its answer or photos come
                              back under this key.
                          type:
                            type: string
                            enum:
                              - image
                            default: image
                          description:
                            type: string
                            maxLength: 500
                            default: ''
                            description: Instruction shown to the person.
                          min:
                            type: integer
                            minimum: 0
                            description: Minimum photos. 0 makes the step optional.
                          max:
                            type: integer
                            minimum: 1
                            description: Maximum photos.
                          allow_upload:
                            type: boolean
                            description: >-
                              Also allow picking a file from the gallery instead
                              of the camera.
                          accept:
                            type: array
                            items:
                              type: string
                              enum:
                                - image/jpeg
                                - image/png
                                - image/webp
                                - image/heic
                                - image/heif
                            minItems: 1
                            description: Accepted media types.
                          max_size_bytes:
                            type: integer
                            minimum: 1
                            maximum: 26214400
                            description: Maximum size per photo, in bytes.
                          expected_object:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: >-
                              What must appear in this photo. Overrides the
                              verification-level value.
                          condition_aspects:
                            type: array
                            items:
                              type: string
                              minLength: 1
                              maxLength: 40
                            minItems: 1
                            maxItems: 6
                            description: >-
                              Aspects to score on this photo. Overrides the
                              verification-level value.
                        required:
                          - key
                          - min
                          - max
                        additionalProperties: false
                      - type: object
                        properties:
                          label:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: Visible title of the step.
                          screen:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                              title:
                                type: string
                                minLength: 1
                                maxLength: 120
                              description:
                                type: string
                                maxLength: 8000
                            required:
                              - key
                              - title
                            additionalProperties: false
                            description: >-
                              Groups consecutive steps on one screen: `key` and
                              `title` shared by the group.
                          when:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                              value:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                            required:
                              - key
                              - value
                            additionalProperties: false
                            description: >-
                              Show this step only when the step `key` was
                              answered with `value`.
                          key:
                            type: string
                            minLength: 1
                            maxLength: 64
                            pattern: ^[a-z0-9][a-z0-9_-]*$
                            description: >-
                              Stable id of the step. Its answer or photos come
                              back under this key.
                          type:
                            type: string
                            enum:
                              - text
                          description:
                            type: string
                            maxLength: 500
                            default: ''
                            description: Instruction shown to the person.
                          required:
                            type: boolean
                            default: true
                            description: Default true.
                          validation:
                            type: object
                            properties:
                              min_length:
                                type: integer
                                minimum: 0
                                maximum: 2000
                              max_length:
                                type: integer
                                minimum: 1
                                maximum: 2000
                              format:
                                type: string
                                enum:
                                  - free_text
                                  - numeric_id
                                  - alphanumeric_id
                                  - email
                                default: free_text
                            default:
                              format: free_text
                            additionalProperties: false
                            description: >-
                              Length and format rules: `free_text`,
                              `numeric_id`, `alphanumeric_id` or `email`.
                          variant:
                            type: string
                            enum:
                              - short
                              - long
                            description: '`short` (one line) or `long`.'
                        required:
                          - key
                          - type
                        additionalProperties: false
                      - type: object
                        properties:
                          label:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: Visible title of the step.
                          screen:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                              title:
                                type: string
                                minLength: 1
                                maxLength: 120
                              description:
                                type: string
                                maxLength: 8000
                            required:
                              - key
                              - title
                            additionalProperties: false
                            description: >-
                              Groups consecutive steps on one screen: `key` and
                              `title` shared by the group.
                          when:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                              value:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                            required:
                              - key
                              - value
                            additionalProperties: false
                            description: >-
                              Show this step only when the step `key` was
                              answered with `value`.
                          key:
                            type: string
                            minLength: 1
                            maxLength: 64
                            pattern: ^[a-z0-9][a-z0-9_-]*$
                            description: >-
                              Stable id of the step. Its answer or photos come
                              back under this key.
                          type:
                            type: string
                            enum:
                              - upload
                          input:
                            type: string
                            enum:
                              - signature
                            description: >-
                              `signature` shows a signature pad instead of a
                              file picker.
                          description:
                            type: string
                            maxLength: 500
                            default: ''
                            description: Instruction shown to the person.
                          min:
                            type: integer
                            minimum: 0
                            description: Minimum files. 0 makes the step optional.
                          max:
                            type: integer
                            minimum: 1
                            description: Maximum files.
                          accept:
                            type: array
                            items:
                              type: string
                              enum:
                                - image/jpeg
                                - image/png
                                - image/webp
                                - image/heic
                                - image/heif
                            minItems: 1
                            default:
                              - image/jpeg
                              - image/png
                              - image/webp
                              - image/heic
                              - image/heif
                            description: Accepted media types.
                          max_size_bytes:
                            type: integer
                            minimum: 1
                            maximum: 26214400
                            default: 10485760
                            description: Maximum size per file, in bytes.
                        required:
                          - key
                          - type
                          - min
                          - max
                        additionalProperties: false
                      - type: object
                        properties:
                          label:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: Visible title of the step.
                          screen:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                              title:
                                type: string
                                minLength: 1
                                maxLength: 120
                              description:
                                type: string
                                maxLength: 8000
                            required:
                              - key
                              - title
                            additionalProperties: false
                            description: >-
                              Groups consecutive steps on one screen: `key` and
                              `title` shared by the group.
                          when:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                              value:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                            required:
                              - key
                              - value
                            additionalProperties: false
                            description: >-
                              Show this step only when the step `key` was
                              answered with `value`.
                          key:
                            type: string
                            minLength: 1
                            maxLength: 64
                            pattern: ^[a-z0-9][a-z0-9_-]*$
                            description: >-
                              Stable id of the step. Its answer or photos come
                              back under this key.
                          type:
                            type: string
                            enum:
                              - video
                          description:
                            type: string
                            maxLength: 500
                            default: ''
                            description: Instruction shown to the person.
                          min:
                            type: integer
                            minimum: 0
                            description: Minimum clips. 0 makes the step optional.
                          max:
                            type: integer
                            minimum: 1
                            description: Maximum clips.
                          max_duration_sec:
                            type: integer
                            minimum: 1
                            maximum: 30
                            default: 30
                            description: Maximum length of each clip, in seconds.
                        required:
                          - key
                          - type
                          - min
                          - max
                        additionalProperties: false
                      - type: object
                        properties:
                          label:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: Visible title of the step.
                          screen:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                              title:
                                type: string
                                minLength: 1
                                maxLength: 120
                              description:
                                type: string
                                maxLength: 8000
                            required:
                              - key
                              - title
                            additionalProperties: false
                            description: >-
                              Groups consecutive steps on one screen: `key` and
                              `title` shared by the group.
                          when:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                              value:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                            required:
                              - key
                              - value
                            additionalProperties: false
                            description: >-
                              Show this step only when the step `key` was
                              answered with `value`.
                          key:
                            type: string
                            minLength: 1
                            maxLength: 64
                            pattern: ^[a-z0-9][a-z0-9_-]*$
                            description: >-
                              Stable id of the step. Its answer or photos come
                              back under this key.
                          type:
                            type: string
                            enum:
                              - choice
                          description:
                            type: string
                            maxLength: 500
                            default: ''
                            description: Instruction shown to the person.
                          required:
                            type: boolean
                            default: true
                            description: Default true.
                          multiple:
                            type: boolean
                            default: false
                            description: Allow picking more than one option.
                          options:
                            type: array
                            items:
                              type: object
                              properties:
                                key:
                                  type: string
                                  minLength: 1
                                  maxLength: 64
                                  pattern: ^[a-z0-9][a-z0-9_-]*$
                                label:
                                  type: string
                                  minLength: 1
                                  maxLength: 500
                              required:
                                - key
                                - label
                              additionalProperties: false
                            minItems: 1
                            maxItems: 50
                            description: Options to pick from, each with `key` and `label`.
                        required:
                          - key
                          - type
                          - options
                        additionalProperties: false
                      - type: object
                        properties:
                          label:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: Visible title of the step.
                          screen:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                              title:
                                type: string
                                minLength: 1
                                maxLength: 120
                              description:
                                type: string
                                maxLength: 8000
                            required:
                              - key
                              - title
                            additionalProperties: false
                            description: >-
                              Groups consecutive steps on one screen: `key` and
                              `title` shared by the group.
                          when:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                              value:
                                type: string
                                minLength: 1
                                maxLength: 64
                                pattern: ^[a-z0-9][a-z0-9_-]*$
                            required:
                              - key
                              - value
                            additionalProperties: false
                            description: >-
                              Show this step only when the step `key` was
                              answered with `value`.
                          key:
                            type: string
                            minLength: 1
                            maxLength: 64
                            pattern: ^[a-z0-9][a-z0-9_-]*$
                            description: >-
                              Stable id of the step. Its answer or photos come
                              back under this key.
                          type:
                            type: string
                            enum:
                              - address
                          country:
                            type: string
                            enum:
                              - BR
                            description: '`BR` shows Brazilian address fields.'
                          description:
                            type: string
                            maxLength: 500
                            default: ''
                            description: Instruction shown to the person.
                          required:
                            type: boolean
                            default: true
                            description: Default true.
                        required:
                          - key
                          - type
                        additionalProperties: false
                  minItems: 1
                expires_in_seconds:
                  type: integer
                  minimum: 60
                  maximum: 86400
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                    maxLength: 500
                expected_location:
                  type:
                    - string
                    - 'null'
                  minLength: 1
                  maxLength: 300
                expected_object:
                  type:
                    - string
                    - 'null'
                  minLength: 1
                  maxLength: 200
                condition_aspects:
                  type:
                    - array
                    - 'null'
                  items:
                    type: string
                    minLength: 1
                    maxLength: 40
                  minItems: 1
                  maxItems: 6
                expected_info:
                  type:
                    - object
                    - 'null'
                  properties:
                    shared:
                      type: object
                      properties:
                        expected_location:
                          type: string
                          minLength: 1
                          maxLength: 300
                        expected_object:
                          type: string
                          minLength: 1
                          maxLength: 200
                        condition_aspects:
                          type: array
                          items:
                            type: string
                            minLength: 1
                            maxLength: 40
                          minItems: 1
                          maxItems: 6
                        ocr_type:
                          type: string
                          minLength: 1
                          maxLength: 40
                      additionalProperties: false
                  required:
                    - shared
                  additionalProperties: false
                daily_cap:
                  type:
                    - integer
                    - 'null'
                  minimum: 1
                  maximum: 10000
                total_cap:
                  type:
                    - integer
                    - 'null'
                  minimum: 1
                  maximum: 1000000
                brand_slug:
                  type:
                    - string
                    - 'null'
                  minLength: 2
                  maxLength: 40
                  pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
                notify_email:
                  type:
                    - string
                    - 'null'
                  maxLength: 254
                  format: email
                notify_subject_template:
                  type:
                    - string
                    - 'null'
                  minLength: 1
                notify_body_template:
                  type:
                    - string
                    - 'null'
                  minLength: 1
                completion_message:
                  type:
                    - string
                    - 'null'
                  minLength: 1
                  maxLength: 2000
                  description: >-
                    Full plain-text message shown after submitting content.
                    HTML, markdown and variables are not interpreted. Omit on
                    create or send null on PATCH to use the default.
                identification:
                  type:
                    - object
                    - 'null'
                  properties:
                    required:
                      type: boolean
                    label:
                      type: string
                      minLength: 1
                      maxLength: 80
                  required:
                    - required
                  additionalProperties: false
                database:
                  type:
                    - object
                    - 'null'
                  properties:
                    database_id:
                      type: string
                      pattern: ^[A-Za-z0-9_-]{1,64}$
                    column_for:
                      type: object
                      properties:
                        identifier:
                          type: string
                          minLength: 1
                          maxLength: 80
                        location:
                          type: string
                          minLength: 1
                          maxLength: 80
                        object:
                          type: string
                          minLength: 1
                          maxLength: 80
                      required:
                        - identifier
                      additionalProperties: false
                  required:
                    - database_id
                    - column_for
                  additionalProperties: false
                requires_location:
                  type: boolean
              additionalProperties: false
            example:
              status: paused
      responses:
        '200':
          description: >-
            Updated template — `version` reflects whether the patch touched the
            snapshot.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkTemplate'
              example:
                slug: warehouse-intake
                org_slug: acme-logistics
                public_url: >-
                  https://verify.rial.io/l/eyJhbGciOiJIUzI1NiJ9.eyJvIjoiYWNtZS1sb2dpc3RpY3MiLCJ0Ijoid2FyZWhvdXNlLWludGFrZSJ9.3YjQ4G9Wf0mJ8s2K
                name: Warehouse intake
                mode: capture
                steps:
                  - key: front
                    type: image
                    description: Front of the pallet
                    min: 1
                    max: 1
                expires_in_seconds: 3600
                status: active
                started_total: 0
                started_today: 0
                version: 1
                created_at: '2026-07-30T12:00:00.000Z'
                updated_at: '2026-07-30T12:00:00.000Z'
        '400':
          description: >-
            Body failed validation or `steps` incoherent with the persisted
            `mode`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No template with that slug for the authenticated tenant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: not_found
                  message: Resource not found
        '422':
          description: >-
            `brand_slug` references a brand profile that does not exist for the
            tenant.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - unknown_brand
                required:
                  - error
        '503':
          description: The template store is unreachable — retry with backoff.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  cause:
                    type: string
                required:
                  - error
              example:
                error: storage_unavailable
      security:
        - bearerApiKey: []
components:
  schemas:
    LinkTemplate:
      type: object
      properties:
        slug:
          type: string
        org_slug:
          type: string
        public_url:
          type: string
          format: uri
        name:
          type: string
        mode:
          type: string
          enum:
            - capture
            - audit
            - hybrid
        steps:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              type:
                type: string
                enum:
                  - image
                  - upload
                  - text
                  - video
                  - choice
                  - address
            required:
              - key
              - type
            description: One normalized capture-spec step (see `stepsInputSchema`).
        expires_in_seconds:
          type: integer
        metadata:
          type: object
          additionalProperties:
            type: string
        expected_info:
          type: object
          properties: {}
        expected_location:
          type: object
          properties: {}
        expected_object:
          type: object
          properties: {}
        condition_aspects:
          type: array
          items: {}
        brand_slug:
          type: string
        notify_email:
          type: string
          format: email
        notify_subject_template:
          type: string
        notify_body_template:
          type: string
        completion_message:
          type: string
          minLength: 1
          maxLength: 2000
          description: >-
            Full plain-text message shown after submitting content. HTML,
            markdown and variables are not interpreted. Omit on create or send
            null on PATCH to use the default.
        identification:
          type: object
          properties:
            required:
              type: boolean
            label:
              type: string
          required:
            - required
        requires_location:
          type: boolean
        database:
          type: object
          properties:
            database_id:
              type: string
            column_for:
              type: object
              properties:
                identifier:
                  type: string
                location:
                  type: string
                object:
                  type: string
              required:
                - identifier
          required:
            - database_id
            - column_for
        status:
          type: string
          enum:
            - active
            - paused
        daily_cap:
          type: integer
        total_cap:
          type: integer
        started_total:
          type: integer
        started_today:
          type: integer
        version:
          type: integer
          minimum: 1
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - slug
        - name
        - mode
        - steps
        - expires_in_seconds
        - status
        - started_total
        - started_today
        - version
        - created_at
        - updated_at
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            fields:
              type: array
              items:
                type: object
                properties:
                  path:
                    type: string
                  message:
                    type: string
                required:
                  - path
                  - message
          required:
            - code
            - message
      required:
        - error
      description: >-
        Uniform error envelope. `code` is the stable string SDKs branch on
        (`invalid_request`, `unauthorized`, `not_found`, `expired`, `step_full`,
        `unknown_step`, `steps_incomplete`, `already_finalized`,
        `too_many_requests`, `storage_unavailable`, `internal_error`). `fields`
        is only present on `invalid_request` validation failures.
  securitySchemes:
    bearerApiKey:
      type: http
      scheme: bearer
      bearerFormat: rk_secret_<key>
      description: >-
        Secret API key, created in the dashboard under Settings → API. Send it
        as `Authorization: Bearer rk_secret_…` from your server only.
        Publishable keys (`pk_live_…`) are for the native SDKs and reach the
        capture endpoints alone. An unknown key returns 401.

````