diff --git a/CHANGELOG.md b/CHANGELOG.md index c6f17247..3b0e6b77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e For public Changelog covering all changes done to Pipedrive’s API, webhooks and app extensions platforms, see [public Changelog](https://pipedrive.readme.io/docs/changelog) with discussion area in [Developers Community](https://devcommunity.pipedrive.com/c/documentation/changelog/19). ## [Unreleased] +### Added +- Added `archive_reason` field to the Lead schema, returned by `GET /v1/leads`, `GET /v1/leads/{id}`, and `GET /v1/leads/archived` — captures the reason a lead was archived +- Added `archive_reason` to the request body of `PATCH /v1/leads/{id}` — can only be set while archiving a lead in the same request, or on a lead that's already archived; it's automatically cleared when the lead is unarchived, and archiving without it returns a 400 error if a reason is required for the company ## [35.0.0] - 2026-10-12 ### Fixed diff --git a/src/versions/v1/models/lead.ts b/src/versions/v1/models/lead.ts index 308acdf9..63552b93 100644 --- a/src/versions/v1/models/lead.ts +++ b/src/versions/v1/models/lead.ts @@ -94,6 +94,11 @@ export interface Lead { */ 'is_archived': boolean; /** + * The reason for archiving the lead. Automatically cleared when the lead is unarchived. + * @type {string} + */ + 'archive_reason': string | null; + /** * A flag indicating whether the lead was seen by someone in the Pipedrive UI * @type {boolean} */ diff --git a/src/versions/v1/models/update-lead-request.ts b/src/versions/v1/models/update-lead-request.ts index a02af3cc..12e52763 100644 --- a/src/versions/v1/models/update-lead-request.ts +++ b/src/versions/v1/models/update-lead-request.ts @@ -54,6 +54,11 @@ export interface UpdateLeadRequest { */ 'is_archived'?: boolean; /** + * The reason for archiving the lead. Can only be provided when `is_archived` is being set to `true` in the same request, or when updating a lead that\'s already archived — providing it otherwise will return a 400 error. Automatically cleared when the lead is unarchived. If archiving with a reason is required for your company, archiving a lead without providing one will also return a 400 error. + * @type {string} + */ + 'archive_reason'?: string | null; + /** * * @type {LeadValue} */