Send a test event to the uptime webhook
const url = 'https://api.nsin.ir/uptime/webhook/test?domain=example.com';const options = {method: 'POST', 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 POST \ --url 'https://api.nsin.ir/uptime/webhook/test?domain=example.com' \ --header 'Authorization: Bearer <token>'POSTs one test event to the saved URL — a single attempt, no retries —
and returns what happened. Works while the webhook is switched off.
Limited to one test every 10 seconds per domain. Requires
domain.settings.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ 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 ”The delivery. ok is false when the endpoint did not answer 2xx.
object
0 for a test delivery.
The event delivered.
Where it was sent.
Whether any attempt got a 2xx.
Status of the last attempt; 0 when there was no response.
Attempts made (up to 3).
Total time spent delivering, in milliseconds.
Why it failed, when it did.
Example
{ "event": "outage.opened"}The domain query parameter is missing, or no webhook URL is saved.
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. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
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 domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}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"}