move_domain()

Move a domain.

Signature

move_domain(array $parameters): mixed

Parameters

Pass these parameters as KasRequestParams. Every request also requires kas_login, kas_auth_type, and kas_auth_data, as shown in SOAP with PHP.

Name Description Requirement
domain_name The host name to move Required
source_account The source account Required
target_account The target account Required

PHP example

<?php

// $sessionToken is returned by KasAuth, see SOAP with PHP.
$parameters = [
    'domain_name' => 'example.com',
    'source_account' => 'w000XXXX',
    'target_account' => 'w000YYYY',
];

try {
    $client = new SoapClient('https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl');
    $response = $client->KasApi(json_encode([
        'kas_login' => 'w0123456',
        'kas_auth_type' => 'session',
        'kas_auth_data' => $sessionToken,
        'kas_action' => 'move_domain',
        'KasRequestParams' => $parameters,
    ]));
    print_r($response);
} catch (SoapFault $fault) {
    echo 'Error: ' . $fault->faultstring;
}

Responses and error codes

  • TRUE the action was carried out
  • missing_parameter a required parameter is missing
  • in_progress the KAS object is currently being processed
  • kas_login_syntax_incorrect
  • target_is_equal_to_source
  • host_is_dummyhost
  • account_doesnt_belong_to_you
  • target_is_dummyaccount
  • domain_not_found_in_kas
  • subdomain_exists_in_subaccount
  • domain_has_active_fpse
  • max_domain_for_subaccount_gt_change_value
  • max_subdomain_for_subaccount_gt_change_value
  • max_mail_account_for_subaccount_gt_change_value
  • max_mail_forward_for_subaccount_gt_change_value
  • max_mailinglist_for_subaccount_gt_change_value
  • ddns_settings_for_subaccount_disabled