DNS overview

The Storefront API lets you manage DNS records for your customers' domains programmatically without needing to log in to Storefront Manager or the customer portal. This is useful if you have your own platform or control panel and want to keep DNS in sync, automate DNS provisioning when customers sign up, or build tooling for your support team.

📘

Shopco nameservers required

DNS management via the API only works for domains using Storefront's default Shopco nameservers (a.ns.shopco.com, b.ns.shopco.com, c.ns.shopco.com). Domains using custom nameservers manage their own DNS outside of Storefront.

Supported record types

The API supports all DNS record types available in the Storefront interface: A, AAAA, CNAME, MX, NS, TXT, SRV, and DS.

The same validation rules that apply in the Storefront Manager and customer portal apply to the API. Records that would be rejected in the UI are rejected via the API with the same validation errors.

DNS record model

Each DNS record returned by the API includes the following fields:

FieldDescription
idUnique record identifier (UUID). Returned in responses; used for update and delete requests.
dns_zone_idIdentifier of the DNS zone this record belongs to. Returned in responses only.
nameThe record name or host (e.g. www, @, *).
rr_typeRecord type (e.g. A, MX, TXT).
classAlways "IN". Returned in responses only.
ttlTime to live in seconds. Default: 900. Minimum: 0.
contentHuman-readable string representation of the record data. Returned in responses only.
rr_dataStructured record data. Fields vary by rr_type (see table below).

Record type reference

rr_data fields depend on rr_type. The table below lists the required fields for each type. name and ttl are always accepted at the top level of the request body.

Typerr_data fieldsNotes
Aaddress (IPv4 string)name accepts: hostname label, @, or *
AAAAaddress (IPv6 string)name accepts: hostname label, @, or *
CNAMEtarget (FQDN, or DKIM format selector._domainkey.domain.tld)CNAME name must be unique; cannot coexist with other record types at the same name
MXserver (hostname), priority (non-negative integer)Lower priority value means higher preference
TXTdata (non-empty string)Use for SPF, DKIM, domain verification, etc.
SRVtarget (hostname), port (1-65535), priority (non-negative integer), weight (non-negative integer)name format: _service._proto
NSserver (nameserver hostname)Use with caution; NS changes affect DNS delegation
DSkeytag (0-65535), algo (1-255), digest_type (1-255), digest (hex string)Used for DNSSEC; requires registry support

Reset vs. Import

These two endpoints both replace DNS records in bulk, but behave very differently — worth understanding before using either.

Reset restores a domain's DNS records to your reseller default/template configuration. It's a safe reset to your reseller baseline, not a generic zone wipe. Use this to restore a domain to a known baseline, for example after a customer has made changes you want to undo, or when re-provisioning a domain.

Import replaces all existing DNS records for a domain with the provided set in a single operation. This is a full replacement: all existing records are deleted and replaced with the provided list. Passing an empty array clears all records. The API validates the resulting zone state before committing. Use this for migration scenarios, for example when moving a domain from another DNS provider and you have a complete zone to apply.

Common error codes

DNS validation errors return a 400 status with an error_string field:

error_stringCause
duplicate dns recordAn identical record already exists
cname name not uniqueA CNAME was added at a name that already has other records
name conflict with existing cname recordA non-CNAME record was added at a name that already has a CNAME
invalid algo for DS recordalgo value is out of the valid range
invalid keytag for DS recordkeytag value is out of the valid range
invalid digest_type for DS recorddigest_type value is out of the valid range