Webhooks

Webhooks

Webhooks allow you to notify external systems that Raygun doesn't currently support when:

When a particular error or crash occurs, we will post a JSON payload to the URL you specify. This is configured on a per-app basis, so you can set different URLs to be sent webhook notifications for each application.

To do this, open an application in Raygun and go to Integrations from the left-hand side menu. On the Integrations page, click the Webhook button.

From that page, you can specify the endpoint the webhook will be delivered to, and enable/disable it.

Available events

When an error occurs

Every time an error notification arrives from your app, the webhook will be fired. 

The body of the POST is JSON, and will look like the following if the notification is of the NewErrorOccurred or ErrorReoccurred type:

{
  "event":"error_notification",
  "eventType":"NewErrorOccurred",
  "error": {
    "url":"http://app.raygun.io/error-url",
    "message":"",
    "firstOccurredOn":"1970-01-28T01:49:36Z",
    "lastOccurredOn":"1970-01-28T01:49:36Z",
    "usersAffected":1,
    "totalOccurrences":1,
    "instance": {
      "tags": ["test", "error-page", "v1.0.1", "env:staging"],
      "affectedUser": {
        "Identifier": "a9b7d84a-c0d3-4e7e-9ded-1ec13d033846",
        "IsAnonymous": true,
        "UUID": "a9b7d84a-c0d3-4e7e-9ded-1ec13d033846" 
      },
      "customData": {
        "pageName": "Error Page",
        "userLoggedIn": true
      }
    }
  },
  "application": {
    "name":"application name",
    "url":"http://app.raygun.io/application-url"
  }
}

Alternatively, if the error is of any other type it will look like the payload below: 

{
  "event":"error_notification",
  "eventType":"OneMinuteFollowUp",
  "error": {
    "url":"http://app.raygun.io/error-url",
    "message":"",
    "firstOccurredOn":"1970-01-28T01:49:36Z",
    "lastOccurredOn":"1970-01-28T01:49:36Z",
    "usersAffected":1,
    "totalOccurrences":1
  },
  "application": {
    "name":"application name",
    "url":"http://app.raygun.io/application-url"
  }
}

Event types

  • NewErrorOccurred [Contains error instance information]
  • ErrorReoccurred [Contains error instance information]
  • OneMinuteFollowUp
  • FiveMinuteFollowUp
  • TenMinuteFollowUp
  • ThirtyMinuteFollowUp
  • HourlyFollowUp

Status changes on an error group

The body of the POST is JSON, and will look like the following if the notification is of the StatusChanged type:

{
  "event":"error_activity",
  "eventType":"StatusChanged",
  "error": {
    "url":"https://app.raygun.com/error-url",
    "description":"Emma marked error Script Error as Ignored",
    "activityDate":"1970-01-28T01:49:36Z",
    "message": "Script Error",
    "status":"Ignored",
    "user":"Emma Cat"
  },
  "application": {
    "name":"Best App",
    "url":"http://app.raygun.io/application-url"
  }
}

Error group is assigned to a user

The body of the POST is JSON, and will look like the following if the notification is of the AssignedToUser type:

{
  "event":"error_activity",
  "eventType":"AssignedToUser",
  "error": {
    "url":"https://app.raygun.com/error-url",
    "description":"Error Script Error was assigned to Kyle by Amy",
    "activityDate":"1970-01-28T01:49:36Z",
    "message": "Script Error",
    "assignedTo":"Kyle Kenny"
    "user":"Amy Loondon"
  },
  "application": {
    "name":"application name",
    "url":"http://app.raygun.io/application-url"
  }
}

A comment is added to an error group

The body of the POST is JSON, and will look like the following if the notification is of the CommentAdded type:

{
  "event":"error_activity",
  "eventType":"CommentAdded",
  "error": {
    "url":"https://app.raygun.com/error-url",
    "description":"Anita left a comment on error Script Error, 'Ignoring these errors'",
    "activityDate":"1970-01-28T01:49:36Z",
    "message": "Script Error",
    "comment":"Ignoring these errors",
    "user":"Anita Peacock"
  },
  "application": {
    "name":"application name",
    "url":"http://app.raygun.io/application-url"
  }
}

If you'd like to see a particular webhook for an event added, contact us or add a feature request from within Raygun.

Documentation missing?

If we don't have documentation about your desired topic, send us a message and we'll create it for you.