Skip to content

Notify ​

How it works ​

Create a topic in the dashboard. Each topic has a secret URL. Send a message to that URL from a script, a server or a CI job, and on.dev sends it to every alert channel you have turned on. Every message is also kept in the topic's feed.

Use one topic per project or kind of event, for example Deploys, Signups or Backups. You can mute a topic or change its key without touching the others.

Sending a message ​

The request body is the message:

bash
curl -d "Deploy finished" https://on.dev/n/YOUR_TOPIC_KEY

Add a title, tags and a link with headers:

bash
curl https://on.dev/n/YOUR_TOPIC_KEY \
  -H "Title: New signup" \
  -H "Tags: signup,pro" \
  -H "Click: https://example.com/admin/users/42" \
  -d "ana@example.com upgraded to Pro"

Or send JSON:

bash
curl https://on.dev/n/YOUR_TOPIC_KEY \
  -H "Content-Type: application/json" \
  -d '{"title": "Backup failed", "message": "exit code 2 on db-1", "tags": ["backup"]}'

A GET works too, with the message in the query string. This is handy for tools that can only open a URL:

bash
curl "https://on.dev/n/YOUR_TOPIC_KEY?message=Backup%20done&tags=backup"

POST, PUT and GET are accepted. The headers can also be sent with an X- prefix (X-Title, X-Tags, X-Click), and the same names work as query parameters.

Fields ​

FieldHeaderLimit
messagethe request bodyRequired, up to 4,000 characters
titleTitleUp to 120 characters. Without one, the topic name is used.
tagsTags, comma separatedUp to 5, each up to 24 letters, digits, dots, dashes or underscores
clickClickAn http or https URL, up to 500 characters

The whole request can be up to 8 KB.

Responses ​

StatusMeaning
200Sent. The body is {"ok": true, "id": "msg_..."}.
400The message is empty or a field is invalid. The body says which.
403The request came from a web browser. See below.
404No topic has this key.
413The request is larger than 8 KB.
422The message looks like it contains a card number, password or private key.
429The topic sent more than 20 messages in a minute, or the account reached its monthly limit.

Servers and scripts only ​

Notify refuses requests from web browsers. Call the topic URL from your own server, not from JavaScript in a web page. This keeps a topic URL from being used to collect what visitors type into a page. For web forms, use Forms.

For the same reason, messages that contain a card number, a password (password: ...), a one-time code or a private key are refused.

Muting ​

A muted topic keeps messages in its feed but sends no alerts. Unmute it in the topic's settings.

Changing the key ​

If a topic URL leaks, open the topic's settings and choose Change key. The old URL stops working at once.

Webhooks ​

Webhook channels receive Notify messages with event: "notify.message". The data object carries the message:

json
{
  "event": "notify.message",
  "title": "New signup",
  "summary": "ana@example.com upgraded to Pro",
  "data": {
    "topicId": "top_...",
    "messageId": "msg_...",
    "topic": "Signups",
    "title": "New signup",
    "message": "ana@example.com upgraded to Pro",
    "tags": ["signup", "pro"],
    "click": "https://example.com/admin/users/42"
  }
}

Limits ​

FreePro
Topics550
Messages300 a month10,000 a month
Message history7 days90 days

Test messages sent from the dashboard count towards the monthly limit.