Child pages
  • WHM API 1 Functions - set_public_contact
Skip to end of metadata
Go to start of metadata

Description

This function sets an account's public contact information.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/set_public_contact?api.version=1&name=Bob%27s%20Hosting%20&url=https%3A%2F%2Fbobshosting.com
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/set_public_contact?api.version=1&name=Bob%27s%20Hosting%20url=https%3A%2F%2Fbobshsting.com
 Command Line
whmapi1 set_public_contact name=Bob\'s\ Hosting url=https://bobshosting.com


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "set_public_contact"
  }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>set_public_contact</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

Note:

You must include at least one of the following parameters.

ReturnTypeDescriptionPossible valuesExample
namestring

The public contact name of the reseller.

If you do not use this parameter, the system retains the current setting.

A valid reseller's name.

Bob's Hosting
url string

The public contact URL.

If you do not use this parameter, the system retains the current setting.

 A valid URL.https://bobshosting.net

Returns

This function only returns metadata.