Delete many records at once
const url = 'https://api.nsin.ir/domains/example.com/records/batch-delete';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"ids":[1]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.nsin.ir/domains/example.com/records/batch-delete \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "ids": [ 1 ] }'Deletes many records in one request, at most 1000 per call.
Best-effort per record — see batch-update; records NSIN manages are
refused per item. Requires records.edit.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The domain name (for example example.com) — not a numeric id.
Example
example.comRequest Body required
Section titled “Request Body required ”object
Example generated
{ "ids": [ 1 ]}Responses
Section titled “ Responses ”Per-record outcome.
Outcome of a best-effort bulk operation. The status code is 200 even
when some records failed — inspect results.
object
object
Present only when ok is false.
Example generated
{ "succeeded": 1, "failed": 1, "results": [ { "id": 1, "ok": true, "error": "example" } ]}Malformed body, an empty ids, or more than 1000 records.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid API key"}The key is read-only, your role on the domain lacks the required permission, or the domain’s plan does not include the feature.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}The domain is disabled or banned.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}