---
title: "Update Public Deal Pipeline"
method: PATCH
path: "/v2/public/deals/pipelines/{pipeline_id}"
tags: ["deals"]
---

# Update Public Deal Pipeline

`PATCH /v2/public/deals/pipelines/{pipeline_id}`

## Request

- Base URL: `https://api.sanka.com`
- URL: `https://api.sanka.com/v2/public/deals/pipelines/{pipeline_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/sankahq/apis/sanka-public-api/docs/v2/public/deals/pipelines/:pipeline_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `pipeline_id` string, required

## Query parameters

- `workspace_id` string, nullable

## Headers

- `X-Workspace-Code` string

## Request body

- DealPipelineUpdateRequest
  - `name` string, nullable
  - `is_default` boolean, nullable: Set true to make this the workspace's default Deal pipeline.
  - `stages` DealPipelineStageUpdate[], nullable: Complete ordered stage list. Every existing stage must appear here by id or in removed_stages. Omit it to keep the current stages and order.
    - `id` string, nullable: Existing stage id. Omit it to add a new stage at this position.
    - `name` string, nullable: Required for a new stage; an existing stage keeps its name when omitted.
    - `internal_value` string, nullable: An existing stage keeps its value when omitted. Changing it moves the stage's Deals to the new value.
    - `score` integer, nullable
    - `is_default` boolean, nullable: Set true on one stage to make it the default. Omit it everywhere to keep the current default stage.
    - `is_hidden` boolean, nullable
  - `removed_stages` DealPipelineStageRemoval[]: Stages to delete. A stage is only deleted when listed here.
    - `id` string, required
    - `replacement_stage_id` string, nullable: Kept stage of the same pipeline that receives this stage's Deals. Required when Deals use the removed stage.

## Response `200`

Successful Response

- UpdatePublicDealPipelineApiV2PublicDealsPipelinesPipelineIdPatch200Envelope
  - `success` true, required
  - `data` DealPipelineData, required
    - `id` string, required
    - `name` string, required
    - `internal_name` string, required
    - `is_default` boolean
    - `order` integer
    - `stages` DealPipelineStageData[]
      - `id` string, required
      - `name` string, required
      - `internal_value` string, required
      - `score` integer
      - `order` integer
      - `is_default` boolean
      - `is_hidden` boolean
  - `meta` EnvelopeMeta, required
    - `ctx_id` string, required
    - `pagination` PaginationMeta
      - `page` integer, required
      - `page_size` integer, required
      - `total` integer, required
      - `next_cursor` string, nullable
    - `toast` ToastMessage
      - `variant` 'success' | 'error' | 'info' | 'warning', required
      - `code` string, required
      - `message` string, required
      - `i18n` ToastMessageI18n, required
        - `en` string, required
        - `ja` string, required

## Other responses

- `401`: Error response
- `422`: Error response

## Changes

- **2026-09-28** `2ca8dd4bb9ff`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sankahq/apis/sanka-public-api/changes/v2/public/deals/pipelines/:pipeline_id/patch.md)

---

[API](https://skmtc.dev/sankahq/apis/sanka-public-api.md) - [All operations](https://skmtc.dev/sankahq/apis/sanka-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sankahq/apis/sanka-public-api/revisions/16f03a9e3ab9?raw)
