# Update IP addresses in zone files This function replaces a domain's IPv4 address in the DNS zone file with the specified destination IPv4 address. Endpoint: GET /DNS/swap_ip_in_zones Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `dest_ip` (string, required) The IPv4 address to use as the replacement in the zone files. Example: "192.0.2.1" - `domain` (string, required) The domain to perform the zone file updates on. To update multiple domains, increment or duplicate the parameter name. For example, , , and . Example: "example.com" - `ftp_ip` (string) The IPv4 address to use as the replacement for FTP records in the zone files. If this parameter is provided, then the system will use the value. Example: "192.0.2.1" - `source_ip` (string) The IPv4 address to replace in the zone files. The detected source IPv4 address is one of: * If there is an A record for the root of the zone the IP address is a loopback address, then the system will use its address. * If there are any A records in the zone whose addresses are loopback addresses, then the system will use the address of the first such A record in the zone file. * If no A records exist in the zone all A records have loopback addresses, then the system will update the zone file. If you do call this parameter, the system will automatically detect the IP addresses in the zone files. Example: "192.0.2.0" ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "swap_ip_in_zones" - `module` (string) The name of the module called. Example: "DNS" - `result` (object) - `result.data` (array) An array of objects containing the updated DNS records, including their previous values. - `result.data.zone_name` (string) The DNS zone in which the system updated the domain's record. Example: "example.com" - `result.data.record_name` (string) The name of the domain's updated DNS record. Example: "example.com" - `result.data.record_type` (string) The type of the DNS record which was updated. Example: "A" - `result.data.old_value` (string) The value of the DNS record before it was updated. Example: "192.0.2.0" - `result.data.new_value` (string) The value of the DNS record after it was updated. Example: "192.0.2.1" - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.status` (integer) * - Success. * - Failed. Check the field for more details. Enum: 0, 1 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.