# Kiteworks API — mobileSync Operations

**10 endpoints** | [Browse interactive reference](https://developer.kiteworks.com/api-reference/mobileSync.html) | [Download spec slice](https://developer.kiteworks.com/assets/specs/mobileSync.json)

> **Authentication required.** All requests must include a Bearer access token in the
> `Authorization` header. See [Authentication](https://developer.kiteworks.com/authentication.md) for how to
> obtain a token using OAuth 2.0 Authorization Code (PKCE) or JWT Bearer flow.

---

## POST /rest/files/actions/mobileSyncItems

**Summary:** Add multiple files to mobile sync list

Adds multiple files to the current user's mobile sync list in a single request. Supports partial success, meaning valid items are processed even if some fail. This operation will not return location headers for each entity created, if the inserted records are
        required, returnEntity should be set to true.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `id:in` | query | yes | 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` | query | no | If set to `true`, the operation will continue for the valid items even if some items result in failure. |
| `returnEntity` | query | no | If set to `true`, returns information about the newly created entity. |
| `mode` | query | no | Determines the detail level of the response body. |

**Responses:**

| Code | Description |
|------|-------------|
| 200 | Mobile sync items created successfully. |
| 409 | Conflict  <i>Possible error codes: </i>ERR_ENTITY_EXISTS |
| 490 | Request blocked by WAF |

**Response Examples:**

**200 (BulkMobileSyncCreated):**

```json
{
  "data": [
    {
      "id": 10,
      "fileId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "userId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
      "created": "2024-04-01T09:00:00Z"
    },
    {
      "id": 11,
      "fileId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "userId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
      "created": "2024-04-01T09:00:00Z"
    }
  ],
  "metadata": {
    "total": 2,
    "limit": 50,
    "offset": 0
  }
}
```

**409 (ERR_ENTITY_EXISTS):**

```json
{
  "errors": {
    "code": "ERR_ENTITY_EXISTS",
    "message": "Entity exists"
  }
}
```

**Code Samples:**

**cURL:**

```shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/files/actions/mobileSyncItems?id:in=VALUE" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

url = "https://{instance}.kiteworks.com/rest/files/actions/mobileSyncItems"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
params = {
    "id:in": "VALUE",
}
response = requests.post(url, params=params, headers=headers)
print(response.json())
```

---

## DELETE /rest/files/actions/mobileSyncItems

**Summary:** Delete multiple files from user mobile sync list

Removes multiple files from the current user's mobile sync list in a single request. Supports partial success, meaning valid items are processed even if some fail.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `id:in` | query | yes | 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` | query | no | If set to `true`, the operation will continue for the valid items even if some items result in failure. |
| `mode` | query | no | Determines the detail level of the response body. |

**Responses:**

| Code | Description |
|------|-------------|
| 204 | Mobile sync items removed successfully. |
| 403 | Forbidden  <i>Possible error codes: </i>ERR_ACCESS_USER |
| 490 | Request blocked by WAF |

**Response Examples:**

**403 (ERR_ACCESS_USER):**

```json
{
  "errors": {
    "code": "ERR_ACCESS_USER",
    "message": "Insufficient access permissions"
  }
}
```

**Code Samples:**

**cURL:**

```shell
curl -X DELETE \
  "https://{instance}.kiteworks.com/rest/files/actions/mobileSyncItems?id:in=VALUE" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

url = "https://{instance}.kiteworks.com/rest/files/actions/mobileSyncItems"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
params = {
    "id:in": "VALUE",
}
response = requests.delete(url, params=params, headers=headers)
print(response.json())
```

---

## POST /rest/files/actions/push

**Summary:** Push files list to mobile sync list

Adds multiple files to the mobile sync list for all members of the files' parent folder. Requires mobile sync to be enabled. Supports partial success, meaning valid items are processed even if some fail. This operation will not return location headers for each entity created, if the inserted records are
        required, returnEntity should be set to true.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `id:in` | query | yes | 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` | query | no | If set to `true`, the operation will continue for the valid items even if some items result in failure. |
| `returnEntity` | query | no | If set to `true`, returns information about the newly created entity. |
| `mode` | query | no | Determines the detail level of the response body. |

**Responses:**

| Code | Description |
|------|-------------|
| 200 | Files pushed to mobile sync list successfully. |
| 490 | Request blocked by WAF |

**Response Examples:**

**200 (BulkPushCreated):**

```json
{
  "data": [
    {
      "id": 20,
      "fileId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "userId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
      "pushUserId": "u9z8y7x6-w5v4-3210-uvwx-yz1234567890",
      "created": "2024-04-01T10:00:00Z"
    }
  ],
  "metadata": {
    "total": 1,
    "limit": 50,
    "offset": 0
  }
}
```

**Code Samples:**

**cURL:**

```shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/files/actions/push?id:in=VALUE" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

url = "https://{instance}.kiteworks.com/rest/files/actions/push"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
params = {
    "id:in": "VALUE",
}
response = requests.post(url, params=params, headers=headers)
print(response.json())
```

---

## DELETE /rest/files/actions/push

**Summary:** Un-Push multiple files

Removes multiple files from all folder members' mobile sync list in a single request. Requires mobile sync to be enabled. Supports partial success, meaning valid items are processed even if some fail.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `id:in` | query | yes | 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` | query | no | If set to `true`, the operation will continue for the valid items even if some items result in failure. |
| `mode` | query | no | Determines the detail level of the response body. |

**Responses:**

| Code | Description |
|------|-------------|
| 204 | Files removed from all folder members' mobile sync list successfully. |
| 490 | Request blocked by WAF |

**Code Samples:**

**cURL:**

```shell
curl -X DELETE \
  "https://{instance}.kiteworks.com/rest/files/actions/push?id:in=VALUE" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

url = "https://{instance}.kiteworks.com/rest/files/actions/push"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
params = {
    "id:in": "VALUE",
}
response = requests.delete(url, params=params, headers=headers)
print(response.json())
```

---

## POST /rest/files/{id}/actions/push

**Summary:** Push file to mobile sync list

Adds the specified file to the mobile sync list for all members of the file's parent folder. Requires mobile sync to be enabled.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `id` | path | yes | The unique identifier of the file |
| `returnEntity` | query | no | If set to `true`, returns information about the newly created entity. |
| `mode` | query | no | Determines the detail level of the response body. |

**Responses:**

| Code | Description |
|------|-------------|
| 200 | File pushed to mobile sync list successfully. |
| 490 | Request blocked by WAF |

**Response Examples:**

**200 (PushCreated):**

```json
{
  "data": [
    {
      "id": 20,
      "fileId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "userId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
      "pushUserId": "u9z8y7x6-w5v4-3210-uvwx-yz1234567890",
      "created": "2024-04-01T10:00:00Z"
    }
  ],
  "metadata": {
    "total": 1,
    "limit": 50,
    "offset": 0
  }
}
```

**Code Samples:**

**cURL:**

```shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/files/:id/actions/push" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

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

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/actions/push"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.post(url, headers=headers)
print(response.json())
```

---

## DELETE /rest/files/{id}/actions/push

**Summary:** Un-Push file from mobile sync list

Removes the specified file from all folder members' mobile sync list. Requires mobile sync to be enabled.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `id` | path | yes | The unique identifer (UUID) of the file |
| `returnEntity` | query | no | If set to `true`, returns information about the newly created entity. |
| `mode` | query | no | Determines the detail level of the response body. |

**Responses:**

| Code | Description |
|------|-------------|
| 204 | File removed from all folder members' mobile sync list successfully. |
| 490 | Request blocked by WAF |

**Code Samples:**

**cURL:**

```shell
curl -X DELETE \
  "https://{instance}.kiteworks.com/rest/files/:id/actions/push" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

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

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/actions/push"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.json())
```

---

## GET /rest/mobileSyncItems

**Summary:** List mobile sync items for the current user

### Description:
  Returns a paginated list of mobile sync items belonging to the current user.
### Precondition:
  User must be authenticated. The tenant must not be suspended and the license must not be expired.
### Response:
  Returns a list of mobile sync items for the current user.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `returnEntity` | query | no | If true, includes the entity in the response body. |
| `with` | query | no | Specifies additional fields to include in the response. |
| `mode` | query | no | Determines the detail level of the response body. |
| `avStatus` | query | no | Filter results by antivirus scan status. Accepted values: `allowed`, `disallowed`, `scanning`. |
| `dlpStatus` | query | no | Filter results by DLP scan status. Accepted values: `allowed`, `disallowed`, `scanning`. |
| `orderBy` | query | no | Sort order for the results. Default is `created:desc`. Allowed values: `created:asc`, `created:desc`. |
| `limit` | query | no | Range limit. |
| `offset` | query | no | Range offset. |

**Responses:**

| Code | Description |
|------|-------------|
| 200 | The list of mobile sync items has been successfully returned. |
| 401 | Unauthorized  <i>Possible error codes: </i>ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED |
| 403 | Forbidden  <i>Possible error codes: </i>ERR_SYSTEM_TENANT_SUSPENDED, ERR_ACCESS_USER, ERR_ENTITY_DELETED |
| 422 | Unprocessable Content  <i>Possible error codes: </i>ERR_LICENSE_EXPIRED |
| 490 | Request blocked by WAF |

**Response Examples:**

**401 (ERR_AUTH_INVALID_CSRF):**

```json
{
  "errors": [
    {
      "code": "ERR_AUTH_INVALID_CSRF",
      "message": "Invalid CSRF Authentication"
    }
  ]
}
```

**401 (ERR_AUTH_UNAUTHORIZED):**

```json
{
  "errors": [
    {
      "code": "ERR_AUTH_UNAUTHORIZED",
      "message": "Unauthorized"
    }
  ]
}
```

**403 (ERR_SYSTEM_TENANT_SUSPENDED):**

```json
{
  "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."
    }
  ]
}
```

**403 (ERR_ACCESS_USER):**

```json
{
  "errors": [
    {
      "code": "ERR_ACCESS_USER",
      "message": "Insufficient access permissions"
    }
  ]
}
```

**403 (ERR_ENTITY_DELETED):**

```json
{
  "errors": [
    {
      "code": "ERR_ENTITY_DELETED",
      "message": "Entity is deleted"
    }
  ]
}
```

**422 (ERR_LICENSE_EXPIRED):**

```json
{
  "errors": [
    {
      "code": "ERR_LICENSE_EXPIRED",
      "message": "License has expired"
    }
  ]
}
```

**Code Samples:**

**cURL:**

```shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/mobileSyncItems" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

url = "https://{instance}.kiteworks.com/rest/mobileSyncItems"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
```

---

## POST /rest/mobileSyncItems

**Summary:** Set file as a mobile sync item

Adds the specified file to the current user's mobile sync list.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `returnEntity` | query | no | If set to `true`, returns information about the newly created entity. |
| `mode` | query | no | Determines the detail level of the response body. |

**Request Body:**

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `fileId` | integer | yes | Unique identifier of File |
| `addLinks` | boolean | no | Indicates whether HATEOAS links should be included in the response |

**Responses:**

| Code | Description |
|------|-------------|
| 200 | Mobile sync item created successfully. |
| 422 | Unprocessable Content  <i>Possible error codes: </i>ERR_INPUT_REQUIRED |
| 490 | Request blocked by WAF |

**Response Examples:**

**200 (MobileSyncCreated):**

```json
{
  "id": 10,
  "fileId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "userId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
  "pushUserId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
  "created": "2024-04-01T09:00:00Z",
  "fingerprint": "abc123def456"
}
```

**422 (ERR_INPUT_REQUIRED):**

```json
{
  "errors": {
    "code": "ERR_INPUT_REQUIRED",
    "message": "Field is required"
  }
}
```

**Code Samples:**

**cURL:**

```shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/mobileSyncItems" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "fileId": 1,
         "addLinks": true
       }'
```

**Python:**

```python
import requests

url = "https://{instance}.kiteworks.com/rest/mobileSyncItems"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "fileId": 1,
  "addLinks": true
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

---

## GET /rest/mobileSyncItems/{id}

**Summary:** Return a mobile sync item

### Description:
  Returns information about the specified mobile sync item belonging to the current user.
### Precondition:
  User must be authenticated and must own the specified mobile sync item. The tenant must not be suspended and the license must not be expired.
### Response:
  Returns the specified mobile sync item.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `id` | path | yes | The unique identifier of the entity. |
| `returnEntity` | query | no | If true, includes the entity in the response body. |
| `with` | query | no | Specifies additional fields to include in the response. |
| `mode` | query | no | Determines the detail level of the response body. |

**Responses:**

| Code | Description |
|------|-------------|
| 200 | The mobile sync item has been successfully returned. |
| 401 | Unauthorized  <i>Possible error codes: </i>ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED |
| 403 | Forbidden  <i>Possible error codes: </i>ERR_SYSTEM_TENANT_SUSPENDED, ERR_ACCESS_USER, ERR_ENTITY_DELETED |
| 422 | Unprocessable Content  <i>Possible error codes: </i>ERR_LICENSE_EXPIRED |
| 490 | Request blocked by WAF |

**Response Examples:**

**401 (ERR_AUTH_INVALID_CSRF):**

```json
{
  "errors": [
    {
      "code": "ERR_AUTH_INVALID_CSRF",
      "message": "Invalid CSRF Authentication"
    }
  ]
}
```

**401 (ERR_AUTH_UNAUTHORIZED):**

```json
{
  "errors": [
    {
      "code": "ERR_AUTH_UNAUTHORIZED",
      "message": "Unauthorized"
    }
  ]
}
```

**403 (ERR_SYSTEM_TENANT_SUSPENDED):**

```json
{
  "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."
    }
  ]
}
```

**403 (ERR_ACCESS_USER):**

```json
{
  "errors": [
    {
      "code": "ERR_ACCESS_USER",
      "message": "Insufficient access permissions"
    }
  ]
}
```

**403 (ERR_ENTITY_DELETED):**

```json
{
  "errors": [
    {
      "code": "ERR_ENTITY_DELETED",
      "message": "Entity is deleted"
    }
  ]
}
```

**422 (ERR_LICENSE_EXPIRED):**

```json
{
  "errors": [
    {
      "code": "ERR_LICENSE_EXPIRED",
      "message": "License has expired"
    }
  ]
}
```

**Code Samples:**

**cURL:**

```shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/mobileSyncItems/:id" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

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

url = f"https://{{instance}}.kiteworks.com/rest/mobileSyncItems/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
```

---

## DELETE /rest/mobileSyncItems/{id}

**Summary:** Remove mobile sync item

Removes the specified item from the current user's mobile sync list.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `id` | path | yes | ID of the mobile sync item to be removed |

**Responses:**

| Code | Description |
|------|-------------|
| 204 | Mobile sync item removed successfully. |
| 403 | Forbidden  <i>Possible error codes: </i>ERR_ACCESS_USER |
| 490 | Request blocked by WAF |

**Response Examples:**

**403 (ERR_ACCESS_USER):**

```json
{
  "errors": {
    "code": "ERR_ACCESS_USER",
    "message": "Insufficient access permissions"
  }
}
```

**Code Samples:**

**cURL:**

```shell
curl -X DELETE \
  "https://{instance}.kiteworks.com/rest/mobileSyncItems/:id" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

id = "VALUE"  # ID of the mobile sync item to be removed

url = f"https://{{instance}}.kiteworks.com/rest/mobileSyncItems/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.json())
```

---
