Skip to content

Send a test notification

POST
/v1/notifications/test
curl --request POST \
--url https://api.overwatch.weareheavy.dev/v1/notifications/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "webhook": { "kind": "slack", "url": "https://hooks.slack.com/services/T000/B000/XXXX" } }'

Deliver a one-off test message to a single target — exactly one of email or webhook — so a channel can be verified before relying on it. Sent synchronously: a 200 means the delivery succeeded, a 502 carries the delivery error. Unsaved targets can be tested too. Session-only, owner/admin.

Media typeapplication/json
object
email
string format: email
webhook

A notification webhook. slack, discord, and teams format the message for the respective chat app; http POSTs a structured JSON payload to any endpoint.

object
kind
required
string
Allowed values: slack discord teams http
url
required
string format: uri
Example
{
"webhook": {
"kind": "slack",
"url": "https://hooks.slack.com/services/T000/B000/XXXX"
}
}

The test message was delivered.

Media typeapplication/json
object
ok
required
boolean
Example
{
"ok": true
}

Provide exactly one of email or webhook, and it must be valid.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "provide exactly one of 'email' or 'webhook'"
}

Missing or invalid credentials.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "invalid api key"
}

A dashboard session is required (API-key callers are rejected), or the session’s role does not allow this action.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "a dashboard session is required"
}

Delivery failed (unreachable webhook, rejected email).

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "delivery failed: 404 from hooks.slack.com"
}