How to use HockeyApp webhooks

Webhooks provide a lightweight mechanism for receiving notifications about new versions, crash groups, and feedback. HockeyApp sends a HTTP POST request to a specified URL for each notification. The post body is formatted as JSON dictionary with 5 default keys and 1 custom key depending of the notification type.

Each notification contains the following default keys:

  • title - the title of the notification, e.g. "New Feedback for My App"
  • url - direct link to the object on HockeyApp
  • public_identifier - the App ID of the respective app
  • sent_at - date when the notification was sent by HockeyApp, formatted as ISO 8601
  • type - the type of the notification; valid values are "app_version", "crash_reason", "feedback", and "ping"

The type defines the name of the custom key for this notification, e.g. "app_version". The value for this key is a dictionary with the same format as the HockeyApp API would return. Please find an example for each type here.

Note: A crash report must be fully symbolicated for iOS or de-obfuscate for Android with Proguard before it can be uploaded via a webhook.

Setup

You can set up a webhook as follows:

  1. Click on your app on the HockeyApp dashboard.
  2. Click on Manage App > Webhooks.
  3. Click on Create Webook.
  4. Enter a name and the URL of your server. If you want to test and inspect the webhook requests, you can use a service like requestb.in.
  5. Set the event checkboxes as desired.
  6. Confirm with Save.
  7. Click on Ping to send a ping request to your webhook.

Examples

Ping

{
  "public_identifier": "77839c6f415093209d5e93276d397777",
  "type": "ping",
  "ping": {
    "hello": "world"
  },
  "sent_at": "2013-08-02T14:15:01+00:00",
  "title": "Ping for MyApp",
  "url": "https://rink.hockeyapp.net/manage/apps/1234"
}

Version Released

{
  "public_identifier": "77839c6f415093209d5e93276d397777",
  "type": "app_version",
  "app_version": {
    "version": "1",
    "shortversion": "1.0",
    "title": "MyApp",
    "timestamp": 1375452901,
    "appsize": 0,
    "notes": "<p>This version includes many changes.</p>",
    "mandatory": false,
    "minimum_os_version": "4.2.1",
    "device_family": null,
    "id": 23,
    "app_id": 1234,
    "restricted_to_tags": false,
    "status": 2,
    "tags": null
  },
  "sent_at": "2013-08-02T14:15:01+00:00",
  "title": "New Version for MyApp",
  "url": "https://rink.hockeyapp.net/apps/77839c6f415093209d5e93276d397777/app_versions/23"
}

Crash Group Created

{
  "public_identifier": "77839c6f415093209d5e93276d397777",
  "type": "crash_reason",
  "crash_reason": {
    "id": 23,
    "app_id": 1234,
    "created_at": "2013-08-02T14:15:01Z",
    "updated_at": "2013-08-02T14:15:01Z",
    "status": 0,
    "reason": "ExampleCrashException",
    "last_crash_at": "2013-08-02T14:15:01Z",
    "fixed": false,
    "app_version_id": 23,
    "bundle_version": "1",
    "bundle_short_version": "1.0",
    "number_of_crashes": null,
    "method": "myMethod",
    "file": "MyClass.m",
    "class": "MyClass",
    "line": "42"
  },
  "sent_at": "2013-08-02T14:15:01+00:00",
  "title": "New Crash Group for MyApp",
  "url": "https://rink.hockeyapp.net/manage/apps/1234/crash_reasons/23"
}

Feedback Created or Updated

{
  "public_identifier": "77839c6f415093209d5e93276d397777",
  "type": "feedback",
  "feedback": {
    "name": "Joe Tester",
    "email": "joe@hockeyapp.net",
    "id": 23,
    "created_at": "2013-08-02T14:15:01Z",
    "messages": [
      {
        "subject": "Just a test",
        "text": "Lorem ipsum dolor sit amet, consectetur adipisicing elit.",
        "oem": null,
        "model": null,
        "os_version": null,
        "created_at": "2013-08-02T14:15:02Z",
        "id": 1,
        "token": "7c2715f1c2aca741f84c0ee7216c0c9c",
        "via": 0,
        "user_string": null,
        "internal": false,
        "clean_text": "Lorem ipsum dolor sit amet, consectetur adipisicing elit.",
        "name": "Joe Tester",
        "app_id": "77839c6f415093209d5e93276d397777"
      }
    ],
    "status": 0
  },
  "sent_at": "2013-08-02T14:15:02+00:00",
  "title": "New Feedback for MyApp",
  "url": "https://rink.hockeyapp.net/manage/apps/1234/feedback/23"
}