files

65 endpoints
DELETE/rest/files

Delete files

Deletes the specified files. Depending on the system retention policy, the files may be
recoverable until permanently deleted by the system.

Requires file_delete permission
on the parent folder for each file.

Parameters
Query Parameters
id:in
Required
string

A comma-separated list of unique identifiers for the entities to be processed.. A comma-separated list of unique identifiers for the entities to be processed.

partialSuccess
Optional
boolean

If set to true, the operation will continue for the valid items even if some items result in failure.

mode
Optional
string

Determines the detail level of the response body.


Responses

Files successfully deleted.

Empty response body.

Forbidden

Possible error codes: ERR_ENTITY_LOCKED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X DELETE \
  "https://{instance}.kiteworks.com/rest/files?id:in=VALUE" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/files"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
params = {
    "id:in": "VALUE",
}
response = requests.delete(url, params=params, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } }
// Error - No Body
POST/rest/files/actions/copy

Copy files

Description:

Copies the specified files to a folder.

Precondition:

Must be assigned the `file_copy` permission for the files being copied and `file_add` permission for the destination folder.

Response:

Copies the files to the folder. If duplicate files exist, appends a number to copied file names.
Parameters
Query Parameters
returnEntity
Optional
boolean

If true, includes the entity in the response body.

with
Optional
string

Specifies additional fields to include in the response.

mode
Optional
string

Determines the detail level of the response body.

id:in
Optional
string[]

Comma-separated list of file UUIDs to copy. Cannot be used together with ids in the request body.

partialSuccess
Optional
boolean

If true, successfully copied files are committed even if some files fail to copy.


Request Body
ids
string[]

List of file UUIDs to copy. Cannot be used together with id:in in the query string.

destinationFolderId
Required
string

UUID of the destination folder to copy the files into.

replace
boolean

If true, overwrites existing files in the destination folder if they share the same name.

newFileName
string

New name for the copied file. Only applicable when copying a single file into the same folder to avoid a name conflict.


Responses

Files have been copied successfully.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_FILTER

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ACCESS_DENIED, ERR_ENTITY_DELETED, ERR_ENTITY_COPIED_FROM_EC, ERR_ENTITY_EC_TO_EC, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_VIRUS_FOUND, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_RESTRICTED_TYPE, ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_IS_MY_DIR

code
string

Error code

message
string

Error message

Content Too Large

Possible error codes: ERR_SYSTEM_NO_STORAGE_AVAILABLE

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/files/actions/copy" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "ids": [
         "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
       ],
         "destinationFolderId": "string",
         "replace": true,
         "newFileName": "string"
       }'
Python
import requests

url = "https://{instance}.kiteworks.com/rest/files/actions/copy"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "ids": [
  "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
],
  "destinationFolderId": "string",
  "replace": true,
  "newFileName": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "parentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "string", "type": "string", "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "creator": {} }
{ "errors": [ { "code": "ERR_REQUEST_INVALID_FILTER", "message": "Filter validation failed" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ACCESS_DENIED", "message": "Your access is denied.", "redirectUrl": "/login?code=3317" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_ENTITY_COPIED_FROM_EC", "message": "Can not perform action on file copied from Repositories Gateway source" } ] }
{ "errors": [ { "code": "ERR_ENTITY_EC_TO_EC", "message": "Unable to copy/move Repositories Gateway file to Repositories Gateway" } ] }
{ "errors": [ { "code": "ERR_ENTITY_NOT_SCANNED", "message": "One or more files are undergoing security and privacy scans. Please try again later." } ] }
{ "errors": [ { "code": "ERR_ENTITY_VIRUS_FOUND", "message": "File is infected" } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_TYPE", "message": "The specified entity mime type is not allowed." } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_BASE_DIR", "message": "Operation not permitted on Base Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_MY_DIR", "message": "Operation not permitted on Tray Folder" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_STORAGE_AVAILABLE", "message": "Folder owner's remaining storage quota does not permit for a file upload of this size." } ] }
// Error - No Body
PATCH/rest/files/actions/lock

Lock files

Description:

Locks the specified files, preventing others from performing actions such as editing, moving, and deleting the files.

Precondition:

Must be assigned the `lock` permission for the files.

Response:

Locks the files.
Parameters
Query Parameters
id:in
Optional
string[]

A comma-separated list of unique identifier (UUID) of the objects to be processed.

returnEntity
Optional
boolean

If true, includes the entity in the response body.

with
Optional
string

Specifies additional fields to include in the response.

mode
Optional
string

Determines the detail level of the response body.

partialSuccess
Optional
boolean

If set to true, the operation will continue for the valid items even if some items result in failure.


Request Body
ids
string[]

A list of file object IDs to be locked/unlocked.


Responses

The files have been successfully locked.

code
string

Error code

message
string

Error message

field
string

Associated field, if applicable.

failedIds
string[]

List of failed IDs.

successIds
string[]

List of IDs for successfully locked files.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

user
object

User details of the member.

role
object

Role details assigned to the member.

group
object

Group details if the member belongs to a group.

sharedBy
object

Details of the user who shared the file or folder.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_DELETED, ERR_ENTITY_DLP_LOCKED, ERR_ENTITY_IS_ATTACHMENT, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_VIRUS_FOUND

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X PATCH \
  "https://{instance}.kiteworks.com/rest/files/actions/lock" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "ids": [
         "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
       ]
       }'
Python
import requests

url = "https://{instance}.kiteworks.com/rest/files/actions/lock"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "ids": [
  "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
]
}
response = requests.patch(url, headers=headers, json=payload)
print(response.json())
Responses
{ "errors": [ { "code": "string", "message": "string", "field": "string", "failedIds": [ "..." ] } ], "successIds": [ "string" ], "data": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "parentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "string", "type": "string", "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "creator": {} } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DLP_LOCKED", "message": "One or more files have been quarantined and are not available to download. Please contact your administrator for assistance." } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_ATTACHMENT", "message": "Operation not permitted on attachment" } ] }
{ "errors": [ { "code": "ERR_ENTITY_NOT_SCANNED", "message": "One or more files are undergoing security and privacy scans. Please try again later." } ] }
{ "errors": [ { "code": "ERR_ENTITY_VIRUS_FOUND", "message": "File is infected" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
// Error - No Body
POST/rest/files/actions/move

Move files

Description:

Moves the specified files to a folder.

Precondition:

Must be assigned the `file_move` permission for the files being moved and the `file_add` permission for the destination folder.

Response:

Moves the files to the folder.
Parameters
Query Parameters
returnEntity
Optional
boolean

If true, includes the entity in the response body.

with
Optional
string

Specifies additional fields to include in the response.

mode
Optional
string

Determines the detail level of the response body.

id:in
Optional
string[]

Comma-separated list of file UUIDs to move. Cannot be used together with ids in the request body.

partialSuccess
Optional
boolean

If true, successfully moved files are committed even if some files fail to move.


Request Body
ids
string[]

List of file UUIDs to move. Cannot be used together with id:in in the query string.

destinationFolderId
Required
string

UUID of the destination folder to move the files into.

replace
boolean

If true, overwrites existing files in the destination folder if they share the same name.


Responses

Files have been moved successfully.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_FILTER

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ACCESS_DENIED, ERR_ENTITY_DELETED, ERR_ENTITY_COPIED_FROM_EC, ERR_ENTITY_EC_TO_EC, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_VIRUS_FOUND, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_RESTRICTED_TYPE, ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_IS_MY_DIR

code
string

Error code

message
string

Error message

Content Too Large

Possible error codes: ERR_SYSTEM_NO_STORAGE_AVAILABLE

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/files/actions/move" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "ids": [
         "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
       ],
         "destinationFolderId": "string",
         "replace": true
       }'
Python
import requests

url = "https://{instance}.kiteworks.com/rest/files/actions/move"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "ids": [
  "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
],
  "destinationFolderId": "string",
  "replace": true
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "parentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "string", "type": "string", "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "creator": {} }
{ "errors": [ { "code": "ERR_REQUEST_INVALID_FILTER", "message": "Filter validation failed" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ACCESS_DENIED", "message": "Your access is denied.", "redirectUrl": "/login?code=3317" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_ENTITY_COPIED_FROM_EC", "message": "Can not perform action on file copied from Repositories Gateway source" } ] }
{ "errors": [ { "code": "ERR_ENTITY_EC_TO_EC", "message": "Unable to copy/move Repositories Gateway file to Repositories Gateway" } ] }
{ "errors": [ { "code": "ERR_ENTITY_NOT_SCANNED", "message": "One or more files are undergoing security and privacy scans. Please try again later." } ] }
{ "errors": [ { "code": "ERR_ENTITY_VIRUS_FOUND", "message": "File is infected" } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_TYPE", "message": "The specified entity mime type is not allowed." } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_BASE_DIR", "message": "Operation not permitted on Base Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_MY_DIR", "message": "Operation not permitted on Tray Folder" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_STORAGE_AVAILABLE", "message": "Folder owner's remaining storage quota does not permit for a file upload of this size." } ] }
// Error - No Body
DELETE/rest/files/actions/permanent

Delete files permanently

Permanently deletes the specified files. Files cannot be recovered after this operation.

Requires permanent delete permission on the parent folder for each file. Each file must
already be in the deleted state and must not be locked.

Parameters
Query Parameters
id:in
Required
string

A comma-separated list of unique identifiers for the entities to be processed.. A comma-separated list of unique identifiers for the entities to be processed.

partialSuccess
Optional
boolean

If set to true, the operation will continue for the valid items even if some items result in failure.

mode
Optional
string

Determines the detail level of the response body.


Responses

All specified files permanently deleted.

Empty response body.

Forbidden

Possible error codes: ERR_ENTITY_LOCKED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X DELETE \
  "https://{instance}.kiteworks.com/rest/files/actions/permanent?id:in=VALUE" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/files/actions/permanent"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
params = {
    "id:in": "VALUE",
}
response = requests.delete(url, params=params, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } }
// Error - No Body
PATCH/rest/files/actions/recover

Recover deleted files

Recovers the specified deleted files, restoring them to their parent folders.

Requires
file_recover permission on the parent folder for each file.
Each file must be in the
deleted state and must not be permanently deleted.

Parameters
Query Parameters
id:in
Required
string

A comma-separated list of unique identifiers for the entities to be processed.. A comma-separated list of unique identifiers for the entities to be processed.

partialSuccess
Optional
boolean

If set to true, the operation will continue for the valid items even if some items result in failure.

returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns the recovered files with their restored status.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

user
object

User details of the member.

role
object

Role details assigned to the member.

group
object

Group details if the member belongs to a group.

sharedBy
object

Details of the user who shared the file or folder.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

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 PATCH \
  "https://{instance}.kiteworks.com/rest/files/actions/recover?id:in=VALUE" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/files/actions/recover"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
params = {
    "id:in": "VALUE",
}
response = requests.patch(url, params=params, headers=headers)
print(response.json())
Responses
[ { "id": "9", "name": "report.pdf", "size": 204800, "mime": "application/pdf", "deleted": false, "locked": 0, "created": "2024-03-01T10:00:00Z", "modified": "2024-06-15T08:30:00Z" }, { "id": "10", "name": "notes.docx", "size": 51200, "mime": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "deleted": false, "locked": 0, "created": "2024-04-10T11:00:00Z", "modified": "2024-06-15T08:30:00Z" } ]
// Error - No Body
POST/rest/files/actions/scan

Scan files for security

Queues security scans for the specified files. Depending on system scan policies, files are
scanned for anti-virus threats, data loss prevention (DLP) violations, and advanced threat
protection. Scans run asynchronously.

Requires view permission on each file. Files
must not be deleted.

Parameters
Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

id:in
Optional
string

List of IDs of entities to scan. Search for results that match any of the specified values for this parameter.

with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns the files for which security scans were queued.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

user
object

User details of the member.

role
object

Role details assigned to the member.

group
object

Group details if the member belongs to a group.

sharedBy
object

Details of the user who shared the file or folder.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

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 POST \
  "https://{instance}.kiteworks.com/rest/files/actions/scan" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/files/actions/scan"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.post(url, headers=headers)
print(response.json())
Responses
[ { "id": "9", "name": "report.pdf", "size": 204800, "mime": "application/pdf", "deleted": false, "locked": 0, "created": "2024-03-01T10:00:00Z", "modified": "2024-06-15T08:30:00Z" }, { "id": "10", "name": "notes.docx", "size": 51200, "mime": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "deleted": false, "locked": 0, "created": "2024-04-10T11:00:00Z", "modified": "2024-06-15T08:30:00Z" } ]
// Error - No Body
PATCH/rest/files/actions/unlock

Unlock files

Description:

Unlocks the specified files, enabling others to perform actions such as edit, move, and delete the files.

Precondition:

Must be assigned the `unlock` permission for the files.

Response:

Unlocks the files.
Parameters
Query Parameters
id:in
Optional
string[]

A comma-separated list of unique identifier (UUID) of the objects to be processed.

returnEntity
Optional
boolean

If true, includes the entity in the response body.

with
Optional
string

Specifies additional fields to include in the response.

mode
Optional
string

Determines the detail level of the response body.

partialSuccess
Optional
boolean

If set to true, the operation will continue for the valid items even if some items result in failure.


Request Body
ids
string[]

A list of file object IDs to be locked/unlocked.


Responses

The files have been successfully unlocked.

code
string

Error code

message
string

Error message

field
string

Associated field, if applicable.

failedIds
string[]

List of failed IDs.

successIds
string[]

List of IDs for successfully locked files.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

user
object

User details of the member.

role
object

Role details assigned to the member.

group
object

Group details if the member belongs to a group.

sharedBy
object

Details of the user who shared the file or folder.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_DELETED, ERR_ENTITY_DLP_LOCKED, ERR_ENTITY_IS_ATTACHMENT, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_VIRUS_FOUND

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X PATCH \
  "https://{instance}.kiteworks.com/rest/files/actions/unlock" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "ids": [
         "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
       ]
       }'
Python
import requests

url = "https://{instance}.kiteworks.com/rest/files/actions/unlock"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "ids": [
  "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
]
}
response = requests.patch(url, headers=headers, json=payload)
print(response.json())
Responses
{ "errors": [ { "code": "string", "message": "string", "field": "string", "failedIds": [ "..." ] } ], "successIds": [ "string" ], "data": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "parentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "string", "type": "string", "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "creator": {} } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DLP_LOCKED", "message": "One or more files have been quarantined and are not available to download. Please contact your administrator for assistance." } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_ATTACHMENT", "message": "Operation not permitted on attachment" } ] }
{ "errors": [ { "code": "ERR_ENTITY_NOT_SCANNED", "message": "One or more files are undergoing security and privacy scans. Please try again later." } ] }
{ "errors": [ { "code": "ERR_ENTITY_VIRUS_FOUND", "message": "File is infected" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
// Error - No Body
GET/rest/files/actions/zip

Download files and folders in ZIP format

Downloads the specified files and folders as a ZIP archive. Folder contents are included
recursively. Optionally filtered by file extension.

Requires download permission on
each file and folder.
Files must not be deleted, infected, or DLP-locked.

Parameters
Query Parameters
name
Optional
string

The name for the generated ZIP archive.

fileId:in
Optional
string

A comma-separated list of file IDs to include in the ZIP archive.. Search for results that match any of the specified values for this parameter.

folderId:in
Optional
string

A comma-separated list of folder IDs to include in the ZIP archive.. Search for results that match any of the specified values for this parameter.

username
Optional
string

The email address of the user requesting the ZIP archive.

extensions
Optional
string

Filter files by the specified comma-separated list of extensions.

utcOffset
Optional
integer

The user's timezone offset in seconds (e.g., UTC+08:00 = 28800).

partialSuccess
Optional
boolean

If set to true, the operation will continue for the valid items even if some items result in failure.

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns a binary ZIP archive containing the requested files and folders.

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 GET \
  "https://{instance}.kiteworks.com/rest/files/actions/zip" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/files/actions/zip"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
// Error - No Body
GET/rest/files/actions/zipStatus

Get file and folder security status

Description:

Gets the security scan results of specified files and folders in preparation for downloading them in ZIP format.

Precondition:

Must be assigned the `download` permission for the files and folders.

Response:

Returns an empty response if all files are safe for download.
Parameters
Query Parameters
fileId:in
Optional
string[]

A comma-separated list of file IDs (UUID) to check. (Recommended request size <= 100)

folderId:in
Optional
string[]

A comma-separated list of folder IDs (UUID) to check. (Recommended request size <= 100)

partialSuccess
Optional
boolean

Indicates whether the operation should proceed if some files/folders fail the check.

extensions
Optional
string[]

Filter results to include only files with the specified comma-separated list of extensions.


Responses

All files and folders are verified as safe for zipping and download.

Empty response body.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_FILTER

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_SYSTEM_TENANT_SUSPENDED, ERR_ACCESS_USER, ERR_ENTITY_VIRUS_FOUND, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_DLP_LOCKED, ERR_ENTITY_DLP_SCANNING, ERR_ENTITY_IS_SECURE_FOLDER, ERR_ENTITY_DELETED

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_LICENSE_EXPIRED

code
string

Error code

message
string

Error message

Request blocked by WAF

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

url = "https://{instance}.kiteworks.com/rest/files/actions/zipStatus"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": [ { "code": "ERR_REQUEST_INVALID_FILTER", "message": "Filter validation failed" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_TENANT_SUSPENDED", "message": "Access to the service is restricted by the service provider. Contact your administrator for updates on restoring normal access." } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_VIRUS_FOUND", "message": "File is infected" } ] }
{ "errors": [ { "code": "ERR_ENTITY_NOT_SCANNED", "message": "One or more files are undergoing security and privacy scans. Please try again later." } ] }
{ "errors": [ { "code": "ERR_ENTITY_DLP_LOCKED", "message": "One or more files have been quarantined and are not available to download. Please contact your administrator for assistance." } ] }
{ "errors": [ { "code": "ERR_ENTITY_DLP_SCANNING", "message": "One or more files are undergoing security and privacy scans. Please try again later." } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_SECURE_FOLDER", "message": "Operation not permitted on restricted Folder." } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_LICENSE_EXPIRED", "message": "License has expired" } ] }
// Error - No Body
GET/rest/files/{id}

Get file metadata

Description:

Gets metadata for specified files, such as file owner, creation date, digital fingerprint, and security scan status.

Precondition:

Must be assigned the `properties_view` permission for the file.

Response:

Returns the file metadata.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.

Query Parameters
requirementId
Optional
string

UUID of the approval requirement. Required together with accessVerificationId to access a file under an approval workflow.

accessVerificationId
Optional
string

UUID of the access verification event. Required together with requirementId to validate approver access.


Responses

The file has been successfully returned.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_FILTER

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_AUTH_INVALID_CSRF, ERR_ACCESS_DENIED

code
string

Error code

message
string

Error message

Request blocked by WAF

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

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "parentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "string", "type": "string", "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "creator": {} }
{ "errors": [ { "code": "ERR_REQUEST_INVALID_FILTER", "message": "Filter validation failed" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_ACCESS_DENIED", "message": "Your access is denied.", "redirectUrl": "/login?code=3317" } ] }
// Error - No Body
POST/rest/files/{id}

Upload a file version

Uploads a new version of the specified file. The uploaded content becomes the new current version (version 0), and the previous current version is incremented. Requires version_create permission on the file.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the file

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Request Body
body
Required
string

Binary content of the file

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.


Responses

Returns the updated file record reflecting the newly uploaded version.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Forbidden

Possible error codes: ERR_ENTITY_LOCKED, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE, ERR_ENTITY_RESTRICTED_TYPE_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE_GROUP

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_INVALID_DATE

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/files/:id" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "body": "string",
         "clientCreated": "string",
         "clientModified": "string"
       }'
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the file

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "body": "string",
  "clientCreated": "string",
  "clientModified": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": 7, "name": "quarterly-report-v2.pdf", "parent_id": 3, "size": 215040, "mime": "application/pdf", "created": "2024-01-05T09:00:00+00:00", "modified": "2024-03-15T10:23:45+00:00", "deleted": false, "locked": 0 }
{ "errors": { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM", "message": "File extension is in custom exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE", "message": "The specified entity mime type is not allowed." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_CUSTOM", "message": "The specified file type is in custom excluded file types list." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_GROUP", "message": "File mime type is in exclusion groups list." } }
{ "error": [ { "code": "string", "message": "string" } ] }
// Error - No Body
PUT/rest/files/{id}

Update a file

Description:

Updates a file's properties such as name and expiration date.

Precondition:

User must have `properties_edit` permission for the file.

Response:

The file is updated.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.

Query Parameters
returnEntity
Optional
boolean

If true, includes the entity in the response body.

with
Optional
string

Specifies additional fields to include in the response.

mode
Optional
string

Determines the detail level of the response body.


Request Body
name
string

The new name for the file.

expire
string

The updated expiration date for the file.

replace
boolean

Indicates whether to replace the existing file if one with the same name already exists.


Responses

The file has been updated successfully.

Empty response body.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ACCESS_DENIED, ERR_ENTITY_DELETED

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_ENTITY_LOCKED, ERR_INVALID_PARAMETER, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE, ERR_ENTITY_RESTRICTED_TYPE_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE_GROUP, ERR_ENTITY_EXISTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X PUT \
  "https://{instance}.kiteworks.com/rest/files/:id" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "name": "string",
         "expire": "2024-01-15",
         "replace": true
       }'
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "name": "string",
  "expire": "2024-01-15",
  "replace": true
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())
Responses
// Request successful - No Body
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ACCESS_DENIED", "message": "Your access is denied.", "redirectUrl": "/login?code=3317" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM", "message": "File extension is in custom exclusion extensions list" } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_TYPE", "message": "The specified entity mime type is not allowed." } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_TYPE_CUSTOM", "message": "The specified file type is in custom excluded file types list." } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_TYPE_GROUP", "message": "File mime type is in exclusion groups list." } ] }
{ "errors": [ { "code": "ERR_ENTITY_EXISTS", "message": "Entity exists" } ] }
// Error - No Body
DELETE/rest/files/{id}

Delete a file

Deletes the specified file. Depending on the system retention policy, the file may be
recoverable until permanently deleted by the system.

Requires delete permission on
the parent folder.
The file must not be locked.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the file.


Responses

File successfully deleted.

Empty response body.

Forbidden

Possible error codes: ERR_ENTITY_LOCKED

code
string

Error code

message
string

Error message

Request blocked by WAF

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

id = "VALUE"  # The unique identifier (UUID) of the file.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } }
// Error - No Body
PATCH/rest/files/{id}/actions/lock

Lock a file

Locks the specified file, preventing other users from editing, moving, or deleting it until
the lock is released.

Requires lock permission on the file. The file must not already
be locked or deleted.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the file

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns the file with its updated lock status.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Forbidden

Possible error codes: ERR_ENTITY_LOCKED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X PATCH \
  "https://{instance}.kiteworks.com/rest/files/:id/actions/lock" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the file

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/actions/lock"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.patch(url, headers=headers)
print(response.json())
Responses
{ "id": "9", "name": "report.pdf", "size": 204800, "mime": "application/pdf", "deleted": false, "locked": 101, "expire": null, "created": "2024-03-01T10:00:00Z", "modified": "2024-06-20T09:00:00Z" }
{ "errors": { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } }
// Error - No Body
DELETE/rest/files/{id}/actions/permanent

Permanently delete a file

Description:

Permanently deletes the specified file. The file must have been soft-deleted first.

Precondition:

The user must be the owner, manager, or collaborator of the file. The file must not be locked or safe-edit locked, unless the user is an admin. The file must have been soft-deleted via `DELETE /rest/files/{id}`.

Response:

The file is permanently deleted and its content cannot be retrieved.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.


Responses

The file has been permanently deleted.

Empty response body.

Unauthorized

Possible error codes: ERR_AUTH_UNAUTHORIZED, ERR_AUTH_INVALID_CSRF

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_LOCKED, ERR_ENTITY_SAFE_EDIT_LOCKED

code
string

Error code

message
string

Error message

Request blocked by WAF

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

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/actions/permanent"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } ] }
{ "errors": [ { "code": "ERR_ENTITY_SAFE_EDIT_LOCKED", "message": "File is under SafeEDIT by another user" } ] }
// Error - No Body
PATCH/rest/files/{id}/actions/recover

Recover a file.

Recovers the specified deleted file, restoring it to its parent folder.

Requires
recover permission on the parent folder.
The file must be in the deleted state and must
not be permanently deleted.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the file

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns the recovered file with its restored status.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Request blocked by WAF

Empty response body.
Shell
curl -X PATCH \
  "https://{instance}.kiteworks.com/rest/files/:id/actions/recover" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the file

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/actions/recover"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.patch(url, headers=headers)
print(response.json())
Responses
{ "id": "9", "name": "report.pdf", "size": 204800, "mime": "application/pdf", "deleted": false, "locked": 0, "expire": null, "created": "2024-03-01T10:00:00Z", "modified": "2024-06-15T08:30:00Z" }
// Error - No Body
PATCH/rest/files/{id}/actions/return

Check file into Repositories Gateway source

Checks the specified file back into its Repositories Gateway source. The local copy of
the file is permanently deleted after a successful check-in. If the file is locked in
the Repositories Gateway source and the caller has unlock permission, the lock is
released automatically.

Requires view permission on the parent folder. The file
must be eligible to return to source (i.e., it was originally checked out) and must not
be infected.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the file

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns the updated file metadata from the Repositories Gateway source after check-in.

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

creator
UserBasicInfo

File's creator (Explicit field. May be retrieved only if mentioned in "with" parameter)

permissions
Permission[]

Current user's permissions (Explicit field. May be retrieved only if mentioned in "with" parameter)

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

parent
SourceContent

Class SourceContent - if you need true EAPI entity use App\Entity\ECObject

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

locked
boolean

Indicates whether the file is locked

size
integer

Size of the source file in bytes

fingerprint
string

File content fingerprint

expire
string

Date and time after which the source file expires and becomes unavailable

mime
string

File MIME type

avStatus
string

Check file availability status according to AV settings and file scanned/infected status

dlpStatus
string

Check file availability status according to DLP settings and file scanned/infected status

lockedUserName
string

Username/email of user who locked the file

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

Request blocked by WAF

Empty response body.
Shell
curl -X PATCH \
  "https://{instance}.kiteworks.com/rest/files/:id/actions/return" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the file

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/actions/return"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.patch(url, headers=headers)
print(response.json())
Responses
{ "id": "kp-42", "name": "report.pdf", "parent_id": "kp-folder-7", "type": "f", "size": 204800, "mime": "application/pdf", "locked": false, "status": "active", "deleted": false, "av_status": "allowed", "dlp_status": "allowed", "created": "2024-03-01T10:00:00Z", "modified": "2024-06-20T14:00:00Z" }
// Error - No Body
POST/rest/files/{id}/actions/scan

Scan a file for security

Queues a security scan for the specified file. Depending on system scan policies, the file
is scanned for anti-virus threats, data loss prevention (DLP) violations, and advanced threat
protection. The scan runs asynchronously.

Requires view permission on the file.
The file must not be deleted.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the file

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns the file for which the security scan was queued.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/files/:id/actions/scan" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the file

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/actions/scan"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.post(url, headers=headers)
print(response.json())
Responses
{ "id": "9", "name": "report.pdf", "size": 204800, "mime": "application/pdf", "deleted": false, "locked": 0, "created": "2024-03-01T10:00:00Z", "modified": "2024-06-15T08:30:00Z" }
// Error - No Body
PATCH/rest/files/{id}/actions/unlock

Unlock a file

Unlocks the specified file, allowing other users to edit, move, and delete it.

Requires unlock permission on the file. The file must currently be locked.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the file

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns the file with its updated lock status.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Forbidden

Possible error codes: ERR_ENTITY_LOCKED_BY_ANOTHER_USER, ERR_ENTITY_UNLOCKED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X PATCH \
  "https://{instance}.kiteworks.com/rest/files/:id/actions/unlock" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the file

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/actions/unlock"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.patch(url, headers=headers)
print(response.json())
Responses
{ "id": "9", "name": "report.pdf", "size": 204800, "mime": "application/pdf", "deleted": false, "locked": 0, "expire": null, "created": "2024-03-01T10:00:00Z", "modified": "2024-06-20T09:15:00Z" }
{ "errors": { "code": "ERR_ENTITY_LOCKED_BY_ANOTHER_USER", "message": "File is locked by another user" } }
{ "errors": { "code": "ERR_ENTITY_UNLOCKED", "message": "File is already unlocked" } }
// Error - No Body
GET/rest/files/{id}/content

Download a file

Description:

Downloads the specified file.

Precondition:

Must be assigned the `download` permission for the file.

Response:

Downloads the file to the specified location.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.

Header Parameters
Range
Optional
string

Range of bytes to download. e.g. bytes=0-1024


Responses

The file download request was successful.

Empty response body.

The file was partially downloaded.

Empty response body.

Unauthorized

Possible error codes: ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_DELETED, ERR_ENTITY_DLP_LOCKED, ERR_ENTITY_IS_SECURE_FOLDER, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_VIRUS_FOUND

code
string

Error code

message
string

Error message

Request blocked by WAF

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

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/content"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
// Request successful - No Body
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DLP_LOCKED", "message": "One or more files have been quarantined and are not available to download. Please contact your administrator for assistance." } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_SECURE_FOLDER", "message": "Operation not permitted on restricted Folder." } ] }
{ "errors": [ { "code": "ERR_ENTITY_NOT_SCANNED", "message": "One or more files are undergoing security and privacy scans. Please try again later." } ] }
{ "errors": [ { "code": "ERR_ENTITY_VIRUS_FOUND", "message": "File is infected" } ] }
// Error - No Body
GET/rest/files/{id}/externalEdit

Get access token for external file edit.

Retrieves a short-lived refresh token scoped to the specified file, authorizing an external
editor to download the current version and upload a new version.

Requires file_add
permission on the parent folder.
The file must not be permanently deleted. Users with
Collaborator, Downloader, or Viewer roles cannot edit files in restricted folders.

Parameters
Path Parameters
id
Required
string

The unique identifier of the file

Query Parameters
with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns a short-lived refresh token with the scope and expiration required for external file editing.

userId
integer

Unique identifier of the user to whom the refresh token belongs

expire
string

Date and time after which the refresh token is no longer valid

scope
Required
string

OAuth scope of the refresh token

refreshToken
Required
string

Refresh token value

Request blocked by WAF

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

id = "VALUE"  # The unique identifier of the file

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/externalEdit"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "user_id": 101, "expire": "2024-06-20T10:05:00Z", "scope": "GET/files/abc-123/content POST/files/abc-123", "refresh_token": "rt_xK9mLpQ2nWvZ7rYsT4uA" } ] }
// Error - No Body
GET/rest/files/{id}/members

Get users with access to a shared file

Description:

Gets a list of users with access to the specified shared file. Also gets the file metadata, providing context and information about the shared file such as each user's role for accessing the file and the user who shared the file.

Precondition:

File sharing must be activated on the system. Must be assigned the `user_view` permission for the shared file.

Response:

Returns the list of users with access to the shared file, along with metadata about the shared file.

Sorting:

Sort string syntax `FIELD_NAME:ORDER`.

ORDER can be asc or desc.

Sorting options:


FIELD_NAMEDescription
idThe member ID
userIdThe user ID
groupIdThe group ID
roleIdThe role ID

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.

Query Parameters
userId
Optional
string

Filter results by user ID (UUID).

groupId
Optional
integer

Filter results by LDAP group ID.

roleId
Optional
integer

Filter results by role ID.

userId:in
Optional
string[]

Filter by a comma-separated list of user IDs (UUID). (Recommended request size <= 100)

groupId:in
Optional
string[]

Filter by a comma-separated list of LDAP Group IDs. (Recommended request size <= 100)

roleId:in
Optional
string[]

Filter by a comma-separated list of role IDs.

type
Optional
string

Filter members by the object type they have access to.
f – File membership.
d – Directory (folder) membership.

orderBy
Optional
string

Sort order for the results. Default is id:asc.
Allowed values: id:asc, id:desc, userId:asc, userId:desc, groupId:asc, groupId:desc, roleId:asc, roleId:desc, rank:asc, rank:desc, email:asc, email:desc.

limit
Optional
integer

Range limit.

offset
Optional
integer

Range offset.

with
Optional
string

Specifies additional fields to include in the response.

mode
Optional
string

Determines the detail level of the response body.


Responses

The file members have been successfully returned.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
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.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_JSON

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_SYSTEM_TENANT_SUSPENDED, ERR_ACCESS_USER, ERR_ENTITY_DELETED, ERR_USER_TYPE_NO_ACCESS

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_LICENSE_EXPIRED

code
string

Error code

message
string

Error message

Request blocked by WAF

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

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/members"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "objectId": "string", "roleId": 1, "userId": "string", "groupId": 1, "user": {}, "role": {} } ], "metadata": {} }
{ "errors": [ { "code": "ERR_REQUEST_INVALID_JSON", "message": "Invalid json provided" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_TENANT_SUSPENDED", "message": "Access to the service is restricted by the service provider. Contact your administrator for updates on restoring normal access." } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_USER_TYPE_NO_ACCESS", "message": "Permission denied" } ] }
{ "errors": [ { "code": "ERR_LICENSE_EXPIRED", "message": "License has expired" } ] }
// Error - No Body
DELETE/rest/files/{id}/members

Remove all access to a shared file

Description:

Removes user access to the specified shared file.

Precondition:

Must be assigned the `user_add` permission for the folder containing the shared file.

Response:

Removes user access to the shared file.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.


Responses

All file members have been successfully removed.

Empty response body.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_DELETED

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER

code
string

Error code

message
string

Error message

Request blocked by WAF

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

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/members"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
// Error - No Body
GET/rest/files/{id}/members/ldapGroup

List LDAP groups with access to a shared file

Returns a list of LDAP groups and their assigned roles for the folder containing the specified file. Requires the user_view permission on the shared file.

Parameters
Path Parameters
id
Required
string

ID of the file

Query Parameters
groupId
Optional
integer

The unique identifier of the group.

groupId:in
Optional
integer

The unique identifier of the group.. Search for results that match any of the specified values for this parameter.

roleId
Optional
integer

The unique identifier of the role.

roleId:in
Optional
integer

The unique identifier of the role.. Search for results that match any of the specified values for this parameter.

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

Returns a paginated list of LDAP groups that have been granted access to the folder containing the specified file, including each group's assigned role.

objectId
Required
string

Unique identifier of the folder this member belongs to

roleId
Required
integer

Unique identifier of the role assigned to this member

id
Required
integer

LDAP group unique identifier

name
Required
string

Display name of the LDAP group

email
string

LDAP group email address

description
string

LDAP group description

links
string[]

HATEOAS links associated with the entity

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

inheritRoleId
integer

Unique identifier of the role inherited from the parent folder (Explicit field. May be retrieved only if mentioned in "with" parameter)

allowedFolderRoleId
string[]

List of role identifiers that are permitted for this folder membership (Explicit field. May be retrieved only if mentioned in "with" parameter)

links
string[]

HATEOAS links associated with the entity

groupId
Required
integer

Unique identifier of the LDAP group assigned as a member

id
Required
string

The unique identifier of the user

basedirId
Required
string

The unique identifier of the user's root Kiteworks directory.

created
string

Date and time the user account was created

email
Required
string

The user's email

mydirId
Required
string

The unique identifier of the user's mydir system directory.

name
Required
string

The name of the user

syncdirId
Required
string

The unique identifier of the user's 'My Folder'.

userTypeId
integer

The unique identifier of the user type (profile).

internal
boolean

Indicates whether the user is an internal user

profileIcon
string

URL to the user's profile icon image

extDL
boolean

Indicates whether the user is an External Distribution List

name
string

Key name of the custom metadata attribute associated with the user

value
string

Value assigned to the custom metadata attribute for the user

adminRoleId
integer

The ID of the admin role assigned to the user.

links
string[]

HATEOAS links associated with the entity

active
boolean

Indicates whether the user is an actual kitework user

suspended
boolean

Indicates whether the user is suspended

deleted
boolean

Indicates whether the user has been deleted

flags
integer

Authentication type.

  • 0: No authentication,
  • 1: Authentication by kiteworks,
  • 2: Authentication by LDAP,
  • 4: Authentication by SSO

verified
boolean

Indicates whether the user is verified

deactivated
boolean

Indicates whether the user has been deactivated

lastActivityDateTime
string

User's last activity datetime

passwordExpirationDateTime
string

The exact timestamp when the user's password will expire

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/files/:id/members/ldapGroup" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # ID of the file

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/members/ldapGroup"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
[ { "objectId": "abc12345def67890ab", "groupId": 42, "roleId": 3 } ]
// Error - No Body
GET/rest/files/{id}/members/ldapGroup/{ldap_group_id}

Get a specific LDAP group's access to a shared file

Returns the access grant record for the specified LDAP group on the folder containing the file, including the group's assigned role. Requires the user_view permission on the shared file.

Parameters
Path Parameters
id
Required
string

ID of the file

ldap_group_id
Required
integer

The unique identifier of the LDAP group.

Query Parameters
with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns the access grant record for the specified LDAP group, including its assigned role for the file's folder.

objectId
Required
string

Unique identifier of the folder this member belongs to

roleId
Required
integer

Unique identifier of the role assigned to this member

id
Required
integer

LDAP group unique identifier

name
Required
string

Display name of the LDAP group

email
string

LDAP group email address

description
string

LDAP group description

links
string[]

HATEOAS links associated with the entity

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

inheritRoleId
integer

Unique identifier of the role inherited from the parent folder (Explicit field. May be retrieved only if mentioned in "with" parameter)

allowedFolderRoleId
string[]

List of role identifiers that are permitted for this folder membership (Explicit field. May be retrieved only if mentioned in "with" parameter)

links
string[]

HATEOAS links associated with the entity

groupId
Required
integer

Unique identifier of the LDAP group assigned as a member

id
Required
string

The unique identifier of the user

basedirId
Required
string

The unique identifier of the user's root Kiteworks directory.

created
string

Date and time the user account was created

email
Required
string

The user's email

mydirId
Required
string

The unique identifier of the user's mydir system directory.

name
Required
string

The name of the user

syncdirId
Required
string

The unique identifier of the user's 'My Folder'.

userTypeId
integer

The unique identifier of the user type (profile).

internal
boolean

Indicates whether the user is an internal user

profileIcon
string

URL to the user's profile icon image

extDL
boolean

Indicates whether the user is an External Distribution List

name
string

Key name of the custom metadata attribute associated with the user

value
string

Value assigned to the custom metadata attribute for the user

adminRoleId
integer

The ID of the admin role assigned to the user.

links
string[]

HATEOAS links associated with the entity

active
boolean

Indicates whether the user is an actual kitework user

suspended
boolean

Indicates whether the user is suspended

deleted
boolean

Indicates whether the user has been deleted

flags
integer

Authentication type.

  • 0: No authentication,
  • 1: Authentication by kiteworks,
  • 2: Authentication by LDAP,
  • 4: Authentication by SSO

verified
boolean

Indicates whether the user is verified

deactivated
boolean

Indicates whether the user has been deactivated

lastActivityDateTime
string

User's last activity datetime

passwordExpirationDateTime
string

The exact timestamp when the user's password will expire

Request blocked by WAF

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

id = "VALUE"  # ID of the file
ldap_group_id = "VALUE"  # The unique identifier of the LDAP group.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/members/ldapGroup/{ldap_group_id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "objectId": "abc12345def67890ab", "groupId": 42, "roleId": 4 }
// Error - No Body
GET/rest/files/{id}/members/{member_user_id}

Returns the specified user member associated with the file.

Returns the name of the specified user with access to the specified shared file. Also gets metadata, providing context and information about the user such as their ID, email address, and role for accessing the file. Must be assigned the user_view permission for the shared file.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the file.

member_user_id
Required
string

The unique identifier of the user member.

Query Parameters
with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns the specified user member and their role for the file.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any

Request blocked by WAF

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

id = "VALUE"  # The unique identifier (UUID) of the file.
member_user_id = "VALUE"  # The unique identifier of the user member.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/members/{member_user_id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "objectId": "abc12345def67890ab", "userId": "usr98765cba43210fe", "roleId": 4 }
// Error - No Body
PUT/rest/files/{id}/members/{member_user_id}

Update file member

Description:

Changes the role assigned to the specified user for accessing the specified shared file.

Precondition:

Must be assigned the `user_add` permission for the folder containing the file.

Response:

Changes the user's role to the specified role.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.

member_user_id
Required
string

The unique identifier (UUID) of the user.


Responses

The file member's role has been successfully updated.

Empty response body.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_IS_MY_DIR, ERR_ENTITY_IS_SYNC_DIR, ERR_ENTITY_IS_SECURE_FOLDER, ERR_ACCESS_USER, ERR_ENTITY_DELETED

code
string

Error code

message
string

Error message

Conflict

Possible error codes: ERR_ENTITY_EXISTS, ERR_ENTITY_ROLE_IS_ASSIGNED, ERR_ENTITY_USER_HAS_INSUFFICIENT_PERMISSIONS

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X PUT \
  "https://{instance}.kiteworks.com/rest/files/:id/members/:member_user_id" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the entity.
member_user_id = "VALUE"  # The unique identifier (UUID) of the user.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/members/{member_user_id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.put(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_BASE_DIR", "message": "Operation not permitted on Base Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_MY_DIR", "message": "Operation not permitted on Tray Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_SYNC_DIR", "message": "Operation not permitted on My Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_SECURE_FOLDER", "message": "Operation not permitted on restricted Folder." } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_ENTITY_EXISTS", "message": "Entity exists" } ] }
{ "errors": [ { "code": "ERR_ENTITY_ROLE_IS_ASSIGNED", "message": "Cannot assign already assigned role" } ] }
{ "errors": [ { "code": "ERR_ENTITY_USER_HAS_INSUFFICIENT_PERMISSIONS", "message": "Target user has insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
// Error - No Body
DELETE/rest/files/{id}/members/{member_user_id}

Remove a user's access to a shared file

Description:

Removes the specified user's access to the specified shared file.

Precondition:

Must be assigned the `user_add` permission for the folder containing the shared file.

Response:

Removes the user's access to the shared file.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.

member_user_id
Required
string

The unique identifier (UUID) of the user.


Responses

The member has been successfully removed from the file.

Empty response body.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_DELETED

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER

code
string

Error code

message
string

Error message

Request blocked by WAF

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

id = "VALUE"  # The unique identifier (UUID) of the entity.
member_user_id = "VALUE"  # The unique identifier (UUID) of the user.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/members/{member_user_id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
// Error - No Body
GET/rest/files/{id}/path

Get file path

Returns the full ancestor path of the specified file, from the workspace root down to the
file's parent folder. Each element in the path represents a folder node with its ID and
name.

Requires properties_view permission on the file.

Parameters
Path Parameters
id
Required
string

The unique identifier of the file

Query Parameters
mode
Optional
string

Determines the detail level of the response body.


Responses

Returns the full ancestor path of the file as an ordered list of folder nodes.

data
FolderTreeItem[]

Ordered list of folder nodes representing the path from the workspace root to the file's parent folder.

links
HateoasLink[]

Optional HATEOAS links. Present only when the request includes link options.

Request blocked by WAF

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

id = "VALUE"  # The unique identifier of the file

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/path"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "id": "1", "name": "My Workspace" }, { "id": "3", "name": "Documents" } ], "links": [ { "rel": "self", "href": "https://<YOUR_INSTANCE_DOMAIN>/rest/1.0/files/9/path" } ] }
// Error - No Body
GET/rest/files/{id}/preview

Get file preview metadata

Description:

Gets file preview metadata about the specified file, such as the permalink for previewing the file and if the file contains a watermark.

Precondition:

Must be assigned the `view` permission for the file.

Response:

Returns the file preview metadata.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.


Responses

The file preview information has been successfully returned.

Empty response body.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_FILTER

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ACCESS_DENIED, ERR_ENTITY_DELETED

code
string

Error code

message
string

Error message

Request blocked by WAF

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

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/preview"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": [ { "code": "ERR_REQUEST_INVALID_FILTER", "message": "Filter validation failed" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ACCESS_DENIED", "message": "Your access is denied.", "redirectUrl": "/login?code=3317" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
// Error - No Body
GET/rest/files/{id}/tasks

Get file tasks

Gets a list of tasks assigned to the specified file. Requires task_view permission on the file's parent folder.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the file.

Query Parameters
assigneeId
Optional
string

Assigned User unique identifier

assigneeId:in
Optional
string

Assigned User unique identifier. Search for results that match any of the specified values for this parameter.

due
Optional
string

Task due date

due:gt
Optional
string

Task due date. Search for results where this parameter value is greater than the specified value.

due:gte
Optional
string

Task due date. Search for results where this parameter value is greater than or equal to the specified value.

due:lt
Optional
string

Task due date. Search for results where this parameter value is less than the specified value.

due:lte
Optional
string

Task due date. Search for results where this parameter value is less than or equal to the specified value.

parentId
Optional
integer

Parent Comment identifier

parentId:in
Optional
integer

Parent Comment identifier. Search for results that match any of the specified values for this parameter.

userId
Optional
string

Identifier of User who created a Task

userId:in
Optional
string

Identifier of User who created a Task. Search for results that match any of the specified values for this parameter.

created
Optional
string

Task creation date

created:gt
Optional
string

Task creation date. Search for results where this parameter value is greater than the specified value.

created:gte
Optional
string

Task creation date. Search for results where this parameter value is greater than or equal to the specified value.

created:lt
Optional
string

Task creation date. Search for results where this parameter value is less than the specified value.

created:lte
Optional
string

Task creation date. Search for results where this parameter value is less than or equal to the specified value.

modified
Optional
string

Task modification date

modified:gt
Optional
string

Task modification date. Search for results where this parameter value is greater than the specified value.

modified:gte
Optional
string

Task modification date. Search for results where this parameter value is greater than or equal to the specified value.

modified:lt
Optional
string

Task modification date. Search for results where this parameter value is less than the specified value.

modified:lte
Optional
string

Task modification date. Search for results where this parameter value is less than or equal to the specified value.

contents:contains
Optional
string

Task content. Search for results that contain the specified characters in this parameter.

status
Optional
string[]

Filter tasks by status. Accepted values: D, P, C.

deleted
Optional
boolean

Whether the task has been deleted

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

Returns a paginated list of tasks associated with the specified file.

id
Required
integer

Task unique identifier

assigneeId
Required
string

Assigned User unique identifier

id
Required
string

The unique identifier of the user

basedirId
Required
string

The unique identifier of the user's root Kiteworks directory.

created
string

Date and time the user account was created

email
Required
string

The user's email

mydirId
Required
string

The unique identifier of the user's mydir system directory.

name
Required
string

The name of the user

syncdirId
Required
string

The unique identifier of the user's 'My Folder'.

userTypeId
integer

The unique identifier of the user type (profile).

internal
boolean

Indicates whether the user is an internal user

profileIcon
string

URL to the user's profile icon image

extDL
boolean

Indicates whether the user is an External Distribution List

name
string

Key name of the custom metadata attribute associated with the user

value
string

Value assigned to the custom metadata attribute for the user

adminRoleId
integer

The ID of the admin role assigned to the user.

links
string[]

HATEOAS links associated with the entity

active
boolean

Indicates whether the user is an actual kitework user

suspended
boolean

Indicates whether the user is suspended

deleted
boolean

Indicates whether the user has been deleted

flags
integer

Authentication type.

  • 0: No authentication,
  • 1: Authentication by kiteworks,
  • 2: Authentication by LDAP,
  • 4: Authentication by SSO

verified
boolean

Indicates whether the user is verified

deactivated
boolean

Indicates whether the user has been deactivated

lastActivityDateTime
string

User's last activity datetime

passwordExpirationDateTime
string

The exact timestamp when the user's password will expire

due
Required
string

Date and time by which the task must be completed

parentId
integer

Parent Comment identifier

objectId
string

Object identifier Task belongs to

userId
Required
string

Identifier of User who created a Task

id
Required
string

The unique identifier of the user

basedirId
Required
string

The unique identifier of the user's root Kiteworks directory.

created
string

Date and time the user account was created

email
Required
string

The user's email

mydirId
Required
string

The unique identifier of the user's mydir system directory.

name
Required
string

The name of the user

syncdirId
Required
string

The unique identifier of the user's 'My Folder'.

userTypeId
integer

The unique identifier of the user type (profile).

internal
boolean

Indicates whether the user is an internal user

profileIcon
string

URL to the user's profile icon image

extDL
boolean

Indicates whether the user is an External Distribution List

name
string

Key name of the custom metadata attribute associated with the user

value
string

Value assigned to the custom metadata attribute for the user

adminRoleId
integer

The ID of the admin role assigned to the user.

links
string[]

HATEOAS links associated with the entity

active
boolean

Indicates whether the user is an actual kitework user

suspended
boolean

Indicates whether the user is suspended

deleted
boolean

Indicates whether the user has been deleted

flags
integer

Authentication type.

  • 0: No authentication,
  • 1: Authentication by kiteworks,
  • 2: Authentication by LDAP,
  • 4: Authentication by SSO

verified
boolean

Indicates whether the user is verified

deactivated
boolean

Indicates whether the user has been deactivated

lastActivityDateTime
string

User's last activity datetime

passwordExpirationDateTime
string

The exact timestamp when the user's password will expire

created
Required
string

Date and time the task was created

modified
string

Date and time the task was last modified

contents
string

Body text of the task

deleted
boolean

Indicates whether the task is deleted

folderId
string

Identifier of Object's parent Folder

status
Required
string

Task status. Accepted values: D (Defined), P (In Progress), C (Completed)

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

user
object

User details of the member.

role
object

Role details assigned to the member.

group
object

Group details if the member belongs to a group.

sharedBy
object

Details of the user who shared the file or folder.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

creator
object

Details of the user who created the object.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

permissions
Permission[]

List of permissions associated with the object.

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

members
Member[]

List of members who have access to the object.

vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

currentUserRole
object

The role of the current user in this folder.

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

user
object

Details of the user who pushed the object.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

user
object

The user responsible for locking the file via SafeEdit.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

links
string[]

HATEOAS links associated with the entity

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/files/:id/tasks" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the file.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/tasks"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "id": 15, "object_id": 7, "parent_id": 0, "user_id": 3, "assignee_id": 5, "contents": "Review the quarterly report for accuracy.", "status": "P", "due": "2024-04-01T00:00:00+00:00", "created": "2024-03-15T10:00:00+00:00", "modified": "2024-03-16T08:30:00+00:00", "deleted": false, "folder_id": 3 } ], "total": 1, "page": 1, "pageSize": 20 }
// Error - No Body
POST/rest/files/{id}/tasks

Create file task

Creates a task for the specified file and assigns it to a user. The assignee must have at least properties_view permission on the file's parent folder. Requires task_add permission on the file's parent folder.

Parameters
Path Parameters
id
Required
string

Object ID of the file task is created on

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Request Body
assigneeId
Required
integer

Assignee user unique identifier

due
Required
string

Date and time by which the task must be completed

parentId
integer

Parent Comment identifier

contents
Required
string

Body text of the task

addLinks
boolean

Indicates whether HATEOAS links should be included in the response


Responses

Returns the newly created task record.

id
Required
integer

Task unique identifier

assigneeId
Required
string

Assigned User unique identifier

id
Required
string

The unique identifier of the user

basedirId
Required
string

The unique identifier of the user's root Kiteworks directory.

created
string

Date and time the user account was created

email
Required
string

The user's email

mydirId
Required
string

The unique identifier of the user's mydir system directory.

name
Required
string

The name of the user

syncdirId
Required
string

The unique identifier of the user's 'My Folder'.

userTypeId
integer

The unique identifier of the user type (profile).

internal
boolean

Indicates whether the user is an internal user

profileIcon
string

URL to the user's profile icon image

extDL
boolean

Indicates whether the user is an External Distribution List

name
string

Key name of the custom metadata attribute associated with the user

value
string

Value assigned to the custom metadata attribute for the user

adminRoleId
integer

The ID of the admin role assigned to the user.

links
string[]

HATEOAS links associated with the entity

active
boolean

Indicates whether the user is an actual kitework user

suspended
boolean

Indicates whether the user is suspended

deleted
boolean

Indicates whether the user has been deleted

flags
integer

Authentication type.

  • 0: No authentication,
  • 1: Authentication by kiteworks,
  • 2: Authentication by LDAP,
  • 4: Authentication by SSO

verified
boolean

Indicates whether the user is verified

deactivated
boolean

Indicates whether the user has been deactivated

lastActivityDateTime
string

User's last activity datetime

passwordExpirationDateTime
string

The exact timestamp when the user's password will expire

due
Required
string

Date and time by which the task must be completed

parentId
integer

Parent Comment identifier

objectId
string

Object identifier Task belongs to

userId
Required
string

Identifier of User who created a Task

id
Required
string

The unique identifier of the user

basedirId
Required
string

The unique identifier of the user's root Kiteworks directory.

created
string

Date and time the user account was created

email
Required
string

The user's email

mydirId
Required
string

The unique identifier of the user's mydir system directory.

name
Required
string

The name of the user

syncdirId
Required
string

The unique identifier of the user's 'My Folder'.

userTypeId
integer

The unique identifier of the user type (profile).

internal
boolean

Indicates whether the user is an internal user

profileIcon
string

URL to the user's profile icon image

extDL
boolean

Indicates whether the user is an External Distribution List

name
string

Key name of the custom metadata attribute associated with the user

value
string

Value assigned to the custom metadata attribute for the user

adminRoleId
integer

The ID of the admin role assigned to the user.

links
string[]

HATEOAS links associated with the entity

active
boolean

Indicates whether the user is an actual kitework user

suspended
boolean

Indicates whether the user is suspended

deleted
boolean

Indicates whether the user has been deleted

flags
integer

Authentication type.

  • 0: No authentication,
  • 1: Authentication by kiteworks,
  • 2: Authentication by LDAP,
  • 4: Authentication by SSO

verified
boolean

Indicates whether the user is verified

deactivated
boolean

Indicates whether the user has been deactivated

lastActivityDateTime
string

User's last activity datetime

passwordExpirationDateTime
string

The exact timestamp when the user's password will expire

created
Required
string

Date and time the task was created

modified
string

Date and time the task was last modified

contents
string

Body text of the task

deleted
boolean

Indicates whether the task is deleted

folderId
string

Identifier of Object's parent Folder

status
Required
string

Task status. Accepted values: D (Defined), P (In Progress), C (Completed)

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

user
object

User details of the member.

role
object

Role details assigned to the member.

group
object

Group details if the member belongs to a group.

sharedBy
object

Details of the user who shared the file or folder.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

links
string[]

HATEOAS links associated with the entity

Forbidden

Possible error codes: ERR_ACCESS_USER

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_REQUIRED, ERR_INPUT_DATE_NOT_AFTER, ERR_INPUT_HTML_TAGS_INVALID

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/files/:id/tasks" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "assigneeId": 1,
         "due": "2024-01-15",
         "parentId": 1,
         "contents": "string",
         "addLinks": true
       }'
Python
import requests

id = "VALUE"  # Object ID of the file task is created on

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/tasks"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "assigneeId": 1,
  "due": "2024-01-15",
  "parentId": 1,
  "contents": "string",
  "addLinks": true
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": 15, "object_id": 7, "parent_id": 0, "user_id": 3, "assignee_id": 5, "contents": "Review the quarterly report for accuracy.", "status": "D", "due": "2024-04-01T00:00:00+00:00", "created": "2024-03-15T10:00:00+00:00", "modified": "2024-03-15T10:00:00+00:00", "deleted": false, "folder_id": 3 }
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
{ "errors": { "code": "ERR_INPUT_REQUIRED", "message": "Field is required" } }
{ "errors": { "code": "ERR_INPUT_HTML_TAGS_INVALID", "message": "Cannot contain HTML tags other than B, I, or U" } }
// Error - No Body
GET/rest/files/{id}/versions

Get file versions

Gets a list of file versions for the specified file. Also gets the file metadata, such as its owner, creation date, digital fingerprint, and security scan status. Requires version_view permission on the file.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the file.

Query Parameters
created
Optional
integer

File Version creation date

created:gt
Optional
integer

File Version creation date. Search for results where this parameter value is greater than the specified value.

created:gte
Optional
integer

File Version creation date. Search for results where this parameter value is greater than or equal to the specified value.

created:lt
Optional
integer

File Version creation date. Search for results where this parameter value is less than the specified value.

created:lte
Optional
integer

File Version creation date. Search for results where this parameter value is less than or equal to the specified value.

orderBy
Optional
string[]

Sorting options

offset
Optional
integer

Offset

limit
Optional
integer

Limit

locate_id
Optional
integer

If specified, "offset" parameter will be ignored
and the page containing entity with this Id will be returned.

with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns a paginated list of version records for the specified file.

id
Required
string

The unique identifier of the file version.

versionNumber
Required
integer

The version number of the file.

deleted
boolean

Indicates whether this version of the file has been deleted.

created
string

The creation date of this file version.

userId
Required
string

The unique identifier of the user who created this file version.

size
integer

The size of the file content in bytes.

fingerprint
string

A unique hash identifying the file.

fingerprintAlgo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

backend
string

The backend system associated with the file version.

mime
string

The MIME type of the file version.

name
Required
string

The name of the file version.

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

objectId
Required
string

The object ID (UUID) for the file version.

clientCreated
string

The date and time the file version was created on the client side.

clientModified
string

The date and time the file version was last modified on the client side.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version\'s availability status based on the administrator\'s quarantine status.

storageAvailable
boolean

Indicates whether the file is accessible on any storage volume.

fingerprints
string[]

A list of fingerprints associated with the file version.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

links
string[]

HATEOAS links associated with the entity

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/files/:id/versions" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the file.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/versions"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "id": 42, "object_id": 7, "version": 0, "created": "2024-03-15T10:23:45+00:00", "user_id": 5, "size": 204800, "fingerprint": "d41d8cd98f00b204e9800998ecf8427e", "fingerprint_algo": "md5", "mime": "application/pdf", "name": "quarterly-report.pdf", "flag": 0, "backend": "local", "deleted": false, "status": "clean" }, { "id": 41, "object_id": 7, "version": 1, "created": "2024-01-10T08:00:00+00:00", "user_id": 5, "size": 198400, "fingerprint": "9e107d9d372bb6826bd81d3542a419d6", "fingerprint_algo": "md5", "mime": "application/pdf", "name": "quarterly-report.pdf", "flag": 0, "backend": "local", "deleted": false, "status": "clean" } ], "total": 2, "page": 1, "pageSize": 20 }
// Error - No Body
POST/rest/files/{id}/versions

Upload a file version

Uploads a new version of the specified file using streaming upload, where the file content is sent in the request body. Requires the version_create permission on the target file. Returns the updated file entity.

Parameters
Path Parameters
id
Required
string

The unique identifier of the file (UUID) to which the version is being uploaded.

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Request Body
body
Required
string

The binary content of the file.


Responses

New file version uploaded successfully.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Forbidden

Possible error codes: ERR_ENTITY_LOCKED, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE, ERR_ENTITY_RESTRICTED_TYPE_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE_GROUP

code
string

Error code

message
string

Error message

Conflict

Possible error codes: ERR_ENTITY_EXISTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/files/:id/versions" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "body": "string"
       }'
Python
import requests

id = "VALUE"  # The unique identifier of the file (UUID) to which the version is being uploaded.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/versions"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "body": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": "a1b2c3d4-e5f6-4789-abcd-ef1234567890", "name": "document.pdf", "type": "file", "size": 307200, "modified": "2024-03-02T09:30:00+00:00" }
{ "errors": { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM", "message": "File extension is in custom exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE", "message": "The specified entity mime type is not allowed." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_CUSTOM", "message": "The specified file type is in custom excluded file types list." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_GROUP", "message": "File mime type is in exclusion groups list." } }
{ "errors": { "code": "ERR_ENTITY_EXISTS", "message": "Entity exists" } }
// Error - No Body
GET/rest/files/{id}/versions/{version_id}

Get a file version

Gets file metadata for the specified file version, such as the date it was added, its expiration date, and any tags applied to the file. Requires version_view permission on the file.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the file.

version_id
Required
string

The unique identifier (UUID) of the file version.


Responses

Returns the metadata for the specified file version.

id
Required
string

The unique identifier of the file version.

versionNumber
Required
integer

The version number of the file.

deleted
boolean

Indicates whether this version of the file has been deleted.

created
string

The creation date of this file version.

userId
Required
string

The unique identifier of the user who created this file version.

size
integer

The size of the file content in bytes.

fingerprint
string

A unique hash identifying the file.

fingerprintAlgo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

backend
string

The backend system associated with the file version.

mime
string

The MIME type of the file version.

name
Required
string

The name of the file version.

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

objectId
Required
string

The object ID (UUID) for the file version.

clientCreated
string

The date and time the file version was created on the client side.

clientModified
string

The date and time the file version was last modified on the client side.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version\'s availability status based on the administrator\'s quarantine status.

storageAvailable
boolean

Indicates whether the file is accessible on any storage volume.

fingerprints
string[]

A list of fingerprints associated with the file version.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

links
string[]

HATEOAS links associated with the entity

Request blocked by WAF

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

id = "VALUE"  # The unique identifier (UUID) of the file.
version_id = "VALUE"  # The unique identifier (UUID) of the file version.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/versions/{version_id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "id": 42, "object_id": 7, "version": 0, "created": "2024-03-15T10:23:45+00:00", "user_id": 5, "size": 204800, "fingerprint": "d41d8cd98f00b204e9800998ecf8427e", "fingerprint_algo": "md5", "mime": "application/pdf", "name": "quarterly-report.pdf", "flag": 0, "backend": "local", "deleted": false, "status": "clean", "avStatus": { "available": true, "scanned": true, "infected": false }, "dlpStatus": { "available": true, "scanned": true, "infected": false }, "fingerprints": [ { "algo": "md5", "hash": "d41d8cd98f00b204e9800998ecf8427e" } ], "tags": [] }
// Error - No Body
DELETE/rest/files/{id}/versions/{version_id}

Delete a file version

Deletes the specified version of the file. Cannot delete the last remaining version of a file. Requires version_delete permission on the file.

Parameters
Path Parameters
id
Required
string

The unique identifier of the file.

version_id
Required
string

The unique identifier (UUID) of the file version.


Responses

The version was successfully deleted. Returns no content.

Empty response body.

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_LOCKED

code
string

Error code

message
string

Error message

Request blocked by WAF

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

id = "VALUE"  # The unique identifier of the file.
version_id = "VALUE"  # The unique identifier (UUID) of the file version.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/versions/{version_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" } }
{ "errors": { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } }
// Error - No Body
POST/rest/files/{id}/versions/{version_id}/actions/promote

Promote a file version

Makes the specified version of the file the current version of the file. The promoted version is assigned version number 0 (current), and all lower-numbered versions are incremented. Also updates the file name to match the promoted version. Requires version_promote permission on the file.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of file

version_id
Required
string

The unique identifier (UUID) of the file version.

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns the promoted version record after it has been set as the current version.

id
Required
string

The unique identifier of the file version.

versionNumber
Required
integer

The version number of the file.

deleted
boolean

Indicates whether this version of the file has been deleted.

created
string

The creation date of this file version.

userId
Required
string

The unique identifier of the user who created this file version.

size
integer

The size of the file content in bytes.

fingerprint
string

A unique hash identifying the file.

fingerprintAlgo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

backend
string

The backend system associated with the file version.

mime
string

The MIME type of the file version.

name
Required
string

The name of the file version.

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

objectId
Required
string

The object ID (UUID) for the file version.

clientCreated
string

The date and time the file version was created on the client side.

clientModified
string

The date and time the file version was last modified on the client side.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version\'s availability status based on the administrator\'s quarantine status.

storageAvailable
boolean

Indicates whether the file is accessible on any storage volume.

fingerprints
string[]

A list of fingerprints associated with the file version.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

links
string[]

HATEOAS links associated with the entity

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_LOCKED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/files/:id/versions/:version_id/actions/promote" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of file
version_id = "VALUE"  # The unique identifier (UUID) of the file version.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/versions/{version_id}/actions/promote"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.post(url, headers=headers)
print(response.json())
Responses
{ "id": 41, "object_id": 7, "version": 0, "created": "2024-01-10T08:00:00+00:00", "user_id": 5, "size": 198400, "fingerprint": "9e107d9d372bb6826bd81d3542a419d6", "fingerprint_algo": "md5", "mime": "application/pdf", "name": "quarterly-report.pdf", "flag": 0, "backend": "local", "deleted": false, "status": "clean" }
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
{ "errors": { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } }
// Error - No Body
POST/rest/files/{id}/versions/{version_id}/actions/scan

Scan a file version for security

Triggers a security scan on the specified file version. Depending on system scan policies, the scan may include anti-virus, data loss prevention, and advanced threat protection checks. Requires version_view permission on the file.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of file

version_id
Required
string

The unique identifier (UUID) of the file version.

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns the version record after the scan has been triggered. The scan result is reflected in the avStatus and dlpStatus fields once the scan completes.

id
Required
string

The unique identifier of the file version.

versionNumber
Required
integer

The version number of the file.

deleted
boolean

Indicates whether this version of the file has been deleted.

created
string

The creation date of this file version.

userId
Required
string

The unique identifier of the user who created this file version.

size
integer

The size of the file content in bytes.

fingerprint
string

A unique hash identifying the file.

fingerprintAlgo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

backend
string

The backend system associated with the file version.

mime
string

The MIME type of the file version.

name
Required
string

The name of the file version.

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

objectId
Required
string

The object ID (UUID) for the file version.

clientCreated
string

The date and time the file version was created on the client side.

clientModified
string

The date and time the file version was last modified on the client side.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version\'s availability status based on the administrator\'s quarantine status.

storageAvailable
boolean

Indicates whether the file is accessible on any storage volume.

fingerprints
string[]

A list of fingerprints associated with the file version.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

links
string[]

HATEOAS links associated with the entity

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 POST \
  "https://{instance}.kiteworks.com/rest/files/:id/versions/:version_id/actions/scan" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of file
version_id = "VALUE"  # The unique identifier (UUID) of the file version.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/versions/{version_id}/actions/scan"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.post(url, headers=headers)
print(response.json())
Responses
{ "id": 42, "object_id": 7, "version": 0, "created": "2024-03-15T10:23:45+00:00", "user_id": 5, "size": 204800, "fingerprint": "d41d8cd98f00b204e9800998ecf8427e", "fingerprint_algo": "md5", "mime": "application/pdf", "name": "quarterly-report.pdf", "flag": 0, "backend": "local", "deleted": false, "status": "scanning", "avStatus": { "available": false, "scanned": false, "infected": false }, "dlpStatus": { "available": false, "scanned": false, "infected": false } }
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
// Error - No Body
GET/rest/files/{id}/versions/{version_id}/content

Download a file version

Downloads the binary content of the specified file version. Requires download permission on the file. Users assigned the Downloader or Viewer role can only download the current version (version 0); attempting to download an older version returns a 403.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of file

version_id
Required
string

The unique identifier (UUID) of the file version.

Header Parameters
Range
Optional
string

Range of bytes to download. e.g. bytes=0-1024


Responses

Returns the binary content of the file version as an octet-stream. Supports range requests via the Range header; a partial-content request returns HTTP 206.

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 GET \
  "https://{instance}.kiteworks.com/rest/files/:id/versions/:version_id/content" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of file
version_id = "VALUE"  # The unique identifier (UUID) of the file version.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/versions/{version_id}/content"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
// Error - No Body
GET/rest/files/{id}/versions/{version_id}/preview

Get file preview metadata for a file version

Gets file preview metadata for the specified file version, such as the permalink for previewing the file and if the file contains a watermark. Requires view permission on the file.

Parameters
Path Parameters
id
Required
string

The unique identifier of the file.

version_id
Required
string

The unique identifier (UUID) of the file version.


Responses

Returns the preview metadata for the specified file version.

link
string

Preview link for the file

pdf
string

PDF file for the preview

viewUrl
string

URL for viewing the preview

status
string

Preview processing status. Accepted values: processing, preview, failed

type
string

Format of the generated preview, such as image or PDF

metadata
string

Additional metadata about the preview, such as dimensions or page count

mime
string

MIME type of the preview file

native
boolean

Indicates whether the preview is a native render

watermark
string

Watermark applied to the preview

tdfOriginalExtension
string

Original file extension for TDF files

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 GET \
  "https://{instance}.kiteworks.com/rest/files/:id/versions/:version_id/preview" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier of the file.
version_id = "VALUE"  # The unique identifier (UUID) of the file version.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/versions/{version_id}/preview"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "link": "/preview/files/7/versions/42/preview.html", "pdf": null, "view_url": "https://viewer.example.com/view?token=abc123", "status": "Preview", "mime": "application/pdf", "native": true, "watermark": null, "tdfOriginalExtension": null }
{ "link": null, "pdf": null, "view_url": null, "status": "Processing", "mime": null, "native": false, "watermark": null, "tdfOriginalExtension": null }
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
// Error - No Body
POST/rest/folders/{id}/actions/file

Upload a file using multipart form data

Uploads a file to the specified folder using multipart form data. If a file with the same
name already exists, a new version is created unless disableAutoVersion is set.

Requires file_add permission on the target folder (or version_create if a file with
the same name already exists). The folder must not be deleted. Sufficient storage must be
available. The file extension and MIME type must not be excluded by the system policy.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the target folder.

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Request Body
body
Required
string

The binary content of the file.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

disableAutoVersion
boolean

Indicates if the file should be prevented from being saved as a new version.

note
boolean

Indicates if the file should be uploaded as a note.


Responses

Returns the uploaded file metadata.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Forbidden

Possible error codes: ERR_ENTITY_LOCKED, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE, ERR_ENTITY_RESTRICTED_TYPE_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE_GROUP

code
string

Error code

message
string

Error message

Conflict

Possible error codes: ERR_ENTITY_EXISTS

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_INVALID_DATE

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/folders/:id/actions/file" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "body": "string",
         "clientCreated": "string",
         "clientModified": "string",
         "disableAutoVersion": true,
         "note": true
       }'
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the target folder.

url = f"https://{{instance}}.kiteworks.com/rest/folders/{id}/actions/file"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "body": "string",
  "clientCreated": "string",
  "clientModified": "string",
  "disableAutoVersion": true,
  "note": true
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": "9", "name": "report.pdf", "size": 204800, "mime": "application/pdf", "deleted": false, "locked": 0, "created": "2024-06-20T10:00:00Z", "modified": "2024-06-20T10:00:00Z", "parent": { "id": "3", "name": "Documents" } }
{ "errors": { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM", "message": "File extension is in custom exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE", "message": "The specified entity mime type is not allowed." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_CUSTOM", "message": "The specified file type is in custom excluded file types list." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_GROUP", "message": "File mime type is in exclusion groups list." } }
{ "errors": { "code": "ERR_ENTITY_EXISTS", "message": "Entity exists" } }
{ "error": [ { "code": "string", "message": "string" } ] }
// Error - No Body
POST/rest/folders/{id}/actions/fileBase64Encoded

Upload a base64-encoded file

Uploads a base64-encoded file to the specified folder. If a file with the same name already
exists, a new version is created unless disableAutoVersion is set.

Requires
file_add permission on the target folder
(or version_create if a file with the same
name already exists). The file content must be valid base64. The file size must not exceed
the system-configured upload size limit. The file extension must not be excluded by the
system policy.

Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the target folder.

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Request Body
addLinks
boolean

Indicates whether HATEOAS links should be included in the response

name
Required
string

Display name of the file

content
Required
string

Raw content body of the file being created

clientCreated
integer

Date and time when the file was created on the client side

clientModified
integer

Date and time when the file was last modified on the client side

note
integer

Indicates whether the file should be uploaded as a note

disableAutoVersion
boolean

Indicates whether the file should be prevented from being saved as a new version


Responses

Returns the uploaded file metadata.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Forbidden

Possible error codes: ERR_ENTITY_LOCKED, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE, ERR_ENTITY_RESTRICTED_TYPE_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE_GROUP

code
string

Error code

message
string

Error message

Conflict

Possible error codes: ERR_ENTITY_EXISTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/folders/:id/actions/fileBase64Encoded" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "addLinks": true,
         "name": "string",
         "content": "string",
         "clientCreated": 1,
         "clientModified": 1,
         "note": 1
       }'
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the target folder.

url = f"https://{{instance}}.kiteworks.com/rest/folders/{id}/actions/fileBase64Encoded"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "addLinks": true,
  "name": "string",
  "content": "string",
  "clientCreated": 1,
  "clientModified": 1,
  "note": 1
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": "12", "name": "notes.txt", "size": 1024, "mime": "text/plain", "deleted": false, "locked": 0, "created": "2024-06-20T11:00:00Z", "modified": "2024-06-20T11:00:00Z", "parent": { "id": "3", "name": "Documents" } }
{ "errors": { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM", "message": "File extension is in custom exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE", "message": "The specified entity mime type is not allowed." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_CUSTOM", "message": "The specified file type is in custom excluded file types list." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_GROUP", "message": "File mime type is in exclusion groups list." } }
{ "errors": { "code": "ERR_ENTITY_EXISTS", "message": "Entity exists" } }
// Error - No Body
POST/rest/folders/{parent_id}/actions/fileFromTemplate

Create Microsoft Office document from template

Creates a new, blank Microsoft Office document from a template in the specified folder.

Requires file_add permission on the target folder. The folder must not be deleted.
The file name must not contain invalid characters.

Parameters
Path Parameters
parent_id
Required
string

ID of the parent folder


Request Body
fileType
string

The file type

fileName
string

The file name


Responses

Returns the newly created file.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_LOCKED, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE, ERR_ENTITY_RESTRICTED_TYPE_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE_GROUP

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_INVALID_DATE

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/folders/:parent_id/actions/fileFromTemplate" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "fileType": "string",
         "fileName": "string"
       }'
Python
import requests

parent_id = "VALUE"  # ID of the parent folder

url = f"https://{{instance}}.kiteworks.com/rest/folders/{parent_id}/actions/fileFromTemplate"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "fileType": "string",
  "fileName": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": "20", "name": "Report.docx", "size": 0, "mime": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "deleted": false, "locked": 0, "created": "2024-06-20T12:00:00Z", "modified": "2024-06-20T12:00:00Z", "parent": { "id": "3", "name": "Documents" } }
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
{ "errors": { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM", "message": "File extension is in custom exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE", "message": "The specified entity mime type is not allowed." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_CUSTOM", "message": "The specified file type is in custom excluded file types list." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_GROUP", "message": "File mime type is in exclusion groups list." } }
{ "error": [ { "code": "string", "message": "string" } ] }
// Error - No Body
POST/rest/folders/{parent}/files

Upload a file

Uploads a file to the specified folder using streaming upload, where the file content is sent in the request body and metadata is provided via request headers. Requires the file_add permission on the target folder. Returns the created file entity.

Parameters
Path Parameters
parent
Required
string

The unique identifier (UUID) of the target folder.

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.

Header Parameters
X-KW-Note
Optional
boolean

Indicates if the file should be uploaded as a note.


Request Body
body
Required
string

The binary content of the file.


Responses

File uploaded successfully.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Forbidden

Possible error codes: ERR_ENTITY_LOCKED, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE, ERR_ENTITY_RESTRICTED_TYPE_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE_GROUP

code
string

Error code

message
string

Error message

Conflict

Possible error codes: ERR_ENTITY_EXISTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/folders/:parent/files" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "body": "string"
       }'
Python
import requests

parent = "VALUE"  # The unique identifier (UUID) of the target folder.

url = f"https://{{instance}}.kiteworks.com/rest/folders/{parent}/files"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "body": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": "a1b2c3d4-e5f6-4789-abcd-ef1234567890", "name": "document.pdf", "type": "file", "size": 204800, "modified": "2024-03-01T12:00:00+00:00" }
{ "errors": { "code": "ERR_ENTITY_LOCKED", "message": "File is locked" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM", "message": "File extension is in custom exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE", "message": "The specified entity mime type is not allowed." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_CUSTOM", "message": "The specified file type is in custom excluded file types list." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_GROUP", "message": "File mime type is in exclusion groups list." } }
{ "errors": { "code": "ERR_ENTITY_EXISTS", "message": "Entity exists" } }
// Error - No Body
GET/rest/permissions/file/{file_id}

Get file permissions

Returns the list of actions the current user is allowed to perform on the specified file, such as downloading, editing, or commenting.

Parameters
Path Parameters
file_id
Required
string

ID of the file

Query Parameters
id
Optional
integer

Unique action identifier

id:in
Optional
integer

Unique action identifier. Search for results that match any of the specified values for this parameter.

name
Optional
string

Action name

name:contains
Optional
string

Action name. Search for results that contain the specified characters in this parameter.

allowed
Optional
boolean

Determines if one has permissions to perform action

enabled
Optional
boolean

Determines if the given action is available considering the current object state (locked, deleted, etc.).

with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

File permissions retrieved successfully.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

Request blocked by WAF

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

file_id = "VALUE"  # ID of the file

url = f"https://{{instance}}.kiteworks.com/rest/permissions/file/{file_id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "id": "DOWNLOAD", "name": "Download", "allowed": true } ] }
// Error - No Body
GET/rest/permissions/files

Get file permissions for a set of files

Returns the current user's allowed actions for each of the specified files. File IDs are passed as request parameters. Returns 400 if no file IDs are provided.

Parameters
Query Parameters
id:in
Required
string

Unique identifier of the file.. Search for results that match any of the specified values for this parameter.

name
Optional
string

Action name

name:contains
Optional
string

Action name. Search for results that contain the specified characters in this parameter.

allowed
Optional
boolean

Determines if one has permissions to perform action

enabled
Optional
boolean

Determines if the given action is available considering the current object state (locked, deleted, etc.).

action_id
Optional
integer

Unique action identifier

action_id:in
Optional
integer

Unique action identifier. Search for results that match any of the specified values for this parameter.

with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

File permissions retrieved successfully.

fileId
string

Id of file

permissions
string[]

Request blocked by WAF

Empty response body.
Shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/permissions/files?id:in=VALUE" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/permissions/files"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
params = {
    "id:in": "VALUE",
}
response = requests.get(url, params=params, headers=headers)
print(response.json())
Responses
{ "data": [ { "fileId": "f1a2b3c4-d5e6-7890-abcd-ef1234567890", "permissions": [ { "id": "DOWNLOAD", "name": "Download", "allowed": true } ] } ] }
// Error - No Body
POST/rest/requestFile/{ref}/actions/file

Upload a file requested by user

Uploads a file to a folder or inbox in response to a file request from another user.
Access is granted via the request file reference link (ref). If the request requires
authentication (require_auth), the caller must be logged in. The uploaded file is
renamed to include the uploader's email address.

The request link must not be expired
or have reached its upload limit. Sufficient storage must be available in the target
folder. The file extension and MIME type must not be excluded by the requestor's system
policy.

Parameters
Path Parameters
ref
Required
string

The unique reference of the Request File upload link.

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Request Body
body
Required
string

The binary content of the file.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.


Responses

Returns the uploaded file metadata.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE, ERR_ENTITY_RESTRICTED_TYPE_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE_GROUP

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_INVALID_DATE

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/requestFile/:ref/actions/file" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "body": "string",
         "clientCreated": "string",
         "clientModified": "string"
       }'
Python
import requests

ref = "VALUE"  # The unique reference of the Request File upload link.

url = f"https://{{instance}}.kiteworks.com/rest/requestFile/{ref}/actions/file"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "body": "string",
  "clientCreated": "string",
  "clientModified": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": "30", "name": "contract (alice@example.com).pdf", "size": 512000, "mime": "application/pdf", "deleted": false, "locked": 0, "created": "2024-06-20T15:00:00Z", "modified": "2024-06-20T15:00:00Z", "parent": { "id": "3", "name": "Incoming Requests" } }
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM", "message": "File extension is in custom exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE", "message": "The specified entity mime type is not allowed." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_CUSTOM", "message": "The specified file type is in custom excluded file types list." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_GROUP", "message": "File mime type is in exclusion groups list." } }
{ "error": [ { "code": "string", "message": "string" } ] }
// Error - No Body
POST/rest/requestFile/{ref}/comment/{object_id}

Add a comment to an uploaded file

Adds a comment to a file that was uploaded through the request file link. Only accessible when the link requires authentication (require_auth=true) and has not expired.

Parameters
Path Parameters
ref
Required
string

The unique reference of the Request File upload link.

object_id
Required
string

Object ID of the file being commented on.

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Request Body
parentId
integer

Unique identifier of the parent comment. Set this value when replying to an existing comment

contents
Required
string

Text content of the comment

addLinks
boolean

Indicates whether HATEOAS links should be included in the response


Responses

Returns the newly created comment record.

id
Required
integer

Comment unique identifier

parentId
Required
integer

Unique identifier of the parent comment, if the comment is a reply

objectId
Required
string

Unique identifier (UUID) of the file being commented on

folderId
string

Unique identifier (UUID) of the folder containing the object being commented on

userId
Required
string

Unique identifier (UUID) of the user who authored the comment

created
string

Date and time when the comment was created

modified
string

Date and time when the comment was last modified

contents
Required
string

Text content of the comment

deleted
boolean

Indicates whether the comment has been deleted

isComment
boolean

Indicates whether the item is a comment

id
Required
string

Unique identifier of object

created
string

Date and time when the object was created

deleted
boolean

Indicates whether the object is deleted

permDeleted
boolean

Indicates whether the object is permanently deleted

expire
string

Date and time when the object expires and becomes inaccessible

modified
string

Date and time when the object was last modified

name
Required
string

Display name of the object

parentId
Required
string

Parent Folder identifier

userId
Required
string

Unique identifier of Object creator

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

user
object

User details of the member.

role
object

Role details assigned to the member.

group
object

Group details if the member belongs to a group.

sharedBy
object

Details of the user who shared the file or folder.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

permalink
string

Permanent URL for accessing the object in the web application

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

vendorDocId
string

Identifier of the corresponding document in the external vendor system (Explicit field. May be retrieved only if mentioned in "with" parameter)

vendorDocName
string

Display name of the corresponding document in the external vendor system (Explicit field. May be retrieved only if mentioned in "with" parameter)

source
integer

Numeric code identifying the external system that originated this object (e.g. Salesforce, Teams)

links
string[]

HATEOAS links associated with the entity

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

id
Required
integer

Comment unique identifier

parentId
Required
integer

Unique identifier of the parent comment, if the comment is a reply

objectId
Required
string

Unique identifier (UUID) of the file being commented on

folderId
string

Unique identifier (UUID) of the folder containing the object being commented on

userId
Required
string

Unique identifier (UUID) of the user who authored the comment

created
string

Date and time when the comment was created

modified
string

Date and time when the comment was last modified

contents
Required
string

Text content of the comment

deleted
boolean

Indicates whether the comment has been deleted

isComment
boolean

Indicates whether the item is a comment

id
Required
string

Unique identifier of object

created
string

Date and time when the object was created

deleted
boolean

Indicates whether the object is deleted

permDeleted
boolean

Indicates whether the object is permanently deleted

expire
string

Date and time when the object expires and becomes inaccessible

modified
string

Date and time when the object was last modified

name
Required
string

Display name of the object

parentId
Required
string

Parent Folder identifier

userId
Required
string

Unique identifier of Object creator

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

creator
object

Details of the user who created the object.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

permissions
Permission[]

List of permissions associated with the object.

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

members
Member[]

List of members who have access to the object.

vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

currentUserRole
object

The role of the current user in this folder.

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

permalink
string

Permanent URL for accessing the object in the web application

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

vendorDocId
string

Identifier of the corresponding document in the external vendor system (Explicit field. May be retrieved only if mentioned in "with" parameter)

vendorDocName
string

Display name of the corresponding document in the external vendor system (Explicit field. May be retrieved only if mentioned in "with" parameter)

source
integer

Numeric code identifying the external system that originated this object (e.g. Salesforce, Teams)

links
string[]

HATEOAS links associated with the entity

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

id
Required
integer

Comment unique identifier

parentId
Required
integer

Unique identifier of the parent comment, if the comment is a reply

objectId
Required
string

Unique identifier (UUID) of the file being commented on

folderId
string

Unique identifier (UUID) of the folder containing the object being commented on

userId
Required
string

Unique identifier (UUID) of the user who authored the comment

created
string

Date and time when the comment was created

modified
string

Date and time when the comment was last modified

contents
Required
string

Text content of the comment

deleted
boolean

Indicates whether the comment has been deleted

isComment
boolean

Indicates whether the item is a comment

id
Required
string

Unique identifier of object

created
string

Date and time when the object was created

deleted
boolean

Indicates whether the object is deleted

permDeleted
boolean

Indicates whether the object is permanently deleted

expire
string

Date and time when the object expires and becomes inaccessible

modified
string

Date and time when the object was last modified

name
Required
string

Display name of the object

parentId
Required
string

Parent Folder identifier

userId
Required
string

Unique identifier of Object creator

parent
Folder

Folder that directly contains this object (Explicit field. May be retrieved only if mentioned in "with" parameter)

permalink
string

Permanent URL for accessing the object in the web application

creator
UserBasicInfo

Basic profile information of the user who created the object (Explicit field. May be retrieved only if mentioned in "with" parameter)

permissions
Permission[]

Current user's permissions (Explicit field. May be retrieved only if mentioned in "with" parameter)

vendorDocId
string

Identifier of the corresponding document in the external vendor system (Explicit field. May be retrieved only if mentioned in "with" parameter)

vendorDocName
string

Display name of the corresponding document in the external vendor system (Explicit field. May be retrieved only if mentioned in "with" parameter)

source
integer

Numeric code identifying the external system that originated this object (e.g. Salesforce, Teams)

links
string[]

HATEOAS links associated with the entity

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

id
Required
integer

Comment unique identifier

parentId
Required
integer

Unique identifier of the parent comment, if the comment is a reply

objectId
Required
string

Unique identifier (UUID) of the file being commented on

folderId
string

Unique identifier (UUID) of the folder containing the object being commented on

userId
Required
string

Unique identifier (UUID) of the user who authored the comment

created
string

Date and time when the comment was created

modified
string

Date and time when the comment was last modified

contents
Required
string

Text content of the comment

deleted
boolean

Indicates whether the comment has been deleted

isComment
boolean

Indicates whether the item is a comment

object
BaseObject

Class Object

author
UserBasicInfo

Author of the comment (Explicit field. May be retrieved only if mentioned in "with" parameter)

parent
Comment

Class Comment

permissions
Permission[]

Permissions of the current user regarding the comment (Explicit field. May be retrieved only if mentioned in "with" parameter)

links
string[]

HATEOAS links associated with the entity

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

links
string[]

HATEOAS links associated with the entity

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

links
string[]

HATEOAS links associated with the entity

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

links
string[]

HATEOAS links associated with the entity

Forbidden

Possible error codes: ERR_ACCESS_USER

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_MAX_VALUE, ERR_INPUT_HTML_TAGS_INVALID, ERR_INPUT_REQUIRED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/requestFile/:ref/comment/:object_id" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "parentId": 1,
         "contents": "string",
         "addLinks": true
       }'
Python
import requests

ref = "VALUE"  # The unique reference of the Request File upload link.
object_id = "VALUE"  # Object ID of the file being commented on.

url = f"https://{{instance}}.kiteworks.com/rest/requestFile/{ref}/comment/{object_id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "parentId": 1,
  "contents": "string",
  "addLinks": true
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": 88, "parent_id": 0, "object_id": 55, "user_id": 5, "contents": "Please review the highlighted sections on page 3.", "created": "2024-03-20T12:00:00+00:00", "modified": "2024-03-20T12:00:00+00:00", "deleted": false, "folder_id": 3, "is_comment": true }
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
{ "errors": { "code": "ERR_INPUT_HTML_TAGS_INVALID", "message": "Cannot contain HTML tags other than B, I, or U" } }
{ "errors": { "code": "ERR_INPUT_REQUIRED", "message": "Field is required" } }
// Error - No Body
GET/rest/requestFile/{ref}/sources/{object_id}/content

Download files from folder in request files to folder message

Downloads a file that was made available to recipients as a source attachment in a
request files to folder message. Access is granted via the request file reference link
(ref).

The request link must be valid and not expired. If the request requires
authentication, the caller must be logged in. The file must not be deleted, infected,
or DLP-locked.

Parameters
Path Parameters
ref
Required
string

The unique reference of the Request File upload link.

object_id
Required
string

The unique identifier of the file

Header Parameters
Range
Optional
string

Range of bytes to download. e.g. bytes=0-1024


Responses

Returns the binary file content as a downloadable stream.

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 GET \
  "https://{instance}.kiteworks.com/rest/requestFile/:ref/sources/:object_id/content" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

ref = "VALUE"  # The unique reference of the Request File upload link.
object_id = "VALUE"  # The unique identifier of the file

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

Download files uploaded to request files to folder or inbox message

Downloads a file that was uploaded to a request files to folder or inbox message. Access
is granted via the request file reference link (ref).

Authentication is required
— guest access is not permitted for this endpoint. The file must be associated with the
specified request link, must not be deleted, and must not be infected or DLP-locked.

Parameters
Path Parameters
ref
Required
string

The unique reference of the Request File upload link.

object_id
Required
string

The unique identifier of the file

Header Parameters
Range
Optional
string

Range of bytes to download. e.g. bytes=0-1024


Responses

Returns the binary file content as a downloadable stream.

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 GET \
  "https://{instance}.kiteworks.com/rest/requestFile/:ref/uploads/:object_id/content" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

ref = "VALUE"  # The unique reference of the Request File upload link.
object_id = "VALUE"  # The unique identifier of the file

url = f"https://{{instance}}.kiteworks.com/rest/requestFile/{ref}/uploads/{object_id}/content"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
// Error - No Body
GET/rest/sources/actions/downloadByTransaction

Download a file from Repositories Gateway source by transaction ID

Downloads a file from its Repositories Gateway source using the transaction ID obtained
from POST /sources/{id}/actions/initiateDownload. The transfer must have completed
successfully before calling this endpoint.

Requires download permission on the
file.

Parameters
Query Parameters
transactionId
Optional
integer

Transaction ID of download

mode
Optional
string

Determines the detail level of the response body.


Responses

Returns the binary file content as a downloadable stream.

Empty response body.

Request blocked by WAF

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

url = "https://{instance}.kiteworks.com/rest/sources/actions/downloadByTransaction"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
// Error - No Body
POST/rest/sources/actions/files/{id}

Upload a file version to Repositories Gateway source

Uploads a new version of the specified file to its Repositories Gateway source. Returns a
transfer status record reflecting the result of the upload operation.

Requires
file_add permission on the Repositories Gateway parent folder of the file.
The file
extension and MIME type must not be excluded by the system policy.

Parameters
Path Parameters
id
Required
integer

The unique identifier of the Repositories Gateway file to add a new version to.

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Request Body
body
Required
string

The binary content of the file.


Responses

Returns the transfer status record for the upload operation.

id
Required
string

KP transfer status unique identifier

transactionId
Required
string

Unique transaction identifier for tracking the Repositories Gateway file transfer

kPObjectId
Required
string

Unique identifier of the Repositories Gateway object being transferred

fileHandle
Required
string

File handle used to reference the temporary file during the transfer process

userId
Required
string

The unique identifier of the user.

errCode
Required
string

Numeric error code returned when the file transfer fails

status
string

Current status of the Repositories Gateway file transfer. Accepted values: 0 (received request), 1 (in progress), 2 (completed successfully), 99 (transfer failed)

avStatus
string

AV scan status. Accepted values: allowed, disallowed, scanning

dlpStatus
string

DLP scan status. Accepted values: allowed, disallowed, scanning

Forbidden

Possible error codes: ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE, ERR_ENTITY_RESTRICTED_TYPE_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE_GROUP

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/sources/actions/files/:id" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "body": "string"
       }'
Python
import requests

id = "VALUE"  # The unique identifier of the Repositories Gateway file to add a new version to.

url = f"https://{{instance}}.kiteworks.com/rest/sources/actions/files/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "body": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": 57, "transaction_id": "txn-ghi789", "kp_object_id": "kp-42", "file_handle": "tmp_ghi789", "user_id": 101, "err_code": null, "status": "2", "av_status": "allowed", "dlp_status": "allowed" }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM", "message": "File extension is in custom exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE", "message": "The specified entity mime type is not allowed." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_CUSTOM", "message": "The specified file type is in custom excluded file types list." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_GROUP", "message": "File mime type is in exclusion groups list." } }
// Error - No Body
POST/rest/sources/{id}/actions/file

Upload a file to Repositories Gateway source

Uploads a file to the specified Repositories Gateway source folder. Returns a transfer
status record that reflects the result of the upload operation.

Requires file_add
permission on the target Repositories Gateway folder.
The file extension and MIME type
must not be excluded by the system policy.

Parameters
Path Parameters
id
Required
integer

The unique identifier of the Repositories Gateway target folder.

Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Request Body
body
Required
string

The binary content of the file.


Responses

Returns the transfer status record for the upload operation.

id
Required
string

KP transfer status unique identifier

transactionId
Required
string

Unique transaction identifier for tracking the Repositories Gateway file transfer

kPObjectId
Required
string

Unique identifier of the Repositories Gateway object being transferred

fileHandle
Required
string

File handle used to reference the temporary file during the transfer process

userId
Required
string

The unique identifier of the user.

errCode
Required
string

Numeric error code returned when the file transfer fails

status
string

Current status of the Repositories Gateway file transfer. Accepted values: 0 (received request), 1 (in progress), 2 (completed successfully), 99 (transfer failed)

avStatus
string

AV scan status. Accepted values: allowed, disallowed, scanning

dlpStatus
string

DLP scan status. Accepted values: allowed, disallowed, scanning

Forbidden

Possible error codes: ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE, ERR_ENTITY_RESTRICTED_TYPE_CUSTOM, ERR_ENTITY_RESTRICTED_TYPE_GROUP

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/sources/:id/actions/file" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "body": "string"
       }'
Python
import requests

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

url = f"https://{{instance}}.kiteworks.com/rest/sources/{id}/actions/file"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "body": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": 56, "transaction_id": "txn-def456", "kp_object_id": "kp-99", "file_handle": "tmp_def456", "user_id": 101, "err_code": null, "status": "2", "av_status": "allowed", "dlp_status": "allowed" }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_EXTENSION_CUSTOM", "message": "File extension is in custom exclusion extensions list" } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE", "message": "The specified entity mime type is not allowed." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_CUSTOM", "message": "The specified file type is in custom excluded file types list." } }
{ "errors": { "code": "ERR_ENTITY_RESTRICTED_TYPE_GROUP", "message": "File mime type is in exclusion groups list." } }
// Error - No Body
POST/rest/sources/{id}/actions/initiateDownload

Download a file asynchronously from Repositories Gateway source

Initiates an asynchronous download of the specified file from its Repositories Gateway
source. Returns a transfer status record that can be polled via
GET /sources/actions/downloadByTransaction until the transfer completes.

Requires download permission on the file.

Parameters
Path Parameters
id
Required
integer

The unique identifier of the file from Repositories Gateway Source.


Responses

Returns the transfer status record for the initiated download, including the transaction ID used to poll for completion.

id
Required
string

KP transfer status unique identifier

transactionId
Required
string

Unique transaction identifier for tracking the Repositories Gateway file transfer

kPObjectId
Required
string

Unique identifier of the Repositories Gateway object being transferred

fileHandle
Required
string

File handle used to reference the temporary file during the transfer process

userId
Required
string

The unique identifier of the user.

errCode
Required
string

Numeric error code returned when the file transfer fails

status
string

Current status of the Repositories Gateway file transfer. Accepted values: 0 (received request), 1 (in progress), 2 (completed successfully), 99 (transfer failed)

avStatus
string

AV scan status. Accepted values: allowed, disallowed, scanning

dlpStatus
string

DLP scan status. Accepted values: allowed, disallowed, scanning

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 POST \
  "https://{instance}.kiteworks.com/rest/sources/:id/actions/initiateDownload" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier of the file from Repositories Gateway Source.

url = f"https://{{instance}}.kiteworks.com/rest/sources/{id}/actions/initiateDownload"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.post(url, headers=headers)
print(response.json())
Responses
{ "id": 55, "transaction_id": "txn-abc123", "kp_object_id": "kp-42", "file_handle": "tmp_abc123", "user_id": 101, "err_code": null, "status": "1", "av_status": "allowed", "dlp_status": "allowed" }
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
// Error - No Body
GET/rest/sources/{id}/content

Download a file from repositories gateway source

Downloads the binary content of the specified file from its Repositories Gateway source.

Requires download permission on the file.

Parameters
Path Parameters
id
Required
integer

Repositories Gateway file id


Responses

Returns the binary file content as a downloadable stream.

Empty response body.

Request blocked by WAF

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

id = "VALUE"  # Repositories Gateway file id

url = f"https://{{instance}}.kiteworks.com/rest/sources/{id}/content"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
// Error - No Body
GET/preview/file/{id}

Preview a file

Description:

Returns the preview content for the specified file via the Repositories Gateway.

Precondition:

User must have the `view` permission for the file.

Response:

The preview content is returned.
Parameters
Path Parameters
id
Required
integer

The unique identifier of the entity.


Responses

The preview content has been successfully returned.

Empty response body.

Unauthorized

Possible error codes: ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ENTITY_USER_HAS_INSUFFICIENT_PERMISSIONS

code
string

Error code

message
string

Error message

Request blocked by WAF

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

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

url = f"https://{{instance}}.kiteworks.com/preview/file/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ENTITY_USER_HAS_INSUFFICIENT_PERMISSIONS", "message": "Target user has insufficient access permissions" } ] }
// Error - No Body
POST/rest/files/members

Share files

Description:

Shares specified files with multiple users.

Precondition:

Must be assigned the `user_add` permission for the folder.

Response:

Shares the files with the specified users.
Parameters
Query Parameters
updateIfExists
Optional
boolean

If set to true, updates the member if they already exist and have a different folder role.

partialSuccess
Optional
boolean

If set to true, the operation will continue for the valid items even if some items result in failure.

downgradeNested
Optional
boolean

If set to true, demote the user member role in all applicable nested folders.

returnEntity
Optional
boolean

If true, includes the entity in the response body.

with
Optional
string

Specifies additional fields to include in the response.

mode
Optional
string

Determines the detail level of the response body.


Request Body
notify
boolean

If set to true, notifies the user being invited to the file via email.

emails
string[]

List of email addresses for new members.

userIds
string[]

List of user IDs (UUID) for new members. (Recommended request size <= 100)

ids
string[]

List of file UUIDs to share with the specified users.

roleId
Required
integer

The role to assign to the new members.
8 – Collaborator (can upload, edit, and download).
9 – Viewer (read-only access).

message
string

Optional message to include with the file sharing.


Responses

All files were successfully shared with the specified users.

code
string

Error code

message
string

Error message

field
string

Associated field, if applicable.

failedIds
string[]

List of failed IDs.

id
string

Access Verification ID

parentId
integer

Unique identifier of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the object.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

user
object

User details of the member.

role
object

Role details assigned to the member.

group
object

Group details if the member belongs to a group.

sharedBy
object

Details of the user who shared the file or folder.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Requirement ID

parentId
integer

Unique identifier of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the object.

creator
object

Details of the user who created the object.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

permissions
Permission[]

List of permissions associated with the object.

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the object in the hierarchy.

members
Member[]

List of members who have access to the object.

vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

approvers
any

List of approvers for the requirement

asset_class
object

Asset class associated with the requirement

matched_recipients
string[]

List of succeeded recipient emails.

referenceId
string

Reference ID for the error

successIds
string[]

List of succeeded IDs.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any

Files were partially shared — some users were added successfully while others failed.

code
string

Error code

message
string

Error message

field
string

Associated field, if applicable.

failedIds
string[]

List of failed IDs.

id
string

Access Verification ID

parentId
integer

Unique identifier of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the object.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

user
object

User details of the member.

role
object

Role details assigned to the member.

group
object

Group details if the member belongs to a group.

sharedBy
object

Details of the user who shared the file or folder.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Requirement ID

parentId
integer

Unique identifier of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the object.

creator
object

Details of the user who created the object.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

permissions
Permission[]

List of permissions associated with the object.

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the object in the hierarchy.

members
Member[]

List of members who have access to the object.

vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

approvers
any

List of approvers for the requirement

asset_class
object

Asset class associated with the requirement

matched_recipients
string[]

List of succeeded recipient emails.

referenceId
string

Reference ID for the error

successIds
string[]

List of succeeded IDs.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_IS_MY_DIR, ERR_ENTITY_IS_SYNC_DIR, ERR_ENTITY_IS_SECURE_FOLDER, ERR_ACCESS_USER, ERR_LICENSE_MAX_USERS_COUNT_REACHED, ERR_USER_HAS_NO_USER_TYPE, ERR_USER_TYPE_NO_ACCESS, ERR_INPUT_EMAIL_IS_DISTRIBUTION_LIST, ERR_ENTITY_USER_HAS_INSUFFICIENT_PERMISSIONS, ERR_PROFILE_COLLABORATION_DISABLED, ERR_ENTITY_IS_OWNER, ERR_ENTITY_DELETED, ERR_CLIENT_OBJECT

code
string

Error code

message
string

Error message

Conflict

Possible error codes: ERR_ENTITY_EXISTS, ERR_ENTITY_ROLE_IS_ASSIGNED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/files/members" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "notify": true,
         "emails": [
         "string"
       ],
         "userIds": [
         "string"
       ],
         "ids": [
         "string"
       ],
         "roleId": 1,
         "message": "string"
       }'
Python
import requests

url = "https://{instance}.kiteworks.com/rest/files/members"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "notify": true,
  "emails": [
  "string"
],
  "userIds": [
  "string"
],
  "ids": [
  "string"
],
  "roleId": 1,
  "message": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "errors": [ { "code": "string", "message": "string", "field": "string", "failedIds": [ "..." ], "accessVerification": {}, "referenceId": "string" } ], "successIds": [ "string" ], "data": [ { "objectId": "string", "roleId": 1, "userId": "string", "groupId": 1, "user": {}, "role": {} } ] }
{ "errors": [ { "code": "string", "message": "string", "field": "string", "failedIds": [ "..." ], "accessVerification": {}, "referenceId": "string" } ], "successIds": [ "string" ], "data": [ { "objectId": "string", "roleId": 1, "userId": "string", "groupId": 1, "user": {}, "role": {} } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_BASE_DIR", "message": "Operation not permitted on Base Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_MY_DIR", "message": "Operation not permitted on Tray Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_SYNC_DIR", "message": "Operation not permitted on My Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_SECURE_FOLDER", "message": "Operation not permitted on restricted Folder." } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_LICENSE_MAX_USERS_COUNT_REACHED", "message": "License count has been reached" } ] }
{ "errors": [ { "code": "ERR_USER_HAS_NO_USER_TYPE", "message": "User has no profile" } ] }
{ "errors": [ { "code": "ERR_USER_TYPE_NO_ACCESS", "message": "Permission denied" } ] }
{ "errors": [ { "code": "ERR_INPUT_EMAIL_IS_DISTRIBUTION_LIST", "message": "Distribution list user is not allowed to register" } ] }
{ "errors": [ { "code": "ERR_ENTITY_USER_HAS_INSUFFICIENT_PERMISSIONS", "message": "Target user has insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_PROFILE_COLLABORATION_DISABLED", "message": "User's profile has no collaboration access" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_OWNER", "message": "Operation not permitted on owner member" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_CLIENT_OBJECT", "message": "Operation is not allowed on this client object" } ] }
{ "errors": [ { "code": "ERR_ENTITY_EXISTS", "message": "Entity exists" } ] }
{ "errors": [ { "code": "ERR_ENTITY_ROLE_IS_ASSIGNED", "message": "Cannot assign already assigned role" } ] }
// Error - No Body
GET/rest/files/shared

Get shared files

Description:

Gets a list of files that have been shared with the user. For each file, the file name, size, and date the file was shared is returned.

Precondition:

If the user is assigned the Restricted profile, the "Collaboration Allowed" setting must be turned on to get results.

Response:

Returns the list of files that have been shared with the user.

Sorting:

Sorting can be applied using two query parameters: `orderBy` for the field name, and `orderType` for the sort order, which can be either `asc` or `desc`.

Sorting field options:

FIELD_NAMEDescription
nameThe name of the file
sizeThe size of the file
sharedThe datetime when the file was shared
Parameters
Query Parameters
orderBy
Optional
string

Field to sort by. Default is shared.
Allowed values: name, size, shared, sharedBy, modified.

orderType
Optional
string

Sort direction. asc for ascending, desc for descending. Default is desc.

limit
Optional
integer

Range limit.

offset
Optional
integer

Range offset.

with
Optional
string

Specifies additional fields to include in the response.

mode
Optional
string

Determines the detail level of the response body.


Responses

Successfully returned the list of files shared with the user.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER

code
string

Error code

message
string

Error message

Request blocked by WAF

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

url = "https://{instance}.kiteworks.com/rest/files/shared"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
[ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "parentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "string", "type": "string", "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "creator": {} } ]
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
// Error - No Body
DELETE/rest/files/{id}/members/me

Remove access to shared file

Description:

Removes the current user's access to the specified file that was shared with them.

Precondition:

The file must have been shared with the user.

Response:

Removes the user's access to the shared file.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.


Responses

The user has been successfully removed from the file.

Empty response body.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_DELETED

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER

code
string

Error code

message
string

Error message

Request blocked by WAF

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

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/members/me"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
// Error - No Body
GET/rest/files/previewSupport

Get file preview status

Description:

Gets the status of the specified file to determine if the file type is supported for preview.

Precondition:

Must be assigned the `view` permission for the folder.

Response:

Returns confirmation as to whether the file type is supported for preview.
Parameters
Query Parameters
id:in
Required
string[]

Comma-separated list of file UUIDs to check for preview support.


Responses

Returns a list of unique identifiers (UUIDs) of the files supported for preview.

supportedIds
string[]

Unique identifier (UUID) of the supported files

Bad Request

Possible error codes: ERR_REQUEST_INVALID_FILTER

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/files/previewSupport?id:in=VALUE" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/files/previewSupport"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
params = {
    "id:in": "VALUE",
}
response = requests.get(url, params=params, headers=headers)
print(response.json())
Responses
{ "supportedIds": [ "string" ] }
{ "errors": [ { "code": "ERR_REQUEST_INVALID_FILTER", "message": "Filter validation failed" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
// Error - No Body
POST/rest/files/actions/downloadLink

Get link for downloading files and folders

Description:

Generates a link for downloading specified folders and files.

Precondition:

Must be assigned the download permission for the specified files and folders.

Response:

A download link is generated and returned. Returns the link for downloading the files and folders, once files complete security scans. Depending on system scan policies, files will be scanned for anti-virus, data loss prevention, and advanced threat protection.
Parameters
Query Parameters
partialSuccess
Optional
boolean

Indicates whether the operation should proceed if some files/folders fail the check.

extensions
Optional
string[]

Filter results to include only files with the specified comma-separated list of extensions.


Request Body
fileIds
string[]

List of file UUIDs to include in the bulk download. Maximum 1000 entries.

folderIds
string[]

List of folder UUIDs to include in the bulk download. Maximum 100 entries.

fileId
string

UUID of a single file to download. Use this for single-file downloads instead of fileIds.

versionId
string

The version ID of the specified file.


Responses

The download link has been successfully generated.

downloadLinks
string[]

List of download URLs for the requested files.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_FILTER

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/files/actions/downloadLink" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "fileIds": [
         "string"
       ],
         "folderIds": [
         "string"
       ],
         "fileId": "string",
         "versionId": "string"
       }'
Python
import requests

url = "https://{instance}.kiteworks.com/rest/files/actions/downloadLink"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "fileIds": [
  "string"
],
  "folderIds": [
  "string"
],
  "fileId": "string",
  "versionId": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "downloadLinks": [ "string" ] }
{ "errors": [ { "code": "ERR_REQUEST_INVALID_FILTER", "message": "Filter validation failed" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
// Error - No Body
PUT/rest/admin/files

Update files

Description:

Updates the metadata of multiple files at the same time.

Precondition:

Must be an administrator with access to the Files and Folders page in the Kiteworks PDN Admin.

Response:

Updates the selected files.
Parameters
Query Parameters
returnEntity
Optional
boolean

If true, includes the entity in the response body.

with
Optional
string

Specifies additional fields to include in the response.

mode
Optional
string

Determines the detail level of the response body.


Request Body
ids
Required
string[]

List of file object IDs (UUID) to be updated.

expire
string

New expiration date for the selected files.


Responses

The files have been successfully updated.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

user
object

User details of the member.

role
object

Role details assigned to the member.

group
object

Group details if the member belongs to a group.

sharedBy
object

Details of the user who shared the file or folder.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_DELETED, ERR_ENTITY_DLP_LOCKED, ERR_ENTITY_IS_ATTACHMENT, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_VIRUS_FOUND

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_EXCEEDS_MAX_VALUE, ERR_INPUT_PAST_DATE, ERR_INVALID_PARAMETER, ERR_SYSTEM_EXTEND_FILE_EXPIRATION_DISABLED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X PUT \
  "https://{instance}.kiteworks.com/rest/admin/files" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "ids": [
         "string"
       ],
         "expire": "2024-01-15"
       }'
Python
import requests

url = "https://{instance}.kiteworks.com/rest/admin/files"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "ids": [
  "string"
],
  "expire": "2024-01-15"
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())
Responses
{ "data": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "parentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "string", "type": "string", "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "creator": {} } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DLP_LOCKED", "message": "One or more files have been quarantined and are not available to download. Please contact your administrator for assistance." } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_ATTACHMENT", "message": "Operation not permitted on attachment" } ] }
{ "errors": [ { "code": "ERR_ENTITY_NOT_SCANNED", "message": "One or more files are undergoing security and privacy scans. Please try again later." } ] }
{ "errors": [ { "code": "ERR_ENTITY_VIRUS_FOUND", "message": "File is infected" } ] }
{ "errors": [ { "code": "ERR_INPUT_EXCEEDS_MAX_VALUE", "message": "Field value exceeds maximum allowed value" } ] }
{ "errors": [ { "code": "ERR_INPUT_PAST_DATE", "message": "Field value should be future date" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_EXTEND_FILE_EXPIRATION_DISABLED", "message": "Extending file expiration is not allowed" } ] }
// Error - No Body
POST/rest/admin/files/{id}/actions/rescan

Scan a file for security

Description:

Runs a security scan on the specified file.

Precondition:

Must authenticate as an administrator with a role allowing for manually scanning files for security.

Response:

Scans the selected file for security. Depending on system scan policies, the file is scanned for anti-virus, data loss prevention, and advanced threat protection.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.

Query Parameters
returnEntity
Optional
boolean

If true, includes the entity in the response body.

with
Optional
string

Specifies additional fields to include in the response.

mode
Optional
string

Determines the detail level of the response body.


Responses

The file has been successfully submitted for rescan.

msg
string

The successful response message

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_ADMIN

code
string

Error code

message
string

Error message

Not Found

Possible error codes: ERR_ENTITY_FILE_IS_NOT_FOUND, ERR_ENABLED_SCANNING_SERVICE_IS_NOT_FOUND

code
string

Error code

message
string

Error message

Conflict

Possible error codes: ERR_SCANNING_IN_PROGRESS

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/admin/files/:id/actions/rescan" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/admin/files/{id}/actions/rescan"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.post(url, headers=headers)
print(response.json())
Responses
{ "msg": "string" }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_ADMIN", "message": "Insufficient admin access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_FILE_IS_NOT_FOUND", "message": "The file is not found" } ] }
{ "errors": [ { "code": "ERR_ENABLED_SCANNING_SERVICE_IS_NOT_FOUND", "message": "No enabled scanning service is found" } ] }
{ "errors": [ { "code": "ERR_SCANNING_IN_PROGRESS", "message": "Scanning in progress. Please rescan later." } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
// Error - No Body