Initiate a site transfer
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.wpengineapi.com/v1/sites/example/site_transfers"
payload := strings.NewReader("{ \"destination_account_id\": \"eeda3227-9a39-46ae-9e14-20958bb4e6c9\", \"scheduled_time\": \"2026-06-01T14:30:00Z\", \"maintenance_mode\": false }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <credentials>") 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))
}const url = 'https://api.wpengineapi.com/v1/sites/example/site_transfers';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"destination_account_id":"eeda3227-9a39-46ae-9e14-20958bb4e6c9","scheduled_time":"2026-06-01T14:30:00Z","maintenance_mode":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.wpengineapi.com/v1/sites/example/site_transfers \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "destination_account_id": "eeda3227-9a39-46ae-9e14-20958bb4e6c9", "scheduled_time": "2026-06-01T14:30:00Z", "maintenance_mode": false }'Description
Requests a transfer of the given site to a destination account.
The transfer is accepted asynchronously and will initially have a pending or scheduled status.
Requires Owner or Full with Billing access on both the origin and destination accounts.
Constraints
- Origin and destination accounts must be different
- Sandbox sites cannot be transferred
- The destination account must have a preferred Data Center configured
- If
scheduled_timeis provided, it must be an RFC 3339 datetime between 1 hour and 7 days in the future
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”ID of the site to transfer
Request Body
Section titled “Request Body ”Properties
destination_account_id(required) — UUID of the account to transfer the site toscheduled_time(optional) — RFC 3339 datetime at which the transfer should be executed (must be between 1 hour and 7 days in the future). Omit to transfer immediately.maintenance_mode(optional) — Whether to enable maintenance mode during the transfer. Defaults tofalse.
object
UUID of the destination account
Example
eeda3227-9a39-46ae-9e14-20958bb4e6c9RFC 3339 datetime at which to execute the transfer. Must be between 1 hour and 7 days in the future. Example: ‘2026-06-01T14:30:00Z’
Example
2026-06-01T14:30:00ZWhether to enable maintenance mode on the site during the transfer
Example
falseResponses
Section titled “ Responses ”Transfer accepted
object
Unique identifier for the site transfer
Name of the site being transferred (as it was at time of transfer)
Names of the installs associated with the site at time of transfer
Name of the account the site is transferring from
Name of the account the site is transferring to
Current status of the transfer
The time at which the transfer is scheduled to execute. Null for immediate transfers.
Timestamp when the transfer was created
Timestamp when the transfer was last updated
Example
{ "id": "7c3e1a2b-4f5d-4e6c-b7a8-d9e0f1a2b3c4", "site": "my-wordpress-site", "installs": [ "mysite", "mysitestg" ], "origin_account": "Acme Corp", "destination_account": "New Owner Inc", "status": "pending", "scheduled_time": "2026-06-01T14:30:00Z", "created_at": "2026-05-15T10:00:00Z", "updated_at": "2026-05-15T10:05:00Z"}Bad Request
object
A message regarding the error that occurred on the server
(Optional) A URL where documentation regarding this specific error can be found
An array of error objects describing specific errors that arose when servicing the request
object
The name of the resource that was being processed when the error occurred
(Optional) The specific field associated with the error
(Optional) A type associated with the error. invalid_value, access_error, value_unavailable
(Optional) A machine code relating to the error that occurred with the field and resource
(Optional) A human-readable message relating to the error that occurred with the field and resource
Example
{ "message": "Invalid Site: Name cannot be empty.", "errors": [ { "resource": "Site", "field": "name", "type": "invalid_value", "code": "too_long", "message": "Name is too long (maximum is 40 characters)" } ]}Authentication Error
object
A message regarding the error that occurred on the server
(Optional) A URL where documentation regarding this specific error can be found
Example
{ "message": "Bad Credentials"}Not authorized
object
A message regarding the error that occurred on the server
(Optional) A URL where documentation regarding this specific error can be found
Example
{ "message": "You don't have permission to perform that action"}Not found
object
A message regarding the error that occurred on the server
(Optional) A URL where documentation regarding this specific error can be found
Example
{ "message": "Not Found"}Conflict — e.g. site already has an active transfer, site is not in a transferable state, or destination account is not eligible.
object
A message regarding the conflict that occurred
(Optional) A URL where documentation regarding this specific error can be found
Example
{ "message": "Transfer has already started and cannot be cancelled"}Unprocessable Entity — e.g. validation failed on transfer parameters
object
A message regarding the unprocessable entity that occurred
(Optional) A URL where documentation regarding this specific error can be found
An array of error objects describing specific errors that arose when servicing the request
object
The name of the resource that was being processed when the error occurred
(Optional) The specific field associated with the error
(Optional) A type associated with the error. invalid_value, access_error, value_unavailable
(Optional) A machine code relating to the error that occurred with the field and resource
(Optional) A human-readable message relating to the error that occurred with the field and resource
Example
{ "message": "Validation failed on transfer parameters", "errors": [ { "resource": "Site", "field": "name", "type": "invalid_value", "code": "too_long", "message": "Name is too long (maximum is 40 characters)" } ]}Too many requests
Internal Server Error
object
A message regarding the error that occurred on the server
Example
{ "message": "An unexpected error occurred, please try again in a few minutes"}Service unavailable