Docs / Services

Webhook (Generic)

POST a notification payload to any HTTP/HTTPS endpoint — useful for custom integrations, internal APIs, or services not natively supported by notifly.

URL format

JSON over HTTP
json://host/path    (HTTP + JSON)
JSON over HTTPS
jsons://host/path   (HTTPS + JSON)
form over HTTP
form://host/path    (HTTP + form-encoded)
form over HTTPS
forms://host/path   (HTTPS + form-encoded)
Field Required Description
host Yes Hostname of the webhook endpoint
path No URL path (default: /)
scheme Yes json/jsons for JSON body, form/forms for form-encoded

Request body

The notification message is sent as the request body:

JSON body
// JSON body (json:// or jsons://)
{
  "title": "Your notification title",
  "body": "Your notification body",
  "type": "success"
}

Examples

typescript
import { notify } from '@ambersecurityinc/notifly';

// HTTPS JSON POST
await notify(
  { urls: ['jsons://hooks.myapp.com/notify'] },
  { title: 'Alert', body: 'Something happened', type: 'warning' }
);

// HTTP form POST (development/local)
await notify(
  { urls: ['form://localhost:3000/webhook'] },
  { body: 'Test notification' }
);

Quirks & limitations

  • Use jsons:// or forms:// (with s) for HTTPS — the scheme suffix controls protocol.
  • No authentication is added automatically — extend with a custom service if you need auth headers.
  • HTTP method is always POST.
  • For more control (custom headers, auth, method), use registerService() instead.
← Previous Email (SMTP) Next → Builder Overview