Skip to content

Update many records at once

POST
/domains/{domain}/records/batch-update
curl --request POST \
--url https://api.nsin.ir/domains/example.com/records/batch-update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "updates": [ { "id": 1, "name": "example", "destination": "example", "mx_priority": 1, "proxied": true, "captcha": true, "scheme": "Http", "port": 1, "host_header": "example", "monitor": true, "timeout": 1, "comment": "example" } ] }'

Applies an update to many records in one request. Each item accepts exactly the same optional fields as a single PUT.

Best-effort: every record is processed independently, so one bad record does not abort the rest. The response always returns 200 with a per-record results array — check it rather than the status code. Requires records.edit.

domain
required
string

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

Example
example.com
Media type application/json
object
updates
required
Array
object
id
required

Id of the record to update.

integer
name
string
destination
string
mx_priority
integer
<= 65535
proxied
boolean
captcha
boolean
scheme

Protocol the edge uses to reach the origin for a proxied record. Default follows the request’s own scheme; Auto probes.

string
Allowed values: Http Https Auto Default
port
integer
host_header
string
monitor
boolean
timeout
integer
comment
string
<= 1024 characters

Per-record outcome.

Media type application/json

Outcome of a best-effort bulk operation. The status code is 200 even when some records failed — inspect results.

object
succeeded
integer
failed
integer
results
Array<object>
object
id
integer
ok
boolean
error

Present only when ok is false.

string
Example generated
{
"succeeded": 1,
"failed": 1,
"results": [
{
"id": 1,
"ok": true,
"error": "example"
}
]
}

Missing, malformed, revoked or expired API key — or the owning account is inactive.

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"
}

The key is read-only, your role on the domain lacks the required permission, or the domain’s plan does not include the feature.

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"
}

No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

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"
}