Skip to content

Switch a gateway off

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

Deletes the record this gateway created and removes it from the zone. This is the only way to remove a gateway record. Requires records.edit.

domain
required
string

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

Example
example.com
gatewayId
required
integer

Numeric id of the gateway, from the gateway list.

Switched off.

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

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

Domain not found, or this gateway is not on for it.

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