Skip to content

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.

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 os
from alter_sdk import App
from 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()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.objectTypeIdstringRequired within parent
path.pipelineIdstringRequired within parent
bodyModelRequired within parentExpand Update rules (Partial) — request body — body

Referenced models: Update rules (Partial) — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Retrieve rules — response body

Referenced models: Retrieve rules — response body

66 more schemas are linked from the tables above, on the schema pages.

Retrieve rules — response body
FieldTypePresenceDescription and constraints
$objectRoot
approvalStageModelOptionalExpand Retrieve rules — response body — approval Stage
createdAtstringRequired within parentThe date and time when the pipeline rule was created.
Format: date-time
governanceValidationRulesModelRequired within parentExpand Retrieve rules — response body — governance Validation Rules
idstringRequired within parentThe unique identifier for the pipeline rule.
objectTypeIdstringRequired within parentThe identifier for the type of object the pipeline rule is associated with.
pipelineIdstringRequired within parentThe unique identifier for the pipeline to which the rule applies.
updatedAtstringRequired within parentThe 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
FieldTypePresenceDescription and constraints
$objectRoot
approvalStageobjectOptionalA rule that defines the approval process for a specific pipeline stage. It is defined using the PublicApprovalStageRuleRequest schema.
noBackwardsMovementRuleobjectOptionalA rule that prevents moving backwards in the pipeline stages. It is defined using the PublicSequenceValidationRule schema.
noSkippingStagesRuleobjectOptionalA rule that prevents skipping stages in the pipeline. It is defined using the PublicSequenceValidationRule schema.
objectCreationRuleobjectOptionalA rule that specifies conditions for object creation within the pipeline. It is defined using the PublicObjectCreationRule schema.
Retrieve rules — response body — approval Stage
FieldTypePresenceDescription and constraints
$objectRoot
approvalCommentstringOptionalA string that allows for an optional comment or note regarding the approval process.
approvalModestringRequired within parentSpecifies 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
approverUserIdsarrayRequired within parentAn array of user IDs representing the users who are designated as approvers for this stage. Each user ID is a string.
approverUserIds[]stringEach item
conditionalApprovalFilterBranchJSONOptionalDefines 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)ModelAlternativeExpand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: OR
conditionalApprovalFilterBranch (anyOf 2)ModelAlternativeExpand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: AND
conditionalApprovalFilterBranch (anyOf 3)ModelAlternativeExpand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: NOT ALL
conditionalApprovalFilterBranch (anyOf 4)ModelAlternativeExpand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: NOT ANY
conditionalApprovalFilterBranch (anyOf 5)ModelAlternativeExpand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: RESTRICTED
conditionalApprovalFilterBranch (anyOf 6)ModelAlternativeExpand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED
conditionalApprovalFilterBranch (anyOf 7)ModelAlternativeExpand Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: ASSOCIATION
pipelineStageIdstringRequired within parentThe 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
FieldTypePresenceDescription and constraints
$objectRoot
noBackwardsMovementRuleModelRequired within parentExpand Retrieve rules — response body — governance Validation Rules no Skipping Stages Rule
noSkippingStagesRuleModelRequired within parentExpand Retrieve rules — response body — governance Validation Rules no Skipping Stages Rule
objectCreationRuleModelRequired within parentExpand 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
FieldTypePresenceDescription and constraints
$objectRoot
pipelineStageIdsarrayRequired within parentAn array of strings representing the IDs of pipeline stages where objects can be created.
pipelineStageIds[]stringEach item
Retrieve rules — response body — governance Validation Rules no Skipping Stages Rule
FieldTypePresenceDescription and constraints
$objectRoot
enabledForAllStagesbooleanRequired within parentA boolean indicating whether the validation rule is enabled for all stages in the pipeline.
pipelineStageIdsarrayRequired within parentAn array of strings representing the specific pipeline stage IDs for which the validation rule is applicable.
pipelineStageIds[]stringEach item
Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: OR filters item filter Type: ADS SEARCH
FieldTypePresenceDescription and constraints
$objectRoot
adNetworkstringRequired within parentA string identifying the ad network where the search is performed.
entityTypestringRequired within parentA string representing the type of entity being filtered.
filterTypestringRequired within parentA string indicating the type of filter being applied. Default value is 'ADS_SEARCH'.
Known values: ADS_SEARCH
Default: ADS_SEARCH
operatorstringRequired within parentA string that specifies the operation or condition applied to the filter.
searchTermTypestringRequired within parentA string specifying the type of search term used in the filter.
searchTermsarrayRequired within parentAn array of strings containing the terms used to search within the ad network.
searchTerms[]stringEach item
Retrieve rules — response body — approvalStage / conditionalApprovalFilterBranch / filterBranchType: OR filters item filter Type: COMMUNICATION SUBSCRIPTION
FieldTypePresenceDescription and constraints
$objectRoot
acceptedOptStatesarrayRequired within parentAn array of strings representing the accepted opt-in states for the subscription.
acceptedOptStates[]stringEach item
businessUnitIdstringOptionalA string representing the ID of the business unit associated with the subscription.
channelstringRequired within parentA string indicating the communication channel associated with the subscription.
filterTypestringRequired within parentA string that indicates the type of filter. The default value is 'COMMUNICATION_SUBSCRIPTION'.
Known values: COMMUNICATION_SUBSCRIPTION
Default: COMMUNICATION_SUBSCRIPTION
subscriptionIdsarrayRequired within parentAn array of strings representing the IDs of the subscriptions to be filtered.
subscriptionIds[]stringEach item
subscriptionTypestringRequired within parentA string indicating the type of subscription.

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"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.