---
title: "Move or mirror assets"
description: "Moves or mirrors assets across hubs asynchronously and returns an execution ID to track progress."
contentType: "api-reference"
url: "https://developer.mindtickle.com/docs/asset-hub/assets/move-or-mirror-assets/"
---

## Prerequisites

1. [Authentication and setup](/docs/getting-started/authentication-and-setup/): A valid access token.
2. [Create assets](/docs/asset-hub/assets/create-assets/): The assets must exist and must not be archived.
3. [Create a hub](/docs/asset-hub/hubs/create-a-hub/): The target hubs must exist.

## Endpoint

```http
PATCH /api/assethub/v2/map-asset-hub/async
```

Base URL: the standard REST host for your region. See [Base URLs](/docs/getting-started/authentication-and-setup/#base-urls).

Headers: `Authorization: Bearer ACCESS_TOKEN`, `Content-Type: application/json`.

## Request

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `user_id` | string | Required | ID of the user performing the operation. Must have the `DEVELOP_ASSETS` permission on the target hubs. |
| `assets` | array | Required | List of mapping operations. Maximum 50 entries per request. |
| `assets[].asset_id` | string | Required | ID of the asset to map. |
| `assets[].operation` | integer | Required | Mapping type. `1` moves the asset by replacing all current hub mappings with the supplied hubs. `2` mirrors it into the supplied hubs while retaining existing mappings. |
| `assets[].hubs` | string[] | Required | Target hub IDs where the asset should be mapped. |

### Request example

```json
{
  "user_id": "123456789abcd101",
  "assets": [
    {
      "asset_id": "123456789012345102",
      "operation": 2,
      "hubs": ["hub_456", "hub_789"]
    },
    {
      "asset_id": "123456789012345103",
      "operation": 1,
      "hubs": ["hub_123"]
    }
  ]
}
```

## Response

| Field | Type | Description |
| --- | --- | --- |
| `execution_id` | string | ID used to track the asynchronous operation status. |
| `request_id` | string | Unique ID for the request. |

## Notes

- **Move:** Operation `1` replaces the asset's entire existing hub list with the target hubs in the request. The asset is removed from all current hubs and added only to the new ones. For example, an asset in the New York hub moved to the San Francisco hub ends up only in the San Francisco hub, and an asset in the London, Berlin, and Paris hubs moved to the Tokyo and Sydney hubs ends up only in the Tokyo and Sydney hubs. The asset is removed from any hub not included in the target hubs.
- **Mirror:** Operation `2` keeps the asset in its existing hubs and adds the target hubs in the request. For example, an asset in the London, Berlin, and Paris hubs mirrored to the Tokyo and Sydney hubs stays in London, Berlin, and Paris, and is also in Tokyo and Sydney.
- **Async processing:** This endpoint starts a background job. Use the `execution_id` to check the final status of each item.
- **Limits:** Maximum 50 assets per request.
- **Permissions:** The `user_id` must have the `DEVELOP_ASSETS` permission on all target hubs.
- **Validation:** The request fails if the asset is archived, or if an asset with the same name or file ID already exists in a target hub.
- **Status response:** Confirm the status response fields for your operation with [Mindtickle Support](mailto:support@mindtickle.com) before implementing polling. Do not assume creation and move or mirror operations use the same response shape because they share `GET /api/assethub/v2/assets/async/{execution_id}`.

## Check status

Poll the result of the bulk mapping operation with the `execution_id` this endpoint returns.

```http
GET /api/assethub/v2/assets/async/{execution_id}
```

Query parameters:

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `user_id` | string | Required | User ID context. |
| `limit` | integer | Optional | Number of records to fetch. |
| `skip` | integer | Optional | Number of records to skip. |

Illustrative failure response. The asset and hub IDs differ from those in the request example above:

```json
{
  "execution_status": "FAILED",
  "total_count": 1,
  "failed_count": 1,
  "assets": [
    {
      "asset_id": "123456789012345104",
      "hub_ids": ["123456789012345105"],
      "status": "TASK_STATUS_FAILED",
      "message": "Asset is archived"
    }
  ]
}
```

## Related

- [Create assets](/docs/asset-hub/assets/create-assets/): Create the assets before mapping them to other hubs.
- [List active hubs](/docs/asset-hub/hubs/list-active-hubs/): Find the target hub IDs.
