---
title: "Remap source files at organization level"
method: POST
path: "/api/v3.0/orgs/{orgUuid}/dependencies/sourceFiles/remapping"
tags: ["Dependencies Source Files"]
---

# Remap source files at organization level

`POST /api/v3.0/orgs/{orgUuid}/dependencies/sourceFiles/remapping`

Remaps the specified source files to a target library across the entire organization. This operation runs asynchronously and returns 202 Accepted with async process status. Requires exactly one of: targetLibraryUuid OR matchSuggestionId (not both, not neither). Request body fields: sourceFileUuids (required, array), targetLibraryUuid (conditional), matchSuggestionId (conditional), comment (optional), sendEmailNotification (optional, boolean).

## Path parameters

- `orgUuid` string, required

## Request body

- SourceFileRemappingOrgRequestDTOV3 — Request payload for remapping source files at organization level
  - `targetLibraryUuid` string — The UUID of the library to which source files should be remapped. Exactly one of targetLibraryUuid or matchSuggestionId must be provided
  - `matchSuggestionId` string — The Id of the library to which source files should be remapped. Exactly one of targetLibraryUuid or matchSuggestionId must be provided
  - `sourceFileUuids` string[]
  - `comment` string — Optional user comment explaining the reason for this remapping action
  - `sendEmailNotification` boolean — Whether to send email notification upon completion of the remapping operation
  - `originalLibraryUuid` string — When set (remap-all-by-library), the server resolves all source files currently mapped to this library on its own; sourceFileUuids is ignored.

## Response `202`

Remapping job accepted and initiated

- SourceFilesRemappingAsyncStatusDtoV3 — Async process status for source file remapping operations
  - `uuid` string — The unique identifier of the async process
  - `status` 'PENDING' | 'IN_PROGRESS' | 'FAILED' | 'FAILURE' | 'SUCCESS' — The current status of the async process
  - `userEmail` string — Email of the user who initiated the process
  - `requestToken` string — Short token for tracking the request

## Other responses

- `400` — Invalid request parameters. Possible errors: 'Only one of targetLibraryUuid or matchSuggestionId must be provided, not both' OR 'Either targetLibraryUuid or matchSuggestionId must be provided'
- `403` — User lacks required permissions
- `404` — Organization or target library not found. Error: 'Target library not found'

---

[API](https://skmtc.dev/mend/apis/mend-api.md) · [All operations](https://skmtc.dev/mend/apis/mend-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mend/mend-api/revisions/b2302e1b6c4c/schema)
