Skip to main content

Supported products

Use the Pipeline Rules API to set and manage rules on CRM object pipelines. For example, restrict stage movement, control in which stages records can be created, require approvals for specific deal stages, or set up per-stage permissions. You can read, update, or remove pipeline rules via the Pipeline Rules API endpoints. Learn more about pipeline rules in HubSpot.

Retrieve pipeline rules

Use the Pipeline Rules API to read a pipeline’s validation rules, approval requirements (deal pipelines only), and stage permissions.

Retrieve all rules for a pipeline

To retrieve all rules for a specific pipeline, make a GET request to /crm/pipelines-rules/2026-09-beta/{objectTypeId}/{pipelineId}. For example, to retrieve rules for the default deals pipeline, make a GET request to /crm/pipelines-rules/2026-09-beta/0-3/default. Your response will look similar to:
The response includes the following fields:

Retrieve pipeline stage permissions

To retrieve details about which users and teams can edit records in specific pipeline stages, make a GET request to /crm/pipelines-rules/2026-09-beta/{objectTypeId}/{pipelineId}/stage-edit-permissions. Learn more about restricted editing access by pipeline stage. For example, to retrieve permissions for the default deals pipeline’s stages, make a GET request to /crm/pipelines-rules/2026-09-beta/0-3/default/stage-edit-permissions. Your response will look similar to:
The response includes the following fields:

Set or update pipeline rules

Replace all pipeline rules

To replace the entire ruleset for a pipeline (e.g., customize rules on a default pipeline, set custom rules on a new pipeline), make a PUT request to /crm/pipelines-rules/2026-09-beta/{objectTypeId}/{pipelineId}. Include the following in your request body to set rules: If you don’t want to replace the full ruleset for a pipeline, learn how to update an individual rule instead.

Validation rules

To set validation rules for how records can move in or be created in a pipeline, in the governanceValidationRules object, include the following rules. Learn more about pipeline validation rules.

Deal approval rules (Sales Hub Enterprise only)

To set approval rules for specific deal pipeline stages, in the approvalStageRules array, include the following fields in your request body for each input. Learn more about pipeline approval rules.

Examples

Refer to the following examples that replace all rules for a pipeline.
Replace all validation rules on the default tickets pipeline with the following rules:
  • Tickets cannot be moved backwards from status_3.
  • Tickets cannot skip any stages in the pipeline.
  • Tickets can only be created in status_1.
Make a PUT request to /crm/pipelines-rules/2026-09-beta/0-5/0 with the following request body.

Update individual pipeline rules

To update individual validation or approval rules for a pipeline, make a PATCH request to /crm/pipelines-rules/2026-09-beta/{objectTypeId}/{pipelineId}. Include only the required fields for the rules to update. Omit fields for rules you want to leave unchanged. For example, the following request body restricts backward movement for all stages, without modifying any other rules:
The response returns the full ruleset, including both updated and unchanged rules.

Update stage permissions

To update the stage permissions for a pipeline, make a PUT request to /crm/pipelines-rules/2026-09-beta/{objectTypeId}/{pipelineId}/stage-edit-permissions. Learn more about restricting edit access by pipeline stage. In your request body, include a stages array with the following fields for each stage: For example, to update stage permissions on the default deals pipeline, make a PUT request to /crm/pipelines-rules/2026-09-beta/0-3/default/stage-edit-permissions and include the following request body.

Remove all pipeline rules

To remove all rules for a pipeline, make a DELETE request to /crm/pipelines-rules/2026-09-beta/{objectTypeId}/{pipelineId}. This removes all custom validation rules and for deal pipelines, approval rules. Stage permissions are not impacted. If successfully removed, you’ll receive a 204 No Content response.

Manage deal pipeline approvals (Sales Hub Enterprise only)

If you’ve required approvals for specific deal stages, you can use the Pipeline Rules API to retrieve approval statuses and create or restart approvals. Learn more about deal pipeline approvals.

Read approval status for a deal

To get the current approval status for a deal that is in, or has passed through, an approval-gated stage, make a GET request to /crm/pipelines-rules/2026-09-beta/0-3/{pipelineId}/approvals/{dealId}. Your response will look similar to:
The response includes the following fields:
Approval status can also be retrieved by the hs_latest_approval_status and hs_latest_approval_status_approval_id properties on a deal. Learn more about retrieving deals.

Create or restart a deal approval

To trigger or re-trigger approvals for a deal, make a POST request to /crm/pipelines-rules/2026-09-beta/0-3/{pipelineId}/approvals/start and include the deal record’s objectId in the request body. For example:
You may need to do this if:
  • An approval failed to start automatically because an approver’s permissions changed.
  • An integration needs to drive the approval lifecycle programmatically.
  • You need to manually retry after a transient failure.
Note the following behavior:
  • Any existing pending approvals are cancelled before the new approvals begin.
  • If conditional approval (conditionalApprovalFilterBranch) is set up and a record doesn’t meet the filter criteria, the approval status is set to NO_APPROVAL_NEEDED and an approval will not be started.
Last modified on August 3, 2026