# API: Create new record in zone

# addDNSRecord

Requires DNS Zone editor plugin to be added and active in HostBill. Create new record in zone

# Required parameters

Parameter Description
app_id App ID
zone_id Zone ID
name Record name
type Record type e.g. A, AAAA, MX
content Record content. If the content contains several fields, such as an SRV record, then content should be an array where each field is a separate element
ttl TTL e.g. 3600

# Optional parameters

Parameter Description
priority Record priority

# Request

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=addDNSRecord&app_id=APP_ID&zone_id=ZONE_ID&name=NAME&type=TYPE&content=CONTENT&ttl=TTL

# PHP Samples

# Response

{
    "success": true,
    "record": {
        "name": "a.testdns.com.",
        "type": "A",
        "ttl": 3600,
        "content": "192.168.112.116",
        "priority": 0,
        "change_date": 0,
        "id": "3d557b1ff545e86df0b84b5fef246a54",
        "domain_id": "3"
    },
    "call": "addDNSRecord",
    "server_time": 1622816284,
    "info": [
        "The record has been created"
    ]
}
Last Updated: 10/7/2024, 2:36:43 PM