# Update a DNS zone This function updates a given DNS zone. It can add, edit, and remove many records in a single call. It also ensures that each record not removed will occupy the same number of lines after the edit as it did before the edit. You use this function to modify temporary domains. Endpoint: GET /mass_edit_dns_zone Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `serial` (integer, required) The current serial number in the DNS zone’s SOA (Start of Authority) record. If this value does not match the zone’s current state, the request fails. Example: 202001010100 - `zone` (string, required) The name of one of the user’s DNS zones. Example: "example.com" - `add` (array) The records to add to the zone. Each item must be a serialized JSON object that contains: * — The record’s name. * — The record’s TTL (Time-To-Live) value. * — The record’s type. For example, or . * — An array of strings. The format and number of the strings depend on the value. - `edit` (array) The records to edit in the zone. Each item must be a serialized JSON object that contains: * — The line number in the DNS zone where the record starts. This is a 0-based index, so to edit the first line in the file use the value. To edit the second line, give , and so forth. * — The record’s name. * — The record’s TTL (Time-To-Live) value. * — The record’s new type. For example, or . * — An array of strings. The format and number of the strings depend on the value. Example: ["'{\"line_index\": 9, \"dname\":\"example\", \"ttl\":14400, \"record_type\": \"TXT\", \"data\":[\"string1\", \"string2\"]}'"] - `remove` (array) The line indexes of records to remove from the zone. Example: [22] ## Response 200 fields (application/json): - `data` (object) - `data.new_serial` (integer) The DNS zone’s SOA record’s new serial number. You can use this to submit later edits if you track the number of lines each record takes up. Example: 2021031903 - `metadata` (object) - `metadata.command` (string) The method name called. Example: "mass_edit_dns_zone" - `metadata.reason` (string) The reason the API function failed when the field is . This field may display a success message when a function succeeds. Example: "OK" - `metadata.result` (integer) * - Success. * - Failed. Check the field for more details. Enum: 0, 1 - `metadata.version` (integer) The version of the API function. Example: 1