Skip to content
nsin docs

Send a test event to the uptime webhook

POST
/uptime/webhook/test
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.

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

The delivery. ok is false when the endpoint did not answer 2xx.

Media type application/json
object
id
integer
incident_id

0 for a test delivery.

integer
event

The event delivered.

string
Allowed values: outage.opened outage.resolved test
url

Where it was sent.

string
ok

Whether any attempt got a 2xx.

boolean
status_code

Status of the last attempt; 0 when there was no response.

integer
attempts

Attempts made (up to 3).

integer
duration_ms

Total time spent delivering, in milliseconds.

integer
error

Why it failed, when it did.

string
created_at
string format: date-time
Example
{
"event": "outage.opened"
}

The domain query parameter is missing, or no webhook URL is saved.

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

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

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