Get outage-detection settings
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
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.
Query parameters
- domainstringrequiredquery
The domain name (for example
example.com). These endpoints take the domain as a query parameter rather than a path segment.
Responses
200Current settings.
Content type: application/json
- enabledboolean
Whether outage alerts are sent for this domain.
- threshold_pctinteger
Per-minute origin-error percentage that counts as down.
- window_mininteger
Minutes the host must stay down before an incident opens.
- min_requestsinteger
Traffic floor — below this, no incident opens.
- min_active_mininteger
Minimum populated one-minute buckets required in the window.
- recover_mininteger
Consecutive clear minutes before an incident resolves.
- uptime_host_match_typestring
How
uptime_host_includes/uptime_host_excludesare read. Empty when no host filter is set, which is the default and means every subdomain is watched.One of:"""exact""wildcard""regex" - uptime_host_includesarray | null
Which subdomains the default whole-host watch covers.
nullor empty means all of them. Same syntax as a rule's host scope. - uptime_host_excludesarray | null
Subdomains excluded from the whole-host watch. Excludes beat includes.
- notify_emailboolean
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. - notify_smsboolean
Master switch for SMS alerts. Default
true. SMS also needs a plan withuptime_sms— on a plan without it no SMS is sent, whatever this says. - notify_webhookboolean
Whether outage events are POSTed to the domain's webhook. Default
false. - webhook_configuredboolean
Whether a webhook URL is saved. The URL itself and the signing secret are served by
GET /uptime/webhook, which needsdomain.settings. - boundsUptimeSettingsBounds
Valid range for each configurable field.
Fields
- threshold_pct_mininteger
Lowest accepted
threshold_pct. - threshold_pct_maxinteger
Highest accepted
threshold_pct. - window_min_mininteger
Lowest accepted
window_min. - window_min_maxinteger
Highest accepted
window_min. - min_requests_mininteger
Lowest accepted
min_requests. - recover_min_mininteger
Lowest accepted
recover_min. - recover_min_maxinteger
Highest accepted
recover_min.
{
"enabled": true,
"threshold_pct": 0,
"window_min": 0,
"min_requests": 0,
"min_active_min": 0,
"recover_min": 0,
"uptime_host_match_type": "",
"uptime_host_includes": [
"string"
],
"uptime_host_excludes": [
"string"
],
"notify_email": true,
"notify_sms": true,
"notify_webhook": true,
"webhook_configured": true,
"bounds": {
"threshold_pct_min": 0,
"threshold_pct_max": 0,
"window_min_min": 0,
"window_min_max": 0,
"min_requests_min": 0,
"recover_min_min": 0,
"recover_min_max": 0
}
}400The domain query parameter is missing.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "domain is required"
}401Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "invalid API key"
}404No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}429The key exceeded its request budget (300 requests per minute by default).
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "rate limit exceeded"
}Example request
curl -X GET "https://api.nsin.ir/uptime/settings?domain=example.com" \
-H "Authorization: Bearer $NSIN_API_KEY"