HubSpot: Update rules (Partial)
HubSpot pipelineGovernance.partiallyUpdatePipelineRules: arguments, response, policy and SDK examples.
← Pipeline governance operations · Get started
Operation hubspot.pipeline_governance_partially_update_pipeline_rules
Provider route: PATCH /crm/pipelines-rules/2026-09/{objectTypeId}/{pipelineId}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/hubspot with npm, or alter-sdk-hubspot with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { HubSpotIntegration } from "@alter-ai/hubspot";
async function execute(input: Parameters<HubSpotIntegration["pipelineGovernance"]["partiallyUpdatePipelineRules"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new HubSpotIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.pipelineGovernance.partiallyUpdatePipelineRules(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_hubspot import HubSpotIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = HubSpotIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.pipeline_governance.partially_update_pipeline_rules(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.objectTypeId | string | Required within parent | |
path.pipelineId | string | Required within parent | |
body | Model | Required within parent | Expand Update rules (Partial) — request body — body |
Referenced models: Update rules (Partial) — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Retrieve rules — response body |
Referenced models: Retrieve rules — response body
Schemas
Section titled “Schemas”66 more schemas are linked from the tables above, on the schema pages.
Retrieve rules — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
approvalStage | Model | Optional | Expand Retrieve rules — response body — approval Stage |
createdAt | string | Required within parent | The date and time when the pipeline rule was created. Format: date-time |
governanceValidationRules | Model | Required within parent | Expand Retrieve rules — response body — governance Validation Rules |
id | string | Required within parent | The unique identifier for the pipeline rule. |
objectTypeId | string | Required within parent | The identifier for the type of object the pipeline rule is associated with. |
pipelineId | string | Required within parent | The unique identifier for the pipeline to which the rule applies. |
updatedAt | string | Required within parent | The date and time when the pipeline rule was last updated. Format: date-time |
Referenced models: Retrieve rules — response body — approval Stage, Retrieve rules — response body — governance Validation Rules
Update rules (Partial) — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
approvalStage | object | Optional | A rule that defines the approval process for a specific pipeline stage. It is defined using the PublicApprovalStageRuleRequest schema. |
noBackwardsMovementRule | object | Optional | A rule that prevents moving backwards in the pipeline stages. It is defined using the PublicSequenceValidationRule schema. |
noSkippingStagesRule | object | Optional | A rule that prevents skipping stages in the pipeline. It is defined using the PublicSequenceValidationRule schema. |
objectCreationRule | object | Optional | A rule that specifies conditions for object creation within the pipeline. It is defined using the PublicObjectCreationRule schema. |
Retrieve rules — response body — approval Stage
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
approvalComment | string | Optional | A string that allows for an optional comment or note regarding the approval process. |
approvalMode | string | Required within parent | Specifies the mode of approval required. It can be either 'ALL', meaning all approvers must approve, or 'ANY', meaning any one approver can approve. It is a string. Known values: ALL, ANY |
approverUserIds | array | Required within parent | An array of user IDs representing the users who are designated as approvers for this stage. Each user ID is a string. |
approverUserIds[] | string | Each item | |
conditionalApprovalFilterBranch | JSON | Optional | Defines the conditions under which the approval is required. It can be one of several filter branch types, such as PublicOrFilterBranch or PublicAndFilterBranch, which determine the logical conditions for approval. |
conditionalApprovalFilterBranch (anyOf 1) | Model | Alternative | Expand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: OR |
conditionalApprovalFilterBranch (anyOf 2) | Model | Alternative | Expand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: AND |
conditionalApprovalFilterBranch (anyOf 3) | Model | Alternative | Expand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: NOT ALL |
conditionalApprovalFilterBranch (anyOf 4) | Model | Alternative | Expand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: NOT ANY |
conditionalApprovalFilterBranch (anyOf 5) | Model | Alternative | Expand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: RESTRICTED |
conditionalApprovalFilterBranch (anyOf 6) | Model | Alternative | Expand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED |
conditionalApprovalFilterBranch (anyOf 7) | Model | Alternative | Expand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: ASSOCIATION |
pipelineStageId | string | Required within parent | The unique identifier for the pipeline stage that this approval rule applies to. It is a string. |
Referenced models: Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: AND, Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: ASSOCIATION, Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: NOT ALL, Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: NOT ANY, Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: OR, Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: RESTRICTED, Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED
Retrieve rules — response body — governance Validation Rules
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
noBackwardsMovementRule | Model | Required within parent | Expand Retrieve rules — response body — governance Validation Rules no Skipping Stages Rule |
noSkippingStagesRule | Model | Required within parent | Expand Retrieve rules — response body — governance Validation Rules no Skipping Stages Rule |
objectCreationRule | Model | Required within parent | Expand Retrieve rules — response body — governance Validation Rules object Creation Rule |
Referenced models: Retrieve rules — response body — governance Validation Rules object Creation Rule, Retrieve rules — response body — governance Validation Rules no Skipping Stages Rule
Retrieve rules — response body — governance Validation Rules object Creation Rule
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
pipelineStageIds | array | Required within parent | An array of strings representing the IDs of pipeline stages where objects can be created. |
pipelineStageIds[] | string | Each item |
Retrieve rules — response body — governance Validation Rules no Skipping Stages Rule
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
enabledForAllStages | boolean | Required within parent | A boolean indicating whether the validation rule is enabled for all stages in the pipeline. |
pipelineStageIds | array | Required within parent | An array of strings representing the specific pipeline stage IDs for which the validation rule is applicable. |
pipelineStageIds[] | string | Each item |
Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: OR filters item filter Type: ADS SEARCH
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
adNetwork | string | Required within parent | A string identifying the ad network where the search is performed. |
entityType | string | Required within parent | A string representing the type of entity being filtered. |
filterType | string | Required within parent | A string indicating the type of filter being applied. Default value is 'ADS_SEARCH'. Known values: ADS_SEARCH Default: ADS_SEARCH |
operator | string | Required within parent | A string that specifies the operation or condition applied to the filter. |
searchTermType | string | Required within parent | A string specifying the type of search term used in the filter. |
searchTerms | array | Required within parent | An array of strings containing the terms used to search within the ad network. |
searchTerms[] | string | Each item |
Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: OR filters item filter Type: COMMUNICATION SUBSCRIPTION
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
acceptedOptStates | array | Required within parent | An array of strings representing the accepted opt-in states for the subscription. |
acceptedOptStates[] | string | Each item | |
businessUnitId | string | Optional | A string representing the ID of the business unit associated with the subscription. |
channel | string | Required within parent | A string indicating the communication channel associated with the subscription. |
filterType | string | Required within parent | A string that indicates the type of filter. The default value is 'COMMUNICATION_SUBSCRIPTION'. Known values: COMMUNICATION_SUBSCRIPTION Default: COMMUNICATION_SUBSCRIPTION |
subscriptionIds | array | Required within parent | An array of strings representing the IDs of the subscriptions to be filtered. |
subscriptionIds[] | string | Each item | |
subscriptionType | string | Required within parent | A string indicating the type of subscription. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: hubspot.pipeline_governance_partially_update_pipeline_rules. Catalog operation: pipeline_governance_partially_update_pipeline_rules. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["crm-pipelines-governance-write"]