---
title: "Update a deal"
method: PATCH
path: "/deals/{id}"
tags: ["Deals"]
---

# Update a deal

`PATCH /deals/{id}`

## Request

- Base URL: `https://api.heffl.com/api/v1`
- URL: `https://api.heffl.com/api/v1/deals/{id}`
- Auth: API key in header `x-api-key`

Updates an existing deal. Only provided fields will be updated.

## Path parameters

- `id` string, required: Deal public ID

## Request body

- object
  - `title` string: Deal title
  - `price` number: Deal value/price
  - `stageId` string: Pipeline stage public ID
  - `status` 'ACTIVE' | 'WON' | 'LOST': Deal status (ACTIVE, WON, LOST)
  - `priority` 'LOW' | 'MEDIUM' | 'HIGH': Deal priority
  - `sourceId` string: Deal source public ID
  - `expectedCloseDate` string, date-time: Expected close date

## Response `200`

OK

- object
  - `id` string, required: Deal public ID
  - `number` string, nullable: Auto-generated deal number
  - `title` string, required: Deal title
  - `price` number, nullable: Deal price/value
  - `status` string, nullable: Deal status
  - `priority` string, nullable: Deal priority
  - `expectedCloseDate` string, date-time, nullable: Expected close date
  - `clientId` string, nullable: Client public ID
  - `pipelineId` string, nullable: Pipeline public ID
  - `stageId` string, nullable: Pipeline stage public ID
  - `sourceId` string, nullable: Deal source public ID
  - `leadId` string, nullable: Lead public ID
  - `createdAt` string, date-time, required: When the deal was created
  - `customFields` object, nullable: Custom field values

---

[API](https://skmtc.dev/heffl/apis/heffl-public-api-legacy-v1.md) · [All operations](https://skmtc.dev/heffl/apis/heffl-public-api-legacy-v1/llms.txt) · [OpenAPI document](https://skmtc.dev/heffl/apis/heffl-public-api-legacy-v1/revisions/9bdb229223a2?raw)
