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

# Create custom event definition

> Crea una definición de evento personalizado.

export const ScopesList = ({scopes = [], description = "Esta API requiere uno de los siguientes ámbitos:"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

export const SupportedProducts = ({marketing, sales, service, cms, marketingLevel, salesLevel, serviceLevel, cmsLevel}) => {
  const translations = {
    header: "Productos compatibles",
    description: "Se requiere uno de los siguientes productos o productos de ediciones superiores.",
    productNames: {
      marketing: "Marketing Hub",
      sales: "Sales Hub",
      service: "Service Hub",
      cms: "Content Hub"
    },
    tiers: {
      free: "Gratuito",
      starter: "Starter",
      professional: "Pro",
      enterprise: "Enterprise"
    }
  };
  const translateTier = tier => {
    if (!tier) return '';
    const lowerTier = tier.toLowerCase();
    return translations.tiers[lowerTier] || tier;
  };
  const products = [{
    name: marketing ? translations.productNames.marketing : '',
    level: translateTier(marketingLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/marketing-bolt.svg",
    alt: "Marketing Hub"
  }, {
    name: sales ? translations.productNames.sales : '',
    level: translateTier(salesLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/sales-star.svg",
    alt: "Sales Hub"
  }, {
    name: service ? translations.productNames.service : '',
    level: translateTier(serviceLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/service-heart.svg",
    alt: "Service Hub"
  }, {
    name: cms ? translations.productNames.cms : '',
    level: translateTier(cmsLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/content-play.svg",
    alt: "Content Hub"
  }].filter(product => product.name && product.level);
  if (products.length === 0) return null;
  return <div>
      <div className="text-sm mb-2">{translations.description}</div>
      <div className={`grid ${products.length === 1 ? 'grid-cols-1' : 'grid-cols-2'} gap-1.5`}>
        {products.map((product, index) => <div key={index} style={{
    display: 'flex',
    alignItems: 'center'
  }}>
            <img src={product.icon} alt={product.alt} className="w-3.5 h-3.5 mr-1.5 mt-2.5 mb-2.5 flex-shrink-0 align-middle" />
            <span className="font-medium mr-1 text-sm">{product.name} -</span>
            <span className="text-sm">{product.level}</span>
          </div>)}
      </div>
    </div>;
};

<AccordionGroup>
  <Accordion title="Supported products" defaultOpen="true" icon="cubes">
    <SupportedProducts marketing={true} sales={true} service={true} cms={true} marketingLevel="ENTERPRISE" salesLevel="ENTERPRISE" serviceLevel="ENTERPRISE" cmsLevel="ENTERPRISE" />
  </Accordion>

  <Accordion title="Required Scopes" icon="key">
    <ScopesList
      scopes={[
  'behavioral_events.event_definitions.read_write'
]}
    />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml specs/legacy/v3/events-manage-event-definitions-v3.json POST /events/v3/event-definitions
openapi: 3.0.1
info:
  title: Events Manage Event Definitions
  description: Endpoint to create, delete and get behavioral event definitions
  version: v3
  x-hubspot-product-tier-requirements:
    marketing: ENTERPRISE
    sales: ENTERPRISE
    service: ENTERPRISE
    cms: ENTERPRISE
    commerce: ENTERPRISE
    crmHub: ENTERPRISE
    dataHub: ENTERPRISE
  x-hubspot-related-documentation:
    - name: Custom Events Definitions Guide
      url: >-
        https://developers.hubspot.com/docs/guides/api/analytics-and-events/custom-events/custom-event-definitions
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Advanced
  - name: Basic
  - name: Batch
paths:
  /events/v3/event-definitions:
    post:
      tags:
        - Basic
      summary: Crear definición de evento personalizado
      description: Crea una definición de evento personalizado.
      operationId: post-/events/v3/event-definitions
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalBehavioralEventTypeDefinitionEgg'
        required: true
      responses:
        '201':
          description: successful operation
          headers:
            Location:
              description: URL of the newly created resource
              style: simple
              explode: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalBehavioralEventTypeDefinition'
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security:
        - oauth2:
            - behavioral_events.event_definitions.read_write
components:
  schemas:
    ExternalBehavioralEventTypeDefinitionEgg:
      required:
        - includeDefaultProperties
        - label
        - propertyDefinitions
      type: object
      properties:
        customMatchingId:
          $ref: '#/components/schemas/ExternalObjectResolutionMappingRequest'
        description:
          type: string
          description: >-
            Una descripción del evento que se mostrará como texto de ayuda en
            HubSpot.
        includeDefaultProperties:
          type: boolean
        label:
          type: string
          description: >-
            Etiqueta del evento legible para humanos. Se utiliza en la UI de
            HubSpot
        name:
          type: string
          description: >-
            Nombre interno del evento, que debe usarse al referenciar el evento
            desde la API de definición de eventos. Si no se especifica un
            nombre, se generará uno con base en la etiqueta. El valor "nombre"
            también se utilizará para generar automáticamente un
            "nombreTotalmenteCalificado" para la definición del evento, que se
            utilizará cuando se envían las finalizaciones de evento
            correspondientes a este evento. 
        primaryObject:
          type: string
          description: >-
            El tipo de objeto al que se asociará este evento. Puede ser uno de
            los siguientes: CONTACTO, EMPRESA, NEGOCIO, TICKET. Si no se
            especifica un primaryObject, por opción predeterminada, asociaremos
            el evento a los objetos CONTACTO.
        propertyDefinitions:
          type: array
          description: Lista de propiedades personalizadas en el evento
          items:
            $ref: '#/components/schemas/ExternalBehavioralEventPropertyCreate'
    ExternalBehavioralEventTypeDefinition:
      required:
        - archived
        - associations
        - fullyQualifiedName
        - id
        - labels
        - name
        - objectTypeId
        - properties
      type: object
      properties:
        archived:
          type: boolean
        associations:
          type: array
          items:
            $ref: '#/components/schemas/AssociationDefinition'
        comboEventRules:
          $ref: '#/components/schemas/ComboEventRuleBranch'
        createdAt:
          type: string
          format: date-time
        createdUserId:
          type: integer
          format: int32
        customMatchingId:
          $ref: '#/components/schemas/ExternalObjectResolutionMappingResponse'
        description:
          type: string
        detailTemplate:
          type: string
        fullyQualifiedName:
          type: string
        headerTemplate:
          type: string
        id:
          type: string
        labels:
          $ref: '#/components/schemas/BehavioralEventTypeDefinitionLabels'
        name:
          type: string
        objectTypeId:
          type: string
        primaryObject:
          type: string
        primaryObjectId:
          type: string
        properties:
          type: array
          items:
            $ref: '#/components/schemas/Property'
        trackingType:
          type: string
          enum:
            - APP_EVENT
            - AUTOCAPTURE_EVENT
            - CLICKED_ELEMENT
            - COMBO_EVENT
            - CUSTOM_SCRIPT
            - CUSTOM_SIGNAL
            - IMPORT
            - MANUAL
            - PROPERTY_CHANGE
            - VISITED_URL
            - WEBHOOK
        updatedAt:
          type: string
          format: date-time
        updatedUserId:
          type: integer
          format: int32
    ExternalObjectResolutionMappingRequest:
      required:
        - primaryObjectRule
      type: object
      properties:
        primaryObjectRule:
          $ref: '#/components/schemas/ExternalPrimaryObjectResolutionRule'
    ExternalBehavioralEventPropertyCreate:
      required:
        - label
        - type
      type: object
      properties:
        description:
          type: string
          description: >-
            Una descripción de la propiedad que se mostrará como texto de ayuda
            en HubSpot.
        label:
          type: string
          description: >-
            Etiqueta de la propiedad legible para humanos. Se utiliza en la UI
            de HubSpot.
        name:
          type: string
          description: >-
            Nombre interno de la propiedad, que debe usarse al referenciar la
            propiedad desde la API
        options:
          type: array
          description: >-
            Una lista de opciones disponibles para la propiedad si se trata de
            una enumeración. NOTA: Este campo solo se puede aplicar para
            propiedades enumeradas.
          items:
            $ref: '#/components/schemas/OptionInput'
        type:
          type: string
          description: >-
            El tipo de datos de la propiedad. Puede ser uno de los siguientes:
            [cadena, número, enumeración, fecha y hora]
    AssociationDefinition:
      required:
        - allowsCustomLabels
        - cardinality
        - category
        - fromObjectTypeId
        - hasAllAssociatedObjects
        - hasCascadingDeletes
        - hasUserEnforcedMaxFromObjectIds
        - hasUserEnforcedMaxToObjectIds
        - hidden
        - id
        - inverseAllowsCustomLabels
        - inverseCardinality
        - inverseHasAllAssociatedObjects
        - inverseId
        - inverseName
        - isDefault
        - isInversePrimary
        - isPrimary
        - maxFromObjectIds
        - maxToObjectIds
        - name
        - portalUniqueIdentifier
        - readOnly
        - toObjectTypeId
      type: object
      properties:
        allowsCustomLabels:
          type: boolean
          description: Si se pueden usar etiquetas personalizadas en la asociación.
        cardinality:
          type: string
          description: >-
            La cardinalidad desde la perspectiva del objeto de origen, ya sea
            "ONE_TO_ONE" o "ONE_TO_MANY".
          enum:
            - ONE_TO_MANY
            - ONE_TO_ONE
        category:
          type: string
          description: La categoría del error
          enum:
            - HUBSPOT_DEFINED
            - INTEGRATOR_DEFINED
            - USER_DEFINED
            - WORK
        fromObjectType:
          type: string
          description: >-
            El nombre del tipo de objeto de origen (por ejemplo, "DEAL" o
            "QUOTE").
          enum:
            - ABANDONED_CART
            - ACCEPTANCE_TEST
            - AD
            - AD_ACCOUNT
            - AD_CAMPAIGN
            - AD_GROUP
            - AI_FORECAST
            - ALL_PAGES
            - APPROVAL
            - APPROVAL_STEP
            - ATTRIBUTION
            - AUDIENCE
            - AUTOMATION_JOURNEY
            - AUTOMATION_PLATFORM_FLOW
            - AUTOMATION_PLATFORM_FLOW_ACTION
            - BET_ALERT
            - BET_DELIVERABLE_SERVICE
            - BLOG_LISTING_PAGE
            - BLOG_POST
            - CALL
            - CAMPAIGN
            - CAMPAIGN_BUDGET_ITEM
            - CAMPAIGN_SPEND_ITEM
            - CAMPAIGN_STEP
            - CAMPAIGN_TEMPLATE
            - CAMPAIGN_TEMPLATE_STEP
            - CART
            - CASE_STUDY
            - CHATFLOW
            - CLIP
            - CMS_URL
            - COMBO_EVENT_CONFIGURATION
            - COMMERCE_PAYMENT
            - COMMUNICATION
            - COMPANY
            - CONTACT
            - CONTACT_CREATE_ATTRIBUTION
            - CONTENT
            - CONTENT_AUDIT
            - CONTENT_AUDIT_PAGE
            - CONVERSATION
            - CONVERSATION_INBOX
            - CONVERSATION_SESSION
            - CRM_OBJECTS_DUMMY_TYPE
            - CRM_PIPELINES_DUMMY_TYPE
            - CTA
            - CTA_VARIANT
            - DATA_PRIVACY_CONSENT
            - DATA_SYNC_STATE
            - DEAL
            - DEAL_CREATE_ATTRIBUTION
            - DEAL_REGISTRATION
            - DEAL_SPLIT
            - DISCOUNT
            - DISCOUNT_CODE
            - DISCOUNT_TEMPLATE
            - EMAIL
            - ENGAGEMENT
            - EXPORT
            - EXTERNAL_WEB_URL
            - FEE
            - FEEDBACK_SUBMISSION
            - FEEDBACK_SURVEY
            - FILE_MANAGER_FILE
            - FILE_MANAGER_FOLDER
            - FOLDER
            - FORECAST
            - FORM
            - FORM_SUBMISSION_INBOUNDDB
            - GOAL_TARGET
            - GOAL_TARGET_GROUP
            - GOAL_TEMPLATE
            - GSC_PROPERTY
            - HUB
            - IMPORT
            - INVOICE
            - KEYWORD
            - KNOWLEDGE_ARTICLE
            - LANDING_PAGE
            - LEAD
            - LINE_ITEM
            - MARKETING_CALENDAR
            - MARKETING_CAMPAIGN_UTM
            - MARKETING_EMAIL
            - MARKETING_EVENT
            - MARKETING_EVENT_ATTENDANCE
            - MARKETING_SMS
            - MEDIA_BRIDGE
            - MEETING_EVENT
            - MIC
            - NOTE
            - OBJECT_LIST
            - ORDER
            - OWNER
            - PARTNER_ACCOUNT
            - PARTNER_CLIENT
            - PARTNER_CLIENT_REVENUE
            - PARTNER_SERVICE
            - PAYMENT_LINK
            - PAYMENT_SCHEDULE
            - PAYMENT_SCHEDULE_INSTALLMENT
            - PERMISSIONS_TESTING
            - PLAYBOOK
            - PLAYBOOK_QUESTION
            - PLAYBOOK_SUBMISSION
            - PLAYBOOK_SUBMISSION_ANSWER
            - PLAYLIST
            - PLAYLIST_FOLDER
            - PODCAST_EPISODE
            - PORTAL
            - PORTAL_OBJECT_SYNC_MESSAGE
            - POSTAL_MAIL
            - PRIVACY_SCANNER_COOKIE
            - PRODUCT
            - PRODUCT_OR_FOLDER
            - PROPERTY_INFO
            - PROSPECTING_AGENT_CONTACT_ASSIGNMENT
            - PUBLISHING_TASK
            - QUARANTINED_SUBMISSION
            - QUOTA
            - QUOTE
            - QUOTE_FIELD
            - QUOTE_MODULE
            - QUOTE_MODULE_FIELD
            - QUOTE_TEMPLATE
            - RESTORABLE_CRM_OBJECT
            - ROSTER
            - ROSTER_MEMBER
            - SALES_DOCUMENT
            - SALES_TASK
            - SALES_WORKLOAD
            - SALESFORCE_SYNC_ERROR
            - SCHEDULING_PAGE
            - SCHEMAS_BACKEND_TEST
            - SCORE_CONFIGURATION
            - SEQUENCE
            - SEQUENCE_ENROLLMENT
            - SEQUENCE_STEP
            - SEQUENCE_STEP_ENROLLMENT
            - SERVICE
            - SITE_PAGE
            - SNIPPET
            - SOCIAL_BROADCAST
            - SOCIAL_CHANNEL
            - SOCIAL_POST
            - SOCIAL_PROFILE
            - SOX_PROTECTED_DUMMY_TYPE
            - SOX_PROTECTED_TEST_TYPE
            - SUBMISSION_TAG
            - SUBSCRIPTION
            - TASK
            - TASK_TEMPLATE
            - TAX
            - TEMPLATE
            - TICKET
            - UNKNOWN
            - UNSUBSCRIBE
            - USER
            - VIEW
            - VIEW_BLOCK
            - WEB_INTERACTIVE
        fromObjectTypeId:
          type: string
          description: >-
            El ID del tipo de objeto de origen (por ejemplo, 0-1 para
            contactos).
        hasAllAssociatedObjects:
          type: boolean
          description: >-
            Si todos los objetos vinculados potenciales se incluyen en la
            asociación
        hasCascadingDeletes:
          type: boolean
          description: >-
            Si las eliminaciones en la asociación deben causar eliminaciones en
            cascada en los objetos vinculados.
        hasUserEnforcedMaxFromObjectIds:
          type: boolean
          description: >-
            Si un usuario ha definido un límite para el número de objetos de
            origen.
        hasUserEnforcedMaxToObjectIds:
          type: boolean
          description: >-
            Si un usuario ha definido un límite para el número de objetos de
            destino.
        hidden:
          type: boolean
          description: Si la asociación está oculta o no.
        hiddenReason:
          type: string
          enum:
            - DEFAULT
            - INTERNAL
            - USER_CONFIGURED
        id:
          type: integer
          description: El ID único del objeto asociado (por ejemplo, el ID de un contacto).
          format: int32
        inverseAllowsCustomLabels:
          type: boolean
          description: >-
            Si la asociación inversa también puede admitir etiquetas
            personalizadas.
        inverseCardinality:
          type: string
          description: >-
            La cardinalidad desde la perspectiva del objeto de destino, ya sea
            "ONE_TO_ONE" o "ONE_TO_MANY".
          enum:
            - ONE_TO_MANY
            - ONE_TO_ONE
        inverseHasAllAssociatedObjects:
          type: boolean
          description: >-
            Si todos los objetos vinculados inversos potenciales se incluyen en
            la asociación.
        inverseId:
          type: integer
          description: El ID único del lado inverso de la asociación.
          format: int32
        inverseLabel:
          type: string
          description: >-
            La etiqueta que se usa para describir la relación inversa en una
            asociación.
        inverseName:
          type: string
          description: >-
            El nombre que se usa para describir la relación inversa en esta
            asociación
        isDefault:
          type: boolean
        isInversePrimary:
          type: boolean
          description: Si la asociación inversa se considera principal.
        isPrimary:
          type: boolean
          description: >-
            Si la asociación es el vínculo principal entre las entidades
            involucradas.
        label:
          type: string
          description: La etiqueta que se le da a una asociación.
        maxFromObjectIds:
          type: integer
          description: >-
            El número máximo de ID de objetos de origen permitidos en la
            asociación.
          format: int32
        maxToObjectIds:
          type: integer
          description: >-
            El número máximo de ID de objetos de destino permitidos en la
            asociación.
          format: int32
        name:
          type: string
          description: >-
            Para los tipos de asociación etiquetados, el nombre interno de la
            asociación.
        portalUniqueIdentifier:
          type: string
          description: Un ID único para la asociación en todos los portales.
        readOnly:
          type: boolean
        toObjectType:
          type: string
          description: >-
            El nombre del tipo de objeto de destino (por ejemplo, "DEAL" o
            "QUOTE").
          enum:
            - ABANDONED_CART
            - ACCEPTANCE_TEST
            - AD
            - AD_ACCOUNT
            - AD_CAMPAIGN
            - AD_GROUP
            - AI_FORECAST
            - ALL_PAGES
            - APPROVAL
            - APPROVAL_STEP
            - ATTRIBUTION
            - AUDIENCE
            - AUTOMATION_JOURNEY
            - AUTOMATION_PLATFORM_FLOW
            - AUTOMATION_PLATFORM_FLOW_ACTION
            - BET_ALERT
            - BET_DELIVERABLE_SERVICE
            - BLOG_LISTING_PAGE
            - BLOG_POST
            - CALL
            - CAMPAIGN
            - CAMPAIGN_BUDGET_ITEM
            - CAMPAIGN_SPEND_ITEM
            - CAMPAIGN_STEP
            - CAMPAIGN_TEMPLATE
            - CAMPAIGN_TEMPLATE_STEP
            - CART
            - CASE_STUDY
            - CHATFLOW
            - CLIP
            - CMS_URL
            - COMBO_EVENT_CONFIGURATION
            - COMMERCE_PAYMENT
            - COMMUNICATION
            - COMPANY
            - CONTACT
            - CONTACT_CREATE_ATTRIBUTION
            - CONTENT
            - CONTENT_AUDIT
            - CONTENT_AUDIT_PAGE
            - CONVERSATION
            - CONVERSATION_INBOX
            - CONVERSATION_SESSION
            - CRM_OBJECTS_DUMMY_TYPE
            - CRM_PIPELINES_DUMMY_TYPE
            - CTA
            - CTA_VARIANT
            - DATA_PRIVACY_CONSENT
            - DATA_SYNC_STATE
            - DEAL
            - DEAL_CREATE_ATTRIBUTION
            - DEAL_REGISTRATION
            - DEAL_SPLIT
            - DISCOUNT
            - DISCOUNT_CODE
            - DISCOUNT_TEMPLATE
            - EMAIL
            - ENGAGEMENT
            - EXPORT
            - EXTERNAL_WEB_URL
            - FEE
            - FEEDBACK_SUBMISSION
            - FEEDBACK_SURVEY
            - FILE_MANAGER_FILE
            - FILE_MANAGER_FOLDER
            - FOLDER
            - FORECAST
            - FORM
            - FORM_SUBMISSION_INBOUNDDB
            - GOAL_TARGET
            - GOAL_TARGET_GROUP
            - GOAL_TEMPLATE
            - GSC_PROPERTY
            - HUB
            - IMPORT
            - INVOICE
            - KEYWORD
            - KNOWLEDGE_ARTICLE
            - LANDING_PAGE
            - LEAD
            - LINE_ITEM
            - MARKETING_CALENDAR
            - MARKETING_CAMPAIGN_UTM
            - MARKETING_EMAIL
            - MARKETING_EVENT
            - MARKETING_EVENT_ATTENDANCE
            - MARKETING_SMS
            - MEDIA_BRIDGE
            - MEETING_EVENT
            - MIC
            - NOTE
            - OBJECT_LIST
            - ORDER
            - OWNER
            - PARTNER_ACCOUNT
            - PARTNER_CLIENT
            - PARTNER_CLIENT_REVENUE
            - PARTNER_SERVICE
            - PAYMENT_LINK
            - PAYMENT_SCHEDULE
            - PAYMENT_SCHEDULE_INSTALLMENT
            - PERMISSIONS_TESTING
            - PLAYBOOK
            - PLAYBOOK_QUESTION
            - PLAYBOOK_SUBMISSION
            - PLAYBOOK_SUBMISSION_ANSWER
            - PLAYLIST
            - PLAYLIST_FOLDER
            - PODCAST_EPISODE
            - PORTAL
            - PORTAL_OBJECT_SYNC_MESSAGE
            - POSTAL_MAIL
            - PRIVACY_SCANNER_COOKIE
            - PRODUCT
            - PRODUCT_OR_FOLDER
            - PROPERTY_INFO
            - PROSPECTING_AGENT_CONTACT_ASSIGNMENT
            - PUBLISHING_TASK
            - QUARANTINED_SUBMISSION
            - QUOTA
            - QUOTE
            - QUOTE_FIELD
            - QUOTE_MODULE
            - QUOTE_MODULE_FIELD
            - QUOTE_TEMPLATE
            - RESTORABLE_CRM_OBJECT
            - ROSTER
            - ROSTER_MEMBER
            - SALES_DOCUMENT
            - SALES_TASK
            - SALES_WORKLOAD
            - SALESFORCE_SYNC_ERROR
            - SCHEDULING_PAGE
            - SCHEMAS_BACKEND_TEST
            - SCORE_CONFIGURATION
            - SEQUENCE
            - SEQUENCE_ENROLLMENT
            - SEQUENCE_STEP
            - SEQUENCE_STEP_ENROLLMENT
            - SERVICE
            - SITE_PAGE
            - SNIPPET
            - SOCIAL_BROADCAST
            - SOCIAL_CHANNEL
            - SOCIAL_POST
            - SOCIAL_PROFILE
            - SOX_PROTECTED_DUMMY_TYPE
            - SOX_PROTECTED_TEST_TYPE
            - SUBMISSION_TAG
            - SUBSCRIPTION
            - TASK
            - TASK_TEMPLATE
            - TAX
            - TEMPLATE
            - TICKET
            - UNKNOWN
            - UNSUBSCRIBE
            - USER
            - VIEW
            - VIEW_BLOCK
            - WEB_INTERACTIVE
        toObjectTypeId:
          type: string
          description: >-
            El ID del tipo de objeto de destino (por ejemplo, 0-3 para
            negocios).
      description: La definición de una asociación
    ComboEventRuleBranch:
      required:
        - composingRules
        - operationType
        - ruleBranches
      type: object
      properties:
        composingRules:
          type: array
          items:
            $ref: '#/components/schemas/ComboEventRule'
        operationType:
          type: string
          enum:
            - AND
            - OR
        ruleBranches:
          type: array
          items:
            $ref: '#/components/schemas/ComboEventRuleBranch'
    ExternalObjectResolutionMappingResponse:
      required:
        - primaryObjectRule
      type: object
      properties:
        primaryObjectRule:
          $ref: '#/components/schemas/ExternalPrimaryObjectResolutionRule'
    BehavioralEventTypeDefinitionLabels:
      required:
        - singular
      type: object
      properties:
        plural:
          type: string
        singular:
          type: string
    Property:
      required:
        - description
        - fieldType
        - groupName
        - label
        - name
        - options
        - type
      type: object
      properties:
        archived:
          type: boolean
          description: Si la propiedad está archivada.
        archivedAt:
          type: string
          description: >-
            La marca de tiempo en la que se archivó la propiedad, en formato ISO
            8601.
          format: date-time
        calculated:
          type: boolean
          description: Si la propiedad es un campo calculado.
        calculationFormula:
          type: string
          description: La fórmula que se usa para las propiedades calculadas.
        createdAt:
          type: string
          description: >-
            La marca de tiempo en la que se creó la propiedad, en formato ISO
            8601.
          format: date-time
        createdUserId:
          type: string
          description: El ID del usuario que creó la propiedad.
        currencyPropertyName:
          type: string
          description: El nombre de la propiedad de divisa relacionada.
        dataSensitivity:
          type: string
          description: >-
            Indica el nivel de sensibilidad de la propiedad, como
            "non_sensitive", "sensitive", or "highly_sensitive".
          enum:
            - highly_sensitive
            - non_sensitive
            - sensitive
        dateDisplayHint:
          type: string
          enum:
            - absolute
            - absolute_with_relative
            - time_since
            - time_until
        description:
          type: string
          description: Un resumen de la finalidad de la propiedad.
        displayOrder:
          type: integer
          description: La posición del elemento en relación con otros de la lista.
          format: int32
        externalOptions:
          type: boolean
          description: >-
            Aplicable solo a propiedades de tipo de enumeración. Debe
            establecerse en verdadero con un "referencedObjectType" de "OWNER".
            De lo contrario, falso.
        fieldType:
          type: string
          description: >-
            Determina cómo aparecerá la propiedad en la IU de HubSpot o en un
            formulario. Más información en la guía de la API de propiedades.
        formField:
          type: boolean
          description: Si la propiedad puede aparecer en los formularios.
        groupName:
          type: string
          description: El nombre del grupo al que se asigna la propiedad.
        hasUniqueValue:
          type: boolean
          description: Si la propiedad es un identificador único.
        hidden:
          type: boolean
          description: >-
            Si la propiedad se ocultará o no de la IU de HubSpot. Se recomienda
            que esto se establezca en falso para las propiedades personalizadas.
          example: false
        hubspotDefined:
          type: boolean
          description: >-
            Un valor booleano establecido en verdadero para las propiedades
            predeterminadas de HubSpot.
        label:
          type: string
          description: La etiqueta de visualización de la propiedad.
        modificationMetadata:
          $ref: '#/components/schemas/PropertyModificationMetadata'
        name:
          type: string
          description: El nombre interno de la propiedad.
        numberDisplayHint:
          type: string
          description: >-
            Sugerencia sobre cómo se muestra y valida una propiedad numérica en
            la IU de HubSpot. Puede ser: "unformatted", "formatted", "currency",
            "percentage", "duration" o "probability".
          enum:
            - currency
            - duration
            - formatted
            - percentage
            - probability
            - unformatted
        options:
          type: array
          description: >-
            Una lista de opciones válidas para la propiedad. Este campo es
            obligatorio para las propiedades enumeradas.
          items:
            $ref: '#/components/schemas/Option_1'
        referencedObjectType:
          type: string
          description: Obsoleto. Utiliza externalOptionsReferenceType en su lugar.
        sensitiveDataCategories:
          type: array
          description: >-
            Cuando sensitiveData es verdadero, enumera el tipo de datos
            sensibles contenidos en la propiedad (por ejemplo, "HIPAA").
          items:
            type: string
        showCurrencySymbol:
          type: boolean
          description: Si se muestra el símbolo de la divisa en la IU de HubSpot.
        textDisplayHint:
          type: string
          description: >-
            Sugerencia sobre cómo se muestra y valida el texto en la IU de
            HubSpot. Puede ser: "unformatted_single_line", "multi_line",
            "email", "phone_number", "domain_name", "ip_address",
            "physical_address" o "postal_code".
          enum:
            - domain_name
            - email
            - ip_address
            - multi_line
            - phone_number
            - physical_address
            - postal_code
            - unformatted_single_line
        type:
          type: string
          description: El tipo de datos de la propiedad, como cadena o número.
        updatedAt:
          type: string
          description: >-
            La marca de tiempo en la que se actualizó la propiedad, en formato
            ISO 8601.
          format: date-time
        updatedUserId:
          type: string
      description: Propiedad de HubSpot
    Error:
      required:
        - category
        - correlationId
        - message
      type: object
      properties:
        category:
          type: string
          description: La categoría del error
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Contexto de la condición de error
          example: >-
            {invalidPropertyName=[propertyValue], missingScopes=[scope1,
            scope2]}
        correlationId:
          type: string
          description: >-
            Un identificador único para la solicitud. Incluye este valor con
            cualquier informe de error o ticket de asistencia.
          format: uuid
          example: aeb5f871-7f07-4993-9211-075dc63e7cbf
        errors:
          type: array
          description: información adicional acerca del error
          items:
            $ref: '#/components/schemas/ErrorDetail'
        links:
          type: object
          additionalProperties:
            type: string
          description: >-
            Un mapa de nombres de enlaces a las URI asociadas que contienen
            documentación sobre el error o los pasos recomendados para
            solucionarlo
        message:
          type: string
          description: >-
            Un mensaje legible en el que se describa el error y los pasos para
            solucionarlo, si procede
          example: An error occurred
        subCategory:
          type: string
          description: >-
            Una categoría específica que contiene detalles más concretos acerca
            del error
      example:
        message: Invalid input (details will vary based on the error)
        correlationId: aeb5f871-7f07-4993-9211-075dc63e7cbf
        category: VALIDATION_ERROR
        links:
          knowledge-base: https://www.hubspot.com/products/service/knowledge-base
    ExternalPrimaryObjectResolutionRule:
      required:
        - eventPropertyName
        - targetObjectPropertyName
      type: object
      properties:
        eventPropertyName:
          type: string
        targetObjectPropertyName:
          type: string
    OptionInput:
      required:
        - displayOrder
        - hidden
        - label
        - value
      type: object
      properties:
        description:
          type: string
          description: nulo
        displayOrder:
          type: integer
          format: int32
        hidden:
          type: boolean
        label:
          type: string
          description: nulo
        value:
          type: string
          description: nulo
    ComboEventRule:
      required:
        - count
        - eventTypeId
        - propertyFilters
      type: object
      properties:
        count:
          type: integer
          format: int32
        eventTypeId:
          type: string
        lookbackWindowDays:
          type: integer
          format: int32
        propertyFilters:
          type: array
          items:
            $ref: '#/components/schemas/PropertyFilter'
    PropertyModificationMetadata:
      required:
        - archivable
        - readOnlyDefinition
        - readOnlyValue
      type: object
      properties:
        archivable:
          type: boolean
        readOnlyDefinition:
          type: boolean
        readOnlyOptions:
          type: boolean
        readOnlyValue:
          type: boolean
    Option_1:
      required:
        - hidden
        - label
        - value
      type: object
      properties:
        description:
          type: string
        displayOrder:
          type: integer
          format: int32
        hidden:
          type: boolean
        label:
          type: string
        value:
          type: string
    ErrorDetail:
      required:
        - message
      type: object
      properties:
        code:
          type: string
          description: El código de estado asociado al detalle del error
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Contexto de la condición de error
          example: '{missingScopes=[scope1, scope2]}'
        in:
          type: string
          description: El nombre del campo o parámetro en el que se encontró el error.
        message:
          type: string
          description: >-
            Un mensaje legible en el que se describa el error y los pasos para
            solucionarlo, si procede
        subCategory:
          type: string
          description: >-
            Una categoría específica que contiene detalles más concretos acerca
            del error
    PropertyFilter:
      title: PROPERTY
      required:
        - filterType
        - operation
        - property
      type: object
      properties:
        context:
          $ref: '#/components/schemas/PropertyFilterContext'
        filterInsightsId:
          type: integer
          format: int32
        filterType:
          type: string
          default: PROPERTY
          enum:
            - PROPERTY
        frameworkFilterId:
          type: integer
          format: int64
        operation:
          oneOf:
            - $ref: '#/components/schemas/BoolPropertyOperation'
            - $ref: '#/components/schemas/NumberPropertyOperation'
            - $ref: '#/components/schemas/StringPropertyOperation'
            - $ref: '#/components/schemas/DateTimePropertyOperation'
            - $ref: '#/components/schemas/RangedDatePropertyOperation'
            - $ref: '#/components/schemas/ComparativeDatePropertyOperation'
            - $ref: '#/components/schemas/ComparativeBoolPropertyOperation'
            - $ref: '#/components/schemas/ComparativeNumberPropertyOperation'
            - $ref: '#/components/schemas/ComparativeStringPropertyOperation'
            - $ref: '#/components/schemas/ComparativePropertyUpdatedOperation'
            - $ref: '#/components/schemas/RollingDateRangePropertyOperation'
            - $ref: '#/components/schemas/RollingPropertyUpdatedOperation'
            - $ref: '#/components/schemas/EnumerationPropertyOperation'
            - $ref: '#/components/schemas/AllPropertyTypesOperation'
            - $ref: '#/components/schemas/RangedNumberPropertyOperation'
            - $ref: '#/components/schemas/MultiStringPropertyOperation'
            - $ref: '#/components/schemas/DatePropertyOperation'
            - $ref: '#/components/schemas/CalendarDatePropertyOperation'
            - $ref: '#/components/schemas/TimePointOperation'
            - $ref: '#/components/schemas/RangedTimeOperation'
            - $ref: '#/components/schemas/RegexPropertyOperation'
        property:
          type: string
      x-hubspot-sub-type-impl: true
    PropertyFilterContext:
      required:
        - objectTypeId
      type: object
      properties:
        objectTypeId:
          type: string
    BoolPropertyOperation:
      title: bool
      required:
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyType
        - value
      type: object
      properties:
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - HAS_EVER_BEEN_EQUAL_TO
            - HAS_NEVER_BEEN_EQUAL_TO
            - IS_EQUAL_TO
            - IS_NOT_EQUAL_TO
        operatorName:
          type: string
        propertyType:
          type: string
          default: bool
          enum:
            - bool
        renderSpec:
          type: string
        value:
          type: boolean
      x-hubspot-sub-type-impl: true
    NumberPropertyOperation:
      title: number
      required:
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyType
        - value
      type: object
      properties:
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - HAS_EVER_BEEN_EQUAL_TO
            - HAS_NEVER_BEEN_EQUAL_TO
            - IS_EQUAL_TO
            - IS_GREATER_THAN
            - IS_GREATER_THAN_OR_EQUAL_TO
            - IS_LESS_THAN
            - IS_LESS_THAN_OR_EQUAL_TO
            - IS_NOT_EQUAL_TO
        operatorName:
          type: string
        propertyType:
          type: string
          default: number
          enum:
            - number
        renderSpec:
          type: string
        value:
          type: number
      x-hubspot-sub-type-impl: true
    StringPropertyOperation:
      title: string
      required:
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyType
        - value
      type: object
      properties:
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - CONTAINS
            - DOES_NOT_CONTAIN
            - ENDS_WITH
            - HAS_EVER_BEEN_EQUAL_TO
            - HAS_EVER_CONTAINED
            - HAS_NEVER_BEEN_EQUAL_TO
            - HAS_NEVER_CONTAINED
            - IS_EQUAL_TO
            - IS_NOT_EQUAL_TO
            - STARTS_WITH
        operatorName:
          type: string
        propertyType:
          type: string
          default: string
          enum:
            - string
        renderSpec:
          type: string
        value:
          type: string
      x-hubspot-sub-type-impl: true
    DateTimePropertyOperation:
      title: datetime
      required:
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyType
        - requiresTimeZoneConversion
        - timestamp
      type: object
      properties:
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - IS_AFTER
            - IS_AFTER_DATE
            - IS_BEFORE
            - IS_BEFORE_DATE
            - IS_EQUAL_TO
        operatorName:
          type: string
        propertyType:
          type: string
          default: datetime
          enum:
            - datetime
        renderSpec:
          type: string
        requiresTimeZoneConversion:
          type: boolean
        timestamp:
          type: integer
          format: int64
      x-hubspot-sub-type-impl: true
    RangedDatePropertyOperation:
      title: datetime-ranged
      required:
        - includeObjectsWithNoValueSet
        - lowerBoundTimestamp
        - operationType
        - operator
        - operatorName
        - propertyType
        - requiresTimeZoneConversion
        - upperBoundTimestamp
      type: object
      properties:
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        lowerBoundTimestamp:
          type: integer
          format: int64
        operationType:
          type: string
        operator:
          type: string
          enum:
            - IS_BETWEEN
            - IS_NOT_BETWEEN
        operatorName:
          type: string
        propertyType:
          type: string
          default: datetime-ranged
          enum:
            - datetime-ranged
        renderSpec:
          type: string
        requiresTimeZoneConversion:
          type: boolean
        upperBoundTimestamp:
          type: integer
          format: int64
      x-hubspot-sub-type-impl: true
    ComparativeDatePropertyOperation:
      title: datetime-comparative
      required:
        - comparisonPropertyName
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyType
      type: object
      properties:
        comparisonPropertyName:
          type: string
        defaultComparisonValue:
          type: string
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - IS_AFTER
            - IS_BEFORE
        operatorName:
          type: string
        propertyType:
          type: string
          default: datetime-comparative
          enum:
            - datetime-comparative
        renderSpec:
          type: string
      x-hubspot-sub-type-impl: true
    ComparativeBoolPropertyOperation:
      title: bool-comparative
      required:
        - comparisonPropertyName
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyType
      type: object
      properties:
        comparisonPropertyName:
          type: string
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - IS_EQUAL_TO
            - IS_NOT_EQUAL_TO
        operatorName:
          type: string
        propertyType:
          type: string
          default: bool-comparative
          enum:
            - bool-comparative
        renderSpec:
          type: string
      x-hubspot-sub-type-impl: true
    ComparativeNumberPropertyOperation:
      title: number-comparative
      required:
        - comparisonPropertyName
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyType
      type: object
      properties:
        comparisonPropertyName:
          type: string
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - IS_EQUAL_TO
            - IS_GREATER_THAN
            - IS_GREATER_THAN_OR_EQUAL_TO
            - IS_LESS_THAN
            - IS_LESS_THAN_OR_EQUAL_TO
            - IS_NOT_EQUAL_TO
        operatorName:
          type: string
        propertyType:
          type: string
          default: number-comparative
          enum:
            - number-comparative
        renderSpec:
          type: string
      x-hubspot-sub-type-impl: true
    ComparativeStringPropertyOperation:
      title: string-comparative
      required:
        - comparisonPropertyName
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyType
      type: object
      properties:
        comparisonPropertyName:
          type: string
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - CONTAINS
            - DOES_NOT_CONTAIN
            - ENDS_WITH
            - IS_EQUAL_TO
            - IS_NOT_EQUAL_TO
            - STARTS_WITH
        operatorName:
          type: string
        propertyType:
          type: string
          default: string-comparative
          enum:
            - string-comparative
        renderSpec:
          type: string
      x-hubspot-sub-type-impl: true
    ComparativePropertyUpdatedOperation:
      title: property-updated-comparative
      required:
        - comparisonPropertyName
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyType
      type: object
      properties:
        comparisonPropertyName:
          type: string
        defaultComparisonValue:
          type: string
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - IS_AFTER
            - IS_BEFORE
        operatorName:
          type: string
        propertyType:
          type: string
          default: property-updated-comparative
          enum:
            - property-updated-comparative
        renderSpec:
          type: string
      x-hubspot-sub-type-impl: true
    RollingDateRangePropertyOperation:
      title: datetime-rolling
      required:
        - includeObjectsWithNoValueSet
        - numberOfDays
        - operationType
        - operator
        - operatorName
        - propertyType
        - requiresTimeZoneConversion
      type: object
      properties:
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        numberOfDays:
          type: integer
          format: int32
        operationType:
          type: string
        operator:
          type: string
          enum:
            - IS_LESS_THAN_X_DAYS_AGO
            - IS_LESS_THAN_X_DAYS_FROM_NOW
            - IS_MORE_THAN_X_DAYS_AGO
            - IS_MORE_THAN_X_DAYS_FROM_NOW
        operatorName:
          type: string
        propertyType:
          type: string
          default: datetime-rolling
          enum:
            - datetime-rolling
        renderSpec:
          type: string
        requiresTimeZoneConversion:
          type: boolean
      x-hubspot-sub-type-impl: true
    RollingPropertyUpdatedOperation:
      title: rolling-property-updated
      required:
        - includeObjectsWithNoValueSet
        - numberOfDays
        - operationType
        - operator
        - operatorName
        - propertyType
      type: object
      properties:
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        numberOfDays:
          type: integer
          format: int32
        operationType:
          type: string
        operator:
          type: string
          enum:
            - NOT_UPDATED_IN_LAST_X_DAYS
            - UPDATED_IN_LAST_X_DAYS
        operatorName:
          type: string
        propertyType:
          type: string
          default: rolling-property-updated
          enum:
            - rolling-property-updated
        renderSpec:
          type: string
      x-hubspot-sub-type-impl: true
    EnumerationPropertyOperation:
      title: enumeration
      required:
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyType
        - values
      type: object
      properties:
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - CONTAINS_ALL
            - DOES_NOT_CONTAIN_ALL
            - HAS_EVER_BEEN_ANY_OF
            - HAS_EVER_BEEN_EXACTLY
            - HAS_EVER_CONTAINED_ALL
            - HAS_NEVER_BEEN_ANY_OF
            - HAS_NEVER_BEEN_EXACTLY
            - HAS_NEVER_CONTAINED_ALL
            - IS_ANY_OF
            - IS_EXACTLY
            - IS_NONE_OF
            - IS_NOT_EXACTLY
        operatorName:
          type: string
        propertyType:
          type: string
          default: enumeration
          enum:
            - enumeration
        renderSpec:
          type: string
        values:
          type: array
          items:
            type: string
      x-hubspot-sub-type-impl: true
    AllPropertyTypesOperation:
      title: alltypes
      required:
        - coalescingRefineBy
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyType
      type: object
      properties:
        coalescingRefineBy:
          oneOf:
            - $ref: '#/components/schemas/NumOccurrencesRefineBy'
            - $ref: '#/components/schemas/SetOccurrencesRefineBy'
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - IS_BLANK
            - IS_KNOWN
            - IS_NOT_BLANK
            - IS_UNKNOWN
        operatorName:
          type: string
        propertyType:
          type: string
          default: alltypes
          enum:
            - alltypes
        pruningRefineBy:
          oneOf:
            - $ref: '#/components/schemas/RelativeComparativeTimestampRefineBy'
            - $ref: '#/components/schemas/RelativeRangedTimestampRefineBy'
            - $ref: '#/components/schemas/AbsoluteComparativeTimestampRefineBy'
            - $ref: '#/components/schemas/AbsoluteRangedTimestampRefineBy'
            - $ref: '#/components/schemas/AllHistoryRefineBy'
            - $ref: '#/components/schemas/TimePointOperation'
            - $ref: '#/components/schemas/RangedTimeOperation'
        renderSpec:
          type: string
      x-hubspot-sub-type-impl: true
    RangedNumberPropertyOperation:
      title: number-ranged
      required:
        - includeObjectsWithNoValueSet
        - lowerBound
        - operationType
        - operator
        - operatorName
        - propertyType
        - upperBound
      type: object
      properties:
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        lowerBound:
          type: number
        operationType:
          type: string
        operator:
          type: string
          enum:
            - IS_BETWEEN
            - IS_NOT_BETWEEN
        operatorName:
          type: string
        propertyType:
          type: string
          default: number-ranged
          enum:
            - number-ranged
        renderSpec:
          type: string
        upperBound:
          type: number
      x-hubspot-sub-type-impl: true
    MultiStringPropertyOperation:
      title: multistring
      required:
        - coalescingRefineBy
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyType
        - values
      type: object
      properties:
        coalescingRefineBy:
          oneOf:
            - $ref: '#/components/schemas/NumOccurrencesRefineBy'
            - $ref: '#/components/schemas/SetOccurrencesRefineBy'
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - CONTAINS
            - CONTAINS_EXACTLY
            - DOES_NOT_CONTAIN
            - DOES_NOT_CONTAIN_EXACTLY
            - ENDS_WITH
            - IS_EQUAL_TO
            - IS_NOT_EQUAL_TO
            - STARTS_WITH
        operatorName:
          type: string
        propertyType:
          type: string
          default: multistring
          enum:
            - multistring
        pruningRefineBy:
          oneOf:
            - $ref: '#/components/schemas/RelativeComparativeTimestampRefineBy'
            - $ref: '#/components/schemas/RelativeRangedTimestampRefineBy'
            - $ref: '#/components/schemas/AbsoluteComparativeTimestampRefineBy'
            - $ref: '#/components/schemas/AbsoluteRangedTimestampRefineBy'
            - $ref: '#/components/schemas/AllHistoryRefineBy'
            - $ref: '#/components/schemas/TimePointOperation'
            - $ref: '#/components/schemas/RangedTimeOperation'
        renderSpec:
          type: string
        values:
          type: array
          items:
            type: string
      x-hubspot-sub-type-impl: true
    DatePropertyOperation:
      title: date
      required:
        - day
        - includeObjectsWithNoValueSet
        - month
        - operationType
        - operator
        - operatorName
        - propertyType
        - year
      type: object
      properties:
        day:
          type: integer
          format: int32
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        month:
          type: string
          enum:
            - APR
            - AUG
            - DEC
            - FEB
            - JAN
            - JUL
            - JUN
            - MAR
            - MAY
            - NOV
            - OCT
            - SEP
        operationType:
          type: string
        operator:
          type: string
          enum:
            - AFTER
            - BEFORE
            - EQUAL
        operatorName:
          type: string
        propertyType:
          type: string
          default: date
          enum:
            - date
        renderSpec:
          type: string
        year:
          type: integer
          format: int32
      x-hubspot-sub-type-impl: true
    CalendarDatePropertyOperation:
      title: calendar-date
      required:
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyType
        - timeUnit
        - timeUnitCount
        - useFiscalYear
      type: object
      properties:
        defaultValue:
          type: string
        fiscalYearStart:
          type: string
          enum:
            - APRIL
            - AUGUST
            - DECEMBER
            - FEBRUARY
            - JANUARY
            - JULY
            - JUNE
            - MARCH
            - MAY
            - NOVEMBER
            - OCTOBER
            - SEPTEMBER
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - IN_LAST_TIME_UNIT
            - IN_NEXT_TIME_UNIT
            - IN_THIS_TIME_UNIT
            - IN_THIS_TIME_UNIT_SO_FAR
        operatorName:
          type: string
        propertyType:
          type: string
          default: calendar-date
          enum:
            - calendar-date
        renderSpec:
          type: string
        timeUnit:
          type: string
          enum:
            - DAY
            - MONTH
            - QUARTER
            - WEEK
            - YEAR
        timeUnitCount:
          type: integer
          format: int32
        useFiscalYear:
          type: boolean
      x-hubspot-sub-type-impl: true
    TimePointOperation:
      title: timepoint
      required:
        - endpointBehavior
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - propertyParser
        - propertyType
        - timePoint
        - type
      type: object
      properties:
        defaultValue:
          type: string
        endpointBehavior:
          type: string
          enum:
            - EXCLUSIVE
            - INCLUSIVE
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - IS_AFTER
            - IS_BEFORE
        operatorName:
          type: string
        propertyParser:
          type: string
          enum:
            - ANNIVERSARY
            - ANNIVERSARY_WITH_ZONE_SAME_LOCAL_CONVERSION
            - UPDATED_AT
            - VALUE
            - VALUE_WITH_ZONE_SAME_LOCAL_CONVERSION
        propertyType:
          type: string
          default: timepoint
          enum:
            - timepoint
        renderSpec:
          type: string
        timePoint:
          oneOf:
            - $ref: '#/components/schemas/DatePoint'
            - $ref: '#/components/schemas/IndexedTimePoint'
            - $ref: '#/components/schemas/PropertyReferencedTime'
        type:
          type: string
      x-hubspot-sub-type-impl: true
    RangedTimeOperation:
      title: rangedtime
      required:
        - includeObjectsWithNoValueSet
        - lowerBoundEndpointBehavior
        - lowerBoundTimePoint
        - operationType
        - operator
        - operatorName
        - propertyParser
        - propertyType
        - type
        - upperBoundEndpointBehavior
        - upperBoundTimePoint
      type: object
      properties:
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        lowerBoundEndpointBehavior:
          type: string
          enum:
            - EXCLUSIVE
            - INCLUSIVE
        lowerBoundTimePoint:
          oneOf:
            - $ref: '#/components/schemas/DatePoint'
            - $ref: '#/components/schemas/IndexedTimePoint'
            - $ref: '#/components/schemas/PropertyReferencedTime'
        operationType:
          type: string
        operator:
          type: string
          enum:
            - IS_BETWEEN
            - IS_NOT_BETWEEN
        operatorName:
          type: string
        propertyParser:
          type: string
          enum:
            - ANNIVERSARY
            - ANNIVERSARY_WITH_ZONE_SAME_LOCAL_CONVERSION
            - UPDATED_AT
            - VALUE
            - VALUE_WITH_ZONE_SAME_LOCAL_CONVERSION
        propertyType:
          type: string
          default: rangedtime
          enum:
            - rangedtime
        renderSpec:
          type: string
        type:
          type: string
        upperBoundEndpointBehavior:
          type: string
          enum:
            - EXCLUSIVE
            - INCLUSIVE
        upperBoundTimePoint:
          oneOf:
            - $ref: '#/components/schemas/DatePoint'
            - $ref: '#/components/schemas/IndexedTimePoint'
            - $ref: '#/components/schemas/PropertyReferencedTime'
      x-hubspot-sub-type-impl: true
    RegexPropertyOperation:
      title: regex
      required:
        - caseSensitive
        - includeObjectsWithNoValueSet
        - operationType
        - operator
        - operatorName
        - pattern
        - propertyType
      type: object
      properties:
        caseSensitive:
          type: boolean
        defaultValue:
          type: string
        includeObjectsWithNoValueSet:
          type: boolean
        operationType:
          type: string
        operator:
          type: string
          enum:
            - DOES_NOT_MATCH_REGEX
            - MATCHES_REGEX
        operatorName:
          type: string
        pattern:
          type: string
        propertyType:
          type: string
          default: regex
          enum:
            - regex
        renderSpec:
          type: string
      x-hubspot-sub-type-impl: true
    NumOccurrencesRefineBy:
      title: NumOccurrencesRefineBy
      required:
        - type
      type: object
      properties:
        maxOccurrences:
          type: integer
          format: int32
        minOccurrences:
          type: integer
          format: int32
        type:
          type: string
          default: NumOccurrencesRefineBy
          enum:
            - NumOccurrencesRefineBy
      x-hubspot-sub-type-impl: true
    SetOccurrencesRefineBy:
      title: SetOccurrencesRefineBy
      required:
        - setType
        - type
      type: object
      properties:
        setType:
          type: string
          enum:
            - ALL
            - ALL_INCLUDE_EMPTY
            - ANY
            - ANY_INCLUDE_EMPTY
            - NONE
            - NONE_EXCLUDE_EMPTY
        type:
          type: string
          default: SetOccurrencesRefineBy
          enum:
            - SetOccurrencesRefineBy
      x-hubspot-sub-type-impl: true
    RelativeComparativeTimestampRefineBy:
      title: RelativeComparativeTimestampRefineBy
      required:
        - comparison
        - timeOffset
        - type
      type: object
      properties:
        comparison:
          type: string
          enum:
            - AFTER
            - BEFORE
        timeOffset:
          $ref: '#/components/schemas/TimeOffset'
        type:
          type: string
          default: RelativeComparativeTimestampRefineBy
          enum:
            - RelativeComparativeTimestampRefineBy
      x-hubspot-sub-type-impl: true
    RelativeRangedTimestampRefineBy:
      title: RelativeRangedTimestampRefineBy
      required:
        - lowerBoundOffset
        - rangeType
        - type
        - upperBoundOffset
      type: object
      properties:
        lowerBoundOffset:
          $ref: '#/components/schemas/TimeOffset'
        rangeType:
          type: string
          enum:
            - BETWEEN
            - NOT_BETWEEN
        type:
          type: string
          default: RelativeRangedTimestampRefineBy
          enum:
            - RelativeRangedTimestampRefineBy
        upperBoundOffset:
          $ref: '#/components/schemas/TimeOffset'
      x-hubspot-sub-type-impl: true
    AbsoluteComparativeTimestampRefineBy:
      title: AbsoluteComparativeTimestampRefineBy
      required:
        - comparison
        - timestamp
        - type
      type: object
      properties:
        comparison:
          type: string
          enum:
            - AFTER
            - BEFORE
        timestamp:
          type: integer
          format: int64
        type:
          type: string
          default: AbsoluteComparativeTimestampRefineBy
          enum:
            - AbsoluteComparativeTimestampRefineBy
      x-hubspot-sub-type-impl: true
    AbsoluteRangedTimestampRefineBy:
      title: AbsoluteRangedTimestampRefineBy
      required:
        - lowerTimestamp
        - rangeType
        - type
        - upperTimestamp
      type: object
      properties:
        lowerTimestamp:
          type: integer
          format: int64
        rangeType:
          type: string
          enum:
            - BETWEEN
            - NOT_BETWEEN
        type:
          type: string
          default: AbsoluteRangedTimestampRefineBy
          enum:
            - AbsoluteRangedTimestampRefineBy
        upperTimestamp:
          type: integer
          format: int64
      x-hubspot-sub-type-impl: true
    AllHistoryRefineBy:
      title: AllHistoryRefineBy
      required:
        - type
      type: object
      properties:
        type:
          type: string
          default: AllHistoryRefineBy
          enum:
            - AllHistoryRefineBy
      x-hubspot-sub-type-impl: true
    DatePoint:
      title: DATE
      required:
        - day
        - month
        - timeType
        - timezoneSource
        - year
        - zoneId
      type: object
      properties:
        day:
          type: integer
          format: int32
        hour:
          type: integer
          format: int32
        millisecond:
          type: integer
          format: int32
        minute:
          type: integer
          format: int32
        month:
          type: integer
          format: int32
        second:
          type: integer
          format: int32
        timeType:
          type: string
          default: DATE
          enum:
            - DATE
        timezoneSource:
          type: string
          enum:
            - CUSTOM
            - PORTAL
            - USER
        year:
          type: integer
          format: int32
        zoneId:
          type: string
      x-hubspot-sub-type-impl: true
    IndexedTimePoint:
      title: INDEXED
      required:
        - indexReference
        - timeType
        - timezoneSource
        - zoneId
      type: object
      properties:
        indexReference:
          oneOf:
            - $ref: '#/components/schemas/NowReference'
            - $ref: '#/components/schemas/TodayReference'
            - $ref: '#/components/schemas/WeekReference'
            - $ref: '#/components/schemas/MonthReference'
            - $ref: '#/components/schemas/QuarterReference'
            - $ref: '#/components/schemas/FiscalQuarter'
            - $ref: '#/components/schemas/YearReference'
            - $ref: '#/components/schemas/FiscalYear'
        offset:
          $ref: '#/components/schemas/IndexOffset'
        shouldGenerateRefreshTime:
          type: boolean
        timeType:
          type: string
          default: INDEXED
          enum:
            - INDEXED
        timezoneSource:
          type: string
          enum:
            - CUSTOM
            - PORTAL
            - USER
        zoneId:
          type: string
      x-hubspot-sub-type-impl: true
    PropertyReferencedTime:
      title: PROPERTY_REFERENCED
      required:
        - property
        - referenceType
        - timeType
        - timezoneSource
        - zoneId
      type: object
      properties:
        property:
          type: string
        referenceType:
          type: string
          enum:
            - ANNIVERSARY
            - ANNIVERSARY_WITH_ZONE_SAME_LOCAL_CONVERSION
            - UPDATED_AT
            - VALUE
            - VALUE_WITH_ZONE_SAME_LOCAL_CONVERSION
        timeType:
          type: string
          default: PROPERTY_REFERENCED
          enum:
            - PROPERTY_REFERENCED
        timezoneSource:
          type: string
          enum:
            - CUSTOM
            - PORTAL
            - USER
        zoneId:
          type: string
      x-hubspot-sub-type-impl: true
    TimeOffset:
      required:
        - amount
        - offsetDirection
        - timeUnit
      type: object
      properties:
        amount:
          type: integer
          format: int64
        offsetDirection:
          type: string
          enum:
            - FUTURE
            - PAST
        timeUnit:
          type: string
          enum:
            - DAYS
            - HOURS
            - MINUTES
            - WEEKS
    NowReference:
      title: NOW
      required:
        - referenceType
      type: object
      properties:
        hour:
          type: integer
          format: int32
        millisecond:
          type: integer
          format: int32
        minute:
          type: integer
          format: int32
        referenceType:
          type: string
          default: NOW
          enum:
            - NOW
        second:
          type: integer
          format: int32
      x-hubspot-sub-type-impl: true
    TodayReference:
      title: TODAY
      required:
        - referenceType
      type: object
      properties:
        hour:
          type: integer
          format: int32
        millisecond:
          type: integer
          format: int32
        minute:
          type: integer
          format: int32
        referenceType:
          type: string
          default: TODAY
          enum:
            - TODAY
        second:
          type: integer
          format: int32
      x-hubspot-sub-type-impl: true
    WeekReference:
      title: WEEK
      required:
        - dayOfWeek
        - referenceType
      type: object
      properties:
        dayOfWeek:
          type: string
          enum:
            - FRIDAY
            - MONDAY
            - SATURDAY
            - SUNDAY
            - THURSDAY
            - TUESDAY
            - WEDNESDAY
        hour:
          type: integer
          format: int32
        millisecond:
          type: integer
          format: int32
        minute:
          type: integer
          format: int32
        referenceType:
          type: string
          default: WEEK
          enum:
            - WEEK
        second:
          type: integer
          format: int32
      x-hubspot-sub-type-impl: true
    MonthReference:
      title: MONTH
      required:
        - day
        - referenceType
      type: object
      properties:
        day:
          type: integer
          format: int32
        hour:
          type: integer
          format: int32
        millisecond:
          type: integer
          format: int32
        minute:
          type: integer
          format: int32
        referenceType:
          type: string
          default: MONTH
          enum:
            - MONTH
        second:
          type: integer
          format: int32
      x-hubspot-sub-type-impl: true
    QuarterReference:
      title: QUARTER
      required:
        - day
        - month
        - referenceType
      type: object
      properties:
        day:
          type: integer
          format: int32
        hour:
          type: integer
          format: int32
        millisecond:
          type: integer
          format: int32
        minute:
          type: integer
          format: int32
        month:
          type: integer
          format: int32
        referenceType:
          type: string
          default: QUARTER
          enum:
            - QUARTER
        second:
          type: integer
          format: int32
      x-hubspot-sub-type-impl: true
    FiscalQuarter:
      title: FISCAL_QUARTER
      required:
        - day
        - month
        - referenceType
      type: object
      properties:
        day:
          type: integer
          format: int32
        hour:
          type: integer
          format: int32
        millisecond:
          type: integer
          format: int32
        minute:
          type: integer
          format: int32
        month:
          type: integer
          format: int32
        referenceType:
          type: string
          default: FISCAL_QUARTER
          enum:
            - FISCAL_QUARTER
        second:
          type: integer
          format: int32
      x-hubspot-sub-type-impl: true
    YearReference:
      title: YEAR
      required:
        - day
        - month
        - referenceType
      type: object
      properties:
        day:
          type: integer
          format: int32
        hour:
          type: integer
          format: int32
        millisecond:
          type: integer
          format: int32
        minute:
          type: integer
          format: int32
        month:
          type: integer
          format: int32
        referenceType:
          type: string
          default: YEAR
          enum:
            - YEAR
        second:
          type: integer
          format: int32
      x-hubspot-sub-type-impl: true
    FiscalYear:
      title: FISCAL_YEAR
      required:
        - day
        - month
        - referenceType
      type: object
      properties:
        day:
          type: integer
          format: int32
        hour:
          type: integer
          format: int32
        millisecond:
          type: integer
          format: int32
        minute:
          type: integer
          format: int32
        month:
          type: integer
          format: int32
        referenceType:
          type: string
          default: FISCAL_YEAR
          enum:
            - FISCAL_YEAR
        second:
          type: integer
          format: int32
      x-hubspot-sub-type-impl: true
    IndexOffset:
      type: object
      properties:
        days:
          type: integer
          format: int32
        hours:
          type: integer
          format: int32
        milliseconds:
          type: integer
          format: int32
        minutes:
          type: integer
          format: int32
        months:
          type: integer
          format: int32
        quarters:
          type: integer
          format: int32
        seconds:
          type: integer
          format: int32
        weeks:
          type: integer
          format: int32
        years:
          type: integer
          format: int32
  responses:
    Error:
      description: An error occurred.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.hubspot.com/oauth/authorize
          tokenUrl: https://api.hubapi.com/oauth/v1/token
          scopes:
            analytics.behavioral_events.send: ''
            behavioral_events.event_definitions.read_write: ''

````