# Copy Companies Between Portfolios This endpoint allows you to copy companies from one portfolio to another. You can specify the source and destination portfolios to perform the copy operation. Endpoint: POST /monitoring/portfolios/{portfolioId}/companies/copy Version: 1.10.9 Security: bearerToken ## Path parameters: - `portfolioId` (number, required) The unique identifier of the portfolio you want to copy companies from, obtained from . ## Query parameters: - `copyAll` (boolean) When CopyAll query parameter is False, portfolios and companies list needs to be passed. When CopyAll query parameter is True, only portfolios need to be passed and companies List must be empty. All companies are copied from current portfolio are considered here. ## Request fields (application/json): - `portfolios` (array, required) Comma separated portfolioId(s). - `companies` (array) Array of companies to copy. - `companies.id` (string) Company Safe Number or Connect ID. Not required when copyAll query parameter is set to true. ## Response 200 fields (application/json): - `correlationId` (string) A unique ID assigned to this request. Example: "23921650-c073-11ea-860f-06bc8182190e" - `data` (object) - `data.totalPortfoliosCompanies` (integer) Total amount of companies attempted to copy. Example: 5 - `data.successfulPortfoliosCompanies` (integer) Amount of companies successfully copied. Example: 3 - `data.failedPortfoliosCompanies` (integer) Amount of companies successfully copied. Example: 2 - `data.reason` (string) A message with a reason for why there was failures. Example: "Duplicate entry '199483-FR00002855' for key 'PRIMARY" ## Response 400 fields (application/json): - `correlationId` (string) A unique ID assigned to this request. - `message` (string) - `details` (string) Provides further information on why the request was rejected ## Response 401 fields (application/json): - `error` (string) ## Response 403 fields (application/json): - `message` (string) Example: "Access forbidden" ## Response 404 fields (application/json): - `correlationId` (string) A unique ID assigned to this request. - `message` (string) - `details` (string) Provides further information on why the request was rejected