Add IP address to Greylisting trusted hosts

This function adds an IP address to the Greylisting Trusted Hosts list.

Authorizations:
query Parameters
ip
required
string

The record's IP address, or a range of IP addresses.

Note:

To add multiple IP addresses, increment the parameter name. For example, ip-1, ip-2, and ip-3.

Examples:
ip=ip-1=192.168.0.1&ip-2=192.168.0.2&ip-3=192.168.0.3
ip=192.168.0.1
comment
string <= 255 characters

A comment.

Example: comment=NoComment

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 --output=jsonpretty \
  create_cpgreylist_trusted_host \
  ip='192.168.0.1'

Response samples

Content type
application/json
{
  • "data": {
    • "comment": "NoComment",
    • "ips_added": [
      • {
        • "comment": "Fascinating",
        • "create_time": "2015-02-17T10:08:26.000Z",
        • "host_ip": "192.168.0.1",
        • "id": 42
        }
      ],
    • "ips_failed": {
      • "comment": "Sorry, 192.168 is not a valid IP address."
      }
    },
  • "metadata": {
    • "command": "create_cpgreylist_trusted_host",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}