Description

This function adds IP addresses to a reseller's account.


To assign a main IP address to a reseller's account, call the WHM API 1 setresellermainip function.

For more information, read our Manage Reseller's IP Delegation documentation.

Examples




https://hostname.example.com:2087/cpsess##########/json-api/setresellerips?api.version=1&user=username&ips=192.168.0.20&delegate=1




https://hostname.example.com:2087/cpsess##########/xml-api/setresellerips?api.version=1&user=username&ips=192.168.0.20&delegate=1




whmapi1 setresellerips user=username ips=192.168.0.20 delegate=1



{
  "data": {
    "ip": [
      "192.168.0.20"
    ]
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "setresellerips"
  }
}




<result>
    <data>
        <ip>192.168.0.20</ip>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>setresellerips</command>
    </metadata>
</result>



Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The reseller's username.

A valid username.username
ipsstring

The IP addresses to allocate to the reseller's account.

If you do not use this parameter, the function clears the reseller's IP address list.

A comma-separated list of IP addresses.192.168.0.20
delegateBoolean

Whether to allocate the reseller a dedicated IP address.

This parameter defaults to 0.

    • 1 — Restrict the reseller's account to its dedicated IP address.
    • 0 — Allow the user to dedicate any available IP address to an owned account.
1

Returns

ReturnTypeDescriptionPossible valuesExample
allBoolean

Whether the function allocated all available IP addresses to the reseller.

This return only appears if you set the delegate parameter to 0.

1 is the only possible value.1

ip

array

An array of the reseller's allocated IP addresses.

The ips input parameter's value.

192.168.0.20