Update an uptime monitor
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
Partial update — omitted fields keep their current value, and an
explicit empty array clears a list. Requires domain.settings.
Disabling a monitor here closes its open incident silently: you turned the watch off, so no recovery notification is sent.
Path parameters
- idintegerrequiredpath
Query parameters
- domainstringrequiredquery
The domain name (for example
example.com). These endpoints take the domain as a query parameter rather than a path segment.
Request body
Content type: application/json · required
- namestring
- enabledboolean
Whether the monitor runs. New monitors are enabled.
Default:true - host_patternstring
Legacy single host filter; prefer
host_includes. - host_match_typestring
Required to be
exact,wildcardorregexonce a host filter is set; defaults towildcardif you set one without saying how to read it.One of:"""exact""wildcard""regex" - host_includesarray of string
Hostnames the monitor watches. Empty means every host of the domain.
- host_excludesarray of string
Hostnames carved out of
host_includes. - path_match_typestring
How
path_includes/path_excludesmatch.One of:"wildcard""regex"Default:"wildcard" - path_includesarray of string
Defaults to
["/*"]when empty. - path_excludesarray of string
Paths carved out of
path_includes.
Responses
200The updated monitor.
Content type: application/json
- idinteger
- domain_idinteger
- namestring
Optional label, up to 64 characters. It is what the outage SMS and the incident list call this watch, so a domain with two monitors on one host sends two distinguishable alerts.
- enabledboolean
- host_patternstring
Legacy single-entry host scope, kept for parity with rules. It is folded into
host_includeswhen the scope is compiled. - host_match_typestring
Empty when the monitor has no host scope, i.e. it watches every subdomain.
One of:"""exact""wildcard""regex" - host_includesarray | null
nullor empty means every subdomain of this domain. - host_excludesarray | null
Excludes beat includes.
- path_match_typestring
How the path lists are read.
One of:"wildcard""regex" - path_includesarray of string
Request paths this monitor watches. Defaults to
["/*"]— every path — when you send an empty list. - path_excludesarray of string
Paths dropped from the scope. Excludes beat includes.
- created_atstring (date-time)
- updated_atstring (date-time)
{
"id": 0,
"domain_id": 0,
"name": "string",
"enabled": true,
"host_pattern": "string",
"host_match_type": "",
"host_includes": [
"string"
],
"host_excludes": [
"string"
],
"path_match_type": "wildcard",
"path_includes": [
"string"
],
"path_excludes": [
"string"
],
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z"
}400The domain query parameter is missing, the body is malformed, a scope
entry is too long, a regex entry does not compile, the monitor narrows
nothing, or the domain is already at its monitor cap.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "a monitor must narrow something: set a subdomain scope or a path scope"
}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"
}403The key is read-only, your role on the domain lacks the required permission, or the domain's plan does not include the feature.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}404No 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.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "monitor not found"
}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 PUT "https://api.nsin.ir/uptime/monitors/0?domain=example.com" \
-H "Authorization: Bearer $NSIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"enabled": true,
"host_pattern": "string",
"host_match_type": "",
"host_includes": [
"string"
],
"host_excludes": [
"string"
],
"path_match_type": "wildcard",
"path_includes": [
"string"
],
"path_excludes": [
"string"
]
}'