Skip to content

Custom webhook

A custom webhook gives you a private link. Send it JSON from any service or script, and Yoohoo turns each message into an alert.

  1. Open Sources and choose Add a source.
  2. Pick Custom webhook and give it a name.
  3. Copy the private link.

Anyone with the link can send alerts to you, so keep it to yourself. If it leaks, delete the source and add a new one.

Send a POST request with a JSON body to the link:

Terminal window
curl -X POST "YOUR_PRIVATE_LINK" \
-H "Content-Type: application/json" \
-d '{
"title": "Deploy failed",
"message": "Build step exited with code 1",
"status": "failed",
"url": "https://ci.example.com/runs/4821"
}'

The same thing from JavaScript:

await fetch(process.env.YOOHOO_WEBHOOK_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
title: "Backup finished",
status: "ok",
message: "2.1 GB in 3 minutes",
}),
});

A reply of 200 means Yoohoo has the alert.

You don’t need a fixed format. Yoohoo looks for common field names and uses the first one it finds.

Part of the alert Field names
Title title, subject, event, type, name, headline
Summary message, summary, text, description, body, detail
Status status, level, severity, state, result
Link url, link, href (web addresses only)
Time timestamp, time, createdAt, created_at, date

Yoohoo shows up to eight other text, number and true/false fields on the alert as facts. A field such as branch or duration appears that way.

Status you send What happens
failed, error, critical, down, crash Interrupts you right away
waiting, or anything with needs or approval Interrupts you right away
info, or no status Waits for the 6 pm roundup
ok, success, passed, resolved Stays quiet, and settles earlier alerts in the same group

Your rules and quiet hours still apply. During quiet hours, an alert that would interrupt waits for the roundup, unless it’s a failure and Failures break through is on.

Yoohoo keeps alerts with the same group value together. If you send a failed alert and later an ok alert with the same group, Yoohoo marks the failure settled.

If you send an id field or an Idempotency-Key header, Yoohoo ignores any repeat of the same value, so retrying a request is safe.

  • The body must be JSON and no larger than 256 KB.
  • A link that doesn’t exist returns 404. Check that you copied all of it.
  • If your plan pauses the source, Yoohoo replies 200 but drops the alert. See Plans.
  1. Send a test with "status": "failed". That interrupts you right away.
  2. Check that notifications are allowed for Yoohoo on your phone.
  3. Open the Rules screen and check your level. An info alert only interrupts you on Everything, as it happens.
  4. Look in the Feed. Every alert shows there, whether or not it sent a notification.