Delete a redirect rule
DELETE
/domains/{domain}/rules/redirect/{ruleId}
const url = 'https://api.nsin.ir/domains/example.com/rules/redirect/1';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.nsin.ir/domains/example.com/rules/redirect/1 \ --header 'Authorization: Bearer <token>'Requires rules.edit.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” domain
required
string
The domain name (for example example.com) — not a numeric id.
Example
example.com ruleId
required
integer
Numeric id of the rule.
Responses
Section titled “ Responses ”Deleted.
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 domain or the rule does not exist, the rule belongs to another domain or another rule type, or your role does not permit this operation.
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"}