Delete a DNS record
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
Removes the record from the zone, and from the edge if it was proxied.
Records NSIN manages (editable: false) cannot be deleted here: turn
a gateway off with DELETE /domains/{domain}/gateways/{gatewayId}, and
Email Routing records go away when routing is disabled. Requires
records.edit.
Path parameters
- domainstringrequiredpath
The domain name (for example
example.com) — not a numeric id. - recordIdintegerrequiredpath
Numeric id of the DNS record.
Responses
200Deleted.
Content type: application/json
- messagestring
{
"message": "deleted"
}401Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "invalid API key"
}403Read-only key, insufficient role, or the record is not editable.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}404Domain or record not found.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}409The domain is disabled or banned.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}429The key exceeded its request budget (300 requests per minute by default).
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "rate limit exceeded"
}Example request
curl -X DELETE "https://api.nsin.ir/domains/example.com/records/0" \
-H "Authorization: Bearer $NSIN_API_KEY"