Skip to main content
Delivery settings decide where a monitor sends a new match: email, a webhook, or both. You create them once for your organization and attach them to monitors by ID. In the dashboard they are under Monitoring → Delivery settings. Email uses up to three pieces. Recipients are the addresses it goes to. A template sets the subject and body. A sender is your own mail server, and it is optional: without one, email goes out through the platform’s mail server. A webhook is one signed HTTP POST per match. Delivery is a notification, not the record. Every match is stored and readable through the match endpoints whether delivery succeeds or not. Neither email nor webhooks are retried.

Availability and cost

Availability: recipients, the system Default Template and the platform’s mail server are on every plan with a license in force. Your own templates and senders need the Custom Email Server plan feature. Webhooks need the Webhooks plan feature. Cost: no metered allowance and no capacity slots. Each organization can hold up to 200 recipients, 200 senders and 10 webhooks. Templates have no cap. Without the plan feature, these calls return 403:
  • Every webhook call (list, create, read, update and delete) needs Webhooks.
  • Creating, updating and deleting senders and templates needs Custom Email Server. Listing and reading them is open on every plan.
These calls return the same body when your license is not in force. Every other delivery call returns 403 with {"detail": "Your license is not active."} instead. A 429 here is the rate limit or the API Calls allowance described in Rate limits.

How defaults work

Recipients, senders, templates and webhooks each carry an is_default flag. Once your organization has at least one item of a type, exactly one of them is the default:
  • The first item you create becomes the default. For templates, the system Default Template starts as the default, so a template you create becomes the default only when you send is_default: true.
  • Setting is_default: true on another item moves the flag to it.
  • You cannot clear the flag on the default directly. Set another item as default instead. Sending is_default: false for the current default returns 400.
  • When you delete the default, the most recently created remaining item becomes the default.
The API never attaches a default to a monitor for you. A monitor uses exactly the IDs you send.

Recipients

A recipient is an email address. Create one with alert_system_setting_create_recipient. Both fields are required.
This was the organization’s first recipient, so it became the default. Pass its id in a monitor’s recipients.
  • Up to 200 recipients per organization. The 201st returns 400 with You can only have 200 recipient emails.
  • alert_system_setting_update_recipient is a PUT that takes the same two fields.
  • The API does not check for duplicates: an address that already exists is added again as a new recipient. List recipients first and reuse the existing id.
  • A recipient that a monitor uses cannot be deleted. The call returns 400 with Cannot delete recipient email. It is currently used by the following alert rules: and the monitor names. Remove it from those monitors, or delete them, first.

Email templates

A template is the subject and HTML body of the email. The platform sends body exactly as it is stored, with the placeholders filled in. It adds no layout, logo or button of its own. The designed layout in the dashboard’s template editor is HTML that the dashboard writes into body when you save a template there, so a template saved in the dashboard returns that full HTML, and a template you create through the API sends only the HTML you write. Every organization has a system-created Default Template with is_system_created: true. It works on every plan, and it cannot be deleted. Find its id with alert_system_setting_get_template_list:
With Custom Email Server you can write your own. alert_system_setting_create_template and alert_system_setting_update_template take name, subject, body and is_default, all required.
The body must contain five placeholders, or the call returns 400 naming the missing ones. The platform fills them in the subject and the body when it sends: Two more placeholders are optional: {total_results} (every result, excluded ones included) and {excluded_count}. Send body on one line. If it contains any newline, the platform wraps each block separated by a blank line in <p>, turns every other newline into <br> and removes the newlines. It does this to HTML too, so a multi-line HTML body gains stray line breaks. A template that a monitor uses cannot be deleted. The call returns 400 with Cannot delete email template. It is currently used by the following alert rules: and the monitor names.

Senders

A sender is your own SMTP server. Without one, a monitor’s sender stays null and email goes out through the platform’s mail server. Your own sender needs Custom Email Server. alert_system_setting_create_sender requires every field, including username and password when authentication_required is false:
encryption_method picks how the connection is secured:
  • SSL opens an encrypted connection from the first byte (implicit TLS). Mail servers usually offer it on port 465.
  • TLS connects in plain text, then upgrades with STARTTLS before logging in. Mail servers usually offer it on port 587.
alert_system_setting_update_sender is a PUT that requires every field again, password included. Up to 200 senders per organization: the 201st returns 400 with You can only have 200 sender emails. A sender that a monitor uses cannot be deleted. The call returns 400 with Cannot delete sender email. It is currently used by the following alert rules: and the monitor names. Test a sender before a monitor depends on it. alert_system_setting_test_email sends a short plain-text message through the sender:
The call returns 202 with {"status": "success"} once the message is queued. It does not report whether the message arrived, so check the inbox. A sender_id that is not yours returns 400.

Webhooks

A webhook receives each delivered match as one HTTP POST. Webhooks need the Webhooks plan feature. Create one with alert_system_setting_create_webhook. All four fields are required.
  • url — a valid URL of up to 2,048 characters.
  • headers — a JSON object sent with every delivery. Send {} for none. The platform always sets Content-Type, User-Agent and X-AlertSystem-Signature itself, and those win over a custom header with the same name.
  • secret — 64 hexadecimal characters, generated by the platform and read-only. A value you send is ignored, and an update never changes it. For a new secret, create a new webhook, point your monitors at it, then delete the old one.
Up to 10 webhooks per organization. A webhook that a monitor uses cannot be deleted: the call returns 400 and names the monitors. Point them at another webhook, or delete them, first.

The payload

Every URL that is not Slack, Discord or Microsoft Teams receives this JSON:
The payload tells you that a match exists. It does not carry the results. Fetch them by match_detail_id, as described in Read and triage matches.

Chat platforms

The platform picks a message format from the webhook URL: For Microsoft Teams, use the channel workflow Send webhook alerts to a channel and paste the URL it generates. The chat formats carry no match_detail_id or alert_rule_id. To process matches in code, use a generic URL.

Verify the signature

Every request carries X-AlertSystem-Signature: sha256= followed by a hex HMAC-SHA256 of the raw request body, keyed with the webhook’s secret. Check it before you trust the payload:
  1. Read the raw body bytes exactly as received, before any JSON parsing.
  2. Compute the HMAC-SHA256 of those bytes with your secret.
  3. Compare it, in constant time, with the header value after the sha256= prefix.
  4. Reject a mismatch. Return any 2xx to accept the delivery.
Requests also carry Content-Type: application/json and User-Agent: AlertSystem/1.0.

Delivery behavior

  • One POST per match, sent right after the run that recorded it.
  • Only matches with at least one result that is not excluded are sent.
  • The platform waits 30 seconds for an answer. Any 2xx counts as delivered.
  • A failed or slow delivery is not retried, and the API keeps no record of it. Read missed matches from the match list.

Bounced emails

The platform sends one message per recipient. When the mail server refuses the message for a recipient, the platform records a bounced email with the server’s reason. When it cannot connect to or log in to the sender, nothing is sent and nothing is recorded, so use the test message to check a sender. alert_system_setting_get_bounced_email_list returns bounces newest first, in pages:
Each bounce has id, alert_rule (the monitor ID), match_detail (the match ID), recipient_email, sender_email, reason and creation_date. Read one with alert_system_setting_get_bounced_email_detail and remove one with alert_system_setting_delete_bounced_email.

Endpoints