← Back to Pushany

🔔 Get notified with webhooks

Create a webhook URL, and whatever is sent to it arrives in your tray with a notification. It works with any service that lets you set a webhook URL, such as GitHub, monitoring services, home automation, IFTTT and Zapier.

First, in Pushany go to Settings → Integrations → Webhooks, tap “Create URL” and enter a name (for example, GitHub). Copy the URL that appears and paste it into the sending service as the webhook URL. The URL is shown only once. If you lose it, delete it and create a new one.

⚠️ Anyone who knows the URL can send to it, so keep it to yourself. What’s sent reaches our server unencrypted. The server encrypts it as soon as it arrives and stores only the encrypted version.

Sending

Send a POST request to the URL. The simplest way is to put plain text in the body.

curl -d "Backup finished" ""

Send JSON to set a title and body separately. Include a URL and it arrives as a link.

curl -H "Content-Type: application/json" \
  -d '{"title": "Server", "message": "Disk space is below 10%", "url": "https://example.com/status"}' \
  ""

How the content is read

Titletitle or subject
BodyThe first of message, body, text, content and description
URLurl or link

Choosing what to show

Add the following to the end of the URL to set the title, body and link. {{field}} is replaced with that value from the JSON you receive. Use . for nested fields and numbers (starting at 0) for arrays.

titleTitle
bodyBody
urlLink URL
memo=1Save to your tray without a notification

Example: GitHub push events showing who pushed and the latest commit message

…/api/hooks/ph_…?title={{pusher.name}}&body={{head_commit.message}}&url={{compare}}

Some services require { and } to be URL-encoded (%7B and %7D).

Using it with GitHub

  1. On GitHub, open Settings → Webhooks → Add webhook for the project you want notifications from.
  2. For Payload URL, paste the URL with title and body added, as in the example above.
  3. For Content type, choose application/json. You can leave Secret empty.
  4. Choose the events you want to be notified about, then click Add webhook.

Limits

Troubleshooting