{
  "openapi": "3.0.1",
  "info": {
    "title": "Content Transfer API",
    "description": "The Content Transfer REST API allows SitecoreAI *Organization Admins* and *Organization Owners* to initiate, monitor, and finalize content transfer operations for migrating content data from one SitecoreAI environment (the *source*) to another (the *destination*). This enables efficient transfer of data between environments using chunked data streaming with encryption and compression support.\n\nEach transfer operation includes at least one set of chunked data, where each chunk set represents a single data tree that was nominated for transfer. When an operation is complete, each of its chunk sets will be represented by a `.raif` file in the *destination* environment. To finish integrating the transferred data, use the separate [Item Transfer API](https://api-docs.sitecore.com/sai/item-transfer) to have the destination database consume the `.raif` files.\n\nNote the following:\n- To use this REST API, you must authorize your API requests.\n- You must be an *Organization Admin* or *Organization Owner* to use this API. \n- Different endpoints in this API are called against different environments. You will switch between a *source* base URL and a *destination* base URL depending on the step in the workflow. Each endpoint description specifies which environment to use.\n\n# Migrating content\n\nNote: If you previously used the Package Designer for content migrations, [review the differences](https://doc.sitecore.com/sai/en/developers/sitecoreai/deploying-sitecoreai/migrating-content-between-sitecoreai-environments.html) between the designer and the modern API-based approach.\n\nThe Content Transfer API covers the *source* side of a content migration. After completing the steps in this API, use the [Item Transfer API](https://api-docs.sitecore.com/sai/item-transfer) to incorporate the transferred data into the destination database.\n\nBefore you begin, ensure you have the *Organization Admin* or *Organization Owner* role, and that you have determined your *source* and *destination* [base URLs](#section/base-url) and created a [JWT](#section/authorization) for each environment. \n\n## Create the transfer\n\nIn your *source* environment, [create a content transfer operation](#operation/ContentTransfer_CreateContentTransfer) using a unique transfer ID of your choice. For each item you want to transfer, specify the item path, whether to include descendants, and how to handle conflicts with existing items in the destination. Depending on how much data is being transferred, the operation creates one or more chunk sets.\n\nEnsure that the item's parent chain already exists in the destination environment with the same item IDs. If it does not, the item will transfer successfully but will not appear in the content tree. To avoid this, transfer from a common ancestor using `Scope: ItemAndDescendants`, or transfer the parent items first.\n\n## Wait for the transfer to be ready\n\n[Poll the operation details](#operation/ContentTransfer_GetContentTransferStatus) in your *source* environment until `State` is `Completed`. If `State` is `Failed`, create a new transfer operation. For each chunk set in the response, record the `ChunkSetId` and `ChunkCount` because you'll need them to retrieve and save the chunks.\n\n## Transfer chunks\n\nFor each chunk set, repeat the following for every chunk in the set:\n\n1. In your *source* environment, [retrieve the chunk](#operation/ContentTransfer_GetChunkAsync). Make one request per chunk, using `chunkId` values `0` through `ChunkCount - 1`. Note the `IsMedia` value from the `Content-Disposition` response header because you'll need it when saving the chunk. You can retrieve multiple chunks in parallel.\n2. In your *destination* environment, [save the chunk](#operation/ContentTransfer_SaveChunkAsync), forwarding the binary stream exactly as received without modification. You can save chunks in parallel with retrieval, but every chunk must be saved before completing the chunk set.\n\nAfter all chunks in a set are saved, [complete the chunk set](#operation/ContentTransfer_CompleteChunkSetAsync) in your *destination* environment. This generates a `.raif` file and returns its name. Record the name for use in the Item Transfer API. Repeat for every chunk set in the operation.\n\n## Delete the transfer\n\n[Delete the transfer operation](#operation/ContentTransfer_DeleteContentTransfer) from your *source* environment to clean up all associated resources. You can do this immediately after downloading all chunks from the *source* environment. \n\n## Next steps\n\nProceed to the [Item Transfer API](https://api-docs.sitecore.com/sai/item-transfer) to incorporate the `.raif` files into the destination database.\n\n# Base URL\nIn the base URL, replace `{host}` with your environment host name. You need two base URLs: one for your *source* environment (where you're migrating data from) and one for your *destination* environment (where you're migrating data to). You will switch between them as you follow the migration workflow.\n\nFind the environment host name in SitecoreAI Deploy > **Projects** > your project > **Authoring environments** > your environment > **Details** > **Environment host name**.\n\nExample environment host name: `your-environment.sitecorecloud.io`\n\n# Authorization\nTo authorize your requests, use environment automation client credentials and generate a JSON Web Token (JWT).\n\nNote: To create client credentials, you must be an [Organization Admin or Organization Owner](https://doc.sitecore.com/portal/en/developers/sitecore-cloud-portal/roles.html).\n\n## Create an automation client\n1. In the Sitecore Cloud Portal, open SitecoreAI Deploy.\n2. Click **Credentials** > **Environment** > **Create credentials** > **Automation**.\n3. Fill out the automation client details, then click **Create**.\n4. Copy the client ID and the client secret because you won't be able to view them again in SitecoreAI Deploy. You'll use them to request a JWT.\n\n## Request a JWT\n\nRun the following cURL command to request a JWT. Replace the placeholder values with your client ID and client secret.\n```curl\n  curl -X POST 'https://auth.sitecorecloud.io/oauth/token' \\\n  --header 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-urlencode 'client_id={YOUR_CLIENT_ID}' \\\n  --data-urlencode 'client_secret={YOUR_CLIENT_SECRET}' \\\n  --data-urlencode 'grant_type=client_credentials' \\\n  --data-urlencode 'audience=https://api.sitecorecloud.io'\n```\n\nThe JWT expires in 24 hours. If your requests unexpectedly return a response with status `403 Forbidden`, request a new JWT by repeating this `POST` request.\n\nWe recommend that you cache the JWT for 24 hours to avoid repeating this `POST` request while the JWT is still valid.\n\n## Include the JWT in the request header\n\nYou can now start making REST API requests. You must include the JWT in the request header of every request. For example:\n```curl\n  curl -X GET '{YOUR_BASE_URL}/...' \\\n  -H 'Authorization: Bearer {YOUR_JWT}' \\\n  -H 'Accept: application/json'\n```\n",
    "version": "v1.0",
    "x-metadata": {
      "product": "SitecoreAI"
    },
    "license": {
      "name": "closed source",
      "url": "https://www.sitecore.com"
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://{host}",
      "variables": {
        "host": {
          "default": "your-environment.sitecorecloud.io",
          "description": "The environment host name."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Content transfer",
      "description": "API endpoints for content transfer operations."
    }
  ],
  "paths": {
    "/sitecore/api/content/transfer/v1/transfers": {
      "post": {
        "tags": [
          "Content transfer"
        ],
        "summary": "Create a content transfer operation",
        "description": "Creates a new operation to transfer one or more specified items from your *source* environment. You must specify a unique ID of your choice for the transfer, which you'll use later in the transfer workflow.\n\nMake this request in your *source* environment.\n\n{% admonition type=\"warning\" name=\"Warning\" %}\nIf you reuse a previous transfer ID, the transfer operation associated with that ID will be overwritten (if it was not previously deleted using this API).\n{% /admonition %}\n\nBy default, a transfer will only include single items based on the paths you specify, and it will replace any duplicate items found in the destination environment. You can override these settings to include descendants or choose a different merge strategy as needed.\n",
        "operationId": "ContentTransfer_CreateContentTransfer",
        "requestBody": {
          "description": "The request body containing your transfer configuration and a unique transfer ID.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContentTransferRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContentTransferRequest"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/CreateContentTransferRequest"
              }
            },
            "text/xml": {
              "schema": {
                "$ref": "#/components/schemas/CreateContentTransferRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreateContentTransferRequest"
              }
            },
            "text/html": {
              "schema": {
                "$ref": "#/components/schemas/CreateContentTransferRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Content transfer creation was initiated successfully.",
            "content": {}
          },
          "400": {
            "description": "Invalid request data or validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "Error": "Transfer configuration validation failed: Invalid item path '/sitecore/content/invalid-path'"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "createContentTransferRequest"
      }
    },
    "/sitecore/api/content/transfer/v1/transfers/{transferId}/status": {
      "get": {
        "tags": [
          "Content transfer"
        ],
        "summary": "Retrieve details of a content transfer operation",
        "description": "Retrieves information about a specific content transfer operation, including its current status and a list of the chunk sets included.\n\nMake this request in your *source* environment.\n\nFor each chunk set in the specified operation, the response contains:\n- `ChunkSetId`: the unique identifier of the chunk set, used as a path parameter in subsequent requests.\n- `ChunkCount`: the number of chunks in the set. Make one [Retrieve a specific chunk of transfer data](#operation/ContentTransfer_GetChunkAsync) request and one [Save a data chunk to the destination environment](#operation/ContentTransfer_SaveChunkAsync) request per chunk, using `chunkId` values `0` through `ChunkCount - 1`.\n- `TotalItemCount`: the total number of content and media items in the chunk set.\n",
        "operationId": "ContentTransfer_GetContentTransferStatus",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "description": "The unique identifier of the transfer operation. This is the UUID you provided when you [created a content transfer operation](#operation/ContentTransfer_CreateContentTransfer).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the transfer status successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentTransferCreationStatusResponse"
                },
                "example": {
                  "State": "Completed",
                  "ChunkSetsMetadata": [
                    {
                      "ChunkSetId": "87654321-4321-4321-4321-cba987654321",
                      "ChunkCount": 3,
                      "TotalItemCount": 150
                    },
                    {
                      "ChunkSetId": "11223344-5566-7788-9900-aabbccddeeff",
                      "ChunkCount": 1,
                      "TotalItemCount": 25
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentTransferCreationStatusResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ContentTransferCreationStatusResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ContentTransferCreationStatusResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ContentTransferCreationStatusResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Transfer with the specified ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "Error": "Transfer with ID '12345678-1234-1234-1234-123456789abc' was not found"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sitecore/api/content/transfer/v1/transfers/{transferId}/chunksets/{chunksetId}/chunks/{chunkId}": {
      "get": {
        "tags": [
          "Content transfer"
        ],
        "summary": "Retrieve a specific chunk of transfer data",
        "description": "Use this endpoint to retrieve the binary data for a single chunk. Make one request per chunk per chunk set, using `chunkId` values `0` through `ChunkCount - 1` (where `ChunkCount` is obtained from the [Retrieve details of a content transfer operation](#operation/ContentTransfer_GetContentTransferStatus) response).\n\nMake this request in your *source* environment.\n\nThe response body contains a binary stream of serialized item data. The first chunk in a given set also includes a header. Every chunk you retrieve must also be saved to the *destination* environment using the [Save a data chunk to the destination environment](#operation/ContentTransfer_SaveChunkAsync) endpoint. You can retrieve and save chunks in parallel, but all chunks in a set must be saved before you can [complete that chunk set](#operation/ContentTransfer_CompleteChunkSetAsync).\n\nDepending on whether the chunk represents a media item or a content item, the data will either be compressed or encrypted, and the returned value of `IsMedia` will either be `true` or `false`:\n- Media data (`IsMedia` = `true`) is compressed.\n- Content data (`IsMedia` = `false`) is encrypted.\n\nContent description metadata is exposed via Content-Disposition header parameters:\n- `ItemsProcessed`: number of successfully processed items written into the stream\n- `ItemsSkipped`: number of items in the chunk that were skipped (failed / filtered)\n- `IsMedia`: indicates whether the returned payload was compressed (`true`) or encrypted (`false`).\n",
        "operationId": "ContentTransfer_GetChunkAsync",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "description": "The unique identifier of the transfer operation. This is the UUID you provided when you [created a content transfer operation](#operation/ContentTransfer_CreateContentTransfer).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "chunksetId",
            "in": "path",
            "description": "The unique identifier of the chunk set that contains the chunk to be transferred. If you don't know this value, first retrieve details of a content transfer operation.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "chunkId",
            "in": "path",
            "description": "The identifier of the chunk to be transferred. The first chunk in the set is 0.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "example": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the chunk data as a binary stream.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "byte"
                },
                "example": "UkFJRgEAAAA="
              },
              "text/json": {
                "schema": {
                  "type": "string",
                  "format": "byte"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "byte"
                }
              },
              "text/xml": {
                "schema": {
                  "type": "string",
                  "format": "byte"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "format": "byte"
                }
              }
            }
          },
          "400": {
            "description": "Invalid chunk ID, chunk set ID, or no processed items in the chunk.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "Error": "Chunk set with ID '87654321-4321-4321-4321-cba987654321' doesn't exist"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Chunk set or chunk not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "Error": "Chunk set with ID '87654321-4321-4321-4321-cba987654321' doesn't exist"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Content transfer"
        ],
        "summary": "Save a data chunk to the destination environment",
        "description": "For each chunk of content in a set within a transfer operation, use this endpoint to copy the chunk to the *destination* environment after using the corresponding [Retrieve a specific chunk of transfer data](#operation/ContentTransfer_GetChunkAsync) endpoint, where you obtained a binary stream representing the chunk data.\n\nMake this request in your *destination* environment.\n\nSet the request header `Content-Type: application/octet-stream`.\n\n{% admonition type=\"important\" name=\"Important\" %}\nThe request body for this endpoint must be the raw binary stream obtained from the response of the paired endpoint.\n\nDo not alter, wrap, re-encode or chunk the stream; forward it exactly as received:\n- For media chunks, the client must send the compressed bytes as-is, with no decompression.\n- For content (non-media) chunks, the client must send the encrypted bytes as-is, with no decryption.\n{% /admonition %}\n\nAfter retrieving and transferring all the chunks in a particular set, use the [Complete a chunk set](#operation/ContentTransfer_CompleteChunkSetAsync) endpoint to generate a `.raif` file containing that chunk set's data on the *destination* environment.\n",
        "operationId": "ContentTransfer_SaveChunkAsync",
        "parameters": [
          {
            "name": "isMedia",
            "in": "query",
            "description": "Whether the chunk contains media content, affecting whether the data is compressed (media) or encrypted (non-media). For a given chunk, obtain this value from the `IsMedia` parameter in the `Content-Disposition` response header of the [Retrieve a specific chunk of transfer data](#operation/ContentTransfer_GetChunkAsync) endpoint.",
            "required": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "transferId",
            "in": "path",
            "description": "The unique identifier of the transfer operation. This is the UUID you provided when you [created a content transfer operation](#operation/ContentTransfer_CreateContentTransfer).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "chunksetId",
            "in": "path",
            "description": "The unique identifier of the chunk set that contains the chunk to be transferred. If you don't know this value, first retrieve details of a content transfer operation.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "chunkId",
            "in": "path",
            "description": "The identifier of the chunk to be transferred.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "example": 0,
              "default": 0
            }
          }
        ],
        "requestBody": {
          "description": "The raw binary stream of chunk data obtained from the paired endpoint (Retrieve a specific chunk of transfer data). Must be forwarded exactly as received, without modification.",
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Chunk was saved successfully.",
            "content": {}
          },
          "400": {
            "description": "Invalid request data or chunk information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "Error": "Transfer configuration validation failed: Invalid item path '/sitecore/content/invalid-path'"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error during chunk processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sitecore/api/content/transfer/v1/transfers/{transferId}/chunksets/{chunksetId}/complete": {
      "post": {
        "tags": [
          "Content transfer"
        ],
        "summary": "Complete a chunk set",
        "description": "After all the chunk data in a particular chunk set has been copied to the *destination* environment, use this endpoint to generate a `.raif` file containing the chunk set data on that environment. The name of this new file is returned in the body of a successful call to this endpoint.\n\nMake this request in your *destination* environment.\n\nMake sure to complete every chunk set.\n\nTo incorporate the `.raif` file data into the destination environment's database, use the separate [Item Transfer API](https://api-docs.sitecore.com/sai/item-transfer).\n",
        "operationId": "ContentTransfer_CompleteChunkSetAsync",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "description": "The unique identifier of the transfer operation. This is the UUID you provided when you [created a content transfer operation](#operation/ContentTransfer_CreateContentTransfer).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "chunksetId",
            "in": "path",
            "description": "The unique identifier of the chunk set to complete.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Chunk set completed successfully, returns the transfer filename",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChunkSetCompleteResponse"
                },
                "example": {
                  "ContentTransferFileName": "content-transfer-12345678-1234-1234-1234-123456789abc.raif"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChunkSetCompleteResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ChunkSetCompleteResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ChunkSetCompleteResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ChunkSetCompleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid chunk set or transfer information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "Error": "Transfer configuration validation failed: Invalid item path '/sitecore/content/invalid-path'"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error during chunk set completion",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sitecore/api/content/transfer/v1/transfers/{transferId}": {
      "delete": {
        "tags": [
          "Content transfer"
        ],
        "summary": "Delete a content transfer and clean up associated resources",
        "description": "If you no longer need a particular content transfer operation—either because you've finished converting the contents of its chunk sets into `.raif` files, or because the transfer was unsuccessful or cancelled—use this endpoint to delete the operation and all associated resources that are no longer required.\n\nMake this request in your *source* environment.\n",
        "operationId": "ContentTransfer_DeleteContentTransfer",
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "description": "The unique identifier of the transfer operation. This is the UUID you provided when you [created a content transfer operation](#operation/ContentTransfer_CreateContentTransfer).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Content transfer was deleted successfully.",
            "content": {}
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Transfer with the specified ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "Error": "Transfer with ID '12345678-1234-1234-1234-123456789abc' was not found"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CreateContentTransferRequest": {
        "type": "object",
        "properties": {
          "Configuration": {
            "$ref": "#/components/schemas/TransferConfiguration"
          },
          "TransferId": {
            "type": "string",
            "format": "uuid",
            "description": "A universally unique identifier (UUID) representing the transfer. This is a value of your choice. \n\n Format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` and containing only hexadecimal characters (`0`-`9`, `a`-`f`).",
            "example": "00000000-0000-0000-0000-000000000000"
          }
        },
        "example": {
          "Configuration": {
            "DataTrees": [
              {
                "ItemPath": "/sitecore/content/Home",
                "Scope": "SingleItem",
                "MergeStrategy": "OverrideExistingItem"
              },
              {
                "ItemPath": "/sitecore/media library/Images",
                "Scope": "SingleItem",
                "MergeStrategy": "OverrideExistingItem"
              }
            ],
            "Database": "master"
          },
          "TransferId": "12345678-1234-1234-1234-123456789abc"
        }
      },
      "TransferConfiguration": {
        "type": "object",
        "properties": {
          "DataTrees": {
            "type": "array",
            "description": "One or more objects representing the content items you want to transfer. Each object represents an item at a specific path, determines whether to include descendants, and specifies how to handle conflicts with existing files.",
            "items": {
              "$ref": "#/components/schemas/DataTree"
            }
          },
          "Database": {
            "type": "string",
            "description": "The name of the database associated with the source.",
            "example": "master"
          }
        }
      },
      "DataTree": {
        "type": "object",
        "properties": {
          "ItemPath": {
            "type": "string",
            "description": "The path of the content item you want to transfer.",
            "example": "/sitecore/content/Home/MyItem"
          },
          "Scope": {
            "type": "string",
            "description": "Whether the specified item should be transferred on its own or include all descendants.",
            "enum": [
              "SingleItem",
              "ItemAndDescendants"
            ],
            "default": "SingleItem"
          },
          "MergeStrategy": {
            "type": "string",
            "description": "The method you want to use to handle conflicts with items that already exist in the destination. `OverrideExistingTree` removes the item and all its descendants from the destination before writing the transferred items. This is the only strategy that can delete existing items.",
            "enum": [
              "OverrideExistingItem",
              "KeepExistingItem",
              "OverrideExistingTree"
            ],
            "default": "OverrideExistingItem"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "Error": {
            "type": "string"
          }
        }
      },
      "ContentTransferCreationStatusResponse": {
        "type": "object",
        "properties": {
          "State": {
            "type": "string",
            "description": "The current status of the transfer operation.",
            "readOnly": true,
            "enum": [
              "Running",
              "Completed",
              "Failed",
              "NotFound"
            ]
          },
          "ChunkSetsMetadata": {
            "type": "array",
            "description": "Metadata for the chunk sets in the transfer operation.",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/ChunkSetMetadata"
            }
          }
        }
      },
      "ChunkSetMetadata": {
        "type": "object",
        "properties": {
          "ChunkSetId": {
            "type": "string",
            "description": "The unique identifier of the chunk set.",
            "format": "uuid",
            "example": "00000000-0000-0000-0000-000000000000"
          },
          "ChunkCount": {
            "type": "integer",
            "description": "The number of chunks in the set.",
            "format": "int32"
          },
          "TotalItemCount": {
            "type": "integer",
            "description": "The number of content and media items in the chunk set.",
            "format": "int32"
          }
        }
      },
      "ChunkSetCompleteResponse": {
        "type": "object",
        "properties": {
          "ContentTransferFileName": {
            "type": "string",
            "description": "The name of the `.raif` file, automatically generated based on the identifier of the source data.",
            "readOnly": true
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "x-original-swagger-version": "2.0"
}