DNS ZonesImport Zone

Import Zone

curl -X POST "https://api.5centscdn.com/v2/dns/example_string/import" \
  -H "X-API-Key: YOUR_API_KEY" \
  --form format=bind \
  --form file=zone.txt \
  --form delete-existing-records=1 \
  --form record-types=a,aaaa,mx,cname,txt
{
  "status": "Success",
  "statusDescription": "The records of example.com were added successfully."
}
POST
/dns/{dnsId}/import
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: multipart/form-data
formatstring

Import file format. bind or tinydns.

filestring

Zone file to import. Must be a plain-text file with .txt extension.

Format: binary
delete-existing-recordsstring

Whether to delete all existing DNS records before importing. '0' = keep existing records. '1' = delete all records before import.

Options: 0, 1
record-typesstring

DNS record types to import as a comma-separated lowercase string. Leave empty to import all types.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

Body

multipart/form-data
formatstring

Import file format. bind or tinydns.

Example:
bind
filefile

Zone file to import. Must be a plain-text file with .txt extension.

Example:
zone.txt
delete-existing-recordsstring

Whether to delete all existing DNS records before importing. '0' = keep existing records. '1' = delete all records before import.

Allowed values:01
record-typesstring

DNS record types to import as a comma-separated lowercase string. Leave empty to import all types.

Example:
a,aaaa,mx,cname,txt

Responses

statusstring

Operation outcome.

statusDescriptionstring

Human-readable description of the operation outcome.