> ## 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 or update events

> Actualiza o crea múltiples eventos de marketing. Si un evento de marketing con el ID especificado ya existe, se actualizará; de lo contrario, se creará un nuevo evento

Solo se actualizarán eventos de marketing creados originalmente por la misma aplicación.

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="FREE" salesLevel="FREE" serviceLevel="FREE" cmsLevel="FREE" />
  </Accordion>

  <Accordion title="Required Scopes" icon="key">
    <ScopesList
      scopes={[
  'crm.objects.marketing_events.write'
]}
    />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml specs/2026-03/marketing-marketing-events-v2026-03.json POST /marketing/marketing-events/2026-03/events/upsert
openapi: 3.0.1
info:
  title: Marketing Marketing Events
  description: Basepom for all HubSpot Projects
  version: 2026-03
  x-hubspot-product-tier-requirements:
    marketing: FREE
    sales: FREE
    service: FREE
    cms: FREE
    commerce: FREE
    crmHub: FREE
    dataHub: FREE
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Basic
  - name: Batch
  - name: Event Attendees
  - name: Event Status
  - name: Identifiers
  - name: List Associations
  - name: Participant State
  - name: Settings
  - name: Subscriber State Changes
paths:
  /marketing/marketing-events/2026-03/events/upsert:
    post:
      tags:
        - Batch
      summary: Crear o actualizar múltiples eventos de marketing
      description: >-
        Actualiza o crea múltiples eventos de marketing. Si un evento de
        marketing con el ID especificado ya existe, se actualizará; de lo
        contrario, se creará un nuevo evento


        Solo se actualizarán eventos de marketing creados originalmente por la
        misma aplicación.
      operationId: post-/marketing/marketing-events/2026-03/events/upsert_upsert
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchInputMarketingEventCreateRequestParams'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BatchResponseMarketingEventPublicDefaultResponse
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security:
        - oauth2:
            - crm.objects.marketing_events.write
components:
  schemas:
    BatchInputMarketingEventCreateRequestParams:
      required:
        - inputs
      type: object
      properties:
        inputs:
          type: array
          items:
            $ref: '#/components/schemas/MarketingEventCreateRequestParams'
    BatchResponseMarketingEventPublicDefaultResponse:
      required:
        - completedAt
        - results
        - startedAt
        - status
      type: object
      properties:
        completedAt:
          type: string
          description: Marca de tiempo de cuando se completó la solicitud.
          format: date-time
        errors:
          type: array
          items:
            $ref: '#/components/schemas/StandardError'
        links:
          type: object
          additionalProperties:
            type: string
          description: Resultado de la solicitud.
        numErrors:
          type: integer
          description: El número de errores que se produjeron durante la solicitud.
          format: int32
        requestedAt:
          type: string
          description: Marca de tiempo de cuando se envió la solicitud.
          format: date-time
        results:
          type: array
          items:
            $ref: '#/components/schemas/MarketingEventPublicDefaultResponse'
        startedAt:
          type: string
          description: Marca de tiempo de cuando comenzó a procesarse la solicitud.
          format: date-time
        status:
          type: string
          description: Estado de la respuesta.
          enum:
            - CANCELED
            - COMPLETE
            - PENDING
            - PROCESSING
    MarketingEventCreateRequestParams:
      required:
        - customProperties
        - eventName
        - eventOrganizer
        - externalAccountId
        - externalEventId
      type: object
      properties:
        customProperties:
          type: array
          description: >
            Una lista de PropertyValues. Pueden ser cualquier tipo de nombres y
            valores de propiedad que desees. Sin embargo, deben existir
            previamente en la definición del objeto MarketingEvent de la cuenta
            de HubSpot. Si no es así, serán filtrados y no se establecerán.

            Para hacer esto, deberás crear un nuevo PropertyGroup en el objeto
            MarketingEvent de la cuenta de HubSpot para tu aplicación específica
            y crear la Propiedad Personalizada a la que deseas hacer seguimiento
            en esa cuenta de HubSpot. No crees ninguna propiedad predeterminada
            nueva en el objeto MarketingEvent, ya que esa propiedad se aplicará
            a todas las cuentas de HubSpot.
          items:
            $ref: '#/components/schemas/PropertyValue'
        endDateTime:
          type: string
          description: La fecha y la hora de finalización del evento de marketing.
          format: date-time
        eventCancelled:
          type: boolean
          description: >-
            Indica si el evento de marketing se canceló. Por opción
            predeterminada, se establece en "falso".
        eventCompleted:
          type: boolean
          description: >-
            Indica si el evento de marketing finalizó. Por opción
            predeterminada, se define como `false`.
        eventDescription:
          type: string
          description: La descripción del evento de marketing.
        eventName:
          type: string
          description: El nombre del evento de marketing.
        eventOrganizer:
          type: string
          description: El nombre del organizador del evento de marketing.
        eventType:
          type: string
          description: >-
            Describe el tipo de evento del que se trata. Por ejemplo:
            "WEBINARIO", "CONFERENCIA", "TALLER"
        eventUrl:
          type: string
          description: >-
            Una URL en la aplicación de eventos externos donde se puede
            gestionar el evento de marketing.
        externalAccountId:
          type: string
          description: >-
            El accountId que está asociado con este evento de marketing en la
            aplicación de eventos externos.
        externalEventId:
          type: string
          description: El id del evento de marketing en la aplicación de eventos externos.
        startDateTime:
          type: string
          description: La fecha y la hora de inicio del evento de marketing.
          format: date-time
    StandardError:
      required:
        - category
        - context
        - errors
        - links
        - message
        - status
      type: object
      properties:
        category:
          type: string
          description: La categoría del error
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: El objeto que contiene los detalles de los errores
        errors:
          type: array
          description: The detailed error objects.
          items:
            $ref: '#/components/schemas/ErrorDetail'
        id:
          type: string
          description: El ID de la solicitud
        links:
          type: object
          additionalProperties:
            type: string
          description: Resultados de la solicitud
        message:
          type: string
          description: >-
            Un mensaje legible en el que se describa el error y los pasos para
            solucionarlo, si procede
        status:
          type: string
          description: Estado de la respuesta
        subCategory:
          type: object
          properties: {}
          description: La subcategoría del error
      description: Ye olde error
    MarketingEventPublicDefaultResponse:
      required:
        - createdAt
        - customProperties
        - eventName
        - eventOrganizer
        - id
        - updatedAt
      type: object
      properties:
        createdAt:
          type: string
          description: La fecha y hora de creación del evento de marketing.
          format: date-time
        customProperties:
          type: array
          description: >
            Una lista de PropertyValues. Pueden ser cualquier tipo de nombres y
            valores de propiedad que desees. Sin embargo, deben existir
            previamente en la definición del objeto MarketingEvent de la cuenta
            de HubSpot. Si no es así, serán filtrados y no se establecerán.

            Para hacer esto, deberás crear un nuevo PropertyGroup en el objeto
            MarketingEvent de la cuenta de HubSpot para tu aplicación específica
            y crear la Propiedad Personalizada a la que deseas hacer seguimiento
            en esa cuenta de HubSpot. No crees ninguna propiedad predeterminada
            nueva en el objeto MarketingEvent, ya que esa propiedad se aplicará
            a todas las cuentas de HubSpot.
          items:
            $ref: '#/components/schemas/PropertyValue'
        endDateTime:
          type: string
          description: La fecha y la hora de finalización del evento de marketing.
          format: date-time
        eventCancelled:
          type: boolean
          description: Indica si el evento de marketing se canceló.
        eventCompleted:
          type: boolean
          description: Indica si el evento de marketing se ha completado.
        eventDescription:
          type: string
          description: La descripción del evento de marketing.
        eventName:
          type: string
          description: El nombre del evento de marketing.
        eventOrganizer:
          type: string
          description: El nombre del organizador del evento de marketing.
        eventType:
          type: string
          description: El tipo del evento de marketing.
        eventUrl:
          type: string
          description: >-
            Una URL en la aplicación de eventos externos donde se puede
            gestionar el evento de marketing.
        id:
          type: string
          description: El ID del objeto del CRM del evento de marketing.
        objectId:
          type: string
          description: El ID del objeto del CRM del evento de marketing.
        startDateTime:
          type: string
          description: La fecha y la hora de inicio del evento de marketing.
          format: date-time
        updatedAt:
          type: string
          description: La fecha y hora de actualización del evento de marketing.
          format: date-time
    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
      description: >-
        Representa una respuesta de error que devuelve la API cuando una
        operación falla. Este componente se usa en varios puntos de terminación
        para dar información detallada sobre el error que se encontró.
      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
    PropertyValue:
      required:
        - dataSensitivity
        - isEncrypted
        - isLargeValue
        - maskedSubstrings
        - name
        - persistenceTimestamp
        - requestId
        - selectedByUser
        - selectedByUserTimestamp
        - source
        - sourceId
        - sourceLabel
        - sourceMetadata
        - sourceUpstreamDeployable
        - sourceVid
        - timestamp
        - unit
        - updatedByUserId
        - useTimestampAsPersistenceTimestamp
        - value
      type: object
      properties:
        dataSensitivity:
          type: string
          description: Nivel de sensibilidad de los datos
          enum:
            - high
            - none
            - standard
        isEncrypted:
          type: boolean
          description: Indica si la propiedad está encriptada
        isLargeValue:
          type: boolean
          description: >-
            Indica si el valor de la propiedad se almacena como un valor grande
            en el almacén
        maskedSubstrings:
          $ref: '#/components/schemas/MaskedSubstrings'
        name:
          type: string
          description: Nombre de la propiedad personalizada
        persistenceTimestamp:
          type: integer
          description: >-
            La marca de tiempo que indica cuándo el valor que se está
            escribiendo persiste en el almacenamiento
          format: int64
        requestId:
          type: string
          description: El ID de la solicitud
        selectedByUser:
          type: boolean
          description: Indica si la propiedad está seleccionada
        selectedByUserTimestamp:
          type: integer
          description: Fecha y hora en que el usuario seleccionó la propiedad
          format: int64
        source:
          type: string
          description: Origen de la propiedad
          enum:
            - ACADEMY
            - ACCEPTANCE_TEST
            - ACTIVITY_AUTO_ASSOCIATE
            - ACTIVITY_LOG_REVERT
            - ADS
            - AI_GROUP
            - ANALYTICS
            - API
            - APPROVALS
            - ASSISTS
            - ASSOCIATIONS
            - AUTO_ASSOCIATE_BY_DOMAIN
            - AUTOMATION_JOURNEY
            - AUTOMATION_PLATFORM
            - AVATARS_SERVICE
            - BATCH_UPDATE
            - BCC_TO_CRM
            - BEHAVIORAL_EVENTS
            - BET_ASSIGNMENT
            - BET_CRM_CONNECTOR
            - BIDEN
            - BILLING
            - BOT
            - BREEZE_AGENT
            - CALCULATED
            - CENTRAL_EXCHANGE_RATES
            - CHATSPOT
            - CLONE_OBJECTS
            - COMMUNICATOR
            - COMPANIES
            - COMPANY_FAMILIES
            - COMPANY_INSIGHTS
            - CONNECTED_ACCOUNT
            - CONTACTS
            - CONTACTS_WEB
            - CONTENT_MEMBERSHIP
            - CONVERSATIONAL_ENRICHMENT
            - CONVERSATIONS
            - CRM_PROCESSES_PLATFORM
            - CRM_UI
            - CRM_UI_BULK_ACTION
            - CUSTOMER_AGENT
            - CUSTOMER_PORTAL
            - DATA_ENRICHMENT
            - DATA_QUALITY
            - DATASET
            - DEALS
            - DEFAULT
            - DELETE_OBJECTS
            - DI_WRITE_TO_CRM
            - EMAIL
            - EMAIL_INBOX_IMPORT
            - EMAIL_INTEGRATION
            - ENGAGEMENTS
            - EXTENSION
            - FILE_MANAGER
            - FLYWHEEL_PRODUCT_DATA_SYNC
            - FORECASTING
            - FORM
            - FORWARD_TO_CRM
            - GMAIL_INTEGRATION
            - GOALS
            - HEISENBERG
            - HELP_DESK
            - HELP_DESK_AI
            - IMPORT
            - INTEGRATION
            - INTEGRATIONS_PLATFORM
            - INTEGRATIONS_SYNC
            - INTENT
            - INTERNAL_PROCESSING
            - LEADIN
            - LEGAL_BASIS_REMEDIATION
            - MARKET_SOURCING
            - MARKETPLACE
            - MARKETS
            - MEETINGS
            - MERGE_COMPANIES
            - MERGE_CONTACTS
            - MERGE_OBJECTS
            - MERGE_REVERT_OBJECTS
            - MICROAPPS
            - MIGRATION
            - MOBILE_ANDROID
            - MOBILE_IOS
            - PAYMENTS
            - PIPELINE_SETTINGS
            - PLAYBOOKS
            - PORTAL_OBJECT_SYNC
            - PORTAL_USER_ASSOCIATOR
            - PRESENTATIONS
            - PRIMARY_AUTOMATION
            - PROPERTY_DEFAULT_VALUE
            - PROPERTY_RESTORE
            - PROPERTY_SETTINGS
            - PROSPECTING_AGENT
            - QUOTAS
            - QUOTES
            - RECYCLING_BIN
            - RESTORE_OBJECTS
            - REVENUE_PLATFORM
            - SALES
            - SALES_MESSAGES
            - SALESFORCE
            - SEQUENCES
            - SETTINGS
            - SIDEKICK
            - SIGNALS
            - SLACK_INTEGRATION
            - SMART_DATA_CAPTURE
            - SOCIAL
            - SUCCESS
            - TALLY
            - TASK
            - UNKNOWN
            - WAL_INCREMENTAL
            - WORK_UI
            - WORKFLOW_CONTACT_DELETE_ACTION
            - WORKFLOWS
        sourceId:
          type: string
          description: ID del origen de la propiedad
        sourceLabel:
          type: string
          description: Etiqueta del origen de la propiedad
        sourceMetadata:
          type: string
          description: Metadatos de origen codificados como una cadena base64
        sourceUpstreamDeployable:
          type: string
          description: Indica qué servicio ascendente realizó el cambio de propiedad
        sourceVid:
          type: array
          description: The unique identifier associated with the source.
          items:
            type: integer
            format: int64
        timestamp:
          type: integer
          description: Marca de tiempo de la solicitud
          format: int64
        unit:
          type: string
          description: La unidad
        updatedByUserId:
          type: integer
          description: El ID del usuario que actualizó la propiedad por última vez
          format: int32
        useTimestampAsPersistenceTimestamp:
          type: boolean
          description: >-
            Indica si la marca de tiempo de persistencia es la misma que la
            marca de tiempo de la versión de almacenamiento
        value:
          type: string
          description: Valor de propiedad personalizada
      description: >-
        Represents a single custom property of a marketing event, storing its
        name, value, metadata (like source, timestamp, and sensitivity), and
        related audit information for tracking changes.
    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
      description: >-
        Representa información detallada sobre un error que ocurrió en la API.
        Este componente se usa para dar contexto adicional y detalles
        específicos sobre los errores, normalmente como parte de una respuesta
        de error.
    MaskedSubstrings:
      required:
        - substrings
      type: object
      properties:
        substrings:
          type: array
          items:
            $ref: '#/components/schemas/MaskedSubstring'
    MaskedSubstring:
      required:
        - end
        - start
      type: object
      properties:
        end:
          type: integer
          format: int32
        start:
          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:
            crm.objects.marketing_events.read: ''
            crm.objects.marketing_events.write: ''
            developers-read: ''
            developers-write: ''

````