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

# Create or update a subscription

> Create a new webhook journal subscription for the specified portal. This endpoint allows you to define the actions and object types that the subscription will monitor. It requires a request body with the subscription details.

> [accordion] Supported products


## OpenAPI

````yaml specs/2027-03-beta/webhooks-journal-webhooks-journal-v2027-03-beta.json POST /webhooks-journal/subscriptions/2027-03-beta
openapi: 3.0.1
info:
  title: Webhooks Journal Webhooks Journal
  description: Basepom for all HubSpot Projects
  version: 2027-03-beta
  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: Advanced
  - name: Basic
  - name: Batch
paths:
  /webhooks-journal/subscriptions/2027-03-beta:
    post:
      tags:
        - Basic
      summary: Upsert subscription
      description: >-
        Create a new webhook journal subscription for the specified portal. This
        endpoint allows you to define the actions and object types that the
        subscription will monitor. It requires a request body with the
        subscription details.
      operationId: >-
        post-/webhooks-journal/subscriptions/2027-03-beta_/webhooks-journal/subscriptions/2027-03-beta
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionUpsertRequest'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionResponse'
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security: []
components:
  schemas:
    SubscriptionUpsertRequest:
      properties: {}
      oneOf:
        - $ref: '#/components/schemas/ObjectSubscriptionUpsertRequest'
        - $ref: '#/components/schemas/AssociationSubscriptionUpsertRequest'
        - $ref: '#/components/schemas/AppLifecycleEventSubscriptionUpsertRequest'
        - $ref: '#/components/schemas/ListMembershipSubscriptionUpsertRequest'
        - $ref: '#/components/schemas/GdprPrivacyDeletionSubscriptionUpsertRequest'
    SubscriptionResponse:
      required:
        - actions
        - appId
        - createdAt
        - id
        - objectTypeId
        - subscriptionType
        - updatedAt
      type: object
      properties:
        actionOverrides:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ActionOverrideRequest'
          description: >-
            An object containing overrides for actions, where each key is an
            action and the value is an ActionOverrideRequest object.
        actions:
          type: array
          description: >-
            An array of actions associated with the subscription. Valid actions
            include 'CREATE', 'UPDATE', 'DELETE', 'MERGE', 'RESTORE',
            'ASSOCIATION_ADDED', 'ASSOCIATION_REMOVED', 'SNAPSHOT',
            'APP_INSTALL', 'APP_UNINSTALL', 'ADDED_TO_LIST',
            'REMOVED_FROM_LIST', and 'GDPR_DELETE'.
          items:
            type: string
            enum:
              - CREATE
              - UPDATE
              - DELETE
              - MERGE
              - RESTORE
              - ASSOCIATION_ADDED
              - ASSOCIATION_REMOVED
              - SNAPSHOT
              - APP_INSTALL
              - APP_UNINSTALL
              - ADDED_TO_LIST
              - REMOVED_FROM_LIST
              - GDPR_DELETE
        appId:
          type: integer
          description: >-
            The unique identifier for the app associated with the subscription,
            represented as an integer.
          format: int64
        associatedObjectTypeIds:
          type: array
          description: An array of strings representing the IDs of associated object types.
          items:
            type: string
        createdAt:
          type: string
          description: >-
            The date and time when the subscription was created, in ISO 8601
            format.
          format: date-time
        createdBy:
          type: integer
          description: >-
            The unique identifier of the user who created the subscription,
            represented as an integer.
          format: int64
        deletedAt:
          type: string
          description: >-
            The date and time when the subscription was deleted, in ISO 8601
            format, if applicable.
          format: date-time
        id:
          type: integer
          description: >-
            The unique identifier for the subscription, represented as an
            integer.
          format: int64
        listIds:
          type: array
          description: >-
            An array of integers representing the IDs of lists associated with
            the subscription.
          items:
            type: integer
            format: int64
        objectIds:
          type: array
          description: >-
            An array of integers representing the IDs of objects associated with
            the subscription.
          items:
            type: integer
            format: int64
        objectTypeId:
          type: string
          description: >-
            The identifier for the type of object associated with the
            subscription, represented as a string.
        portalId:
          type: integer
          description: >-
            The unique identifier for the portal associated with the
            subscription, represented as an integer.
          format: int64
        properties:
          type: array
          description: >-
            An array of strings representing the properties associated with the
            subscription.
          items:
            type: string
        subscriptionType:
          type: string
          description: >-
            The type of subscription, indicating the nature of events it
            pertains to. Valid values include 'OBJECT', 'ASSOCIATION', 'EVENT',
            'APP_LIFECYCLE_EVENT', 'LIST_MEMBERSHIP', and
            'GDPR_PRIVACY_DELETION'.
          enum:
            - APP_LIFECYCLE_EVENT
            - ASSOCIATION
            - EVENT
            - GDPR_PRIVACY_DELETION
            - LIST_MEMBERSHIP
            - OBJECT
        updatedAt:
          type: string
          description: >-
            The date and time when the subscription was last updated, in ISO
            8601 format.
          format: date-time
    ObjectSubscriptionUpsertRequest:
      required:
        - actions
        - objectIds
        - objectTypeId
        - portalId
        - properties
        - subscriptionType
      type: object
      properties:
        actions:
          type: array
          description: >-
            An array of strings specifying the actions to be tracked. Valid
            actions include 'CREATE', 'UPDATE', 'DELETE', 'MERGE', 'RESTORE'.
          items:
            type: string
            enum:
              - CREATE
              - UPDATE
              - DELETE
              - MERGE
              - RESTORE
              - ASSOCIATION_ADDED
              - ASSOCIATION_REMOVED
              - SNAPSHOT
              - APP_INSTALL
              - APP_UNINSTALL
              - ADDED_TO_LIST
              - REMOVED_FROM_LIST
              - GDPR_DELETE
        objectIds:
          type: array
          description: >-
            An array of integers in int64 format, representing the unique
            identifiers of the objects involved in the subscription.
          items:
            type: integer
            format: int64
        objectTypeId:
          type: string
          description: >-
            The identifier for the type of object the subscription is related
            to.
        portalId:
          type: integer
          description: >-
            An integer representing the unique identifier of the account for
            which the subscription is being created or updated.
          format: int64
        properties:
          type: array
          description: >-
            An array of strings specifying the properties of the objects that
            are relevant to the subscription.
          items:
            type: string
        subscriptionType:
          type: string
          description: >-
            A string indicating the type of subscription, which is 'OBJECT' by
            default.
          default: OBJECT
          enum:
            - OBJECT
      x-hubspot-sub-type-impl: true
    AssociationSubscriptionUpsertRequest:
      required:
        - actions
        - associatedObjectTypeIds
        - objectIds
        - objectTypeId
        - portalId
        - subscriptionType
      type: object
      properties:
        actions:
          type: array
          description: >-
            An array of actions that trigger the subscription. Valid actions
            include 'ASSOCIATION_ADDED', 'ASSOCIATION_REMOVED'.
          items:
            type: string
            enum:
              - CREATE
              - UPDATE
              - DELETE
              - MERGE
              - RESTORE
              - ASSOCIATION_ADDED
              - ASSOCIATION_REMOVED
              - SNAPSHOT
              - APP_INSTALL
              - APP_UNINSTALL
              - ADDED_TO_LIST
              - REMOVED_FROM_LIST
              - GDPR_DELETE
        associatedObjectTypeIds:
          type: array
          description: >-
            An array of strings representing the types of objects that are
            associated with the primary object in the subscription. In other
            words, the set of allowed TO object types in the TO/FROM association
            relationship. 
          items:
            type: string
        objectIds:
          type: array
          description: >-
            An array of integers representing the unique identifiers of the
            objects involved in the subscription.
          items:
            type: integer
            format: int64
        objectTypeId:
          type: string
          description: >-
            A string representing the unique identifier for the type of the
            primary object involved in the subscription. In other words, the
            allowed FROM object type in the TO/FROM association relationship.
        portalId:
          type: integer
          description: >-
            The unique identifier for the HubSpot portal. It is an integer
            formatted as int64.
          format: int64
        subscriptionType:
          type: string
          description: >-
            The type of subscription, which is fixed as 'ASSOCIATION' for this
            request.
          default: ASSOCIATION
          enum:
            - ASSOCIATION
      x-hubspot-sub-type-impl: true
    AppLifecycleEventSubscriptionUpsertRequest:
      required:
        - eventTypeId
        - properties
        - subscriptionType
      type: object
      properties:
        eventTypeId:
          type: string
          description: >-
            A string representing the unique identifier for the event type
            associated with the app lifecycle event. 


            4-1909196: App install event

            4-1916193: App uninstall event
        properties:
          type: array
          description: >-
            An array of strings specifying the properties related to the event
            that should be included in the subscription.
          items:
            type: string
        subscriptionType:
          type: string
          description: >-
            A string indicating the type of subscription, which is
            'APP_LIFECYCLE_EVENT' 
          default: APP_LIFECYCLE_EVENT
          enum:
            - APP_LIFECYCLE_EVENT
      x-hubspot-sub-type-impl: true
    ListMembershipSubscriptionUpsertRequest:
      required:
        - actions
        - listIds
        - objectIds
        - portalId
        - subscriptionType
      type: object
      properties:
        actions:
          type: array
          description: >-
            An array of strings specifying the actions to be tracked for the
            subscription. Valid actions include 'ADDED_TO_LIST',
            'REMOVED_FROM_LIST'.
          items:
            type: string
            enum:
              - CREATE
              - UPDATE
              - DELETE
              - MERGE
              - RESTORE
              - ASSOCIATION_ADDED
              - ASSOCIATION_REMOVED
              - SNAPSHOT
              - APP_INSTALL
              - APP_UNINSTALL
              - ADDED_TO_LIST
              - REMOVED_FROM_LIST
              - GDPR_DELETE
        listIds:
          type: array
          description: >-
            An array of integers representing the unique identifiers of the
            lists involved in the subscription.
          items:
            type: integer
            format: int64
        objectIds:
          type: array
          description: >-
            An array of integers representing the unique identifiers of the
            objects involved in the subscription.
          items:
            type: integer
            format: int64
        portalId:
          type: integer
          description: >-
            An integer representing the unique identifier of the HubSpot account
            the subscription is listening to.
          format: int64
        subscriptionType:
          type: string
          description: >-
            A string that specifies the type of subscription. The default and
            only valid value is 'LIST_MEMBERSHIP'.
          default: LIST_MEMBERSHIP
          enum:
            - LIST_MEMBERSHIP
      x-hubspot-sub-type-impl: true
    GdprPrivacyDeletionSubscriptionUpsertRequest:
      required:
        - actions
        - objectTypeId
        - portalId
        - subscriptionType
      type: object
      properties:
        actions:
          type: array
          description: >-
            An array of actions that can trigger the subscription. Valid actions
            include 'GDPR_DELETE'.
          items:
            type: string
            enum:
              - CREATE
              - UPDATE
              - DELETE
              - MERGE
              - RESTORE
              - ASSOCIATION_ADDED
              - ASSOCIATION_REMOVED
              - SNAPSHOT
              - APP_INSTALL
              - APP_UNINSTALL
              - ADDED_TO_LIST
              - REMOVED_FROM_LIST
              - GDPR_DELETE
        objectTypeId:
          type: string
          description: >-
            A string that identifies the type of object for which the
            subscription is being created or updated.
        portalId:
          type: integer
          description: >-
            An integer representing the unique identifier of the account where
            the subscription is applied.
          format: int64
        subscriptionType:
          type: string
          description: >-
            A string indicating the type of subscription, which is set to
            'GDPR_PRIVACY_DELETION' by default.
          default: GDPR_PRIVACY_DELETION
          enum:
            - GDPR_PRIVACY_DELETION
      x-hubspot-sub-type-impl: true
    ActionOverrideRequest:
      type: object
      properties:
        associatedObjectTypeIds:
          type: array
          description: >-
            An array of strings representing the IDs of the associated object
            types involved in the action.
          items:
            type: string
        listIds:
          type: array
          description: >-
            An array of integers (int64 format) representing the IDs of the
            lists involved in the action.
          items:
            type: integer
            format: int64
        objectIds:
          type: array
          description: >-
            An array of integers (int64 format) representing the IDs of the
            objects involved in the action.
          items:
            type: integer
            format: int64
        properties:
          type: array
          description: >-
            An array of strings representing the properties to be overridden or
            specified for the action.
          items:
            type: string
    Error:
      required:
        - category
        - correlationId
        - message
      type: object
      properties:
        category:
          type: string
          description: The error category.
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: >-
            Context about the error condition, represented as an object with
            additional properties.
          example: >-
            {invalidPropertyName=[propertyValue], missingScopes=[scope1,
            scope2]}
        correlationId:
          type: string
          description: >-
            A unique identifier for the request. Include this value with any
            error reports or support tickets.
          format: uuid
          example: aeb5f871-7f07-4993-9211-075dc63e7cbf
        errors:
          type: array
          description: >-
            Further information about the error, represented as an array of
            ErrorDetail objects.
          items:
            $ref: '#/components/schemas/ErrorDetail'
        links:
          type: object
          additionalProperties:
            type: string
          description: >-
            A map of link names to associated URIs containing documentation
            about the error or recommended remediation steps.
        message:
          type: string
          description: >-
            A human readable message describing the error along with remediation
            steps where appropriate.
          example: An error occurred
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error.
      description: >-
        Represents an error response returned by the API when an operation
        fails. This component is used in various endpoints to provide detailed
        information about the error encountered.
      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
    ErrorDetail:
      required:
        - message
      type: object
      properties:
        code:
          type: string
          description: The status code associated with the error detail.
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: >-
            Context about the error condition, represented as an object with
            additional properties. Each property is an array of strings
            providing further context.
          example: '{missingScopes=[scope1, scope2]}'
        in:
          type: string
          description: The name of the field or parameter in which the error was found.
        message:
          type: string
          description: >-
            A human readable message describing the error along with remediation
            steps where appropriate. This is a required property.
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error.
      description: >-
        Represents detailed information about an error that occurred in the API.
        This component is used to provide additional context and specifics about
        errors, typically as part of an error response.
  responses:
    Error:
      description: An error occurred.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'

````