Send a test notification
const url = 'https://api.overwatch.weareheavy.dev/v1/notifications/test';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"webhook":{"kind":"slack","url":"https://hooks.slack.com/services/T000/B000/XXXX"}}'};
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.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.
Authorizations
Section titled “ Authorizations ”Request Bodyrequired
Section titled “ Request Bodyrequired ”object
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
Example
{ "webhook": { "kind": "slack", "url": "https://hooks.slack.com/services/T000/B000/XXXX" }}Responses
Section titled “ Responses ”The test message was delivered.
object
Example
{ "ok": true}Provide exactly one of email or webhook, and it must be valid.
object
A human-readable error message.
Example
{ "error": "provide exactly one of 'email' or 'webhook'"}Missing or invalid credentials.
object
A human-readable error message.
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.
object
A human-readable error message.
Example
{ "error": "a dashboard session is required"}Delivery failed (unreachable webhook, rejected email).
object
A human-readable error message.
Example
{ "error": "delivery failed: 404 from hooks.slack.com"}