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.
Set it up
Section titled “Set it up”- Open Sources and choose Add a source.
- Pick Custom webhook and give it a name.
- 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 an alert
Section titled “Send an alert”Send a POST request with a JSON body to the link:
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.
What to put in the JSON
Section titled “What to put in the JSON”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 decides when you hear about it
Section titled “Status decides when you hear about it”| 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.
Group and de-duplicate
Section titled “Group and de-duplicate”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.
Limits
Section titled “Limits”- 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
200but drops the alert. See Plans.
If nothing arrives
Section titled “If nothing arrives”- Send a test with
"status": "failed". That interrupts you right away. - Check that notifications are allowed for Yoohoo on your phone.
- Open the Rules screen and check your level. An
infoalert only interrupts you on Everything, as it happens. - Look in the Feed. Every alert shows there, whether or not it sent a notification.