Skip to content
nsin docs

Delete a DNS record

DELETE
/domains/{domain}/records/{recordId}
curl --request DELETE \
--url https://api.nsin.ir/domains/example.com/records/1 \
--header 'Authorization: Bearer <token>'

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.

domain
required
string

The domain name (for example example.com) — not a numeric id.

Example
example.com
recordId
required
integer

Numeric id of the DNS record.

Deleted.

Media type application/json
object
message
string
Example
{
"message": "deleted"
}

Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

Read-only key, insufficient role, or the record is not editable.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

Domain or record not found.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

The domain is disabled or banned.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}