Webhooks

You can provide us a webhook endpoint and we will send real time notifications data to you in processed format or raw format. We trigger a notification whenever an action type occurs on a comment.

List of Action Types

Action TypeDescription
addedWhen a new comment is added
updatedWhen an existing comment gets updated
deletedWhen an existing comments gets deleted
approvedWhen the comment is approved by the moderator. This is only applicable if you have turned on Moderator Mode.
assignedWhen a comment gets assigned to a user
reopenedWhen a closed comment gets reopened
statusChangedWhen a comment has its status changed (e.g. in progress, resolved, opened)
priorityChangedWhen a comment has its priority changed (e.g. P0, P1, P2 or custom set priorities)

Setting up a Webhook

To enable Webhooks go to the Configurations -> Webhook Service in the Velt Console, or click here

Then provide the following:

  • Webhook Auth Token - this is an optional security feature. You can generate and set a unique auth token(string) on your velt console in the webhooks setting. We will add that to the authorization header whenever we are making a post request to your endpoint. This is so that you can validate that the request is coming from us and not a spammer.

  • Processed Notification URL - endpoint for processed notifications, usually hosted on your server and is used to process the incoming body data in Processed Format

  • Raw Notification URL - endpoint for processed notifications, usually hosted on your server and is used to process the incoming body data in Raw Format

Processed vs Raw Formats

The Raw Format contains lot more metadata that might not be very useful for your notification processing.

In the Processed Format, we will automatically populate who should get what type of notification so that you dont have to write that logic. Eg: If someone was previously tagged on a comment, then they should receive an update notification vs if someone if tagged in this thread, then they should receive a notification that they were tagged in a comment. We recommend using this so that you dont have to maintain the logic on your end.

Processed format

FieldTypeRequiredDescription
fromUserYesThe user who added, updated or deleted the target Comment.
commentTextstringOptionaltext for the added, updated or deleted Comment. This is empty when entire CommentAnnotation is deleted.
toContactsTaggedUserContact[]OptionalList of user contacts that are tagged to the target Comment.
toContactsUpdatedUserContact[]OptionalList of user contacts that are on the target CommentAnnotation. This excludes all the user contacts that are on the target Comment.
pageTitlestringYesTitle of the page on which the target CommentAnnotation is present.
pageUrlstringYesFull URL of the page on which the target CommentAnnotation is present.
actionTypestringYesThis can have 5 values: added, updated, deleted, resolved, approved

Raw format

FieldTypeRequiredDescription
commentAnnotationCommentAnnotationYesThe target CommentAnnotation object on which the event happened.
targetCommentCommentOptionalThe target Comment object on which the event happened. This field will not be present if the event was at CommentAnnotation level. Eg: deleted the entire comment annotation, resolved comment, approved comment.
actionTypestringYesThis can have 5 values: added, updated, deleted, resolved, approved
{
  "from": {
    "color": "#FFD600",
    "contacts": [
      {
        "email": "john.doe@snippyly.com",
        "name": "John Doe",
        "photoUrl": "https://i.pravatar.cc/300",
        "userId": "d5558f1f-bdea-4eb5-9fd5-ed657e460307",
        "visibility": "group"
      },
      {
        "email": "mary.doe@snippyly.com",
        "name": "Mary Doe",
        "photoUrl": "https://i.pravatar.cc/300",
        "userId": "d5558f1f-bdea-4eb5-9fd5-ed657e460308",
        "visibility": "group"
      }
    ],
    "email": "ben@velt.dev",
    "groupId": "admins",
    "name": "ben",
    "photoUrl": "https://media.licdn.com/dms/image/C5603AQHgHt3GquPb0g/profile-displayphoto-shrink_400_400/0/1650605489047?e=1696464000&v=beta&t=9056kSSbnv5pNtD6IfTKJ6Facx5LV7myV2FwE5sEv7A",
    "type": "signedIn",
    "userId": "123ben",
    "userSnippylyId": "4658641886513752"
  },
  "commentText": "test",
  "commentTextFrom": {
    "color": "#FFD600",
    "contacts": [
      {
        "email": "john.doe@snippyly.com",
        "name": "John Doe",
        "photoUrl": "https://i.pravatar.cc/300",
        "userId": "d5558f1f-bdea-4eb5-9fd5-ed657e460307",
        "visibility": "group"
      },
      {
        "email": "mary.doe@snippyly.com",
        "name": "Mary Doe",
        "photoUrl": "https://i.pravatar.cc/300",
        "userId": "d5558f1f-bdea-4eb5-9fd5-ed657e460308",
        "visibility": "group"
      }
    ],
    "email": "ben@velt.dev",
    "groupId": "admins",
    "name": "ben",
    "photoUrl": "https://media.licdn.com/dms/image/C5603AQHgHt3GquPb0g/profile-displayphoto-shrink_400_400/0/1650605489047?e=1696464000&v=beta&t=9056kSSbnv5pNtD6IfTKJ6Facx5LV7myV2FwE5sEv7A",
    "type": "signedIn",
    "userId": "123ben",
    "userSnippylyId": "4658641886513752"
  },
  "toContactsTagged": [],
  "toContactsUpdated": [],
  "pageTitle": "",
  "pageUrl": "https://mixpanel-demo.vercel.app/?username=ben&scommentId=-NdDJhxEEljnpY-n8gH6",
  "actionType": "added",
  "status": {
    "color": "#625DF5",
    "id": "OPEN",
    "lightColor": "#E7E8FA",
    "name": "Open",
    "svg": "\n      <svg\n        width=\"16\"\n        height=\"16\"\n        viewBox=\"0 0 16 16\"\n        fill=\"none\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n      >\n        <path\n          fill-rule=\"evenodd\"\n          clip-rule=\"evenodd\"\n          d=\"M8.00016 13.3333C10.9457 13.3333 13.3335 10.9455 13.3335 8.00001C13.3335 5.05449 10.9457 2.66668 8.00016 2.66668C5.05464 2.66668 2.66683 5.05449 2.66683 8.00001C2.66683 10.9455 5.05464 13.3333 8.00016 13.3333ZM8.00016 14.6667C11.6821 14.6667 14.6668 11.6819 14.6668 8.00001C14.6668 4.31811 11.6821 1.33334 8.00016 1.33334C4.31826 1.33334 1.3335 4.31811 1.3335 8.00001C1.3335 11.6819 4.31826 14.6667 8.00016 14.6667Z\"\n          fill=\"currentColor\"\n        />\n      </svg>\n      ",
    "type": "default"
  },
  "notificationSource": "comment",
  "slackChannelId": "",
  "documentId": "7528509053768138",
  "clientDocumentId": "mixpanel-demo",
  "deviceInfo": {
    "browserName": "Chrome",
    "browserVersion": "116",
    "deviceType": "Desktop",
    "orientation": "landscape",
    "osName": "Macintosh",
    "osVersion": "10.15.7",
    "screenHeight": 982,
    "screenWidth": 1512,
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
  }
}