notifications

3 endpoints
PUT/rest/folders/{id}/actions/setNotifications

Set/Update notifications

Creates or updates the current user's notification subscription for the specified folder. Optionally applies the same settings to all nested subfolders. Returns HTTP 201 if a new subscription was created, or HTTP 200 if an existing one was updated.

Parameters
Path Parameters
id
Required
string

The unique identifier of the folder.

Query Parameters
includeNested
Optional
boolean

Set notification for nested folders as well

offset
Optional
integer

Offset

limit
Optional
integer

Limit

mode
Optional
string

Determines the detail level of the response body.


Request Body
fileAdded
integer

Number of files added to the notification

commentAdded
integer

Number of comments added to the notification

addLinks
boolean

Indicates whether HATEOAS links should be included in the response


Responses

Notification subscription set successfully.

objectId
string

Unique identifier of the folder included in the notification

fileAdded
integer

Number of files added to the notification

commentAdded
integer

Number of comments added to the notification

links
string[]

HATEOAS links associated with the entity

userId
Required
string

Unique identifier of the user who receives the notification

Unprocessable Content

Possible error codes: ERR_INPUT_NOT_INTEGER

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X PUT \
  "https://{instance}.kiteworks.com/rest/folders/:id/actions/setNotifications" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "fileAdded": 1,
         "commentAdded": 1,
         "addLinks": true
       }'
Python
import requests

id = "VALUE"  # The unique identifier of the folder.

url = f"https://{{instance}}.kiteworks.com/rest/folders/{id}/actions/setNotifications"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "fileAdded": 1,
  "commentAdded": 1,
  "addLinks": true
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())
Responses
{ "objectId": "f0e1d2c3-b4a5-6789-0fed-cba987654321", "userId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890", "fileAdded": 1, "commentAdded": 1 }
{ "errors": { "code": "ERR_INPUT_NOT_INTEGER", "message": "Input is not a valid integer" } }
// Error - No Body
GET/rest/notifications

List notifications

Returns a paginated list of notification subscriptions for the current user, including the folder each subscription is for and the enabled notification types.

Parameters
Query Parameters
userId
Optional
string

Filter notifications by the ID of the user who receives them.

userId:in
Optional
string

Filter notifications by the ID of the user who receives them.. Search for results that match any of the specified values for this parameter.

objectId
Optional
string

Filter notifications by the ID of the folder they are associated with.

objectId:in
Optional
string

Filter notifications by the ID of the folder they are associated with.. Search for results that match any of the specified values for this parameter.

fileAdded
Optional
boolean

Filter notifications triggered when a file is added.

commentAdded
Optional
boolean

Filter notifications triggered when a comment is added.

orderBy
Optional
string[]

Sorting options

offset
Optional
integer

Offset

limit
Optional
integer

Limit

with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

List of notification subscriptions retrieved successfully.

objectId
string

Unique identifier of the folder included in the notification

fileAdded
integer

Number of files added to the notification

commentAdded
integer

Number of comments added to the notification

links
string[]

HATEOAS links associated with the entity

userId
Required
string

Unique identifier of the user who receives the notification

total
integer

Total number of items available.

limit
integer

Maximum number of items returned per page.

offset
integer

Number of items skipped before the current page.

Request blocked by WAF

Empty response body.
Shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/notifications" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/notifications"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "objectId": "f0e1d2c3-b4a5-6789-0fed-cba987654321", "userId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890", "fileAdded": 1, "commentAdded": 0 } ], "metadata": { "total": 1, "limit": 50, "offset": 0 } }
// Error - No Body
DELETE/rest/notifications/{object_id}

Remove notification options

Unsubscribes the current user from all notifications for the specified folder.

Parameters
Path Parameters
object_id
Required
integer

Object ID of the folder to remove notification options


Responses

Notification subscription removed successfully.

Empty response body.

Forbidden

Possible error codes: ERR_ACCESS_USER

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X DELETE \
  "https://{instance}.kiteworks.com/rest/notifications/:object_id" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

object_id = "VALUE"  # Object ID of the folder to remove notification options

url = f"https://{{instance}}.kiteworks.com/rest/notifications/{object_id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
// Error - No Body