Skip to content

Purge the entire cache for a domain

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

Removes every cached entry for the domain.

The sweep runs in the background: a 202 means it was queued and deleted is not yet known. Requires cache.edit and a plan including cache purge.

domain
required
string

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

Example
example.com

Purge completed synchronously — nothing was cached.

Media type application/json
object
deleted
integer
accepted

The purge was queued to run in the background, so deleted is not yet known.

boolean
Example generated
{
"deleted": 1,
"accepted": true
}

Purge queued; it runs in the background.

Media type application/json
object
deleted
integer
accepted

The purge was queued to run in the background, so deleted is not yet known.

boolean
Example generated
{
"deleted": 1,
"accepted": true
}

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

Read-only key, insufficient role, or cache purge is not on the plan.

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 domain is disabled.

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