Skip to content

Update outage-detection settings

PUT
/uptime/settings
curl --request PUT \
--url 'https://api.nsin.ir/uptime/settings?domain=example.com' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "enabled": true, "threshold_pct": 1, "window_min": 1, "min_requests": 1, "min_active_min": 1, "recover_min": 1 }'

Partial update — omitted fields keep their current value. Values are clamped to the ranges reported in bounds. Requires domain.settings.

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
Media type application/json

Every field is optional; omitted fields keep their current value.

object
enabled
boolean
threshold_pct
integer
window_min
integer
min_requests
integer
min_active_min
integer
recover_min
integer
Example generated
{
"enabled": true,
"threshold_pct": 1,
"window_min": 1,
"min_requests": 1,
"min_active_min": 1,
"recover_min": 1
}

Updated 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
bounds

Valid range for each configurable field.

object
threshold_pct_min
integer
threshold_pct_max
integer
window_min_min
integer
window_min_max
integer
min_requests_min
integer
recover_min_min
integer
recover_min_max
integer
Example generated
{
"enabled": true,
"threshold_pct": 1,
"window_min": 1,
"min_requests": 1,
"min_active_min": 1,
"recover_min": 1,
"bounds": {
"threshold_pct_min": 1,
"threshold_pct_max": 1,
"window_min_min": 1,
"window_min_max": 1,
"min_requests_min": 1,
"recover_min_min": 1,
"recover_min_max": 1
}
}

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 — 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 key is read-only, your role on the domain lacks the required permission, or the domain’s plan does not include the feature.

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