# API: Get a list of zones by client or service

# getDNSZones

Requires DNS Zone editor plugin to be added and active in HostBill. Get zones by client or service. We can query Hostbill about the zones it has on file for a client, based on the account ID.

# Optional parameters

Parameter Description
client_id Client ID
service_id Service ID

# Request

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=getDNSZones

# PHP Samples

# Response

{
    "success": true,
    "zones": [
        {
            "server_id": "2",
            "account_id": "125",
            "domain_id": "21",
            "domain": "testsslhelper.com"
        },
        {
            "server_id": "2",
            "account_id": "126",
            "domain_id": "10",
            "domain": "testassign.test"
        }
    ],
    "call": "getDNSZones",
    "server_time": 1622815033
}
Last Updated: 9/30/2024, 2:47:06 PM