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

# List metric definitions

> Fetch metric definitions available in the project, including both system-generated and custom metrics. Results are ordered by immutable definition ID; pass `nextCursor` to retrieve the following page.



## OpenAPI

````yaml /api-reference/openapi.documented.json get /v1/metric/definitions
openapi: 3.1.0
info:
  title: Roark Analytics API
  description: >-
    The Roark Analytics API gives you access to the same API that powers the
    award winning Roark Analytics platform.
  version: 1.0.0
servers:
  - description: Production
    url: https://api.roark.ai
security:
  - Bearer: []
tags:
  - name: Agent
  - name: Agent Endpoint
  - name: Call
  - name: Chat
  - name: Metric
  - name: Metric Policy
  - name: Metric Collection Job
  - name: Customer Flow
  - name: Customer Flow Edge Case
  - name: Simulation
  - name: Simulation Persona
  - name: Simulation Environment
  - name: Simulation Scenario
  - name: Simulation Run Plan
  - name: Simulation Template
  - name: Simulation Run Plan Job
  - name: Simulation Job
  - name: HTTP Request Definition
  - name: Webhook
  - name: Issue
  - name: Knowledge Base
  - name: Config
  - name: CLI Auth
  - name: Call Analysis
  - name: Health
paths:
  /v1/metric/definitions:
    get:
      tags:
        - Metric
      summary: List metric definitions
      description: >-
        Fetch metric definitions available in the project, including both
        system-generated and custom metrics. Results are ordered by immutable
        definition ID; pass `nextCursor` to retrieve the following page.
      operationId: getV1MetricDefinitions
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 500
            default: 500
        - in: query
          name: after
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListMetricDefinitionsResponse'
          description: Cursor-paginated metric definitions available in the project
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Validation error
              example:
                type: validation
                code: invalid_parameter
                message: The request was invalid
                param: email
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Authentication error
              example:
                type: authentication
                code: unauthorized
                message: Authentication required
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Permission error
              example:
                type: forbidden
                code: permission_denied
                message: You do not have permission to access this resource
          description: Forbidden
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Rate limit error
              example:
                type: rate_limit
                code: too_many_requests
                message: Rate limit exceeded
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Server error
              example:
                type: internal
                code: internal_error
                message: Internal server error
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Roark from '@roarkanalytics/sdk';

            const client = new Roark({
              bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
            });

            const response = await client.metric.listDefinitions();

            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from roark_analytics import Roark

            client = Roark(
                bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"),  # This is the default and can be omitted
            )
            response = client.metric.list_definitions()
            print(response.data)
components:
  schemas:
    ListMetricDefinitionsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MetricDefinitionResponse'
        pagination:
          type: object
          properties:
            limit:
              type: integer
              minimum: 1
              maximum: 500
            hasMore:
              type: boolean
            nextCursor:
              type:
                - string
                - 'null'
          required:
            - limit
            - hasMore
            - nextCursor
      required:
        - data
        - pagination
      description: Cursor-paginated metric definitions available in the project
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - validation
            - authentication
            - forbidden
            - not_found
            - conflict
            - payment_required
            - rate_limit
            - internal
          description: The error type category
          examples:
            - validation
            - authentication
        code:
          type: string
          description: Machine-readable error code identifier
          examples:
            - invalid_parameter
            - missing_required_field
            - unauthorized
        message:
          type: string
          description: Human-readable error message
          examples:
            - The request was invalid
            - Authentication required
        param:
          type: string
          description: The parameter that caused the error (if applicable)
          examples:
            - email
            - user_id
        details:
          description: Additional error context information
      required:
        - type
        - code
        - message
    MetricDefinitionResponse:
      oneOf:
        - $ref: '#/components/schemas/LlmJudgeMetricResponse'
        - $ref: '#/components/schemas/ProviderMetricResponse'
        - $ref: '#/components/schemas/ThresholdMetricResponse'
        - $ref: '#/components/schemas/FormulaMetricResponse'
        - $ref: '#/components/schemas/PatternMetricResponse'
      discriminator:
        propertyName: calculationType
        mapping:
          LLM_JUDGE:
            $ref: '#/components/schemas/LlmJudgeMetricResponse'
          PROVIDER:
            $ref: '#/components/schemas/ProviderMetricResponse'
          THRESHOLD:
            $ref: '#/components/schemas/ThresholdMetricResponse'
          FORMULA:
            $ref: '#/components/schemas/FormulaMetricResponse'
          PATTERN:
            $ref: '#/components/schemas/PatternMetricResponse'
      description: Metric definition data. The variant is selected by `calculationType`.
    LlmJudgeMetricResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the metric definition
        slug:
          type: string
          description: Stable metric slug (e.g. "call_reason", "customer_satisfaction")
        metricId:
          type: string
          description: >-
            Alias of `slug` retained for backwards compatibility. Same value as
            `slug`.
        variantId:
          type: string
          format: uuid
          description: >-
            The resolved variant this response reflects (org-scoped Default if
            the org has customized it, otherwise the system Default). Pass this
            as sourceVariantId when building a derived metric off this one to
            pin the exact config.
        versionId:
          type: string
          format: uuid
          description: >-
            The variant's current version. Immutable snapshot of the config —
            editing the metric produces a new versionId. Use it to detect config
            changes.
        name:
          type: string
          description: Name of the metric
        description:
          type: string
          description: Description of what the metric measures
        type:
          type: string
          enum:
            - COUNT
            - NUMERIC
            - BOOLEAN
            - SCALE
            - TEXT
            - CLASSIFICATION
            - OFFSET
          description: Type of value this metric produces
        scope:
          type: string
          enum:
            - GLOBAL
            - PER_PARTICIPANT
          description: Whether metric is global or per-participant
        supportedContexts:
          type: array
          items:
            type: string
            enum:
              - CALL
              - SEGMENT
              - TURN
          description: Which levels this metric can produce values at
        supportedConversationSources:
          type:
            - array
            - 'null'
          items:
            type: string
            enum:
              - SIMULATED
              - LIVE
          description: >-
            Which kinds of conversation this metric can be scored on. `null`
            means both. `["LIVE"]` marks a metric that can only be scored from
            your own recording of a real call, and `["SIMULATED"]` one that only
            applies to simulations.
        requiresLiveConversation:
          type: boolean
          description: >-
            True when this metric can only be scored from a live recording
            (`supportedConversationSources` is `["LIVE"]`). Selecting one of
            these on a simulation run forces live enrichment: the run waits for
            your recording and, if none arrives, the metric produces no value.
            Check this before a run rather than discovering the wait afterwards.
        supportsVariants:
          type: boolean
          description: >-
            Whether you can create a variant of this metric with POST
            /v1/metric/definitions/{idOrSlug}/variants. False for threshold
            metrics (their configuration comes from the metric they derive
            from), for provider-computed metrics whose calculation lives in the
            collector rather than an editable prompt, and for metrics in a
            package that manages its own variants. Most of Roark’s own metrics
            are false, so read this rather than discovering it from a 403.
        unit:
          type: object
          properties:
            name:
              type: string
              description: Name of the unit
            symbol:
              type:
                - string
                - 'null'
              description: Symbol for the unit
          required:
            - name
            - symbol
          description: Unit information if applicable
        calculationType:
          type: string
          const: LLM_JUDGE
          description: Metric evaluated by an LLM against a prompt.
        llmPrompt:
          type:
            - string
            - 'null'
          description: >-
            The rubric this judge applies, as stored. Read it back to confirm
            which criteria are live after a create or update.
        booleanTrueLabel:
          type:
            - string
            - 'null'
          description: >-
            For a BOOLEAN metric, what a `true` value means. Also given to the
            judge as its polarity rule.
        booleanFalseLabel:
          type:
            - string
            - 'null'
          description: >-
            For a BOOLEAN metric, what a `false` value means. Also given to the
            judge as its polarity rule.
      required:
        - id
        - slug
        - metricId
        - variantId
        - versionId
        - name
        - description
        - type
        - scope
        - supportedContexts
        - supportedConversationSources
        - requiresLiveConversation
        - supportsVariants
        - calculationType
        - llmPrompt
        - booleanTrueLabel
        - booleanFalseLabel
      title: LLM judge metric
    ProviderMetricResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the metric definition
        slug:
          type: string
          description: Stable metric slug (e.g. "call_reason", "customer_satisfaction")
        metricId:
          type: string
          description: >-
            Alias of `slug` retained for backwards compatibility. Same value as
            `slug`.
        variantId:
          type: string
          format: uuid
          description: >-
            The resolved variant this response reflects (org-scoped Default if
            the org has customized it, otherwise the system Default). Pass this
            as sourceVariantId when building a derived metric off this one to
            pin the exact config.
        versionId:
          type: string
          format: uuid
          description: >-
            The variant's current version. Immutable snapshot of the config —
            editing the metric produces a new versionId. Use it to detect config
            changes.
        name:
          type: string
          description: Name of the metric
        description:
          type: string
          description: Description of what the metric measures
        type:
          type: string
          enum:
            - COUNT
            - NUMERIC
            - BOOLEAN
            - SCALE
            - TEXT
            - CLASSIFICATION
            - OFFSET
          description: Type of value this metric produces
        scope:
          type: string
          enum:
            - GLOBAL
            - PER_PARTICIPANT
          description: Whether metric is global or per-participant
        supportedContexts:
          type: array
          items:
            type: string
            enum:
              - CALL
              - SEGMENT
              - TURN
          description: Which levels this metric can produce values at
        supportedConversationSources:
          type:
            - array
            - 'null'
          items:
            type: string
            enum:
              - SIMULATED
              - LIVE
          description: >-
            Which kinds of conversation this metric can be scored on. `null`
            means both. `["LIVE"]` marks a metric that can only be scored from
            your own recording of a real call, and `["SIMULATED"]` one that only
            applies to simulations.
        requiresLiveConversation:
          type: boolean
          description: >-
            True when this metric can only be scored from a live recording
            (`supportedConversationSources` is `["LIVE"]`). Selecting one of
            these on a simulation run forces live enrichment: the run waits for
            your recording and, if none arrives, the metric produces no value.
            Check this before a run rather than discovering the wait afterwards.
        supportsVariants:
          type: boolean
          description: >-
            Whether you can create a variant of this metric with POST
            /v1/metric/definitions/{idOrSlug}/variants. False for threshold
            metrics (their configuration comes from the metric they derive
            from), for provider-computed metrics whose calculation lives in the
            collector rather than an editable prompt, and for metrics in a
            package that manages its own variants. Most of Roark’s own metrics
            are false, so read this rather than discovering it from a 403.
        unit:
          type: object
          properties:
            name:
              type: string
              description: Name of the unit
            symbol:
              type:
                - string
                - 'null'
              description: Symbol for the unit
          required:
            - name
            - symbol
          description: Unit information if applicable
        calculationType:
          type: string
          const: PROVIDER
          description: System-managed metric produced by an analysis provider.
      required:
        - id
        - slug
        - metricId
        - variantId
        - versionId
        - name
        - description
        - type
        - scope
        - supportedContexts
        - supportedConversationSources
        - requiresLiveConversation
        - supportsVariants
        - calculationType
      title: Provider metric
    ThresholdMetricResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the metric definition
        slug:
          type: string
          description: Stable metric slug (e.g. "call_reason", "customer_satisfaction")
        metricId:
          type: string
          description: >-
            Alias of `slug` retained for backwards compatibility. Same value as
            `slug`.
        variantId:
          type: string
          format: uuid
          description: >-
            The resolved variant this response reflects (org-scoped Default if
            the org has customized it, otherwise the system Default). Pass this
            as sourceVariantId when building a derived metric off this one to
            pin the exact config.
        versionId:
          type: string
          format: uuid
          description: >-
            The variant's current version. Immutable snapshot of the config —
            editing the metric produces a new versionId. Use it to detect config
            changes.
        name:
          type: string
          description: Name of the metric
        description:
          type: string
          description: Description of what the metric measures
        type:
          type: string
          enum:
            - COUNT
            - NUMERIC
            - BOOLEAN
            - SCALE
            - TEXT
            - CLASSIFICATION
            - OFFSET
          description: Type of value this metric produces
        scope:
          type: string
          enum:
            - GLOBAL
            - PER_PARTICIPANT
          description: Whether metric is global or per-participant
        supportedContexts:
          type: array
          items:
            type: string
            enum:
              - CALL
              - SEGMENT
              - TURN
          description: Which levels this metric can produce values at
        supportedConversationSources:
          type:
            - array
            - 'null'
          items:
            type: string
            enum:
              - SIMULATED
              - LIVE
          description: >-
            Which kinds of conversation this metric can be scored on. `null`
            means both. `["LIVE"]` marks a metric that can only be scored from
            your own recording of a real call, and `["SIMULATED"]` one that only
            applies to simulations.
        requiresLiveConversation:
          type: boolean
          description: >-
            True when this metric can only be scored from a live recording
            (`supportedConversationSources` is `["LIVE"]`). Selecting one of
            these on a simulation run forces live enrichment: the run waits for
            your recording and, if none arrives, the metric produces no value.
            Check this before a run rather than discovering the wait afterwards.
        supportsVariants:
          type: boolean
          description: >-
            Whether you can create a variant of this metric with POST
            /v1/metric/definitions/{idOrSlug}/variants. False for threshold
            metrics (their configuration comes from the metric they derive
            from), for provider-computed metrics whose calculation lives in the
            collector rather than an editable prompt, and for metrics in a
            package that manages its own variants. Most of Roark’s own metrics
            are false, so read this rather than discovering it from a 403.
        unit:
          type: object
          properties:
            name:
              type: string
              description: Name of the unit
            symbol:
              type:
                - string
                - 'null'
              description: Symbol for the unit
          required:
            - name
            - symbol
          description: Unit information if applicable
        calculationType:
          type: string
          const: THRESHOLD
          description: >-
            Boolean metric derived by comparing a source metric against a
            threshold.
        threshold:
          $ref: '#/components/schemas/ThresholdMetricDetails'
          description: Threshold configuration.
      required:
        - id
        - slug
        - metricId
        - variantId
        - versionId
        - name
        - description
        - type
        - scope
        - supportedContexts
        - supportedConversationSources
        - requiresLiveConversation
        - supportsVariants
        - calculationType
      title: Threshold metric
    FormulaMetricResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the metric definition
        slug:
          type: string
          description: Stable metric slug (e.g. "call_reason", "customer_satisfaction")
        metricId:
          type: string
          description: >-
            Alias of `slug` retained for backwards compatibility. Same value as
            `slug`.
        variantId:
          type: string
          format: uuid
          description: >-
            The resolved variant this response reflects (org-scoped Default if
            the org has customized it, otherwise the system Default). Pass this
            as sourceVariantId when building a derived metric off this one to
            pin the exact config.
        versionId:
          type: string
          format: uuid
          description: >-
            The variant's current version. Immutable snapshot of the config —
            editing the metric produces a new versionId. Use it to detect config
            changes.
        name:
          type: string
          description: Name of the metric
        description:
          type: string
          description: Description of what the metric measures
        type:
          type: string
          enum:
            - COUNT
            - NUMERIC
            - BOOLEAN
            - SCALE
            - TEXT
            - CLASSIFICATION
            - OFFSET
          description: Type of value this metric produces
        scope:
          type: string
          enum:
            - GLOBAL
            - PER_PARTICIPANT
          description: Whether metric is global or per-participant
        supportedContexts:
          type: array
          items:
            type: string
            enum:
              - CALL
              - SEGMENT
              - TURN
          description: Which levels this metric can produce values at
        supportedConversationSources:
          type:
            - array
            - 'null'
          items:
            type: string
            enum:
              - SIMULATED
              - LIVE
          description: >-
            Which kinds of conversation this metric can be scored on. `null`
            means both. `["LIVE"]` marks a metric that can only be scored from
            your own recording of a real call, and `["SIMULATED"]` one that only
            applies to simulations.
        requiresLiveConversation:
          type: boolean
          description: >-
            True when this metric can only be scored from a live recording
            (`supportedConversationSources` is `["LIVE"]`). Selecting one of
            these on a simulation run forces live enrichment: the run waits for
            your recording and, if none arrives, the metric produces no value.
            Check this before a run rather than discovering the wait afterwards.
        supportsVariants:
          type: boolean
          description: >-
            Whether you can create a variant of this metric with POST
            /v1/metric/definitions/{idOrSlug}/variants. False for threshold
            metrics (their configuration comes from the metric they derive
            from), for provider-computed metrics whose calculation lives in the
            collector rather than an editable prompt, and for metrics in a
            package that manages its own variants. Most of Roark’s own metrics
            are false, so read this rather than discovering it from a 403.
        unit:
          type: object
          properties:
            name:
              type: string
              description: Name of the unit
            symbol:
              type:
                - string
                - 'null'
              description: Symbol for the unit
          required:
            - name
            - symbol
          description: Unit information if applicable
        calculationType:
          type: string
          const: FORMULA
          description: Metric computed by evaluating an expression over other metrics.
        formula:
          $ref: '#/components/schemas/FormulaMetricDetails'
          description: Formula configuration.
      required:
        - id
        - slug
        - metricId
        - variantId
        - versionId
        - name
        - description
        - type
        - scope
        - supportedContexts
        - supportedConversationSources
        - requiresLiveConversation
        - supportsVariants
        - calculationType
        - formula
      title: Formula metric
    PatternMetricResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the metric definition
        slug:
          type: string
          description: Stable metric slug (e.g. "call_reason", "customer_satisfaction")
        metricId:
          type: string
          description: >-
            Alias of `slug` retained for backwards compatibility. Same value as
            `slug`.
        variantId:
          type: string
          format: uuid
          description: >-
            The resolved variant this response reflects (org-scoped Default if
            the org has customized it, otherwise the system Default). Pass this
            as sourceVariantId when building a derived metric off this one to
            pin the exact config.
        versionId:
          type: string
          format: uuid
          description: >-
            The variant's current version. Immutable snapshot of the config —
            editing the metric produces a new versionId. Use it to detect config
            changes.
        name:
          type: string
          description: Name of the metric
        description:
          type: string
          description: Description of what the metric measures
        type:
          type: string
          enum:
            - COUNT
            - NUMERIC
            - BOOLEAN
            - SCALE
            - TEXT
            - CLASSIFICATION
            - OFFSET
          description: Type of value this metric produces
        scope:
          type: string
          enum:
            - GLOBAL
            - PER_PARTICIPANT
          description: Whether metric is global or per-participant
        supportedContexts:
          type: array
          items:
            type: string
            enum:
              - CALL
              - SEGMENT
              - TURN
          description: Which levels this metric can produce values at
        supportedConversationSources:
          type:
            - array
            - 'null'
          items:
            type: string
            enum:
              - SIMULATED
              - LIVE
          description: >-
            Which kinds of conversation this metric can be scored on. `null`
            means both. `["LIVE"]` marks a metric that can only be scored from
            your own recording of a real call, and `["SIMULATED"]` one that only
            applies to simulations.
        requiresLiveConversation:
          type: boolean
          description: >-
            True when this metric can only be scored from a live recording
            (`supportedConversationSources` is `["LIVE"]`). Selecting one of
            these on a simulation run forces live enrichment: the run waits for
            your recording and, if none arrives, the metric produces no value.
            Check this before a run rather than discovering the wait afterwards.
        supportsVariants:
          type: boolean
          description: >-
            Whether you can create a variant of this metric with POST
            /v1/metric/definitions/{idOrSlug}/variants. False for threshold
            metrics (their configuration comes from the metric they derive
            from), for provider-computed metrics whose calculation lives in the
            collector rather than an editable prompt, and for metrics in a
            package that manages its own variants. Most of Roark’s own metrics
            are false, so read this rather than discovering it from a 403.
        unit:
          type: object
          properties:
            name:
              type: string
              description: Name of the unit
            symbol:
              type:
                - string
                - 'null'
              description: Symbol for the unit
          required:
            - name
            - symbol
          description: Unit information if applicable
        calculationType:
          type: string
          const: PATTERN
          description: >-
            Metric detecting a trigger condition followed by an outcome within a
            window.
        pattern:
          $ref: '#/components/schemas/PatternMetricDetails'
          description: Pattern configuration.
      required:
        - id
        - slug
        - metricId
        - variantId
        - versionId
        - name
        - description
        - type
        - scope
        - supportedContexts
        - supportedConversationSources
        - requiresLiveConversation
        - supportsVariants
        - calculationType
        - pattern
      title: Pattern metric
    ThresholdMetricDetails:
      type: object
      properties:
        sourceMetricDefinitionId:
          type: string
          format: uuid
        operator:
          type: string
          enum:
            - GREATER_THAN
            - GREATER_THAN_OR_EQUALS
            - LESS_THAN
            - LESS_THAN_OR_EQUALS
            - EQUALS
            - NOT_EQUALS
        thresholdValue:
          type: string
        aggregationMode:
          type: string
          enum:
            - EACH
            - COUNT
            - AVERAGE
            - MIN
            - MAX
            - MEDIAN
            - P95
            - P99
            - SUM
        countThreshold:
          type:
            - integer
            - 'null'
        sourceParticipantRole:
          type:
            - string
            - 'null'
          enum:
            - AGENT
            - CUSTOMER
            - SIMULATED_CUSTOMER
            - BACKGROUND_SPEAKER
        sourceVariantId:
          type:
            - string
            - 'null'
          format: uuid
      required:
        - sourceMetricDefinitionId
        - operator
        - thresholdValue
        - aggregationMode
        - countThreshold
        - sourceParticipantRole
        - sourceVariantId
    FormulaMetricDetails:
      type: object
      properties:
        expression:
          type: string
        sources:
          type: array
          items:
            type: object
            properties:
              sourceMetricDefinitionId:
                type: string
                format: uuid
              sourceVariantId:
                type:
                  - string
                  - 'null'
                format: uuid
            required:
              - sourceMetricDefinitionId
              - sourceVariantId
      required:
        - expression
        - sources
    PatternMetricDetails:
      type: object
      properties:
        operation:
          type: string
          enum:
            - PATTERN_EXISTS
            - PATTERN_COUNT
            - OUTCOME_AGGREGATE
        windowMode:
          type:
            - string
            - 'null'
        triggerCombinator:
          type:
            - string
            - 'null'
          enum:
            - AND
            - OR
        triggers:
          type: array
          items:
            type: object
            properties:
              sourceMetricDefinitionId:
                type: string
                format: uuid
              operator:
                type: string
                enum:
                  - GREATER_THAN
                  - GREATER_THAN_OR_EQUALS
                  - LESS_THAN
                  - LESS_THAN_OR_EQUALS
                  - EQUALS
                  - NOT_EQUALS
              thresholdValue:
                type: string
              sourceParticipantRole:
                type:
                  - string
                  - 'null'
                enum:
                  - AGENT
                  - CUSTOMER
                  - SIMULATED_CUSTOMER
                  - BACKGROUND_SPEAKER
              sourceVariantId:
                type:
                  - string
                  - 'null'
                format: uuid
            required:
              - sourceMetricDefinitionId
              - operator
              - thresholdValue
              - sourceParticipantRole
              - sourceVariantId
        outcome:
          type:
            - object
            - 'null'
          properties:
            sourceMetricDefinitionId:
              type: string
              format: uuid
            operator:
              type: string
              enum:
                - GREATER_THAN
                - GREATER_THAN_OR_EQUALS
                - LESS_THAN
                - LESS_THAN_OR_EQUALS
                - EQUALS
                - NOT_EQUALS
            thresholdValue:
              type: string
            sourceParticipantRole:
              type:
                - string
                - 'null'
              enum:
                - AGENT
                - CUSTOMER
                - SIMULATED_CUSTOMER
                - BACKGROUND_SPEAKER
            sourceVariantId:
              type:
                - string
                - 'null'
              format: uuid
            windowBefore:
              type:
                - integer
                - 'null'
            windowAfter:
              type:
                - integer
                - 'null'
          required:
            - sourceMetricDefinitionId
            - operator
            - thresholdValue
            - sourceParticipantRole
            - sourceVariantId
            - windowBefore
            - windowAfter
      required:
        - operation
        - windowMode
        - triggerCombinator
        - triggers
        - outcome
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````