update_subdomain()

Update a subdomain.

Signature

update_subdomain(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
subdomain_name The host name to update Required
subdomain_path The host path in the account, or for a redirect an FQDN or a website builder (optional, examples: /path/, http://example.com with redirect_status, or wbk:wbk000001) Optional
redirect_status Redirect status: 0|301|302|307, 0 = no redirect Optional
php_version The requested PHP version: modul|5.X Optional
is_active The subdomain is active: Y|N Optional
temporary_until Expiration date of the transitional domain as YYYYMMDD; 0 = no expiration Optional
ssl_proxy Deprecated since 2026-10-06, ignored Deprecated
statistic Deprecated since 2026-10-06, ignored Deprecated

PHP example

<?php

// $sessionToken is returned by KasAuth, see SOAP with PHP.
$parameters = [
    'subdomain_name' => 'sub.example.com',
    'subdomain_path' => '/directory/',
];

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' => 'update_subdomain',
        '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
  • nothing_to_do nothing was changed
  • redirect_status_syntax_incorrect
  • subdomain_doenst_exist
  • subdomain_has_active_fpse
  • subdomain_path_syntax_incorrect
  • php_version_syntax_incorrect
  • php_version_not_available_on_server
  • is_active_syntax_incorrect
  • temporary_until_syntax_incorrect