> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Transfer a Domain

POST https://api.bigcommerce.com/stores/{store_hash}/v3/infrastructure/projects/{project_uuid}/domains/{domain}/transfer
Content-Type: application/json

Transfers a custom domain from its current project to another project in the same store. The source project is the `{project_uuid}` in the path; the destination project is supplied in the request body. The destination project must differ from the source project.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/management/infrastructure-hosting/domains/transfer-domain

## Authentication

- `X-Auth-Token` header (required) — ### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Infrastructure Deployments | read-only | `store_infrastructure_deployments_read_only` | | Infrastructure Deployments | create preview | `store_infrastructure_deployments_create_preview` | | Infrastructure Deployments | manage | `store_infrastructure_deployments_manage` | | Infrastructure Projects | read-only | `store_infrastructure_projects_read_only` | | Infrastructure Projects | manage | `store_infrastructure_projects_manage` | | Infrastructure Logs | read-only | `store_infrastructure_logs_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

## Request

### Path parameters

- `project_uuid` (string, required) — The UUID of the source project the domain is currently bound to.
- `domain` (string, required) — The custom domain name to transfer.
- `store_hash` (string, required) — Permanent ID of the BigCommerce store.

### Body (application/json)

This endpoint expects a TransferDomainRequest.

- `new_project_uuid` (string, required) — The UUID of the destination project to transfer the domain to. Must differ from the source project in the path.

## Response

### 204

The domain was transferred successfully. No content is returned.

## Errors

### 400 Bad Request Error

The destination project is the same as the source project.

- `status` (integer, optional) — The HTTP status code.
- `title` (string, optional) — A description of the error.
- `type` (string, optional) — A URL identifying the error type.
- `errors` (ErrorResponseErrors, optional) — Additional error details.
- `meta` (map from string to any, optional) — Additional structured context for the error, such as the ownership-verification TXT record to publish, the conflicting `project_uuid`, or the domain `limit` and `current` count.

### 404 Not Found Error

The source or destination project was not found.

- `status` (integer, optional) — The HTTP status code.
- `title` (string, optional) — A description of the error.
- `type` (string, optional) — A URL identifying the error type.
- `errors` (ErrorResponseErrors, optional) — Additional error details.
- `meta` (map from string to any, optional) — Additional structured context for the error, such as the ownership-verification TXT record to publish, the conflicting `project_uuid`, or the domain `limit` and `current` count.

### 409 Conflict Error

The domain could not be transferred because of a conflict. This occurs when the domain is not bound to any project in this store, is not owned by the source project, or another operation is in progress for the domain.

- `status` (integer, optional) — The HTTP status code.
- `title` (string, optional) — A description of the error.
- `type` (string, optional) — A URL identifying the error type.
- `errors` (ErrorResponseErrors, optional) — Additional error details.
- `meta` (map from string to any, optional) — Additional structured context for the error, such as the ownership-verification TXT record to publish, the conflicting `project_uuid`, or the domain `limit` and `current` count.

### 422 Unprocessable Entity Error

Transferring the domain would exceed the destination project's custom domain limit.

- `status` (integer, optional) — The HTTP status code.
- `title` (string, optional) — A description of the error.
- `type` (string, optional) — A URL identifying the error type.
- `errors` (ErrorResponseErrors, optional) — Additional error details.
- `meta` (map from string to any, optional) — Additional structured context for the error, such as the ownership-verification TXT record to publish, the conflicting `project_uuid`, or the domain `limit` and `current` count.

## Types

### ErrorResponseErrors

Additional error details.

## Examples

**Request**

```json
{
  "new_project_uuid": "01956ca2-72dd-7968-9484-469ce291d38f"
}
```

**SDK Code**

```python Transfer a domain
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/projects/project_uuid/domains/shop.example.com/transfer"

payload = { "new_project_uuid": "01956ca2-72dd-7968-9484-469ce291d38f" }
headers = {
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Transfer a domain
const url = 'https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/projects/project_uuid/domains/shop.example.com/transfer';
const options = {
  method: 'POST',
  headers: {'X-Auth-Token': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"new_project_uuid":"01956ca2-72dd-7968-9484-469ce291d38f"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Transfer a domain
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/projects/project_uuid/domains/shop.example.com/transfer"

	payload := strings.NewReader("{\n  \"new_project_uuid\": \"01956ca2-72dd-7968-9484-469ce291d38f\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Transfer a domain
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/projects/project_uuid/domains/shop.example.com/transfer")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"new_project_uuid\": \"01956ca2-72dd-7968-9484-469ce291d38f\"\n}"

response = http.request(request)
puts response.read_body
```

```java Transfer a domain
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/projects/project_uuid/domains/shop.example.com/transfer")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"new_project_uuid\": \"01956ca2-72dd-7968-9484-469ce291d38f\"\n}")
  .asString();
```

```php Transfer a domain
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/projects/project_uuid/domains/shop.example.com/transfer', [
  'body' => '{
  "new_project_uuid": "01956ca2-72dd-7968-9484-469ce291d38f"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Transfer a domain
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/projects/project_uuid/domains/shop.example.com/transfer");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"new_project_uuid\": \"01956ca2-72dd-7968-9484-469ce291d38f\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Transfer a domain
import Foundation

let headers = [
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["new_project_uuid": "01956ca2-72dd-7968-9484-469ce291d38f"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/projects/project_uuid/domains/shop.example.com/transfer")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```