# Delete Record
## Endpoint
`/api/zones/records/delete`
## Method
GET (query parameters)
## Description
Deletes a record from an authoritative zone. Record-type-specific parameters are required to identify which record to delete (since multiple records of the same type can exist for one domain).
## Authentication
Required. Session token from `login` or `createToken`.
## Permissions
- Zones: None
- Zone: Delete
## Common Parameters
| `token` | string | Yes | No | Session token from `login` or `createToken` |
| `domain` | string | Yes | No | The domain name of the zone to delete the record from |
| `zone` | string | No | No | The authoritative zone name. When unspecified, the closest authoritative zone is used |
| `node` | string | No | No | Node domain name for clustering. Only usable when Clustering is initialized |
| `type` | string | Yes | No | The resource record type to delete |
## Per-Record-Type Parameters
Each record type requires specific parameters to identify which record to delete.
### A / AAAA
| `ipAddress` | string | Yes | The IP address of the A or AAAA record to delete |
| `updateSvcbHints` | boolean | No | When `true`, update SVCB/HTTPS records with Automatic Hints matching this domain |
### NS
| `nameServer` | string | Yes | The name server domain name to delete |
### CNAME
No additional parameters required. Only one CNAME can exist per domain, so `domain` + `type` is sufficient.
### SOA
SOA records cannot be deleted (they are intrinsic to the zone).
### PTR
| `ptrName` | string | Yes | The PTR domain name to delete |
### MX
| `preference` | integer | Yes | The preference value of the MX record to delete |
| `exchange` | string | Yes | The exchange domain name of the MX record to delete |
### TXT
| `text` | string | Yes | The text value of the TXT record to delete |
| `splitText` | boolean | No | Split text mode. Default: `false` |
### RP
| `mailbox` | string | Yes | Email address of the RP record to delete |
| `txtDomain` | string | Yes | TXT domain name of the RP record to delete |
### SRV
| `priority` | integer | Yes | Priority of the SRV record to delete |
| `weight` | integer | Yes | Weight of the SRV record to delete |
| `port` | integer | Yes | Port of the SRV record to delete |
| `target` | string | Yes | Target of the SRV record to delete |
### NAPTR
| `naptrOrder` | integer | Yes | Order value |
| `naptrPreference` | integer | Yes | Preference value |
| `naptrFlags` | string | Yes | Flags value |
| `naptrServices` | string | Yes | Services value |
| `naptrRegexp` | string | Yes | Regexp value |
| `naptrReplacement` | string | Yes | Replacement value |
### DNAME
No additional parameters required. Only one DNAME can exist per domain, so `domain` + `type` is sufficient.
### DS
| `keyTag` | integer | Yes | Key tag value |
| `algorithm` | string | Yes | Algorithm value |
| `digestType` | string | Yes | Digest type |
| `digest` | string | Yes | Digest hex string |
### SSHFP
| `sshfpAlgorithm` | string | Yes | Algorithm (RSA, DSA, ECDSA, Ed25519, Ed448) |
| `sshfpFingerprintType` | string | Yes | Fingerprint type (SHA1, SHA256) |
| `sshfpFingerprint` | string | Yes | Fingerprint hex string |
### TLSA
| `tlsaCertificateUsage` | string | Yes | Certificate usage (PKIX-TA, PKIX-EE, DANE-TA, DANE-EE) |
| `tlsaSelector` | string | Yes | Selector (Cert, SPKI) |
| `tlsaMatchingType` | string | Yes | Matching type (Full, SHA2-256, SHA2-512) |
| `tlsaCertificateAssociationData` | string | Yes | Certificate association data |
### SVCB / HTTPS
| `svcPriority` | integer | Yes | Priority value |
| `svcTargetName` | string | Yes | Target domain name |
| `svcParams` | string | Yes | Service parameters (pipe-separated key-value list). Set to `false` to match cleared values |
### URI
| `uriPriority` | integer | Yes | Priority value |
| `uriWeight` | integer | Yes | Weight value |
| `uri` | string | Yes | URI value |
### CAA
| `flags` | integer | Yes | CAA flags value |
| `tag` | string | Yes | CAA tag value |
| `value` | string | Yes | CAA value |
### ANAME
| `aname` | string | Yes | ANAME domain name to delete |
### FWD (Forwarder - proprietary)
| `forwarder` | string | Yes | Forwarder address to delete |
| `protocol` | string | No | Protocol of the FWD record. Default: `Udp`. Valid: `Udp`, `Tcp`, `Tls`, `Https`, `Quic` |
### APP
No additional parameters required per the API docs. APP records are singletons per domain, so `domain` + `type` is sufficient.
### Unknown Record Types
| `rdata` | string | Yes | Hex string or colon-separated hex string identifying the record |
## Response Fields
| `status` | string | `"ok"` on success |
| `response` | object | Empty object on success |
The delete endpoint returns a minimal response with no record details.
## Conditional Logic Notes
1. **`ipAddress` is REQUIRED when deleting `A` or `AAAA` records.** Without it, the server cannot identify which A/AAAA record to delete (multiple can exist). This is the bug that the `bug/record-delete-ipaddress-missing` branch name references.
2. **`nameServer` is required when deleting `NS` records.**
3. **`ptrName` is required when deleting `PTR` records.**
4. **Both `preference` and `exchange` are required when deleting `MX` records.**
5. **`text` is required when deleting `TXT` records.** `splitText` defaults to `false` and affects how the text is matched.
6. **Both `mailbox` and `txtDomain` are required when deleting `RP` records.**
7. **All four SRV fields are required** (`priority`, `weight`, `port`, `target`).
8. **All six NAPTR fields are required** (`naptrOrder`, `naptrPreference`, `naptrFlags`, `naptrServices`, `naptrRegexp`, `naptrReplacement`).
9. **All four DS fields are required** (`keyTag`, `algorithm`, `digestType`, `digest`).
10. **All three SSHFP fields are required** (`sshfpAlgorithm`, `sshfpFingerprintType`, `sshfpFingerprint`).
11. **All four TLSA fields are required** (`tlsaCertificateUsage`, `tlsaSelector`, `tlsaMatchingType`, `tlsaCertificateAssociationData`).
12. **All three SVCB/HTTPS fields are required** (`svcPriority`, `svcTargetName`, `svcParams`).
13. **All three URI fields are required** (`uriPriority`, `uriWeight`, `uri`).
14. **All three CAA fields are required** (`flags`, `tag`, `value`).
15. **`aname` is required when deleting `ANAME` records.**
16. **`forwarder` is required when deleting `FWD` records.** `protocol` is optional (defaults to `Udp`), meaning if you have a `Tls` forwarder and omit `protocol`, it will try to delete a `Udp` forwarder instead.
17. **CNAME, DNAME, and APP** do not require additional identifying parameters (they are singletons per domain).
18. **`updateSvcbHints` is only relevant for `A` and `AAAA` records.**
## Edge Cases
- **No `type`-specific parameters for CNAME/DNAME/APP**: These are singleton record types, so the `domain` + `type` combination is sufficient to identify the record. No rData parameters are needed.
- **SOA cannot be deleted**: SOA records are intrinsic to the zone and can only be updated, never deleted.
- **FWD `protocol` default trap**: If you have multiple FWD records with different protocols (e.g., one UDP, one TLS), omitting the `protocol` parameter defaults to `Udp`, which may delete the wrong record or fail if no UDP forwarder exists.
- **`splitText` for TXT**: The `splitText` parameter affects how the text value is matched for identification. If a TXT record was created with `splitText=true`, you may need to pass `splitText=true` when deleting it to match correctly.
- **The response is minimal**: Unlike add/update, the delete response does not return any record details -- just `{"response": {}, "status": "ok"}`.
- **No bulk delete**: Each call deletes exactly one record. To delete all records of a type, you must call this endpoint once per record.
- **The API docs reference `SCVB`** in SVCB/HTTPS parameter descriptions -- this is a typo for `SVCB`.
- **`rdata` for unknown types**: Must be formatted as hex string or colon-separated hex string, matching exactly what was used to create the record.