nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. DNS Records

Delete a DNS record

deletehttps://api.nsin.ir/domains/{domain}/records/{recordId}

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
json
{
  "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.

json
{
  "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.

json
{
  "error": "read-only API key"
}
404Domain or record not found.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}
409The domain is disabled or banned.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "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.

json
{
  "error": "rate limit exceeded"
}

Example request

bash
curl -X DELETE "https://api.nsin.ir/domains/example.com/records/0" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc