User notifications

Method: user notifications list

Authorization is required. Group administrator's privileges required.

Request

HTTP request

GET https://<YOUR_DOMAIN>/api/v1/en_US/user/{userId}/notifications?groupId={groupId}

Parameters

property value description
userId guid The id of the user
groupId guid The elements group's ID

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [],
  "object": {
    "userId": "bec18635-4897-4e41-8012-8658e007df7e",
    "type": "userNotifications",
    "userEmail": "lottrobinson@isoplex.com",
    "accessWarnings": [],
    "typeGroups": [
      {
        "group": {
          "id": "5ecda199-615f-4597-8dff-89765cac9a42",
          "name": "Home",
          "slug": "Home",
          "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
          "url": "http://demo.hivesocialnow.com/Home/"
        },
        "notifications": [
          {
            "id": 1,
            "name": "All new group posts",
            "emailAlert": {
              "id": 0,
              "name": "None",
              "description": "Does not send email notifications"
            },
            "showScreenAlert": true,
            "showRedLabel": true
          }
        ]
      }
    ],
    "typePosts": [
      {
        "id": 3,
        "name": "New comments on post",
        "emailAlert": {
          "id": 2,
          "name": "Daily Digest",
          "description": "Sends notifications once a day"
        },
        "showScreenAlert": true,
        "showRedLabel": true,
        "post": {
          "id": "40082a31-8f43-4892-b3ab-e48a6effbcb9",
          "title": "Incididunt ullamco amet anim est adipisicing adipisicing consequat aliquip ad ipsum do qui.",
          "slug": "123",
          "url": "http://demo.hivesocialnow.com/Home/posts/123"
        },
        "group": {
          "id": "5ecda199-615f-4597-8dff-89765cac9a42",
          "name": "Home",
          "slug": "home",
          "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
          "url": "http://demo.hivesocialnow.com/Home/"
        }
      }
    ],
    "typeAuthors": [
      {
        "id": 8,
        "name": "New posts by author",
        "emailAlert": {
          "id": 2,
          "name": "Daily Digest",
          "description": "Sends notifications once a day"
        },
        "showScreenAlert": true,
        "showRedLabel": true,
        "author": {
          "id": "b3f5355c-4643-4c12-98d4-0d4aed216691",
          "alias": "cillum sint",
          "extendedAlias": "culpa culpa dolor elit aliquip",
          "slug": "Home",
          "avatarUrl": "http://demo.hivesocialnow.com/bigavatar/bc7fbf51-7930-4550-98b0-6a3ff6111ebe.jpg",
          "url": "http://demo.hivesocialnow.com/blog/GeorgiRaykov/site/profile/"
        }
      }
    ],
    "typePersonal": [
      {
        "id": 4,
        "name": "New private messages",
        "emailAlert": {
          "id": 0,
          "name": "None",
          "description": "Does not send email notifications"
        },
        "showScreenAlert": true,
        "showRedLabel": true
      }
    ],
    "digest": {
      "typeId": 1,
      "typeName": "Summary Daily digest"
    }
  }
}	

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

Here are presented just some of the available notifications. They are categories by the type of the notification and each type has its unique object properties. The property digest shows how the notifications are send to the user.

Method: upsert group notification

Authorization is required. Root group administrator's privileges required.

Request

HTTP request

POST https://<YOUR_DOMAIN>/api/v1/en_US/user/{userId}/notifications/group/{notificationId}

Parameters

property value description
userId guid The user for which you need to add or update a notification
notificationId integer The id of the notification that you need to add or update. Alternatives are:
  • 1 - All new group posts
  • 2 - All new group comments
  • 3 - All new/updated wiki documents
  • 4 - All new file documents
  • 5 - New comments to group's wiki document

Request body

property value description
groupId guid The id of the group to which to subscribe the user
emailAlertId integer The id of the notification. Alternatives are:
  • 0 - no email notification
  • 1 - instant email notification
  • 2 - import in the daily digest email notification
showScreenAlert boolean Whether to show a screen message as a small growl bubble on the right top corner of the screen, when the notification event happens
showRedLabel boolean Whether to add to the count on the red label

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "userRoleId",
      "value": "",
      "message": "Invalid user role Id"
    }
  ],
  "object": {
    "id": 1,
    "name": "All new group posts",
    "emailAlert": {
      "id": 0,
      "name": "None",
      "description": "Does not send email notifications"
    },
    "showScreenAlert": false,
    "showRedLabel": true
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

Method: upsert post notification

Authorization is required. Root group administrator's privileges required.

Request

HTTP request

POST https://<YOUR_DOMAIN>/api/v1/en_US/user/{userId}/notifications/post/{notificationId}

Parameters

property value description
userId guid The user for which you need to add or update a notification
notificationId integer The id of the notification that you need to update.

Request body

property value description
postId guid The id of the post to which to subscribe the user to be alerted on new comments
emailAlertId integer The id of the notification. Alternatives are:
  • 0 - no email notification
  • 1 - instant email notification
  • 2 - import in the daily digest email notification
showScreenAlert boolean Whether to show a screen message as a small growl bubble on the right top corner of the screen, when the notification event happens
showRedLabel boolean Whether to add to the count on the red label

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "userRoleId",
      "value": "",
      "message": "Invalid user role Id"
    }
  ],
  "object": {
    "id": 3,
    "name": "New comments on post",
    "emailAlert": {
      "id": 2,
      "name": "Daily Digest",
      "description": "Sends notifications once a day"
    },
    "showScreenAlert": true,
    "showRedLabel": true,
    "post": {
      "id": "40082a31-8f43-4892-b3ab-e48a6effbcb9",
      "title": "Incididunt ullamco amet anim est adipisicing adipisicing consequat aliquip ad ipsum do qui.",
      "slug": "123",
      "url": "http://demo.hivesocialnow.com/Home/posts/123"
    },
    "group": {
      "id": "5ecda199-615f-4597-8dff-89765cac9a42",
      "name": "Home",
      "slug": "home",
      "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
      "url": "http://demo.hivesocialnow.com/Home/"
    }
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

Method: upsert author notification

Authorization is required. Root group administrator's privileges required.

Request

HTTP request

POST https://<YOUR_DOMAIN>/api/v1/en_US/user/{userId}/notifications/author/{notificationId}

Parameters

property value description
userId guid The user for which you need to add or update a notification
notificationId integer The id of the notification that you need to add or update.
showScreenAlert boolean Whether to show a screen message as a small growl bubble on the right top corner of the screen, when the notification event happens
showRedLabel boolean Whether to add to the count on the red label

Request body

property value description
authorId guid The id of the author to which to subscribe the user to be alerted on new comments
emailAlertId integer The id of the notification. Alternatives are:
  • 0 - no email notification
  • 1 - instant email notification
  • 2 - import in the daily digest email notification
showScreenAlert boolean Whether to show a screen message as a small growl bubble on the right top corner of the screen, when the notification event happens
showRedLabel boolean Whether to add to the count on the red label

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": false,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "userRoleId",
      "value": "",
      "message": "Invalid user role Id"
    }
  ],
  "object": {
    "id": 8,
    "name": "New posts by author",
    "emailAlert": {
      "id": 1,
      "name": "Instant",
      "description": "Sends notifications instantly"
    },
    "showScreenAlert": false,
    "showRedLabel": true,
    "author": {
      "id": "b3f5355c-4643-4c12-98d4-0d4aed216692",
      "alias": "JohnDoe",
      "extendedAlias": "culpa culpa dolor elit aliquip",
      "slug": "Home",
      "avatarUrl": "http://demo.hivesocialnow.com/bigavatar/bc7fbf51-7930-4550-98b0-6a3ff6111ebe.jpg",
      "url": "http://demo.hivesocialnow.com/blog/GeorgiRaykov/site/profile/"
    }
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

Method: upsert personal notification

Authorization is required. Root group administrator's privileges required.

Request

HTTP request

POST https://<YOUR_DOMAIN>/api/v1/en_US/user/{userId}/notifications/personal/{notificationId}

Parameters

property value description
userId guid The user for which you need to add or update a notification
notificationId integer The id of the notification that you need to add or update.

Request body

property value description
emailAlertId integer The id of the notification. Alternatives are:
  • 0 - no email notification
  • 1 - instant email notification
  • 2 - import in the daily digest email notification
showScreenAlert boolean Whether to show a screen message as a small growl bubble on the right top corner of the screen, when the notification event happens
showRedLabel boolean Whether to add to the count on the red label

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "userRoleId",
      "value": "",
      "message": "Invalid user role Id"
    }
  ],
  "object": {
    "id": 4,
    "name": "New private messages",
    "emailAlert": {
      "id": 0,
      "name": "None",
      "description": "Does not send email notifications"
    },
    "showScreenAlert": true,
    "showRedLabel": true
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

Method: update digest settings

Authorization is required. Group administrator's privileges required.

Request

HTTP request

POST https://<YOUR_DOMAIN>/api/v1/en_US/user/{userId}/notifications/type-digest

Parameters

property value description
userId guid The user for which you need to change the digest settings

Request body

property value description
typeId integer The digest type. The alternatives are:
  • 1 - Summary Daily digest
  • 2 - Full Daily digest

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "userRoleId",
      "value": "",
      "message": "Invalid user role Id"
    }
  ],
  "object": {
    "typeId": 1,
    "typeName": "Summary Daily digest"
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.