Docs
Everything bonk does fits on this page.
Your URL
The app shows your URL: https://trybonk.com/to/b_…. The part after /to/ is your secret. Treat it like a password. If it leaks, tap Regenerate URL in the app and the old one stops working immediately.
Send a notification
POST to your URL. The body becomes the notification text:
POST https://trybonk.com/to/<secret>
curl -d "deploy finished" https://trybonk.com/to/b_YOUR_SECRET
Send JSON to set a title or attach a link:
curl https://trybonk.com/to/b_YOUR_SECRET \
-H "Content-Type: application/json" \
-d '{"title":"CI","body":"main is green","url":"https://github.com"}'
title(up to 100 characters, optional): defaults to “bonk”.body(up to 2,000 characters, optional): the notification text.url(up to 2,000 characters, optional): must start withhttp://orhttps://. Tapping the notification opens it.
Without Content-Type: application/json, the whole body is the notification text and the title is “bonk”. Title, body and url together must stay under 3,500 bytes, and requests are capped at 16 KB.
Send to several phones
Separate secrets with commas, up to 20 per request:
curl -d "server down" https://trybonk.com/to/b_FIRST,b_SECOND,b_THIRD
Unknown secrets are skipped. The response tells you how many phones accepted it.
Responses
200: Handed to the push service. The body is{"sent": n}, the number of phones accepted. It doesn't confirm the phone showed it.400: Invalid body, a field over its limit, the notification over 3,500 bytes, or more than 20 secrets.404: None of the secrets exist.429: Rate limited. Wait the number of seconds inRetry-After.502: The push service didn't answer. Retry with backoff; a retry can rarely deliver the notification twice.
Limits
Each phone accepts 60 notifications per minute. When you send to several phones, any phone over its limit is skipped; you get 429 only when all of them are. Requests with unknown secrets are limited to 30 per minute per IP address.
Examples
JavaScript
await fetch("https://trybonk.com/to/b_YOUR_SECRET", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ title: "Backup", body: "Nightly backup done" }),
});
Python
import urllib.request
urllib.request.urlopen("https://trybonk.com/to/b_YOUR_SECRET", data=b"Nightly backup done")
Go
http.Post("https://trybonk.com/to/b_YOUR_SECRET", "text/plain", strings.NewReader("Nightly backup done"))
When a long command finishes
make build; curl -d "build exited with $?" https://trybonk.com/to/b_YOUR_SECRET
Using bonk from scripts and agents
- The secret is a credential. Read it from an environment variable; never log it or commit it.
- Delivery is best effort. Don't use bonk for safety-critical alerts.
- bonk doesn't store messages, but they aren't end-to-end encrypted.