---
title: "Start migrating an existing site to Hosted EZ"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.hostedez.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Hosted EZ REST API

`POST /v1/sites/moves`

## Authentication

- `sessionCookie`, apiKey, in cookie

## Header parameters

- `startSiteMove.header.Idempotency-Key` (string, optional) — Optional idempotency key (1 to 255 printable ASCII characters) scoped to caller and route.
  - minLength 1; maxLength 255

## Request body

_Required._

- `startSiteMove.address` (string, required)
- `startSiteMove.currentHost` (string, required)
  - minLength 1; maxLength 255
- `startSiteMove.includesEmail` (boolean, optional)
  - default `false`

## Example request

```json
{
  "address": "string",
  "currentHost": "string",
  "includesEmail": false
}
```

## Code samples

### cURL

```curl
curl --request POST \
  --url https://api.hostedez.com/v1/sites/moves \
  --header 'Content-Type: application/json' \
  --header '__Secure-better-auth.session_token: <value>' \
  --data '
{
  "address": "string",
  "currentHost": "string",
  "includesEmail": false
}
'
```

### TypeScript

```typescript
const url = 'https://api.hostedez.com/v1/sites/moves';
const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    '__Secure-better-auth.session_token': '<value>'
  },
  body: JSON.stringify({address: 'string', currentHost: 'string', includesEmail: false})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.hostedez.com/v1/sites/moves"

payload = {
    "address": "string",
    "currentHost": "string",
    "includesEmail": False
}
headers = {
    "Content-Type": "application/json",
    "__Secure-better-auth.session_token": "<value>"
}

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

print(response.text)
```

## Responses

### 202

Site migration accepted

#### Example

```json
{
  "app": "wordpress",
  "assistedMoveRequested": true,
  "createdAt": "2019-08-24T14:15:22Z",
  "currentHost": "string",
  "domain": "string",
  "failReason": "signin",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "includesEmail": true,
  "isStaging": true,
  "kind": "new",
  "lastSyncedAt": "2019-08-24T14:15:22Z",
  "mailboxesCount": 0,
  "maintenanceEnabled": true,
  "name": "string",
  "parentSiteId": "186e495c-10c6-4f33-a5ef-3f9806a2ea6b",
  "phpVersion": "",
  "slug": "string",
  "status": "creating",
  "statusSince": 0,
  "storageBytes": 0,
  "tempAddress": "string",
  "updatedAt": "2019-08-24T14:15:22Z",
  "userId": "string"
}
```

- `startSiteMove.response.202.app` (string | null, required)
  - one of `"wordpress"`, `"nextcloud"`, `"laravel"`, `"drupal"`, `"php"`, `"static"`, `null`
- `startSiteMove.response.202.assistedMoveRequested` (boolean, required)
- `startSiteMove.response.202.createdAt` (string, required)
  - format `date-time`
- `startSiteMove.response.202.currentHost` (string | null, required)
- `startSiteMove.response.202.domain` (string | null, required)
- `startSiteMove.response.202.failReason` (string | null, required)
  - one of `"signin"`, `"too_large"`, `"unsupported"`, `null`
- `startSiteMove.response.202.id` (string, required)
  - format `uuid`
- `startSiteMove.response.202.includesEmail` (boolean, required)
- `startSiteMove.response.202.isStaging` (boolean, required)
- `startSiteMove.response.202.kind` (string, required)
  - one of `"new"`, `"move"`
- `startSiteMove.response.202.lastSyncedAt` (string | null, required)
  - format `date-time`
- `startSiteMove.response.202.mailboxesCount` (integer, required)
  - format `int32`
- `startSiteMove.response.202.maintenanceEnabled` (boolean, required) — Whether maintenance mode is currently active on this Hosted EZ site.
- `startSiteMove.response.202.name` (string, required)
- `startSiteMove.response.202.parentSiteId` (string | null, required)
  - format `uuid`
- `startSiteMove.response.202.phpVersion` (string, required)
  - one of `""`, `"8.3"`, `"8.4"`, `"8.5"`
- `startSiteMove.response.202.slug` (string, required)
- `startSiteMove.response.202.status` (string, required)
  - one of `"creating"`, `"moving"`, `"ready"`, `"live_temporary"`, `"switching"`, `"live"`, `"suspended"`, `"failed"`, `"deleting"`
- `startSiteMove.response.202.statusSince` (integer, required)
  - format `int64`
- `startSiteMove.response.202.storageBytes` (integer, required)
  - format `int64`
- `startSiteMove.response.202.tempAddress` (string, required)
- `startSiteMove.response.202.updatedAt` (string, required)
  - format `date-time`
- `startSiteMove.response.202.userId` (string, required)

### 400

Invalid request

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `startSiteMove.response.400.error` (object, required)
  - `startSiteMove.response.400.error.code` (string, required)
  - `startSiteMove.response.400.error.message` (string, required)
  - `startSiteMove.response.400.error.issues` (array<object>, optional)
    - `startSiteMove.response.400.error.issues.message` (string, required)
    - `startSiteMove.response.400.error.issues.path` (string, required)

### 401

Unauthenticated

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `startSiteMove.response.401.error` (object, required)
  - `startSiteMove.response.401.error.code` (string, required)
  - `startSiteMove.response.401.error.message` (string, required)
  - `startSiteMove.response.401.error.issues` (array<object>, optional)
    - `startSiteMove.response.401.error.issues.message` (string, required)
    - `startSiteMove.response.401.error.issues.path` (string, required)

### 403

Forbidden origin

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `startSiteMove.response.403.error` (object, required)
  - `startSiteMove.response.403.error.code` (string, required)
  - `startSiteMove.response.403.error.message` (string, required)
  - `startSiteMove.response.403.error.issues` (array<object>, optional)
    - `startSiteMove.response.403.error.issues.message` (string, required)
    - `startSiteMove.response.403.error.issues.path` (string, required)

### 409

Idempotency key reused with a different request

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `startSiteMove.response.409.error` (object, required)
  - `startSiteMove.response.409.error.code` (string, required)
  - `startSiteMove.response.409.error.message` (string, required)
  - `startSiteMove.response.409.error.issues` (array<object>, optional)
    - `startSiteMove.response.409.error.issues.message` (string, required)
    - `startSiteMove.response.409.error.issues.path` (string, required)


Source: https://docs.hostedez.com/api/startSiteMove/index.md
