---
title: "Return Greylisting trusted hosts"
method: GET
path: "/read_cpgreylist_trusted_hosts"
tags: ["Greylisting", "Spam Protection (Greylisting)"]
---

# Return Greylisting trusted hosts

`GET /read_cpgreylist_trusted_hosts`

This function retrieves the entries on the Greylisting Trusted Hosts list.

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `greylist_trusted_hosts` object[] — An array of objects that contain identification information for the trusted hosts.
      - `comment` string — The IP address' comment.
      - `create_time` string, ISO-8601 Date Time (Space Separated) — The date and time when the system added the IP address to the _Trusted Hosts_ list.
      - `host_ip` string, ipv4 — The IP address of the host that the system added to the _Trusted Hosts_ list.
      - `id` integer — The identification number that the system assigned to the IP address.
  - `metadata` object
    - `command` string — The method name called.
    - `reason` string — The reason the API function failed when the `metadata.result` field is 0. This field may display a success message when a function succeeds.
    - `result` 0 | 1 — * `1` - Success. * `0` - Failed. Check the `reason` field for more details.
    - `version` integer — The version of the API function.

---

[API](https://skmtc.net/cpanel/apis/whm-api.md) · [All operations](https://skmtc.net/cpanel/apis/whm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/whm-api/revisions/3da41671c02c/schema)
