Delete an uptime monitor
const url = 'https://api.nsin.ir/uptime/monitors/1?domain=example.com';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/uptime/monitors/1?domain=example.com' \ --header 'Authorization: Bearer <token>'Requires domain.settings. The monitor’s open incident is resolved
without a recovery notification; its resolved incident history is kept,
because it is the record behind alerts you may still be reading.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Query Parameters
Section titled “Query Parameters ”The domain name (for example example.com). These endpoints take the
domain as a query parameter rather than a path segment.
Example
example.comResponses
Section titled “ Responses ”Deleted.
object
Example generated
{ "deleted": true}Invalid monitor id.
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 — or the owning account is inactive.
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 monitor on this domain. A monitor id belonging to another domain is reported the same way, so an id can never be used to probe another tenant.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "monitor not found"}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"}