Cancel a scheduled site transfer
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.wpengineapi.com/v1/sites/example/site_transfers/example"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Basic <credentials>")
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/example';const options = {method: 'DELETE', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.wpengineapi.com/v1/sites/example/site_transfers/example \ --header 'Authorization: Basic <credentials>'Description
Cancels a site transfer. Only transfers that have not yet started can be cancelled;
a transfer that has already started will return 409 Conflict.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”ID of the site
ID of the site transfer to cancel
Responses
Section titled “ Responses ”Transfer cancelled
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 — transfer has already started and cannot be cancelled
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"}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