Skip to content
nsin docs

Get outage-detection settings

GET
/uptime/settings
curl --request GET \
--url 'https://api.nsin.ir/uptime/settings?domain=example.com' \
--header 'Authorization: Bearer <token>'

The domain’s outage-detection settings: the thresholds, with the valid range for each in bounds; the subdomain scope of the default whole-host watch (uptime_host_*); and the alert channels’ master switches (notify_email, notify_sms, notify_webhook) with webhook_configured. The switches gate every recipient at once — the owner and each member — on top of each person’s own notification preferences. The webhook URL and secret are not included here; read them with GET /uptime/webhook. Requires analytics.view.

domain
required
string

The domain name (for example example.com). These endpoints take the domain as a query parameter rather than a path segment.

Example
example.com

Current settings.

Media type application/json
object
enabled

Whether outage alerts are sent for this domain.

boolean
threshold_pct

Per-minute origin-error percentage that counts as down.

integer
window_min

Minutes the host must stay down before an incident opens.

integer
min_requests

Traffic floor — below this, no incident opens.

integer
min_active_min

Minimum populated one-minute buckets required in the window.

integer
recover_min

Consecutive clear minutes before an incident resolves.

integer
uptime_host_match_type

How uptime_host_includes / uptime_host_excludes are read. Empty when no host filter is set, which is the default and means every subdomain is watched.

string
Allowed values: "" exact wildcard regex
uptime_host_includes

Which subdomains the default whole-host watch covers. null or empty means all of them. Same syntax as a rule’s host scope.

Array<string> | null
uptime_host_excludes

Subdomains excluded from the whole-host watch. Excludes beat includes.

Array<string> | null
notify_email

Master switch for email alerts on this domain. It applies to the owner and to every member, on top of each member’s own preferences. Default true.

boolean
notify_sms

Master switch for SMS alerts. Default true. SMS also needs a plan with uptime_sms — on a plan without it no SMS is sent, whatever this says.

boolean
notify_webhook

Whether outage events are POSTed to the domain’s webhook. Default false.

boolean
webhook_configured

Whether a webhook URL is saved. The URL itself and the signing secret are served by GET /uptime/webhook, which needs domain.settings.

boolean
bounds

Valid range for each configurable field.

object
threshold_pct_min

Lowest accepted threshold_pct.

integer
threshold_pct_max

Highest accepted threshold_pct.

integer
window_min_min

Lowest accepted window_min.

integer
window_min_max

Highest accepted window_min.

integer
min_requests_min

Lowest accepted min_requests.

integer
recover_min_min

Lowest accepted recover_min.

integer
recover_min_max

Highest accepted recover_min.

integer
Example
{
"uptime_host_match_type": ""
}

The domain query parameter is missing.

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 missing
{
"error": "domain is required"
}

Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

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

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