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

# Upsert Intent Trigger Route

> Create or update the intent scoring trigger config for this proxy.



## OpenAPI

````yaml https://cp.xenovia.io/openapi.json put /api/v1/proxies/{proxy_id}/intent-trigger
openapi: 3.1.0
info:
  title: controlplane
  version: 1.0.0
servers: []
security: []
paths:
  /api/v1/proxies/{proxy_id}/intent-trigger:
    put:
      tags:
        - proxies
      summary: Upsert Intent Trigger Route
      description: Create or update the intent scoring trigger config for this proxy.
      operationId: upsert_intent_trigger_route_api_v1_proxies__proxy_id__intent_trigger_put
      parameters:
        - name: proxy_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Proxy Id
        - name: Authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-Request-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Request-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IntentTriggerUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntentTriggerRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    IntentTriggerUpdate:
      properties:
        turn_scope:
          anyOf:
            - type: string
              pattern: ^(all|first|first_n)$
            - type: 'null'
          title: Turn Scope
          description: 'Which turns to score: ''all'', ''first'', or ''first_n''.'
        first_n:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: First N
          description: Only used when turn_scope='first_n'. Number of turns to score.
        on_tools:
          anyOf:
            - type: string
              pattern: ^(ignore|require|always)$
            - type: 'null'
          title: On Tools
          description: How to handle turns that contain tool calls.
        min_content_chars:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Min Content Chars
          description: Skip scoring if the turn content is shorter than this many chars.
        sample_rate:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Sample Rate
          description: Fraction of turns to score (0.00–1.00).
      type: object
      title: IntentTriggerUpdate
      description: >-
        All fields optional — only provided fields are updated (PATCH semantics
        via PUT).
    IntentTriggerRead:
      properties:
        turn_scope:
          type: string
          title: Turn Scope
        first_n:
          anyOf:
            - type: integer
            - type: 'null'
          title: First N
        on_tools:
          type: string
          title: On Tools
        min_content_chars:
          type: integer
          title: Min Content Chars
        sample_rate:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Sample Rate
      type: object
      required:
        - turn_scope
        - first_n
        - on_tools
        - min_content_chars
        - sample_rate
      title: IntentTriggerRead
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````