update (surname)

Changes properties of the domain. You can use this command to change the DNS records, enable or disable email forwarding, or to change the service type, for example, to switch from Webmail (no IMAP/POP/SMTP) to a regular mailbox.

Request parameters for update surname

Standard parameters

  • action = update
  • object = surname attributes

Attributes

Parameters within the attributes associative array are described below.

Parameter nameObligationDefinition/Value
dnsRecordsOptionalA DNS record associated with the domain along with its value.

Note: You can only specify one DNS record: either A or CNAME.

For more information, see the DNS Records table below.
domainRequiredThe domain to be updated.
mailboxOptionalAn array that defines the type of account.

For more information, see the Mailbox table below.

DnsRecords
Parameters within the dnsRecords associative array are described below.

Parameter nameObligationDefinition/Value
contentOptionalThe IP address or the fully qualified domain name.
nameOptionalThe new name for the DNS record.

Specify @ to indicate the actual zone rather than another record in the zone.
typeOptionalType of DNS record. Allowed values are A or CNAME.

Warning: If you update dnsRecords, you must supply a full list of records. Any committed records will be deleted.

Mailbox

Parameters within the mailbox associative array are described below.

Parameter nameObligationDefinition/Value
disableforward emailOptionalDisable email forwarding.
Allowed value is 1.

Note: To enable forwarding, use the forward_email parameter.
forward_emailOptionalThe address to which email is forwarded.
mailbox_typeOptionalChange the type of mailbox account. Allowed values are:

MAILBOX—Change to regular email account.

WEBMAIL_ONLY—Change to Webmail only account (no IMAP/POP/SMTP).
passwordOptionalThe registrant's new email password.

Response parameters for update surname

Standard parameters

  • action = reply
  • object = surname
  • is_success = a Boolean is returned, indicating success or failure of the
    request
  • response_code = response code indicating outcome of the request response_text = message describing the outcome of the request

Examples for update surname

Change a regular mailbox account to a webmail only account and enable email forwarding

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE OPS_envelope SYSTEM 'ops.dtd'>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">UPDATE</item>
                <item key="object">SURNAME</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="domain">steven.smith.net</item>
                        <item key="mailbox">
                            <dt_assoc>
                                <item key="mailbox_type">WEBMAIL_ONLY</item>
                                <item key="forward_email">[email protected]</item>
                            </dt_assoc>
                        </item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">REPLY</item>
                <item key="object">SURNAME</item>
                <item key="is_success">1</item>
                <item key="response_text">Command completed successfully</item>
                <item key="response_code">200</item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>

Change a webmail only account to a regular mailbox, change the password, and set the A record

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE OPS_envelope SYSTEM 'ops.dtd'>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">UPDATE</item>
                <item key="object">SURNAME</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="domain">steven.smith.net</item>
                        <item key="mailbox">
                            <dt_assoc>
                                <item key="mailbox_type">MAILBOX</item>
                                <item key="password">changeit</item>
                            </dt_assoc>
                        </item>
                        <item key="dnsRecords">
                            <dt_array>
                                <item key="0">
                                    <dt_assoc>
                                        <item key="type">A</item>
                                        <item key="name">@</item>
                                        <item key="content">127.0.0.2</item>
                                    </dt_assoc>
                                </item>
                            </dt_array>
                        </item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">REPLY</item>
                <item key="object">SURNAME</item>
                <item key="is_success">1</item>
                <item key="response_text">Command completed successfully</item>
                <item key="response_code">200</item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>

Change a webmail only account to a regular mailbox and disable email forwarding

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE OPS_envelope SYSTEM 'ops.dtd'>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">UPDATE</item>
                <item key="object">SURNAME</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="domain">steven.smith.net</item>
                        <item key="mailbox">
                            <dt_assoc>
                                <item key="mailbox_type">MAILBOX</item>
                                <item key="disable_forward_email">1</item>
                            </dt_assoc>
                        </item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">REPLY</item>
                <item key="object">SURNAME</item>
                <item key="is_success">1</item>
                <item key="response_text">Command completed successfully</item>
                <item key="response_code">200</item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>