Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `project_id` parameter to `POST /v1/files` endpoint
- Added `project_id` & `project_name` properties to responses in `/v1/files/*` endpoints

## [33.2.0] - 2026-05-29
### Added
Expand Down
23 changes: 18 additions & 5 deletions src/versions/v1/api/files-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ export const FilesApiAxiosParamCreator = function (configuration?: Configuration
* @param {number} [product_id] The ID of the product to associate file(s) with
* @param {number} [activity_id] The ID of the activity to associate file(s) with
* @param {string} [lead_id] The ID of the lead to associate file(s) with
* @param {number} [project_id] The ID of the project to associate file(s) with

* @throws {RequiredError}
*/
addFile: async (file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, ): Promise<RequestArgs> => {
addFile: async (file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, project_id?: number, ): Promise<RequestArgs> => {
// verify required parameter 'file' is not null or undefined
assertParamExists('addFile', 'file', file)
const localVarPath = `/files`;
Expand Down Expand Up @@ -106,6 +107,10 @@ export const FilesApiAxiosParamCreator = function (configuration?: Configuration
localVarFormParams.append('lead_id', lead_id as any);
}

if (project_id !== undefined) {
localVarFormParams.append('project_id', project_id as any);
}


localVarHeaderParameter['Content-Type'] = 'multipart/form-data';

Expand Down Expand Up @@ -515,11 +520,12 @@ export const FilesApiFp = function(configuration?: Configuration) {
* @param {number} [product_id] The ID of the product to associate file(s) with
* @param {number} [activity_id] The ID of the activity to associate file(s) with
* @param {string} [lead_id] The ID of the lead to associate file(s) with
* @param {number} [project_id] The ID of the project to associate file(s) with

* @throws {RequiredError}
*/
async addFile(file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AddFileResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.addFile(file, deal_id, person_id, org_id, product_id, activity_id, lead_id, );
async addFile(file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, project_id?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AddFileResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.addFile(file, deal_id, person_id, org_id, product_id, activity_id, lead_id, project_id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand Down Expand Up @@ -628,7 +634,7 @@ export const FilesApiFactory = function (configuration?: Configuration, basePath
* @throws {RequiredError}
*/
addFile(requestParameters: FilesApiAddFileRequest, ): Promise<AddFileResponse> {
return localVarFp.addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, ).then((request) => request(axios, basePath));
return localVarFp.addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, requestParameters.project_id, ).then((request) => request(axios, basePath));
},
/**
* Creates a new empty file in the remote location (`googledrive`) that will be linked to the item you supply. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-a-remote-file\" target=\"_blank\" rel=\"noopener noreferrer\">adding a remote file</a>.
Expand Down Expand Up @@ -757,6 +763,13 @@ export interface FilesApiAddFileRequest {
* @memberof FilesApiAddFile
*/
readonly lead_id?: string

/**
* The ID of the project to associate file(s) with
* @type {number}
* @memberof FilesApiAddFile
*/
readonly project_id?: number
}

/**
Expand Down Expand Up @@ -950,7 +963,7 @@ export class FilesApi extends BaseAPI {
* @memberof FilesApi
*/
public addFile(requestParameters: FilesApiAddFileRequest, ) {
return FilesApiFp(this.configuration).addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, ).then((request) => request(this.axios, this.basePath));
return FilesApiFp(this.configuration).addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, requestParameters.project_id, ).then((request) => request(this.axios, this.basePath));
}

/**
Expand Down
10 changes: 10 additions & 0 deletions src/versions/v1/models/get-files-response-data-inner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ export interface GetFilesResponseDataInner {
*/
'lead_id'?: string;
/**
* The ID of the project to associate the file with
* @type {number}
*/
'project_id'?: number;
/**
* The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS
* @type {string}
*/
Expand Down Expand Up @@ -146,6 +151,11 @@ export interface GetFilesResponseDataInner {
*/
'lead_name'?: string;
/**
* The name of the project associated with the file
* @type {string}
*/
'project_name'?: string;
/**
* The URL of the download file
* @type {string}
*/
Expand Down