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 requiredDNS 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:
| Field | Description |
|---|---|
id | Unique record identifier (UUID). Returned in responses; used for update and delete requests. |
dns_zone_id | Identifier of the DNS zone this record belongs to. Returned in responses only. |
name | The record name or host (e.g. www, @, *). |
rr_type | Record type (e.g. A, MX, TXT). |
class | Always "IN". Returned in responses only. |
ttl | Time to live in seconds. Default: 900. Minimum: 0. |
content | Human-readable string representation of the record data. Returned in responses only. |
rr_data | Structured 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.
| Type | rr_data fields | Notes |
|---|---|---|
| A | address (IPv4 string) | name accepts: hostname label, @, or * |
| AAAA | address (IPv6 string) | name accepts: hostname label, @, or * |
| CNAME | target (FQDN, or DKIM format selector._domainkey.domain.tld) | CNAME name must be unique; cannot coexist with other record types at the same name |
| MX | server (hostname), priority (non-negative integer) | Lower priority value means higher preference |
| TXT | data (non-empty string) | Use for SPF, DKIM, domain verification, etc. |
| SRV | target (hostname), port (1-65535), priority (non-negative integer), weight (non-negative integer) | name format: _service._proto |
| NS | server (nameserver hostname) | Use with caution; NS changes affect DNS delegation |
| DS | keytag (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_string | Cause |
|---|---|
duplicate dns record | An identical record already exists |
cname name not unique | A CNAME was added at a name that already has other records |
name conflict with existing cname record | A non-CNAME record was added at a name that already has a CNAME |
invalid algo for DS record | algo value is out of the valid range |
invalid keytag for DS record | keytag value is out of the valid range |
invalid digest_type for DS record | digest_type value is out of the valid range |