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

# Update Custom Extractor

> Update a custom extractor's definition (including outputMode/jsonSchema), its LLM-seeded anchors, or its lifecycle status — set status "ACTIVE" to start it running live in the analytics pipeline. Only the provided keys change. Requires the custom-extractors entitlement.



## OpenAPI

````yaml post /api/v2/custom-extractor/update
openapi: 3.0.0
info:
  version: 5.4.0
  title: Octave API
  description: API for Octave workspace management and AI-powered content generation
servers:
  - url: https://app.octavehq.com
security:
  - ApiKeyAuth: []
paths:
  /api/v2/custom-extractor/update:
    post:
      tags:
        - Custom Extractors
      summary: Update Custom Extractor
      description: >-
        Update a custom extractor's definition (including
        outputMode/jsonSchema), its LLM-seeded anchors, or its lifecycle status
        — set status "ACTIVE" to start it running live in the analytics
        pipeline. Only the provided keys change. Requires the custom-extractors
        entitlement.
      operationId: updateCustomExtractor
      requestBody:
        description: Extractor oId plus the fields to change
        content:
          application/json:
            schema:
              type: object
              properties:
                oId:
                  type: string
                  minLength: 1
                data:
                  type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                      maxLength: 255
                    description:
                      type: string
                      nullable: true
                      maxLength: 2000
                    prompt:
                      type: string
                      minLength: 1
                      maxLength: 20000
                    authoringInput:
                      type: string
                      nullable: true
                      maxLength: 4000
                      description: >-
                        The plain-language ask the AI authoring assist drafted
                        the prompt from, kept for provenance. Omit (or null)
                        when the prompt was hand-written. Changing it alone does
                        not bump promptVersion.
                    eventTypes:
                      type: array
                      items:
                        type: string
                        enum:
                          - EMAIL_SENT
                          - EMAIL_REPLY_RECEIVED
                          - CALL_TRANSCRIPT
                          - DEAL_WON
                          - DEAL_LOST
                          - OPPORTUNITY_CREATED
                          - MEETING_BOOKED
                          - RESOURCE_INDEXED
                          - RESOURCE_REINDEXED
                          - PROJECT_UPDATE
                          - TASK_COMPLETED
                          - ENTITY_CREATED
                          - ENTITY_UPDATED
                          - SOCIAL_MESSAGE_SENT
                          - SOCIAL_MESSAGE_RECEIVED
                          - SOCIAL_CONNECTION_SENT
                          - SOCIAL_CONNECTION_ACCEPTED
                          - AD_SET_PUBLISHED
                          - AD_PERFORMANCE_SNAPSHOT
                          - BULK_IMPORT_SUMMARY
                          - PROCESSING_NOT_APPLICABLE
                          - PROVIDER_EVENT_TYPE_UNKNOWN
                          - UNKNOWN
                      minItems: 1
                      description: Event types this extractor runs on
                    eventFilters:
                      type: object
                      nullable: true
                      properties:
                        match:
                          type: object
                          properties:
                            entityMatchAll:
                              type: boolean
                              description: >-
                                Require every selected library entity, including
                                entities of the same category
                            eventOIds:
                              type: array
                              items:
                                type: string
                              description: Filter to these event oIds only
                            opportunityIds:
                              type: array
                              items:
                                type: string
                              description: >-
                                Filter to events linked to these opportunities.
                                Accepts Octave opportunity oIds (crmo_*) or the
                                CRM's own deal ids (Salesforce Id, HubSpot
                                object id, Attio record UUID) interchangeably
                            eventCategories:
                              type: array
                              items:
                                type: string
                                enum:
                                  - EMAIL
                                  - CALL
                                  - CRM
                                  - RESOURCE
                                  - REVISION
                                  - SOCIAL
                                  - ADS
                                  - PRODUCT
                                  - UNKNOWN
                              description: Filter by event categories (CALL, EMAIL, CRM)
                            eventTypes:
                              type: array
                              items:
                                type: string
                                enum:
                                  - EMAIL_SENT
                                  - EMAIL_REPLY_RECEIVED
                                  - CALL_TRANSCRIPT
                                  - DEAL_WON
                                  - DEAL_LOST
                                  - OPPORTUNITY_CREATED
                                  - MEETING_BOOKED
                                  - RESOURCE_INDEXED
                                  - RESOURCE_REINDEXED
                                  - PROJECT_UPDATE
                                  - TASK_COMPLETED
                                  - ENTITY_CREATED
                                  - ENTITY_UPDATED
                                  - SOCIAL_MESSAGE_SENT
                                  - SOCIAL_MESSAGE_RECEIVED
                                  - SOCIAL_CONNECTION_SENT
                                  - SOCIAL_CONNECTION_ACCEPTED
                                  - AD_SET_PUBLISHED
                                  - AD_PERFORMANCE_SNAPSHOT
                                  - BULK_IMPORT_SUMMARY
                                  - PROCESSING_NOT_APPLICABLE
                                  - PROVIDER_EVENT_TYPE_UNKNOWN
                                  - UNKNOWN
                              description: >-
                                Filter by specific event types (CALL_TRANSCRIPT,
                                EMAIL_SENT, DEAL_WON, etc.)
                            sentiments:
                              type: array
                              items:
                                type: string
                                enum:
                                  - POSITIVE
                                  - NEUTRAL
                                  - NEGATIVE
                                  - UNKNOWN
                              description: >-
                                Filter by sentiment (POSITIVE, NEGATIVE,
                                NEUTRAL, MIXED)
                            contactEmails:
                              type: array
                              items:
                                type: string
                              description: Filter by participant email addresses
                            companyDomains:
                              type: array
                              items:
                                type: string
                              description: Filter by company domains
                            outcomeFilters:
                              type: array
                              items:
                                type: string
                                enum:
                                  - OPEN
                                  - WON
                                  - LOST
                                  - POSITIVE_REPLY
                                  - NEUTRAL_REPLY
                                  - NEGATIVE_REPLY
                              description: >-
                                Filter by outcome (OPEN, WON, LOST,
                                POSITIVE_REPLY, NEUTRAL_REPLY, NEGATIVE_REPLY)
                            opportunityStatuses:
                              type: array
                              items:
                                type: string
                                enum:
                                  - OPEN
                                  - WON
                                  - LOST
                              description: >-
                                Filter to events linked to deals with this
                                status (OPEN, WON, LOST)
                            dealMotions:
                              type: array
                              items:
                                type: string
                                enum:
                                  - NET_NEW
                                  - UPSELL
                                  - CROSS_SELL
                                  - RENEW_AND_RETAIN
                                  - CONVERT_FREE_TO_PAID
                                  - DISPLACE_INCUMBENT
                                  - SERVICES
                                  - PARTNER
                                  - NON_COMMERCIAL
                              description: >-
                                Filter to events linked to deals whose CRM deal
                                type maps to these motions (NET_NEW, UPSELL,
                                CROSS_SELL, RENEW_AND_RETAIN,
                                CONVERT_FREE_TO_PAID, DISPLACE_INCUMBENT,
                                SERVICES, PARTNER, NON_COMMERCIAL)
                            dealTypes:
                              type: array
                              items:
                                type: string
                              description: >-
                                Filter to events linked to deals with these raw
                                CRM deal-type labels (Salesforce Type, HubSpot
                                dealtype), case-insensitive
                            dealStages:
                              type: array
                              items:
                                type: string
                              description: >-
                                Filter to events linked to deals currently in
                                these CRM stages, by stage label or stage id,
                                case-insensitive
                            dealStagesAtEvent:
                              type: array
                              items:
                                type: string
                              description: >-
                                Filter to events whose linked deal was in one of
                                these CRM stages WHEN THE EVENT HAPPENED (by
                                stage label, case-insensitive), from the deal's
                                stage history — unlike dealStages, which reads
                                the deal's stage today. Use it for 'what came up
                                on calls during Discovery'. An event whose deal
                                has no recorded stage at that time does not
                                match.
                            pipelinePhases:
                              type: array
                              items:
                                type: string
                                enum:
                                  - prospecting
                                  - discovery
                                  - evaluation
                                  - negotiation
                                  - commitment
                                  - closed_won
                                  - closed_lost
                              description: >-
                                Filter to events linked to deals whose stage
                                maps to these pipeline phases (prospecting,
                                discovery, evaluation, negotiation, commitment,
                                closed_won, closed_lost)
                            crmPipelines:
                              type: array
                              items:
                                type: string
                              description: >-
                                Filter to events linked to deals in these CRM
                                pipelines, by pipeline id or name
                                (case-insensitive name)
                            minStalledDays:
                              type: number
                              description: >-
                                Filter to events linked to an OPEN deal that has
                                sat in its current stage at least this many days
                            minDealAmount:
                              type: number
                              description: Minimum deal amount filter
                            maxDealAmount:
                              type: number
                              description: Maximum deal amount filter
                            offerings:
                              type: array
                              items:
                                type: string
                              description: Filter by offering oIds
                            personas:
                              type: array
                              items:
                                type: string
                              description: >-
                                Filter by persona oIds (events must match these
                                personas)
                            segments:
                              type: array
                              items:
                                type: string
                              description: Filter by segment oIds
                            tags:
                              type: array
                              items:
                                type: string
                              description: >-
                                Filter by reporting tag oIds (from any tag
                                group, on any library entity type). Resolved to
                                the entities carrying those tags; multiple tags
                                are OR'd.
                            useCases:
                              type: array
                              items:
                                type: string
                              description: Filter by use case oIds
                            references:
                              type: array
                              items:
                                type: string
                              description: Filter by reference customer oIds
                            competitors:
                              type: array
                              items:
                                type: string
                              description: Filter by competitor oIds
                            alternatives:
                              type: array
                              items:
                                type: string
                              description: Filter by alternative oIds
                            buyingTriggers:
                              type: array
                              items:
                                type: string
                              description: Filter by buying trigger oIds
                            coreFeatures:
                              type: array
                              items:
                                type: string
                              description: Filter by core feature oIds
                            objections:
                              type: array
                              items:
                                type: string
                              description: Filter by objection oIds
                            proofPoints:
                              type: array
                              items:
                                type: string
                              description: Filter by proof point oIds
                            motionTypes:
                              type: array
                              items:
                                type: string
                                enum:
                                  - NET_NEW
                                  - UPSELL
                                  - CROSS_SELL
                                  - CONVERT_FREE_TO_PAID
                                  - RENEW_AND_RETAIN
                                  - DISPLACE_INCUMBENT
                              description: Filter by motion type (NET_NEW, UPSELL)
                            customerScope:
                              type: string
                              enum:
                                - ALL
                                - NEW_CUSTOMERS
                                - EXISTING_CUSTOMERS
                              description: >-
                                Customer-scope view (NEW_CUSTOMERS /
                                EXISTING_CUSTOMERS); ALL or absent applies no
                                filter
                            callPurposes:
                              type: array
                              items:
                                type: string
                                enum:
                                  - DISCOVERY
                                  - DEMO
                                  - TECHNICAL_EVALUATION
                                  - WORKING_SESSION
                                  - NEGOTIATION_PRICING
                                  - ONBOARDING
                                  - CHECK_IN_SUCCESS
                                  - QBR_RENEWAL
                                  - EXPANSION_UPSELL
                                  - ESCALATION_CHURN_RISK
                                  - SUPPORT
                                  - INTERNAL_SYNC
                                  - OTHER
                              description: >-
                                Filter calls by classified purpose (DISCOVERY,
                                DEMO, TECHNICAL_EVALUATION, WORKING_SESSION,
                                NEGOTIATION_PRICING, ONBOARDING,
                                CHECK_IN_SUCCESS, QBR_RENEWAL, EXPANSION_UPSELL,
                                ESCALATION_CHURN_RISK, SUPPORT, INTERNAL_SYNC,
                                OTHER)
                            unmatchedOnly:
                              type: boolean
                              description: >-
                                When true, only return events that have findings
                                with no library entity matches
                          description: Filters to INCLUDE events matching these criteria
                        exclude:
                          type: object
                          properties:
                            eventCategories:
                              type: array
                              items:
                                type: string
                                enum:
                                  - EMAIL
                                  - CALL
                                  - CRM
                                  - RESOURCE
                                  - REVISION
                                  - SOCIAL
                                  - ADS
                                  - PRODUCT
                                  - UNKNOWN
                              description: Filter by event categories (CALL, EMAIL, CRM)
                            eventTypes:
                              type: array
                              items:
                                type: string
                                enum:
                                  - EMAIL_SENT
                                  - EMAIL_REPLY_RECEIVED
                                  - CALL_TRANSCRIPT
                                  - DEAL_WON
                                  - DEAL_LOST
                                  - OPPORTUNITY_CREATED
                                  - MEETING_BOOKED
                                  - RESOURCE_INDEXED
                                  - RESOURCE_REINDEXED
                                  - PROJECT_UPDATE
                                  - TASK_COMPLETED
                                  - ENTITY_CREATED
                                  - ENTITY_UPDATED
                                  - SOCIAL_MESSAGE_SENT
                                  - SOCIAL_MESSAGE_RECEIVED
                                  - SOCIAL_CONNECTION_SENT
                                  - SOCIAL_CONNECTION_ACCEPTED
                                  - AD_SET_PUBLISHED
                                  - AD_PERFORMANCE_SNAPSHOT
                                  - BULK_IMPORT_SUMMARY
                                  - PROCESSING_NOT_APPLICABLE
                                  - PROVIDER_EVENT_TYPE_UNKNOWN
                                  - UNKNOWN
                              description: >-
                                Filter by specific event types (CALL_TRANSCRIPT,
                                EMAIL_SENT, DEAL_WON, etc.)
                            sentiments:
                              type: array
                              items:
                                type: string
                                enum:
                                  - POSITIVE
                                  - NEUTRAL
                                  - NEGATIVE
                                  - UNKNOWN
                              description: >-
                                Filter by sentiment (POSITIVE, NEGATIVE,
                                NEUTRAL, MIXED)
                            contactEmails:
                              type: array
                              items:
                                type: string
                              description: Filter by participant email addresses
                            companyDomains:
                              type: array
                              items:
                                type: string
                              description: Filter by company domains
                            outcomeFilters:
                              type: array
                              items:
                                type: string
                                enum:
                                  - OPEN
                                  - WON
                                  - LOST
                                  - POSITIVE_REPLY
                                  - NEUTRAL_REPLY
                                  - NEGATIVE_REPLY
                              description: >-
                                Exclude by outcome (OPEN, WON, LOST,
                                POSITIVE_REPLY, NEUTRAL_REPLY, NEGATIVE_REPLY)
                            opportunityStatuses:
                              type: array
                              items:
                                type: string
                                enum:
                                  - OPEN
                                  - WON
                                  - LOST
                              description: Exclude by opportunity status (OPEN, WON, LOST)
                            minDealAmount:
                              type: number
                              description: Minimum deal amount filter
                            maxDealAmount:
                              type: number
                              description: Maximum deal amount filter
                            offerings:
                              type: array
                              items:
                                type: string
                              description: Exclude events matching these offering oIds
                            personas:
                              type: array
                              items:
                                type: string
                              description: Exclude events matching these persona oIds
                            segments:
                              type: array
                              items:
                                type: string
                              description: Exclude events matching these segment oIds
                            tags:
                              type: array
                              items:
                                type: string
                              description: >-
                                Exclude events matching any library entity that
                                carries these reporting tag oIds (any tag group;
                                OR'd).
                            useCases:
                              type: array
                              items:
                                type: string
                              description: Exclude events matching these use case oIds
                            references:
                              type: array
                              items:
                                type: string
                              description: >-
                                Exclude events matching these reference customer
                                oIds
                            competitors:
                              type: array
                              items:
                                type: string
                              description: Exclude events matching these competitor oIds
                            alternatives:
                              type: array
                              items:
                                type: string
                              description: Exclude events matching these alternative oIds
                            buyingTriggers:
                              type: array
                              items:
                                type: string
                              description: >-
                                Exclude events matching these buying trigger
                                oIds
                            coreFeatures:
                              type: array
                              items:
                                type: string
                              description: Exclude events matching these core feature oIds
                            objections:
                              type: array
                              items:
                                type: string
                              description: Exclude events matching these objection oIds
                            proofPoints:
                              type: array
                              items:
                                type: string
                              description: Exclude events matching these proof point oIds
                            motionTypes:
                              type: array
                              items:
                                type: string
                                enum:
                                  - NET_NEW
                                  - UPSELL
                                  - CROSS_SELL
                                  - CONVERT_FREE_TO_PAID
                                  - RENEW_AND_RETAIN
                                  - DISPLACE_INCUMBENT
                              description: >-
                                Exclude events matching these motion types
                                (NET_NEW, UPSELL)
                            callPurposes:
                              type: array
                              items:
                                type: string
                                enum:
                                  - DISCOVERY
                                  - DEMO
                                  - TECHNICAL_EVALUATION
                                  - WORKING_SESSION
                                  - NEGOTIATION_PRICING
                                  - ONBOARDING
                                  - CHECK_IN_SUCCESS
                                  - QBR_RENEWAL
                                  - EXPANSION_UPSELL
                                  - ESCALATION_CHURN_RISK
                                  - SUPPORT
                                  - INTERNAL_SYNC
                                  - OTHER
                              description: >-
                                Exclude calls with these classified purposes
                                (e.g. SUPPORT, INTERNAL_SYNC)
                            dealMotions:
                              type: array
                              items:
                                type: string
                                enum:
                                  - NET_NEW
                                  - UPSELL
                                  - CROSS_SELL
                                  - RENEW_AND_RETAIN
                                  - CONVERT_FREE_TO_PAID
                                  - DISPLACE_INCUMBENT
                                  - SERVICES
                                  - PARTNER
                                  - NON_COMMERCIAL
                              description: >-
                                Exclude events linked to deals whose CRM deal
                                type maps to these motions
                            dealTypes:
                              type: array
                              items:
                                type: string
                              description: >-
                                Exclude events linked to deals with these raw
                                CRM deal-type labels, case-insensitive
                            dealStages:
                              type: array
                              items:
                                type: string
                              description: >-
                                Exclude events linked to deals currently in
                                these CRM stages, by stage label or stage id,
                                case-insensitive
                            pipelinePhases:
                              type: array
                              items:
                                type: string
                                enum:
                                  - prospecting
                                  - discovery
                                  - evaluation
                                  - negotiation
                                  - commitment
                                  - closed_won
                                  - closed_lost
                              description: >-
                                Exclude events linked to deals whose stage maps
                                to these pipeline phases
                          description: Filters to EXCLUDE events matching these criteria
                      description: >-
                        Optional additional event filters (event-log filter
                        shape). Library-entity filters hold the extractor until
                        entity matching has run, then gate it there as well as
                        in backfills.
                    modelTier:
                      type: string
                      enum:
                        - NOTE
                        - PULSE
                        - ECHO
                        - HARMONY
                        - CHORUS
                        - SYMPHONY
                    outputMode:
                      type: string
                      enum:
                        - freeform
                        - boolean
                        - number
                        - enum_single
                        - enum_multi
                        - object
                    classes:
                      type: array
                      nullable: true
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                            minLength: 1
                            maxLength: 64
                            pattern: ^[a-z0-9][a-z0-9_-]*$
                          label:
                            type: string
                            nullable: true
                            maxLength: 120
                          description:
                            type: string
                            nullable: true
                            maxLength: 500
                        required:
                          - value
                      maxItems: 25
                      description: >-
                        Choice-mode classes (enum_single / enum_multi); >= 2
                        required
                    numberConfig:
                      type: object
                      nullable: true
                      properties:
                        unit:
                          type: string
                          nullable: true
                          maxLength: 32
                        min:
                          type: number
                          nullable: true
                        max:
                          type: number
                          nullable: true
                      description: NUMBER-mode unit and optional min/max bounds
                    jsonSchema:
                      type: object
                      nullable: true
                      additionalProperties:
                        nullable: true
                      description: OBJECT-mode JSON Schema for the structured value
                    resultCardinality:
                      type: string
                      enum:
                        - single
                        - repeated
                    perspective:
                      type: string
                      enum:
                        - INTERNAL
                        - EXTERNAL
                        - ANY
                    fieldTargets:
                      type: array
                      items:
                        type: object
                        properties:
                          table:
                            type: string
                            enum:
                              - persona
                              - product
                              - service
                              - solution
                              - use_case
                              - playbook
                              - proof_point
                              - competitor
                              - alternative
                              - buying_trigger
                              - core_feature
                              - objection
                              - reference
                              - hypothesis
                              - segment
                              - skill
                          entityOId:
                            type: string
                            minLength: 1
                          field:
                            type: string
                            minLength: 1
                            maxLength: 120
                        required:
                          - table
                          - entityOId
                          - field
                    status:
                      type: string
                      enum:
                        - DRAFT
                        - ACTIVE
                        - PAUSED
                        - ARCHIVED
                    associatedLibraryTables:
                      type: array
                      items:
                        type: string
                        enum:
                          - persona
                          - product
                          - service
                          - solution
                          - use_case
                          - playbook
                          - proof_point
                          - competitor
                          - alternative
                          - buying_trigger
                          - core_feature
                          - objection
                          - reference
                          - hypothesis
                          - segment
                          - skill
              required:
                - oId
                - data
      responses:
        '200':
          description: The updated extractor
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  data:
                    $ref: '#/components/schemas/CustomExtractor'
                required:
                  - _metadata
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
      deprecated: false
components:
  schemas:
    Metadata:
      type: object
      properties:
        usage:
          type: number
          default: 0
          example: 0
          description: API usage
        requestId:
          type: string
          example: requestId
          description: Request ID
        message:
          type: string
          example: message
          description: Message
        timestamp:
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: Timestamp
      required:
        - requestId
        - timestamp
    CustomExtractor:
      type: object
      nullable: true
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
        description:
          type: string
          nullable: true
          maxLength: 2000
        prompt:
          type: string
          minLength: 1
          maxLength: 20000
        authoringInput:
          type: string
          nullable: true
          maxLength: 4000
          description: >-
            The plain-language ask the AI authoring assist drafted the prompt
            from, kept for provenance. Omit (or null) when the prompt was
            hand-written. Changing it alone does not bump promptVersion.
        eventTypes:
          type: array
          items:
            type: string
            enum:
              - EMAIL_SENT
              - EMAIL_REPLY_RECEIVED
              - CALL_TRANSCRIPT
              - DEAL_WON
              - DEAL_LOST
              - OPPORTUNITY_CREATED
              - MEETING_BOOKED
              - RESOURCE_INDEXED
              - RESOURCE_REINDEXED
              - PROJECT_UPDATE
              - TASK_COMPLETED
              - ENTITY_CREATED
              - ENTITY_UPDATED
              - SOCIAL_MESSAGE_SENT
              - SOCIAL_MESSAGE_RECEIVED
              - SOCIAL_CONNECTION_SENT
              - SOCIAL_CONNECTION_ACCEPTED
              - AD_SET_PUBLISHED
              - AD_PERFORMANCE_SNAPSHOT
              - BULK_IMPORT_SUMMARY
              - PROCESSING_NOT_APPLICABLE
              - PROVIDER_EVENT_TYPE_UNKNOWN
              - UNKNOWN
          minItems: 1
          description: Event types this extractor runs on
        eventFilters:
          type: object
          nullable: true
          properties:
            match:
              type: object
              properties:
                entityMatchAll:
                  type: boolean
                  description: >-
                    Require every selected library entity, including entities of
                    the same category
                eventOIds:
                  type: array
                  items:
                    type: string
                  description: Filter to these event oIds only
                opportunityIds:
                  type: array
                  items:
                    type: string
                  description: >-
                    Filter to events linked to these opportunities. Accepts
                    Octave opportunity oIds (crmo_*) or the CRM's own deal ids
                    (Salesforce Id, HubSpot object id, Attio record UUID)
                    interchangeably
                eventCategories:
                  type: array
                  items:
                    type: string
                    enum:
                      - EMAIL
                      - CALL
                      - CRM
                      - RESOURCE
                      - REVISION
                      - SOCIAL
                      - ADS
                      - PRODUCT
                      - UNKNOWN
                  description: Filter by event categories (CALL, EMAIL, CRM)
                eventTypes:
                  type: array
                  items:
                    type: string
                    enum:
                      - EMAIL_SENT
                      - EMAIL_REPLY_RECEIVED
                      - CALL_TRANSCRIPT
                      - DEAL_WON
                      - DEAL_LOST
                      - OPPORTUNITY_CREATED
                      - MEETING_BOOKED
                      - RESOURCE_INDEXED
                      - RESOURCE_REINDEXED
                      - PROJECT_UPDATE
                      - TASK_COMPLETED
                      - ENTITY_CREATED
                      - ENTITY_UPDATED
                      - SOCIAL_MESSAGE_SENT
                      - SOCIAL_MESSAGE_RECEIVED
                      - SOCIAL_CONNECTION_SENT
                      - SOCIAL_CONNECTION_ACCEPTED
                      - AD_SET_PUBLISHED
                      - AD_PERFORMANCE_SNAPSHOT
                      - BULK_IMPORT_SUMMARY
                      - PROCESSING_NOT_APPLICABLE
                      - PROVIDER_EVENT_TYPE_UNKNOWN
                      - UNKNOWN
                  description: >-
                    Filter by specific event types (CALL_TRANSCRIPT, EMAIL_SENT,
                    DEAL_WON, etc.)
                sentiments:
                  type: array
                  items:
                    type: string
                    enum:
                      - POSITIVE
                      - NEUTRAL
                      - NEGATIVE
                      - UNKNOWN
                  description: Filter by sentiment (POSITIVE, NEGATIVE, NEUTRAL, MIXED)
                contactEmails:
                  type: array
                  items:
                    type: string
                  description: Filter by participant email addresses
                companyDomains:
                  type: array
                  items:
                    type: string
                  description: Filter by company domains
                outcomeFilters:
                  type: array
                  items:
                    type: string
                    enum:
                      - OPEN
                      - WON
                      - LOST
                      - POSITIVE_REPLY
                      - NEUTRAL_REPLY
                      - NEGATIVE_REPLY
                  description: >-
                    Filter by outcome (OPEN, WON, LOST, POSITIVE_REPLY,
                    NEUTRAL_REPLY, NEGATIVE_REPLY)
                opportunityStatuses:
                  type: array
                  items:
                    type: string
                    enum:
                      - OPEN
                      - WON
                      - LOST
                  description: >-
                    Filter to events linked to deals with this status (OPEN,
                    WON, LOST)
                dealMotions:
                  type: array
                  items:
                    type: string
                    enum:
                      - NET_NEW
                      - UPSELL
                      - CROSS_SELL
                      - RENEW_AND_RETAIN
                      - CONVERT_FREE_TO_PAID
                      - DISPLACE_INCUMBENT
                      - SERVICES
                      - PARTNER
                      - NON_COMMERCIAL
                  description: >-
                    Filter to events linked to deals whose CRM deal type maps to
                    these motions (NET_NEW, UPSELL, CROSS_SELL,
                    RENEW_AND_RETAIN, CONVERT_FREE_TO_PAID, DISPLACE_INCUMBENT,
                    SERVICES, PARTNER, NON_COMMERCIAL)
                dealTypes:
                  type: array
                  items:
                    type: string
                  description: >-
                    Filter to events linked to deals with these raw CRM
                    deal-type labels (Salesforce Type, HubSpot dealtype),
                    case-insensitive
                dealStages:
                  type: array
                  items:
                    type: string
                  description: >-
                    Filter to events linked to deals currently in these CRM
                    stages, by stage label or stage id, case-insensitive
                dealStagesAtEvent:
                  type: array
                  items:
                    type: string
                  description: >-
                    Filter to events whose linked deal was in one of these CRM
                    stages WHEN THE EVENT HAPPENED (by stage label,
                    case-insensitive), from the deal's stage history — unlike
                    dealStages, which reads the deal's stage today. Use it for
                    'what came up on calls during Discovery'. An event whose
                    deal has no recorded stage at that time does not match.
                pipelinePhases:
                  type: array
                  items:
                    type: string
                    enum:
                      - prospecting
                      - discovery
                      - evaluation
                      - negotiation
                      - commitment
                      - closed_won
                      - closed_lost
                  description: >-
                    Filter to events linked to deals whose stage maps to these
                    pipeline phases (prospecting, discovery, evaluation,
                    negotiation, commitment, closed_won, closed_lost)
                crmPipelines:
                  type: array
                  items:
                    type: string
                  description: >-
                    Filter to events linked to deals in these CRM pipelines, by
                    pipeline id or name (case-insensitive name)
                minStalledDays:
                  type: number
                  description: >-
                    Filter to events linked to an OPEN deal that has sat in its
                    current stage at least this many days
                minDealAmount:
                  type: number
                  description: Minimum deal amount filter
                maxDealAmount:
                  type: number
                  description: Maximum deal amount filter
                offerings:
                  type: array
                  items:
                    type: string
                  description: Filter by offering oIds
                personas:
                  type: array
                  items:
                    type: string
                  description: Filter by persona oIds (events must match these personas)
                segments:
                  type: array
                  items:
                    type: string
                  description: Filter by segment oIds
                tags:
                  type: array
                  items:
                    type: string
                  description: >-
                    Filter by reporting tag oIds (from any tag group, on any
                    library entity type). Resolved to the entities carrying
                    those tags; multiple tags are OR'd.
                useCases:
                  type: array
                  items:
                    type: string
                  description: Filter by use case oIds
                references:
                  type: array
                  items:
                    type: string
                  description: Filter by reference customer oIds
                competitors:
                  type: array
                  items:
                    type: string
                  description: Filter by competitor oIds
                alternatives:
                  type: array
                  items:
                    type: string
                  description: Filter by alternative oIds
                buyingTriggers:
                  type: array
                  items:
                    type: string
                  description: Filter by buying trigger oIds
                coreFeatures:
                  type: array
                  items:
                    type: string
                  description: Filter by core feature oIds
                objections:
                  type: array
                  items:
                    type: string
                  description: Filter by objection oIds
                proofPoints:
                  type: array
                  items:
                    type: string
                  description: Filter by proof point oIds
                motionTypes:
                  type: array
                  items:
                    type: string
                    enum:
                      - NET_NEW
                      - UPSELL
                      - CROSS_SELL
                      - CONVERT_FREE_TO_PAID
                      - RENEW_AND_RETAIN
                      - DISPLACE_INCUMBENT
                  description: Filter by motion type (NET_NEW, UPSELL)
                customerScope:
                  type: string
                  enum:
                    - ALL
                    - NEW_CUSTOMERS
                    - EXISTING_CUSTOMERS
                  description: >-
                    Customer-scope view (NEW_CUSTOMERS / EXISTING_CUSTOMERS);
                    ALL or absent applies no filter
                callPurposes:
                  type: array
                  items:
                    type: string
                    enum:
                      - DISCOVERY
                      - DEMO
                      - TECHNICAL_EVALUATION
                      - WORKING_SESSION
                      - NEGOTIATION_PRICING
                      - ONBOARDING
                      - CHECK_IN_SUCCESS
                      - QBR_RENEWAL
                      - EXPANSION_UPSELL
                      - ESCALATION_CHURN_RISK
                      - SUPPORT
                      - INTERNAL_SYNC
                      - OTHER
                  description: >-
                    Filter calls by classified purpose (DISCOVERY, DEMO,
                    TECHNICAL_EVALUATION, WORKING_SESSION, NEGOTIATION_PRICING,
                    ONBOARDING, CHECK_IN_SUCCESS, QBR_RENEWAL, EXPANSION_UPSELL,
                    ESCALATION_CHURN_RISK, SUPPORT, INTERNAL_SYNC, OTHER)
                unmatchedOnly:
                  type: boolean
                  description: >-
                    When true, only return events that have findings with no
                    library entity matches
              description: Filters to INCLUDE events matching these criteria
            exclude:
              type: object
              properties:
                eventCategories:
                  type: array
                  items:
                    type: string
                    enum:
                      - EMAIL
                      - CALL
                      - CRM
                      - RESOURCE
                      - REVISION
                      - SOCIAL
                      - ADS
                      - PRODUCT
                      - UNKNOWN
                  description: Filter by event categories (CALL, EMAIL, CRM)
                eventTypes:
                  type: array
                  items:
                    type: string
                    enum:
                      - EMAIL_SENT
                      - EMAIL_REPLY_RECEIVED
                      - CALL_TRANSCRIPT
                      - DEAL_WON
                      - DEAL_LOST
                      - OPPORTUNITY_CREATED
                      - MEETING_BOOKED
                      - RESOURCE_INDEXED
                      - RESOURCE_REINDEXED
                      - PROJECT_UPDATE
                      - TASK_COMPLETED
                      - ENTITY_CREATED
                      - ENTITY_UPDATED
                      - SOCIAL_MESSAGE_SENT
                      - SOCIAL_MESSAGE_RECEIVED
                      - SOCIAL_CONNECTION_SENT
                      - SOCIAL_CONNECTION_ACCEPTED
                      - AD_SET_PUBLISHED
                      - AD_PERFORMANCE_SNAPSHOT
                      - BULK_IMPORT_SUMMARY
                      - PROCESSING_NOT_APPLICABLE
                      - PROVIDER_EVENT_TYPE_UNKNOWN
                      - UNKNOWN
                  description: >-
                    Filter by specific event types (CALL_TRANSCRIPT, EMAIL_SENT,
                    DEAL_WON, etc.)
                sentiments:
                  type: array
                  items:
                    type: string
                    enum:
                      - POSITIVE
                      - NEUTRAL
                      - NEGATIVE
                      - UNKNOWN
                  description: Filter by sentiment (POSITIVE, NEGATIVE, NEUTRAL, MIXED)
                contactEmails:
                  type: array
                  items:
                    type: string
                  description: Filter by participant email addresses
                companyDomains:
                  type: array
                  items:
                    type: string
                  description: Filter by company domains
                outcomeFilters:
                  type: array
                  items:
                    type: string
                    enum:
                      - OPEN
                      - WON
                      - LOST
                      - POSITIVE_REPLY
                      - NEUTRAL_REPLY
                      - NEGATIVE_REPLY
                  description: >-
                    Exclude by outcome (OPEN, WON, LOST, POSITIVE_REPLY,
                    NEUTRAL_REPLY, NEGATIVE_REPLY)
                opportunityStatuses:
                  type: array
                  items:
                    type: string
                    enum:
                      - OPEN
                      - WON
                      - LOST
                  description: Exclude by opportunity status (OPEN, WON, LOST)
                minDealAmount:
                  type: number
                  description: Minimum deal amount filter
                maxDealAmount:
                  type: number
                  description: Maximum deal amount filter
                offerings:
                  type: array
                  items:
                    type: string
                  description: Exclude events matching these offering oIds
                personas:
                  type: array
                  items:
                    type: string
                  description: Exclude events matching these persona oIds
                segments:
                  type: array
                  items:
                    type: string
                  description: Exclude events matching these segment oIds
                tags:
                  type: array
                  items:
                    type: string
                  description: >-
                    Exclude events matching any library entity that carries
                    these reporting tag oIds (any tag group; OR'd).
                useCases:
                  type: array
                  items:
                    type: string
                  description: Exclude events matching these use case oIds
                references:
                  type: array
                  items:
                    type: string
                  description: Exclude events matching these reference customer oIds
                competitors:
                  type: array
                  items:
                    type: string
                  description: Exclude events matching these competitor oIds
                alternatives:
                  type: array
                  items:
                    type: string
                  description: Exclude events matching these alternative oIds
                buyingTriggers:
                  type: array
                  items:
                    type: string
                  description: Exclude events matching these buying trigger oIds
                coreFeatures:
                  type: array
                  items:
                    type: string
                  description: Exclude events matching these core feature oIds
                objections:
                  type: array
                  items:
                    type: string
                  description: Exclude events matching these objection oIds
                proofPoints:
                  type: array
                  items:
                    type: string
                  description: Exclude events matching these proof point oIds
                motionTypes:
                  type: array
                  items:
                    type: string
                    enum:
                      - NET_NEW
                      - UPSELL
                      - CROSS_SELL
                      - CONVERT_FREE_TO_PAID
                      - RENEW_AND_RETAIN
                      - DISPLACE_INCUMBENT
                  description: Exclude events matching these motion types (NET_NEW, UPSELL)
                callPurposes:
                  type: array
                  items:
                    type: string
                    enum:
                      - DISCOVERY
                      - DEMO
                      - TECHNICAL_EVALUATION
                      - WORKING_SESSION
                      - NEGOTIATION_PRICING
                      - ONBOARDING
                      - CHECK_IN_SUCCESS
                      - QBR_RENEWAL
                      - EXPANSION_UPSELL
                      - ESCALATION_CHURN_RISK
                      - SUPPORT
                      - INTERNAL_SYNC
                      - OTHER
                  description: >-
                    Exclude calls with these classified purposes (e.g. SUPPORT,
                    INTERNAL_SYNC)
                dealMotions:
                  type: array
                  items:
                    type: string
                    enum:
                      - NET_NEW
                      - UPSELL
                      - CROSS_SELL
                      - RENEW_AND_RETAIN
                      - CONVERT_FREE_TO_PAID
                      - DISPLACE_INCUMBENT
                      - SERVICES
                      - PARTNER
                      - NON_COMMERCIAL
                  description: >-
                    Exclude events linked to deals whose CRM deal type maps to
                    these motions
                dealTypes:
                  type: array
                  items:
                    type: string
                  description: >-
                    Exclude events linked to deals with these raw CRM deal-type
                    labels, case-insensitive
                dealStages:
                  type: array
                  items:
                    type: string
                  description: >-
                    Exclude events linked to deals currently in these CRM
                    stages, by stage label or stage id, case-insensitive
                pipelinePhases:
                  type: array
                  items:
                    type: string
                    enum:
                      - prospecting
                      - discovery
                      - evaluation
                      - negotiation
                      - commitment
                      - closed_won
                      - closed_lost
                  description: >-
                    Exclude events linked to deals whose stage maps to these
                    pipeline phases
              description: Filters to EXCLUDE events matching these criteria
          description: >-
            Optional additional event filters (event-log filter shape).
            Library-entity filters hold the extractor until entity matching has
            run, then gate it there as well as in backfills.
        modelTier:
          type: string
          enum:
            - NOTE
            - PULSE
            - ECHO
            - HARMONY
            - CHORUS
            - SYMPHONY
        outputMode:
          type: string
          enum:
            - freeform
            - boolean
            - number
            - enum_single
            - enum_multi
            - object
          default: freeform
          description: >-
            Output shape: freeform snippets, structured fields, or a per-event
            verdict (boolean / number / single or multi choice)
        classes:
          type: array
          nullable: true
          items:
            type: object
            properties:
              value:
                type: string
                minLength: 1
                maxLength: 64
                pattern: ^[a-z0-9][a-z0-9_-]*$
              label:
                type: string
                nullable: true
                maxLength: 120
              description:
                type: string
                nullable: true
                maxLength: 500
            required:
              - value
          maxItems: 25
          description: Choice-mode classes (enum_single / enum_multi); >= 2 required
        numberConfig:
          type: object
          nullable: true
          properties:
            unit:
              type: string
              nullable: true
              maxLength: 32
            min:
              type: number
              nullable: true
            max:
              type: number
              nullable: true
          description: NUMBER-mode unit and optional min/max bounds
        jsonSchema:
          type: object
          nullable: true
          additionalProperties:
            nullable: true
          description: OBJECT-mode JSON Schema for the structured value
        resultCardinality:
          type: string
          enum:
            - single
            - repeated
          default: single
          description: >-
            OBJECT mode only: one record for the whole event, or one record per
            matching occurrence
        perspective:
          type: string
          enum:
            - INTERNAL
            - EXTERNAL
            - ANY
          default: EXTERNAL
          description: >-
            Whose contributions to mine: INTERNAL (our team), EXTERNAL
            (prospect), or ANY. Defaults to EXTERNAL — nearly all GTM
            intelligence is about what the buyer said, and an unstated
            preference is a preference for the buyer's voice.
        fieldTargets:
          type: array
          items:
            type: object
            properties:
              table:
                type: string
                enum:
                  - persona
                  - product
                  - service
                  - solution
                  - use_case
                  - playbook
                  - proof_point
                  - competitor
                  - alternative
                  - buying_trigger
                  - core_feature
                  - objection
                  - reference
                  - hypothesis
                  - segment
                  - skill
              entityOId:
                type: string
                minLength: 1
              field:
                type: string
                minLength: 1
                maxLength: 120
            required:
              - table
              - entityOId
              - field
          default: []
          description: >-
            Optional (entity, field) refinement targets — findings are pinned to
            these entities as evidence for the named field
        status:
          type: string
          enum:
            - DRAFT
            - ACTIVE
            - PAUSED
            - ARCHIVED
        oId:
          type: string
        promptVersion:
          type: number
        source:
          type: string
          enum:
            - WORKSPACE
            - SYSTEM
        mappingStatus:
          type: string
          enum:
            - PENDING
            - COMPLETED
            - FAILED
        associatedLibraryTables:
          type: array
          items:
            type: string
            enum:
              - persona
              - product
              - service
              - solution
              - use_case
              - playbook
              - proof_point
              - competitor
              - alternative
              - buying_trigger
              - core_feature
              - objection
              - reference
              - hypothesis
              - segment
              - skill
        mappingProposal:
          type: object
          nullable: true
          properties:
            libraryTables:
              type: array
              items:
                type: object
                properties:
                  table:
                    type: string
                    enum:
                      - persona
                      - product
                      - service
                      - solution
                      - use_case
                      - playbook
                      - proof_point
                      - competitor
                      - alternative
                      - buying_trigger
                      - core_feature
                      - objection
                      - reference
                      - hypothesis
                      - segment
                      - skill
                  rationale:
                    type: string
                required:
                  - table
                  - rationale
          required:
            - libraryTables
        mappingModel:
          type: string
          nullable: true
        createdAt:
          type: string
          nullable: true
          format: date-time
        updatedAt:
          type: string
          nullable: true
          format: date-time
        user:
          type: object
          nullable: true
          properties:
            oId:
              type: string
              nullable: true
            email:
              type: string
              nullable: true
        executionScope:
          type: object
          properties:
            phase:
              type: string
              enum:
                - EXTRACTION
                - POST_MATCH
                - UNSUPPORTED
            extractionKeys:
              type: array
              items:
                type: string
            deferredKeys:
              type: array
              items:
                type: string
            unsupportedKeys:
              type: array
              items:
                type: string
          required:
            - phase
            - extractionKeys
            - deferredKeys
            - unsupportedKeys
      required:
        - name
        - prompt
        - eventTypes
        - modelTier
        - status
        - oId
        - promptVersion
        - source
        - mappingStatus
        - associatedLibraryTables
        - createdAt
        - updatedAt
        - executionScope
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````