{
  "openapi": "3.0.2",
  "info": {
    "version": "28",
    "title": "Kiteworks API — dli Operations"
  },
  "paths": {
    "/rest/dli/exports": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Return the list of all exports for all users",
        "description": "Returns a paginated list of all data exports across all users, including each export's status, type, date range, and download URL. Requires admin privileges.",
        "responses": {
          "200": {
            "description": "List of exports retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Export"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/MetaData"
                    }
                  }
                },
                "examples": {
                  "ExportList": {
                    "summary": "Paginated list of exports",
                    "value": {
                      "data": [
                        {
                          "id": "exp-guid-001",
                          "status": "completed",
                          "type": "files",
                          "startDate": "2024-01-01",
                          "endDate": "2024-01-31",
                          "userId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
                          "generatedDate": "2024-02-01T08:00:00Z",
                          "fileName": "export_files_jan2024.zip",
                          "downloadURL": "https://example.com/exports/exp-guid-001"
                        }
                      ],
                      "metadata": {
                        "total": 1,
                        "limit": 50,
                        "offset": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "query",
            "name": "user_id",
            "description": "Unique identifier of user",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "user_id:in",
            "description": "Unique identifier of user. Search for results that match any of the specified values for this parameter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "description": "Status of the generated report",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status:contains",
            "description": "Status of the generated report. Search for results that contain the specified characters in this parameter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Offset",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "with",
            "description": "With parameters",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "description": "Determines the detail level of the response body.",
            "schema": {
              "type": "string",
              "enum": [
                "full_with_links",
                "full",
                "compact"
              ]
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/exports\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = \"https://{instance}.kiteworks.com/rest/dli/exports\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/exports/users/{id}": {
      "post": {
        "tags": [
          "dli"
        ],
        "summary": "Start generating export for the specified user",
        "description": "Initiates one or more data export jobs for the specified user based on the requested report types and date range. Returns the newly created export record(s) in a pending state. Requires admin privileges.",
        "responses": {
          "200": {
            "description": "Export job(s) created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Export"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/MetaData"
                    }
                  }
                },
                "examples": {
                  "ExportCreated": {
                    "summary": "Newly created export in pending state",
                    "value": {
                      "data": [
                        {
                          "id": "exp-guid-002",
                          "status": "pending",
                          "type": "activities",
                          "startDate": "2024-03-01",
                          "endDate": "2024-03-31",
                          "userId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
                          "generatedDate": null,
                          "fileName": null,
                          "downloadURL": null
                        }
                      ],
                      "metadata": {
                        "total": 1,
                        "limit": 50,
                        "offset": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content<br /><br /><i>Possible error codes: </i>ERR_INPUT_INVALID_DATE, ERR_INPUT_DATE_NOT_BEFORE, ERR_INPUT_REQUIRED, ERR_INPUT_DATE_NOT_AFTER, ERR_INPUT_NOT_ARRAY, ERR_INPUT_NOT_IN_LIST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_INPUT_REQUIRED": {
                    "summary": "Field is required",
                    "description": "Field is required",
                    "value": {
                      "errors": {
                        "code": "ERR_INPUT_REQUIRED",
                        "message": "Field is required"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of the user",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "returnEntity",
            "description": "If set to `true`, returns information about the newly created entity.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "description": "Determines the detail level of the response body.",
            "schema": {
              "type": "string",
              "enum": [
                "full_with_links",
                "full"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Export.Post"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X POST \\\n  \"https://{instance}.kiteworks.com/rest/dli/exports/users/:id\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n         \"startDate\": \"2024-01-15\",\n         \"endDate\": \"2024-01-15\",\n         \"types\": [\n         \"string\"\n       ],\n         \"addLinks\": true\n       }'"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # ID of the user\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/exports/users/{id}\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n  \"startDate\": \"2024-01-15\",\n  \"endDate\": \"2024-01-15\",\n  \"types\": [\n  \"string\"\n],\n  \"addLinks\": true\n}\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/exports/{id}": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Return information of an export such as status, download url, user ID, etc.",
        "description": "Returns the details of a specific export job, including its status, type, date range, the user it belongs to, and the download URL when the export is complete. Requires admin privileges.",
        "responses": {
          "200": {
            "description": "Export details retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Export"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/MetaData"
                    }
                  }
                },
                "examples": {
                  "ExportCompleted": {
                    "summary": "A completed export with a download URL",
                    "value": {
                      "id": "exp-guid-001",
                      "status": "completed",
                      "type": "files",
                      "startDate": "2024-01-01",
                      "endDate": "2024-01-31",
                      "userId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
                      "generatedDate": "2024-02-01T08:00:00Z",
                      "fileName": "export_files_jan2024.zip",
                      "downloadURL": "https://example.com/exports/exp-guid-001"
                    }
                  },
                  "ExportPending": {
                    "summary": "An export still being generated",
                    "value": {
                      "id": "exp-guid-002",
                      "status": "pending",
                      "type": "activities",
                      "startDate": "2024-03-01",
                      "endDate": "2024-03-31",
                      "userId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
                      "generatedDate": null,
                      "fileName": null,
                      "downloadURL": null
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of the export",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/exports/:id\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # ID of the export\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/exports/{id}\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      },
      "delete": {
        "tags": [
          "dli"
        ],
        "summary": "Delete the specified export.",
        "description": "Permanently deletes the specified export record and its associated data. Requires admin privileges.",
        "responses": {
          "204": {
            "description": "Export deleted successfully."
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of the export",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X DELETE \\\n  \"https://{instance}.kiteworks.com/rest/dli/exports/:id\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # ID of the export\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/exports/{id}\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.delete(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/exports/{id}/content": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Download the generated export.",
        "description": "Downloads the generated export file as a binary stream. The export must be in a completed state before it can be downloaded. Requires admin privileges.",
        "responses": {
          "200": {
            "description": "Export file returned as a binary stream."
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of the export",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/exports/:id/content\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # ID of the export\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/exports/{id}/content\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/files/{fileId}/users/{userId}/activities": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Return the list of Activities for this file",
        "description": "Returns all activities performed by the specified user on the specified file. Each activity includes the affected object, a human-readable message, the acting user, and whether the action was successful. Requires admin privileges.",
        "responses": {
          "200": {
            "description": "List of file activities for the user retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ActivityAdmin"
                      }
                    }
                  }
                },
                "examples": {
                  "FileActivities": {
                    "summary": "Activities on a file by a user",
                    "value": {
                      "data": [
                        {
                          "object": {
                            "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                            "name": "contract.pdf",
                            "type": "file"
                          },
                          "message": "User downloaded file contract.pdf",
                          "directUser": {
                            "id": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
                            "name": "Alice Smith",
                            "email": "alice@example.com"
                          },
                          "successful": 1
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "fileId",
            "description": "ID of the file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "userId",
            "description": "The unique identifier of the user.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "noDayBack",
            "description": "Number of days back to search",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "startDate",
            "description": "Start date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "endDate",
            "description": "End date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "filter",
            "description": "Filter activities by scope. Accepted values: `all`, `my`.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "my"
              ]
            }
          },
          {
            "in": "query",
            "name": "search",
            "description": "Search by mail body, subject and sender/recipients",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "description": "Filter activities by type. Accepted values: `all`, `folder_changes`, `file_changes`, `user_preferences`, `mail`, `tasks`, `comments`, `kitepoint`.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "folder_changes",
                "file_changes",
                "user_preferences",
                "mail",
                "tasks",
                "comments",
                "kitepoint"
              ]
            }
          },
          {
            "in": "query",
            "name": "transactionId",
            "description": "Transaction ID associated with the activities",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "orderBy",
            "description": "Sorting options",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "enum": [
                "created:asc",
                "created:desc",
                "name:asc",
                "name:desc"
              ]
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Offset",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "with",
            "description": "With parameters",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "description": "Determines the detail level of the response body.",
            "schema": {
              "type": "string",
              "enum": [
                "full_with_links",
                "full",
                "compact"
              ]
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/files/:fileId/users/:userId/activities\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nfileId = \"VALUE\"  # ID of the file\nuserId = \"VALUE\"  # The unique identifier of the user.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/files/{fileId}/users/{userId}/activities\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/files/{id}": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Retrieve information about the file specified.",
        "description": "Returns metadata for the specified file, including its name, size, MIME type, content fingerprint, creation and modification dates, deletion status, and lock state.",
        "responses": {
          "200": {
            "description": "File metadata retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                },
                "examples": {
                  "FileInfo": {
                    "summary": "File metadata",
                    "value": {
                      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                      "name": "contract.pdf",
                      "size": 204800,
                      "mime": "application/pdf",
                      "fingerprint": "d41d8cd98f00b204e9800998ecf8427e",
                      "created": "2024-01-15T10:30:00Z",
                      "modified": "2024-03-20T14:45:00Z",
                      "deleted": false,
                      "locked": 0,
                      "parentId": "f0e1d2c3-b4a5-6789-0fed-cba987654321"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of the file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "with",
            "description": "With parameters",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "description": "Determines the detail level of the response body.",
            "schema": {
              "type": "string",
              "enum": [
                "full_with_links",
                "full",
                "compact"
              ]
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/files/:id\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # ID of the file\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/files/{id}\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/files/{id}/content": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Read file content",
        "description": "Downloads the binary content of the specified file. Supports partial downloads via the Range header.",
        "responses": {
          "200": {
            "description": "File content returned as a binary stream."
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of the file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Range",
            "description": "Range of bytes to download. e.g. `bytes=0-1024`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/files/:id/content\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # ID of the file\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/files/{id}/content\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/files/{id}/path": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Get file path",
        "description": "Returns the full ancestor path of the specified file as an ordered list of folder nodes, from the workspace root down to the file's parent folder.",
        "responses": {
          "200": {
            "description": "File path retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FilePathResponse"
                },
                "examples": {
                  "FilePath": {
                    "summary": "Path from workspace root to the file's parent folder",
                    "value": {
                      "data": [
                        {
                          "id": "root-folder-guid",
                          "name": "Workspace"
                        },
                        {
                          "id": "sub-folder-guid",
                          "name": "Projects"
                        },
                        {
                          "id": "parent-folder-guid",
                          "name": "Q1 Reports"
                        }
                      ],
                      "links": [
                        {
                          "rel": "self",
                          "href": "https://example.com/api/rest/1/dli/files/a1b2c3d4/path"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of the file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "description": "Determines the detail level of the response body.",
            "schema": {
              "type": "string",
              "enum": [
                "full_with_links",
                "full"
              ]
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/files/:id/path\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # ID of the file\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/files/{id}/path\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/files/{id}/preview": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Retrieve information about the file preview.",
        "description": "Returns preview access links and processing status for the specified file.",
        "responses": {
          "200": {
            "description": "Preview metadata retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Preview"
                },
                "examples": {
                  "PreviewReady": {
                    "summary": "Preview is available",
                    "value": {
                      "link": "https://example.com/preview/abc123/dli/1",
                      "pdf": "https://example.com/preview/abc123/pdf/dli/1",
                      "viewUrl": "https://example.com/preview/abc123/view/dli/1",
                      "status": "Preview",
                      "watermark": "CONFIDENTIAL",
                      "tdfOriginalExtension": null
                    }
                  },
                  "PreviewProcessing": {
                    "summary": "Preview is still being generated",
                    "value": {
                      "link": "https://example.com/preview/abc123/dli/1",
                      "pdf": "https://example.com/preview/abc123/pdf/dli/1",
                      "viewUrl": "https://example.com/preview/abc123/view/dli/1",
                      "status": "Processing",
                      "watermark": null,
                      "tdfOriginalExtension": null
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of the file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/files/:id/preview\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # ID of the file\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/files/{id}/preview\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/files/{id}/versions": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "List versions",
        "description": "Returns a paginated list of all versions for the specified file. Each version includes its name, size, MIME type, creation date, creator, and content fingerprint.",
        "responses": {
          "200": {
            "description": "List of file versions retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Version"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/MetaData"
                    }
                  }
                },
                "examples": {
                  "VersionList": {
                    "summary": "Paginated list of versions",
                    "value": {
                      "data": [
                        {
                          "id": "v1b2c3d4-e5f6-7890-abcd-ef1234567890",
                          "name": "report_v2.pdf",
                          "versionNumber": 2,
                          "size": 102400,
                          "mime": "application/pdf",
                          "fingerprint": "abc123def456",
                          "created": "2024-03-20T14:45:00Z",
                          "deleted": false,
                          "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                        }
                      ],
                      "metadata": {
                        "total": 1,
                        "limit": 50,
                        "offset": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Object id of file to retrieve versions for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "created",
            "description": "File Version creation date",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "created:gt",
            "description": "File Version creation date. Search for results where this parameter value is greater than the specified value.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "created:gte",
            "description": "File Version creation date. Search for results where this parameter value is greater than or equal to the specified value.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "created:lt",
            "description": "File Version creation date. Search for results where this parameter value is less than the specified value.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "created:lte",
            "description": "File Version creation date. Search for results where this parameter value is less than or equal to the specified value.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "orderBy",
            "description": "Sorting options",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "enum": [
                "id:asc",
                "id:desc",
                "versionNumber:asc",
                "versionNumber:desc",
                "created:asc",
                "created:desc"
              ]
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Offset",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locate_id",
            "description": "If specified, \"offset\" parameter will be ignored\n                                            and the page containing entity with this Id will be returned.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "with",
            "description": "With parameters",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "description": "Determines the detail level of the response body.",
            "schema": {
              "type": "string",
              "enum": [
                "full_with_links",
                "full",
                "compact"
              ]
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/files/:id/versions\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # Object id of file to retrieve versions for\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/files/{id}/versions\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/files/{id}/versions/{version_id}": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Allow DLI admin to get specified version",
        "description": "Returns the metadata for a specific version of a file, including its name, size, MIME type, creation date, creator, and content fingerprint.",
        "responses": {
          "200": {
            "description": "Version metadata retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Version"
                },
                "examples": {
                  "VersionInfo": {
                    "summary": "A specific file version",
                    "value": {
                      "id": "v1b2c3d4-e5f6-7890-abcd-ef1234567890",
                      "name": "report_v2.pdf",
                      "versionNumber": 2,
                      "size": 102400,
                      "mime": "application/pdf",
                      "fingerprint": "abc123def456",
                      "created": "2024-03-20T14:45:00Z",
                      "deleted": false,
                      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Object id of file to retrieve versions for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version_id",
            "description": "version ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/files/:id/versions/:version_id\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # Object id of file to retrieve versions for\nversion_id = \"VALUE\"  # version ID\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/files/{id}/versions/{version_id}\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/files/{id}/versions/{version_id}/content": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Download specified version",
        "description": "Downloads the binary content of the specified file version. Supports partial downloads via the Range header.",
        "responses": {
          "200": {
            "description": "Version content returned as a binary stream."
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of the file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version_id",
            "description": "version ID for which to retrieve content",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Range",
            "description": "Range of bytes to download. e.g. `bytes=0-1024`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/files/:id/versions/:version_id/content\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # ID of the file\nversion_id = \"VALUE\"  # version ID for which to retrieve content\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/files/{id}/versions/{version_id}/content\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/folders/{folderId}/users/{userId}/activities": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Return the list of activities for this folder of the specified user",
        "description": "Returns all activities performed by the specified user on the specified folder. Each activity includes the affected object, a human-readable message, the acting user, and whether the action was successful. Requires admin privileges.",
        "responses": {
          "200": {
            "description": "List of folder activities for the user retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ActivityAdmin"
                      }
                    }
                  }
                },
                "examples": {
                  "FolderActivities": {
                    "summary": "Activities on a folder by a user",
                    "value": {
                      "data": [
                        {
                          "object": {
                            "id": "f0e1d2c3-b4a5-6789-0fed-cba987654321",
                            "name": "Q1 Reports",
                            "type": "folder"
                          },
                          "message": "User uploaded file to Q1 Reports",
                          "directUser": {
                            "id": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
                            "name": "Alice Smith",
                            "email": "alice@example.com"
                          },
                          "successful": 1
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "folderId",
            "description": "The unique identifier of the folder.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "userId",
            "description": "The unique identifier of the user.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "noDayBack",
            "description": "Number of days back to search",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "startDate",
            "description": "Start date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "endDate",
            "description": "End date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "filter",
            "description": "Filter activities by scope. Accepted values: `all`, `my`.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "my"
              ]
            }
          },
          {
            "in": "query",
            "name": "search",
            "description": "Search by mail body, subject and sender/recipients",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "description": "Filter activities by type. Accepted values: `all`, `folder_changes`, `file_changes`, `user_preferences`, `mail`, `tasks`, `comments`, `kitepoint`.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "folder_changes",
                "file_changes",
                "user_preferences",
                "mail",
                "tasks",
                "comments",
                "kitepoint"
              ]
            }
          },
          {
            "in": "query",
            "name": "transactionId",
            "description": "Transaction ID associated with the activities",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "orderBy",
            "description": "Sorting options",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "enum": [
                "created:asc",
                "created:desc",
                "name:asc",
                "name:desc"
              ]
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Offset",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "with",
            "description": "With parameters",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "description": "Determines the detail level of the response body.",
            "schema": {
              "type": "string",
              "enum": [
                "full_with_links",
                "full",
                "compact"
              ]
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/folders/:folderId/users/:userId/activities\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nfolderId = \"VALUE\"  # The unique identifier of the folder.\nuserId = \"VALUE\"  # The unique identifier of the user.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/folders/{folderId}/users/{userId}/activities\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/folders/{id}": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Retrieve folder information.",
        "description": "Returns metadata for the specified folder, including its name, creation date, deletion status, and permalink.",
        "responses": {
          "200": {
            "description": "Folder metadata retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Folder"
                },
                "examples": {
                  "FolderInfo": {
                    "summary": "Folder metadata",
                    "value": {
                      "id": "f0e1d2c3-b4a5-6789-0fed-cba987654321",
                      "name": "Q1 Reports",
                      "created": "2023-11-01T08:00:00Z",
                      "modified": "2024-02-14T12:30:00Z",
                      "deleted": false,
                      "parentId": "root-folder-guid",
                      "permalink": "https://example.com/w/f0e1d2c3"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The unique identifier of the folder.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "with",
            "description": "With parameters",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "description": "Determines the detail level of the response body.",
            "schema": {
              "type": "string",
              "enum": [
                "full_with_links",
                "full",
                "compact"
              ]
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/folders/:id\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # The unique identifier of the folder.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/folders/{id}\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/mail/{id}/attachments": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "List email attachments",
        "description": "Returns a paginated list of all attachments for the specified email, including each attachment's ID, name, size, MIME type, and content fingerprint.",
        "responses": {
          "200": {
            "description": "List of email attachments retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Attachment"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/MetaData"
                    }
                  }
                },
                "examples": {
                  "AttachmentList": {
                    "summary": "Attachments for an email",
                    "value": {
                      "data": [
                        {
                          "attachmentId": "att-guid-001",
                          "name": "invoice.pdf",
                          "size": 51200,
                          "mime": "application/pdf",
                          "fingerprint": "abc123def456",
                          "created": "2024-03-15T09:00:00Z",
                          "deleted": false,
                          "emailPackageId": "p1a2b3c4-d5e6-7890-abcd-ef1234567890"
                        }
                      ],
                      "metadata": {
                        "total": 1,
                        "limit": 50,
                        "offset": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The unique identifier of the email containing the attachment.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "ref",
            "description": "The reference code for the email. Required if the email can be accessed without authentication.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Offset",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locate_id",
            "description": "If specified, \"offset\" parameter will be ignored\n                                            and the page containing entity with this Id will be returned.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "with",
            "description": "With parameters",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "description": "Determines the detail level of the response body.",
            "schema": {
              "type": "string",
              "enum": [
                "full_with_links",
                "full",
                "compact"
              ]
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/mail/:id/attachments\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # The unique identifier of the email containing the attachment.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/mail/{id}/attachments\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/mail/{id}/recipients": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "List Recipients",
        "description": "Returns a paginated list of all recipients (To, CC, and BCC) for the specified email, including each recipient's user ID, email address, and recipient type.",
        "responses": {
          "200": {
            "description": "List of email recipients retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Recipient"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/MetaData"
                    }
                  }
                },
                "examples": {
                  "RecipientList": {
                    "summary": "Recipients for an email",
                    "value": {
                      "data": [
                        {
                          "userId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
                          "email": "alice@example.com",
                          "type": 1
                        },
                        {
                          "userId": "u2b3c4d5-e6f7-8901-bcde-f12345678901",
                          "email": "bob@example.com",
                          "type": 2
                        }
                      ],
                      "metadata": {
                        "total": 2,
                        "limit": 50,
                        "offset": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of the email",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "description": "Filter recipients by type. Accepted values: `0`, `1`, `2`.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "enum": [
                "0",
                "1",
                "2"
              ]
            }
          },
          {
            "in": "query",
            "name": "ref",
            "description": "The reference ID of the email (Mandatory if the email can be accessed without authentication).",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "orderBy",
            "description": "Sorting options",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "enum": [
                "userId:asc",
                "userId:desc",
                "type:asc",
                "type:desc"
              ]
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Offset",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locate_id",
            "description": "If specified, \"offset\" parameter will be ignored\n                                            and the page containing entity with this Id will be returned.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "with",
            "description": "With parameters",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "description": "Determines the detail level of the response body.",
            "schema": {
              "type": "string",
              "enum": [
                "full_with_links",
                "full",
                "compact"
              ]
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/mail/:id/recipients\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # ID of the email\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/mail/{id}/recipients\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/users/{id}/activities": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Return the list of all activities of the specified user",
        "description": "Returns all activities performed by or on behalf of the specified user. Each activity includes the affected object, a human-readable message, the acting user, and whether the action was successful. Requires admin privileges.",
        "responses": {
          "200": {
            "description": "List of user activities retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ActivityAdmin"
                      }
                    }
                  }
                },
                "examples": {
                  "UserActivities": {
                    "summary": "Activities for a user",
                    "value": {
                      "data": [
                        {
                          "object": {
                            "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                            "name": "contract.pdf",
                            "type": "file"
                          },
                          "message": "User downloaded file contract.pdf",
                          "directUser": {
                            "id": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
                            "name": "Alice Smith",
                            "email": "alice@example.com"
                          },
                          "successful": 1
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of the user",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "noDayBack",
            "description": "Number of days back to search",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "startDate",
            "description": "Start date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "endDate",
            "description": "End date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "filter",
            "description": "Filter activities by scope. Accepted values: `all`, `my`.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "my"
              ]
            }
          },
          {
            "in": "query",
            "name": "search",
            "description": "Search by mail body, subject and sender/recipients",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "description": "Filter activities by type. Accepted values: `all`, `folder_changes`, `file_changes`, `user_preferences`, `mail`, `tasks`, `comments`, `kitepoint`.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "folder_changes",
                "file_changes",
                "user_preferences",
                "mail",
                "tasks",
                "comments",
                "kitepoint",
                "admin"
              ]
            }
          },
          {
            "in": "query",
            "name": "transactionId",
            "description": "Transaction ID associated with the activities",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "orderBy",
            "description": "Sorting options",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "enum": [
                "created:asc",
                "created:desc",
                "name:asc",
                "name:desc"
              ]
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Offset",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "with",
            "description": "With parameters",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "description": "Determines the detail level of the response body.",
            "schema": {
              "type": "string",
              "enum": [
                "full_with_links",
                "full",
                "compact"
              ]
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/users/:id/activities\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # ID of the user\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/users/{id}/activities\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/dli/users/{id}/mail": {
      "get": {
        "tags": [
          "dli"
        ],
        "summary": "Retrieve information about the mail specified be a user",
        "description": "Returns a paginated list of all emails sent or received by the specified user, including emails where the user is the sender and emails where the user appears as a recipient.",
        "responses": {
          "200": {
            "description": "List of emails retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Email"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/MetaData"
                    }
                  }
                },
                "examples": {
                  "EmailList": {
                    "summary": "Paginated list of emails for a user",
                    "value": {
                      "data": [
                        {
                          "id": "e1a2b3c4-d5e6-7890-abcd-ef1234567890",
                          "senderId": "u1a2b3c4-d5e6-7890-abcd-ef1234567890",
                          "subject": "Q1 Report",
                          "status": "sent",
                          "type": "standard",
                          "date": "2024-03-15",
                          "deleted": false,
                          "emailPackageId": "p1a2b3c4-d5e6-7890-abcd-ef1234567890"
                        }
                      ],
                      "metadata": {
                        "total": 1,
                        "limit": 50,
                        "offset": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_LICENSE_DLI, ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_LICENSE_DLI": {
                    "summary": "Feature DLI is not enabled by license",
                    "description": "Feature DLI is not enabled by license",
                    "value": {
                      "errors": {
                        "code": "ERR_LICENSE_DLI",
                        "message": "Feature DLI is not enabled by license"
                      }
                    }
                  },
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of the user",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "senderId",
            "description": "Unique identifier of User who sent Email",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "senderId:in",
            "description": "Unique identifier of User who sent Email. Search for results that match any of the specified values for this parameter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "isRecipient",
            "description": "Filter emails where the current user is a recipient.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "read",
            "description": "Whether the email is read or not by the current user.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "date",
            "description": "Email creation date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "date:gt",
            "description": "Email creation date. Search for results where this parameter value is greater than the specified value.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "date:gte",
            "description": "Email creation date. Search for results where this parameter value is greater than or equal to the specified value.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "date:lt",
            "description": "Email creation date. Search for results where this parameter value is less than the specified value.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "date:lte",
            "description": "Email creation date. Search for results where this parameter value is less than or equal to the specified value.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "modified_date",
            "description": "Email modification date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "modified_date:gt",
            "description": "Email modification date. Search for results where this parameter value is greater than the specified value.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "modified_date:gte",
            "description": "Email modification date. Search for results where this parameter value is greater than or equal to the specified value.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "modified_date:lt",
            "description": "Email modification date. Search for results where this parameter value is less than the specified value.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "modified_date:lte",
            "description": "Email modification date. Search for results where this parameter value is less than or equal to the specified value.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "deleted",
            "description": "Filter emails based on whether they have been deleted.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "emailPackageId",
            "description": "Email Package unique identifier",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "emailPackageId:in",
            "description": "Email Package unique identifier. Search for results that match any of the specified values for this parameter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "templateId",
            "description": "Email Template unique identifier",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "templateId:in",
            "description": "Email Template unique identifier. Search for results that match any of the specified values for this parameter.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "description": "Filter emails by status. Accepted values: `sent`, `draft`, `queued`, `error`, `self_send`, `transferring`.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "enum": [
                "sent",
                "draft",
                "queued",
                "error",
                "self_send",
                "transferring"
              ]
            }
          },
          {
            "in": "query",
            "name": "isPreview",
            "description": "Whether the email is a preview email",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "isUserSent",
            "description": "Whether the email was sent by some user",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "bucket",
            "description": "Filter emails by bucket. Accepted values: `draft`, `inbox`, `outgoing`, `sent`, `trash`.",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "inbox",
                "outgoing",
                "sent",
                "trash"
              ]
            }
          },
          {
            "in": "query",
            "name": "returnCustomWebForm",
            "description": "Return all emails including those with the custom web form.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "customWebFormOnly",
            "description": "Return only emails with the custom web form",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "webFormId",
            "description": "Email web form ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "webFormId:contains",
            "description": "Email web form ID. Search for results that contain the specified characters in this parameter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "orderBy",
            "description": "Sorting options",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "enum": [
                "id:asc",
                "id:desc",
                "date:asc",
                "date:desc",
                "status:asc",
                "status:desc"
              ]
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Offset",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locate_id",
            "description": "If specified, \"offset\" parameter will be ignored\n                                            and the page containing entity with this Id will be returned.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "with",
            "description": "With parameters",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "description": "Determines the detail level of the response body.",
            "schema": {
              "type": "string",
              "enum": [
                "full_with_links",
                "full",
                "compact"
              ]
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/dli/users/:id/mail\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # ID of the user\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/dli/users/{id}/mail\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Export": {
        "description": "Class Export",
        "required": [
          "userId"
        ],
        "properties": {
          "id": {
            "description": "Export task unique identifier",
            "type": "string"
          },
          "startDate": {
            "description": "Export start date",
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "description": "Export end date",
            "type": "string",
            "format": "date"
          },
          "status": {
            "description": "Current status of the export. Accepted values: `inprocess`, `error`, `completed`, `nodata`",
            "type": "string"
          },
          "downloadURL": {
            "description": "URL for downloading the exported data",
            "type": "string"
          },
          "type": {
            "description": "Export type. Accepted values: `activities`, `files`, `emails`",
            "type": "string"
          },
          "userId": {
            "description": "Unique identifier of the user",
            "type": "string"
          },
          "generatedDate": {
            "description": "Date when the report was generated",
            "type": "string",
            "format": "date"
          },
          "fileName": {
            "description": "Name of the generated export report file available for download",
            "type": "string"
          },
          "links": {
            "description": "HATEOAS links associated with the entity",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "MetaData": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of items available."
          },
          "limit": {
            "type": "integer",
            "description": "Maximum number of items returned per page."
          },
          "offset": {
            "type": "integer",
            "description": "Number of items skipped before the current page."
          }
        }
      },
      "Errors": {
        "type": "object",
        "properties": {
          "error": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Export.Post": {
        "description": "Class Export",
        "required": [
          "startDate",
          "endDate",
          "types"
        ],
        "properties": {
          "startDate": {
            "description": "Export start date",
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "description": "Export end date",
            "type": "string",
            "format": "date"
          },
          "types": {
            "description": "Export type. Accepted values: `activities`, `files`, `emails`",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "addLinks": {
            "description": "Indicates whether HATEOAS links should be included in the response",
            "type": "boolean"
          }
        }
      },
      "ActivityAdmin": {
        "description": "Class Activity",
        "required": [
          "event",
          "id",
          "message",
          "type",
          "user"
        ],
        "properties": {
          "created": {
            "description": "Activity creation date",
            "type": "string",
            "format": "date"
          },
          "data": {
            "description": "Contains information about affected entities",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "permissions": {
            "description": "List of actions allowed for the user on the object in the activity",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "event": {
            "description": "Activity event name",
            "type": "string"
          },
          "id": {
            "description": "Unique Activity identifier",
            "type": "integer"
          },
          "message": {
            "description": "User-friendly message",
            "type": "string"
          },
          "type": {
            "description": "Activity type. Accepted values: `folder_changes`, `file_changes`, `user_preferences`, `mail`, `tasks`, `comments`, `kitepoint`, `admin`",
            "type": "string"
          },
          "user": {
            "description": "User associated with the activity",
            "type": "string"
          },
          "successful": {
            "description": "Indicates whether the activity was successful",
            "type": "integer"
          },
          "object": {
            "description": "Contains information about the affected file or folder",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "directUser": {
            "description": "Direct user associated with the activity",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "inDirectUsers": {
            "description": "Indirect users associated with the activity",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "File": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier (UUID) of the file."
          },
          "parentId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier (UUID) of the parent folder."
          },
          "name": {
            "type": "string",
            "description": "Name of the object."
          },
          "type": {
            "type": "string",
            "description": "Type of the object.<br>`f` – File.<br>`d` – Folder."
          },
          "userId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier (UUID) who created the file."
          },
          "creator": {
            "description": "Details of the user who created the object.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasic"
              }
            ]
          },
          "created": {
            "type": "string",
            "format": "date",
            "description": "The date and time when the object was created."
          },
          "modified": {
            "type": "string",
            "format": "date",
            "description": "The date and time when the object was last modified."
          },
          "expire": {
            "type": "string",
            "format": "date",
            "description": "Expiration timestamp of the object, if applicable."
          },
          "permissions": {
            "description": "List of permissions associated with the object.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            }
          },
          "deleted": {
            "type": "boolean",
            "description": "Indicates whether the object has been deleted."
          },
          "permDeleted": {
            "type": "boolean",
            "description": "Indicates whether the object has been permanently deleted."
          },
          "permalink": {
            "type": "string",
            "description": "Permanent URL link to access the file."
          },
          "path": {
            "type": "string",
            "description": "Path to the object in the hierarchy."
          },
          "members": {
            "description": "List of members who have access to the object.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Member"
            }
          },
          "vendorDocId": {
            "type": "string",
            "description": "Vendor document ID associated with the object."
          },
          "vendorDocName": {
            "type": "string",
            "description": "Name of the vendor document associated with the object."
          },
          "secure": {
            "type": "boolean",
            "description": "Indicates whether the folder or the parent folder containing the file is marked as secure."
          },
          "source": {
            "type": "integer",
            "description": "ID representing the source of the object (1 - Salesforce, 2 - Teams)."
          },
          "modifier": {
            "description": "The user who last modified the file.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasic"
              }
            ]
          },
          "size": {
            "type": "integer",
            "description": "The size of the file in bytes."
          },
          "mime": {
            "type": "string",
            "description": "The MIME type of the file."
          },
          "fingerprint": {
            "type": "string",
            "description": "A unique hash identifying the file."
          },
          "fingerprints": {
            "type": "array",
            "description": "List of fingerprints associated with the file.",
            "items": {
              "$ref": "#/components/schemas/Fingerprint"
            }
          },
          "clientCreated": {
            "type": "string",
            "format": "date",
            "description": "The date and time when the file was created on the client side."
          },
          "clientModified": {
            "type": "string",
            "format": "date",
            "description": "The date and time when the file was last modified on the client side."
          },
          "overriddenExpire": {
            "type": "boolean",
            "description": "Indicates whether the expiration date for the file has been overridden."
          },
          "sharedBy": {
            "description": "The user who shared the file.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasic"
              }
            ]
          },
          "sharedTime": {
            "type": "string",
            "format": "date",
            "description": "The date and time when the file was shared."
          },
          "parent": {
            "description": "The parent folder of the file.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Folder"
              }
            ]
          },
          "originalFileId": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the original file if this one is a copy."
          },
          "avStatus": {
            "type": "string",
            "description": "Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected."
          },
          "dlpStatus": {
            "type": "string",
            "description": "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": {
            "type": "string",
            "description": "Indicates the file version's availability status based on the administrator's quarantine status."
          },
          "locked": {
            "type": "boolean",
            "description": "Indicates if the file is locked."
          },
          "lockUser": {
            "description": "The user who locked the file.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasic"
              }
            ]
          },
          "isShared": {
            "type": "boolean",
            "description": "Indicates if the file is shared with other users."
          },
          "lastModifiedBy": {
            "description": "The user who last modified the file.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasic"
              }
            ]
          },
          "pushedObject": {
            "description": "Details about the pushed object, if any.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PushedObject"
              }
            ]
          },
          "pathIds": {
            "type": "string",
            "format": "uuid",
            "description": "A list of IDs representing the path of the file within the folder hierarchy."
          },
          "wopiapp": {
            "description": "WOPI-related information for the file when used in a mobile app.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MobileInfo"
              }
            ]
          },
          "pushed": {
            "type": "boolean",
            "description": "Indicates if the file has been pushed to a mobile app."
          },
          "tags": {
            "description": "List of tags associated with the file.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "safeEdit": {
            "description": "Information regarding the file's SafeEdit settings.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SafeEdit"
              }
            ]
          },
          "versionsCount": {
            "type": "integer",
            "description": "The total number of versions for the file."
          },
          "tracking_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Tracking identifier associated with the file upload."
          }
        }
      },
      "FilePathResponse": {
        "description": "Represents the full ancestor path of a file, from the workspace root down to the file's parent folder. Returned by the GET /files/{id}/path endpoint.",
        "properties": {
          "data": {
            "description": "Ordered list of folder nodes representing the path from the workspace root to the file's parent folder.",
            "type": "array",
            "items": {
              "$ref": "FolderTreeItem"
            }
          },
          "links": {
            "description": "Optional HATEOAS links. Present only when the request includes link options.",
            "type": "array",
            "items": {
              "$ref": "HateoasLink"
            }
          }
        }
      },
      "Preview": {
        "description": "Class Preview",
        "properties": {
          "link": {
            "description": "Preview link for the file",
            "type": "string"
          },
          "pdf": {
            "description": "PDF file for the preview",
            "type": "string"
          },
          "viewUrl": {
            "description": "URL for viewing the preview",
            "type": "string"
          },
          "status": {
            "description": "Preview processing status. Accepted values: `processing`, `preview`, `failed`",
            "type": "string"
          },
          "type": {
            "description": "Format of the generated preview, such as image or PDF",
            "type": "string"
          },
          "metadata": {
            "description": "Additional metadata about the preview, such as dimensions or page count",
            "type": "string"
          },
          "mime": {
            "description": "MIME type of the preview file",
            "type": "string"
          },
          "native": {
            "description": "Indicates whether the preview is a native render",
            "type": "boolean"
          },
          "watermark": {
            "description": "Watermark applied to the preview",
            "type": "string"
          },
          "tdfOriginalExtension": {
            "description": "Original file extension for TDF files",
            "type": "string"
          }
        }
      },
      "Version": {
        "description": "Class Version",
        "required": [
          "id",
          "name",
          "objectId",
          "userId",
          "versionNumber"
        ],
        "properties": {
          "id": {
            "description": "The unique identifier of the file version.",
            "type": "string"
          },
          "versionNumber": {
            "description": "The version number of the file.",
            "type": "integer"
          },
          "deleted": {
            "description": "Indicates whether this version of the file has been deleted.",
            "type": "boolean"
          },
          "created": {
            "description": "The creation date of this file version.",
            "type": "string",
            "format": "date"
          },
          "userId": {
            "description": "The unique identifier of the user who created this file version.",
            "type": "string"
          },
          "size": {
            "description": "The size of the file content in bytes.",
            "type": "integer"
          },
          "fingerprint": {
            "description": "A unique hash identifying the file.",
            "type": "string"
          },
          "fingerprintAlgo": {
            "description": "The algorithm used to generate the fingerprint (e.g., sha3-256, md5).",
            "type": "string"
          },
          "backend": {
            "description": "The backend system associated with the file version.",
            "type": "string"
          },
          "mime": {
            "description": "The MIME type of the file version.",
            "type": "string"
          },
          "name": {
            "description": "The name of the file version.",
            "type": "string"
          },
          "creator": {
            "description": "The user who created the file version. (Explicit field. May be retrieved only if mentioned in \"with\" parameter)",
            "$ref": "#/components/schemas/UserBasicInfo"
          },
          "objectId": {
            "description": "The object ID (UUID) for the file version.",
            "type": "string"
          },
          "clientCreated": {
            "description": "The date and time the file version was created on the client side.",
            "type": "string",
            "format": "date"
          },
          "clientModified": {
            "description": "The date and time the file version was last modified on the client side.",
            "type": "string",
            "format": "date"
          },
          "avStatus": {
            "description": "Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.",
            "type": "string"
          },
          "dlpStatus": {
            "description": "Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.",
            "type": "string"
          },
          "adminQuarantineStatus": {
            "description": "Indicates the file version\\'s availability status based on the administrator\\'s quarantine status. ",
            "type": "string"
          },
          "storageAvailable": {
            "description": "Indicates whether the file is accessible on any storage volume.",
            "type": "boolean"
          },
          "fingerprints": {
            "description": "A list of fingerprints associated with the file version.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "description": "List of tags associated with the file.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "links": {
            "description": "HATEOAS links associated with the entity",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Folder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier (UUID) of the folder."
          },
          "parentId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier (UUID) of the parent object."
          },
          "name": {
            "type": "string",
            "description": "Name of the object."
          },
          "type": {
            "type": "string",
            "description": "Type of the object.<br>`f` – File.<br>`d` – Folder."
          },
          "userId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier (UUID) who created the folder."
          },
          "creator": {
            "description": "Details of the user who created the object.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasic"
              }
            ]
          },
          "created": {
            "type": "string",
            "format": "date",
            "description": "The date and time when the object was created."
          },
          "modified": {
            "type": "string",
            "format": "date",
            "description": "The date and time when the object was last modified."
          },
          "expire": {
            "type": "string",
            "format": "date",
            "description": "Expiration timestamp of the object, if applicable."
          },
          "permissions": {
            "description": "List of permissions associated with the object.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            }
          },
          "deleted": {
            "type": "boolean",
            "description": "Indicates whether the object has been deleted."
          },
          "permDeleted": {
            "type": "boolean",
            "description": "Indicates whether the object has been permanently deleted."
          },
          "permalink": {
            "type": "string",
            "description": "Permanent URL link to access the object."
          },
          "path": {
            "type": "string",
            "description": "Path to the folder in the hierarchy."
          },
          "members": {
            "description": "List of members who have access to the object.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Member"
            }
          },
          "vendorDocId": {
            "type": "string",
            "description": "Vendor document ID associated with the object."
          },
          "vendorDocName": {
            "type": "string",
            "description": "Name of the vendor document associated with the object."
          },
          "secure": {
            "type": "boolean",
            "description": "Indicates whether the folder or the parent folder containing the file is marked as secure."
          },
          "source": {
            "type": "integer",
            "description": "ID representing the source of the object (1 - Salesforce, 2 - Teams)."
          },
          "isShared": {
            "type": "boolean",
            "description": "Indicates if the folder is shared with other users."
          },
          "syncable": {
            "type": "boolean",
            "description": "Indicates if the folder can be synced by Desktop Sync Client."
          },
          "fileLifetime": {
            "type": "integer",
            "description": "Time duration (in days) for which the files in this folder are kept after being added to the folder."
          },
          "description": {
            "type": "string",
            "description": "The description of the folder."
          },
          "isFavorite": {
            "type": "boolean",
            "description": "Indicates if the folder is marked as a favorite by the user."
          },
          "pushedFilesCount": {
            "type": "integer",
            "description": "The number of files that have been pushed to mobile apps in this folder."
          },
          "currentUserRole": {
            "description": "The role of the current user in this folder.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Role"
              }
            ]
          },
          "avStatus": {
            "type": "string",
            "description": "The Antivirus (AV) status of the folder."
          },
          "dlpStatus": {
            "type": "string",
            "description": "The Data Loss Prevention (DLP) status of the folder."
          },
          "totalMembersCount": {
            "type": "integer",
            "description": "Total number of members who have access to this folder."
          },
          "totalFoldersCount": {
            "type": "integer",
            "description": "Total number of subfolders within this folder."
          },
          "totalFilesCount": {
            "type": "integer",
            "description": "Total number of files within this folder."
          },
          "maxFolderExpiration": {
            "type": "string",
            "format": "date",
            "description": "The maximum expiration date allowed for files in this folder."
          },
          "maxFileLifetime": {
            "type": "integer",
            "description": "The maximum duration (in days) that files in this folder can be kept after being added to the folder."
          },
          "isLdapGroupMember": {
            "type": "boolean",
            "description": "Indicates if the folder is part of an LDAP group."
          },
          "isUnderMyFolder": {
            "type": "boolean",
            "description": "Indicates if this folder is a subfolder of the user's \"My Folder\"."
          },
          "pathIds": {
            "type": "string",
            "description": "A list of IDs representing the path of the folder within the folder hierarchy."
          },
          "isRoot": {
            "type": "boolean",
            "description": "Indicates if this folder is a root folder."
          },
          "rootId": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the root folder if this is a subfolder."
          },
          "useFolderQuota": {
            "type": "boolean",
            "description": "Indicates if a folder quota is applied to this folder."
          },
          "quota": {
            "type": "integer",
            "description": "The storage quota for the folder (in bytes)."
          },
          "size": {
            "type": "integer",
            "description": "The total storage size used by the folder (in bytes)."
          },
          "freeSpace": {
            "type": "integer",
            "description": "The amount of free space available in the folder (in bytes)."
          },
          "inheritanceEnabled": {
            "type": "boolean",
            "description": "Indicates if a folder inherits permissions from the parent folder"
          }
        }
      },
      "Attachment": {
        "type": "object",
        "properties": {
          "emailPackageId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the email package containing the attachment."
          },
          "attachmentId": {
            "type": "string",
            "description": "Unique identifier for the attachment."
          },
          "withdrawn": {
            "type": "boolean",
            "description": "Indicates whether the attachment has been withdrawn."
          },
          "drmFile": {
            "description": "Details of the DRM-protected file associated with the attachment.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DrmFile"
              }
            ]
          },
          "accessType": {
            "type": "integer",
            "description": "Access type for the attachment (e.g., read-only, editable)."
          },
          "tags": {
            "description": "List of tags associated with the attachment.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "permissions": {
            "type": "array",
            "description": "List of permissions associated with the attachment.",
            "items": {
              "$ref": "#/components/schemas/Permission"
            }
          },
          "objectId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the file associated with the attachment."
          },
          "name": {
            "type": "string",
            "description": "Name of the attachment file."
          },
          "size": {
            "type": "integer",
            "description": "Size of the attachment file in bytes."
          },
          "mime": {
            "type": "string",
            "description": "The MIME type of the attachment file."
          },
          "created": {
            "type": "string",
            "format": "date",
            "description": "Date when the attachment file was created."
          },
          "deleted": {
            "type": "boolean",
            "description": "Indicates if the attachment has been deleted."
          },
          "fingerprint": {
            "type": "string",
            "description": "A unique hash identifying the file version."
          },
          "fingerprintAlgo": {
            "type": "string",
            "description": "The algorithm used for generating the file version fingerprint. (e.g., sha3-256, md5)."
          },
          "fingerprints": {
            "description": "List of alternative fingerprints for the attachment file.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Fingerprint"
            }
          },
          "adminQuarantineStatus": {
            "type": "string",
            "description": "Status of the attachment in the admin quarantine system."
          },
          "avStatus": {
            "type": "string",
            "description": "Antivirus (AV) scan status of the attachment."
          },
          "dlpStatus": {
            "type": "string",
            "description": "Data Loss Prevention (DLP) status of the attachment."
          }
        }
      },
      "Recipient": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "Unique identifier of the user associated with the recipient."
          },
          "type": {
            "type": "integer",
            "description": "Recipient type.<br>`0` – To.<br>`1` – CC.<br>`2` – BCC."
          },
          "email": {
            "type": "string",
            "description": "Email address of the recipient."
          },
          "isDistributionList": {
            "type": "boolean",
            "description": "Indicates if the recipient is a distribution list rather than an individual user."
          },
          "user": {
            "description": "Details of the user associated with the recipient.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasic"
              }
            ]
          }
        }
      },
      "Email": {
        "description": "Class Email",
        "required": [
          "date",
          "emailPackageId",
          "id",
          "modifiedDate",
          "parentEmailId",
          "recipients",
          "senderId",
          "status",
          "subject",
          "type"
        ],
        "properties": {
          "id": {
            "description": "Email unique identifier",
            "type": "string"
          },
          "senderId": {
            "description": "Unique identifier of User who sent Email",
            "type": "string"
          },
          "templateId": {
            "description": "Email template unique identifier",
            "type": "integer"
          },
          "status": {
            "description": "Email status. Accepted values: `sent`, `draft`, `queued`, `transferring`, `error`, `self_send`",
            "type": "string"
          },
          "type": {
            "description": "Email type. Accepted values: `original`, `resend`, `forward`, `reply`",
            "type": "string"
          },
          "date": {
            "description": "Date and time the email was created",
            "type": "string",
            "format": "date"
          },
          "deleted": {
            "description": "Indicates whether the email is deleted",
            "type": "boolean"
          },
          "emailPackageId": {
            "description": "Email Package unique identifier",
            "type": "string"
          },
          "isPreview": {
            "description": "Indicates whether the email is a preview email",
            "type": "boolean"
          },
          "isUserSent": {
            "description": "Indicates whether the email was sent by a user",
            "type": "boolean"
          },
          "watermark": {
            "description": "The watermark on the preview email",
            "type": "string"
          },
          "package": {
            "description": "(Explicit field. May be retrieved only if mentioned in \"with\" parameter)",
            "$ref": "#/components/schemas/Package"
          },
          "expirationDate": {
            "description": "Email package expiration date",
            "type": "string",
            "format": "date-time"
          },
          "attachmentCount": {
            "description": "Number of attachments in the email package",
            "type": "integer"
          },
          "sender": {
            "description": "Sender's basic information (Explicit field. May be retrieved only if mentioned in \"with\" parameter)",
            "$ref": "#/components/schemas/UserBasicInfo"
          },
          "recipients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Recipient"
            }
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "secureBody": {
            "description": "Indicates whether the email body is secured",
            "type": "boolean"
          },
          "modifiedDate": {
            "description": "Date and time the email was last modified",
            "type": "string",
            "format": "date"
          },
          "parentEmailId": {
            "description": "Unique identifier of the original email this email was forwarded or replied from",
            "type": "string"
          },
          "emailReturnReceipt": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailReturnReceipt"
            }
          },
          "error": {
            "description": "Error message when the email status is error",
            "type": "string"
          },
          "subject": {
            "description": "Subject line of the email as shown to recipients",
            "type": "string"
          },
          "body": {
            "description": "(Explicit field. May be retrieved only if mentioned in \"with\" parameter)",
            "type": "string"
          },
          "rawBody": {
            "description": "(Explicit field. May be retrieved only if mentioned in \"with\" parameter)",
            "type": "string"
          },
          "headline": {
            "description": "(Explicit field. May be retrieved only if mentioned in \"with\" parameter)",
            "type": "string"
          },
          "notice": {
            "description": "(Explicit field. May be retrieved only if mentioned in \"with\" parameter)",
            "type": "string"
          },
          "htmlBody": {
            "description": "(Explicit field. May be retrieved only if mentioned in \"with\" parameter)",
            "type": "string"
          },
          "fullHtmlBody": {
            "description": "(Explicit field. May be retrieved only if mentioned in \"with\" parameter)",
            "type": "string"
          },
          "emailFrom": {
            "description": "(Explicit field. May be retrieved only if mentioned in \"with\" parameter)",
            "type": "string"
          },
          "isRead": {
            "description": "Indicates whether the email has been read by the current user",
            "type": "boolean"
          },
          "bucket": {
            "description": "Mailbox bucket the email belongs to. Accepted values: `inbox`, `sent`, `draft`, `outgoing`, `trash`",
            "type": "string"
          },
          "templateBody": {
            "description": "(Explicit field. May be retrieved only if mentioned in \"with\" parameter)",
            "type": "string"
          },
          "webFormId": {
            "description": "(Explicit field. May be retrieved only if mentioned in \"with\" parameter)",
            "type": "string"
          },
          "webFormFields": {
            "description": "(Explicit field. May be retrieved only if mentioned in \"with\" parameter)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "links": {
            "description": "HATEOAS links associated with the entity",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Package": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the email package."
          },
          "selfCopy": {
            "type": "boolean",
            "description": "Indicates whether the package includes a copy for the sender."
          },
          "includeFingerprint": {
            "type": "boolean",
            "description": "Indicates whether a fingerprint (hash) of the package should be included for verification."
          },
          "expire": {
            "type": "integer",
            "description": "Expiration time of the package in seconds from creation."
          },
          "fileCount": {
            "readOnly": true,
            "description": "Count of the files attached to the package."
          },
          "deleted": {
            "type": "boolean",
            "description": "Indicates whether the package has been marked as deleted."
          },
          "acl": {
            "type": "string",
            "description": "Access control list (ACL) associated with the package, specifying who can access it."
          },
          "attachments": {
            "description": "List of attachments included in the package.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attachment"
            }
          },
          "downloadLink": {
            "type": "string",
            "description": "Link for accessing the email."
          }
        }
      },
      "UserBasicInfo": {
        "required": [
          "email",
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "description": "The unique identifier of the user",
            "type": "string"
          },
          "name": {
            "description": "The name of the user",
            "type": "string"
          },
          "email": {
            "description": "The user's email",
            "type": "string"
          },
          "profileIcon": {
            "description": "URL to the user's profile icon image",
            "type": "string"
          }
        }
      },
      "EmailReturnReceipt": {
        "description": "Class Recipient",
        "required": [
          "mailId",
          "userId"
        ],
        "properties": {
          "mailId": {
            "description": "Email unique identifier for return receipt",
            "type": "integer"
          },
          "user": {
            "description": "User who is associated with this return receipt record",
            "$ref": "#/components/schemas/UserBasicInfo"
          },
          "userId": {
            "description": "User ID for Return Receipt",
            "type": "string"
          }
        }
      },
      "UserBasic": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier (UUID) for the user."
          },
          "email": {
            "type": "string",
            "description": "Email address associated with the user."
          },
          "name": {
            "type": "string",
            "description": "Full name of the user."
          },
          "profileIcon": {
            "type": "string",
            "description": "URL or identifier for the user's profile icon."
          }
        }
      },
      "DrmFile": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the DRM-protected file."
          },
          "size": {
            "type": "integer",
            "description": "Size of the DRM-protected file in bytes."
          }
        }
      },
      "Tag": {
        "type": "object",
        "properties": {
          "guid": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier (UUID) for the tag."
          },
          "name": {
            "type": "string",
            "description": "Display name of the tag."
          },
          "type": {
            "type": "string",
            "description": "Type category of the tag."
          }
        }
      },
      "Permission": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier for the permission."
          },
          "name": {
            "type": "string",
            "description": "Name of the permission."
          },
          "allowed": {
            "type": "boolean",
            "description": "Indicates whether the permission is granted (True) or denied (False)."
          }
        }
      },
      "Fingerprint": {
        "type": "object",
        "properties": {
          "algo": {
            "type": "string",
            "description": "The algorithm used to generate the fingerprint (e.g., sha3-256, md5)."
          },
          "hash": {
            "type": "string",
            "description": "The resulting hash value representing the fingerprint of the file or object."
          }
        }
      },
      "Member": {
        "type": "object",
        "properties": {
          "objectId": {
            "type": "string",
            "description": "Unique identifier (UUID) of the associated object (file or folder)."
          },
          "roleId": {
            "type": "integer",
            "description": "Role assigned to the member."
          },
          "userId": {
            "type": "string",
            "description": "Unique identifier (UUID) of the user."
          },
          "groupId": {
            "type": "integer",
            "description": "Unique identifier of the LDAP group."
          },
          "user": {
            "description": "User details of the member.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasic"
              }
            ]
          },
          "role": {
            "description": "Role details assigned to the member.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Role"
              }
            ]
          },
          "group": {
            "description": "Group details if the member belongs to a group.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Group"
              }
            ]
          },
          "sharedBy": {
            "description": "Details of the user who shared the file or folder.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasic"
              }
            ]
          },
          "created": {
            "type": "string",
            "format": "date",
            "description": "Date when the file or folder was shared."
          },
          "inheritRoleId": {
            "type": "integer",
            "description": "Inherited role ID from the parent folder, if applicable."
          },
          "allowedFolderRoleId": {
            "type": "array",
            "description": "List of allowed folder role IDs.",
            "items": {
              "type": "integer"
            }
          },
          "email": {
            "type": "string",
            "description": "Email associated with the member."
          },
          "rank": {
            "type": "integer",
            "description": "Rank of the member role."
          },
          "originFolder": {
            "readOnly": true
          }
        }
      },
      "Role": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Role ID"
          },
          "name": {
            "type": "string",
            "description": "Role name"
          },
          "rank": {
            "type": "integer",
            "description": "Role rank"
          },
          "type": {
            "type": "string",
            "description": "Role type"
          }
        }
      },
      "Group": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "LDAP Group ID"
          },
          "name": {
            "type": "string",
            "description": "LDAP Group name"
          },
          "dn": {
            "type": "string",
            "description": "LDAP Group domain name"
          },
          "email": {
            "type": "string",
            "description": "LDAP Group email"
          },
          "description": {
            "type": "string",
            "description": "LDAP Group description"
          }
        }
      },
      "PushedObject": {
        "type": "object",
        "properties": {
          "objectId": {
            "type": "string",
            "description": "Unique identifier (UUID) for the pushed object."
          },
          "userId": {
            "type": "string",
            "description": "Unique identifier (UUID) for the user who pushed the object."
          },
          "created": {
            "type": "string",
            "format": "date",
            "description": "The date and time when the object was pushed."
          },
          "user": {
            "description": "Details of the user who pushed the object.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasic"
              }
            ]
          }
        }
      },
      "MobileInfo": {
        "type": "object",
        "properties": {
          "wopiSrc": {
            "type": "string",
            "description": "The WOPI (Web Application Open Platform Interface) source URL for the mobile application."
          },
          "userId": {
            "type": "string",
            "description": "Unique identifier of the user."
          },
          "service": {
            "type": "string",
            "description": "The WOPI service ID."
          },
          "scheme": {
            "type": "string",
            "description": "URI scheme used by the mobile application to handle the file."
          },
          "schemeSupport": {
            "type": "string",
            "description": "Indicates the level of support the mobile app has for the URI scheme."
          }
        }
      },
      "SafeEdit": {
        "type": "object",
        "properties": {
          "safeEditLocked": {
            "type": "boolean",
            "description": "Indicates if the file is locked through a SafeEdit session."
          },
          "user": {
            "description": "The user responsible for locking the file via SafeEdit.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasic"
              }
            ]
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Error code"
          },
          "message": {
            "type": "string",
            "description": "Error message"
          }
        }
      }
    }
  }
}
