{
  "openapi": "3.0.2",
  "info": {
    "version": "28",
    "title": "Kiteworks API — requestFile Operations"
  },
  "paths": {
    "/rest/folders/{id}/actions/requestFile": {
      "post": {
        "summary": "Send a Request File to Folder request",
        "description": "### Description:\n  Initiates a Request File to Folder.\n### Precondition:\n  The user profile must have the necessary access rights to request files to the folder.\n### Response:\n  Successfully creates a request file and returns the request file details.\n",
        "tags": [
          "requestFile"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "description": "The unique identifier (UUID) of the entity.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestFileToFolderPostRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Request File to Folder request has been successfully created."
          },
          "400": {
            "description": "Bad Request<br /><br /><i>Possible error codes: </i>ERR_REQUEST_INVALID_JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_REQUEST_INVALID_JSON": {
                    "summary": "Invalid json provided",
                    "description": "Invalid json provided",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_REQUEST_INVALID_JSON",
                          "message": "Invalid json provided"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized<br /><br /><i>Possible error codes: </i>ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_AUTH_INVALID_CSRF": {
                    "summary": "Invalid CSRF Authentication",
                    "description": "Invalid CSRF Authentication",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_AUTH_INVALID_CSRF",
                          "message": "Invalid CSRF Authentication"
                        }
                      ]
                    }
                  },
                  "ERR_AUTH_UNAUTHORIZED": {
                    "summary": "Unauthorized",
                    "description": "Unauthorized",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_AUTH_UNAUTHORIZED",
                          "message": "Unauthorized"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_ACCESS_USER, ERR_ENTITY_DELETED, ERR_ENTITY_DLP_LOCKED, ERR_ENTITY_IS_SECURE_FOLDER, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_VIRUS_FOUND, ERR_INPUT_EMAIL_IS_DISTRIBUTION_LIST, ERR_LICENSE_MAX_USERS_COUNT_REACHED, ERR_USER_HAS_NO_USER_TYPE, ERR_USER_TYPE_NO_ACCESS",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_ACCESS_USER",
                          "message": "Insufficient access permissions"
                        }
                      ]
                    }
                  },
                  "ERR_ENTITY_DELETED": {
                    "summary": "Entity is deleted",
                    "description": "Entity is deleted",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_ENTITY_DELETED",
                          "message": "Entity is deleted"
                        }
                      ]
                    }
                  },
                  "ERR_ENTITY_DLP_LOCKED": {
                    "summary": "One or more files have been quarantined and are not available to download. Please contact your administrator for assistance.",
                    "description": "One or more files have been quarantined and are not available to download. Please contact your administrator for assistance.",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_ENTITY_DLP_LOCKED",
                          "message": "One or more files have been quarantined and are not available to download. Please contact your administrator for assistance."
                        }
                      ]
                    }
                  },
                  "ERR_ENTITY_IS_SECURE_FOLDER": {
                    "summary": "Operation not permitted on restricted Folder.",
                    "description": "Operation not permitted on restricted Folder.",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_ENTITY_IS_SECURE_FOLDER",
                          "message": "Operation not permitted on restricted Folder."
                        }
                      ]
                    }
                  },
                  "ERR_ENTITY_NOT_SCANNED": {
                    "summary": "One or more files are undergoing security and privacy scans. Please try again later.",
                    "description": "One or more files are undergoing security and privacy scans. Please try again later.",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_ENTITY_NOT_SCANNED",
                          "message": "One or more files are undergoing security and privacy scans. Please try again later."
                        }
                      ]
                    }
                  },
                  "ERR_ENTITY_VIRUS_FOUND": {
                    "summary": "File is infected",
                    "description": "File is infected",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_ENTITY_VIRUS_FOUND",
                          "message": "File is infected"
                        }
                      ]
                    }
                  },
                  "ERR_INPUT_EMAIL_IS_DISTRIBUTION_LIST": {
                    "summary": "Distribution list user is not allowed to register",
                    "description": "Distribution list user is not allowed to register",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_INPUT_EMAIL_IS_DISTRIBUTION_LIST",
                          "message": "Distribution list user is not allowed to register"
                        }
                      ]
                    }
                  },
                  "ERR_LICENSE_MAX_USERS_COUNT_REACHED": {
                    "summary": "License count has been reached",
                    "description": "License count has been reached",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_LICENSE_MAX_USERS_COUNT_REACHED",
                          "message": "License count has been reached"
                        }
                      ]
                    }
                  },
                  "ERR_USER_HAS_NO_USER_TYPE": {
                    "summary": "User has no profile",
                    "description": "User has no profile",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_USER_HAS_NO_USER_TYPE",
                          "message": "User has no profile"
                        }
                      ]
                    }
                  },
                  "ERR_USER_TYPE_NO_ACCESS": {
                    "summary": "Permission denied",
                    "description": "Permission denied",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_USER_TYPE_NO_ACCESS",
                          "message": "Permission denied"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content<br /><br /><i>Possible error codes: </i>ERR_INPUT_HYPERLINK, ERR_INPUT_INVALID_DATE, ERR_INPUT_REQUIRED, ERR_INVALID_PARAMETER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_INPUT_HYPERLINK": {
                    "summary": "Not allowed hyperlink domain. Hyperlink domain should not different from anchored text domain.",
                    "description": "Not allowed hyperlink domain. Hyperlink domain should not different from anchored text domain.",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_INPUT_HYPERLINK",
                          "message": "Not allowed hyperlink domain. Hyperlink domain should not different from anchored text domain."
                        }
                      ]
                    }
                  },
                  "ERR_INPUT_INVALID_DATE": {
                    "summary": "The input is not a valid date.",
                    "description": "The input is not a valid date.",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_INPUT_INVALID_DATE",
                          "message": "The input is not a valid date."
                        }
                      ]
                    }
                  },
                  "ERR_INPUT_REQUIRED": {
                    "summary": "Field is required",
                    "description": "Field is required",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_INPUT_REQUIRED",
                          "message": "Field is required"
                        }
                      ]
                    }
                  },
                  "ERR_INVALID_PARAMETER": {
                    "summary": "Invalid Parameter Exception",
                    "description": "Invalid Parameter Exception",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_INVALID_PARAMETER",
                          "message": "Invalid Parameter Exception"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X POST \\\n  \"https://{instance}.kiteworks.com/rest/folders/:id/actions/requestFile\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n         \"to\": [\n         \"string\"\n       ],\n         \"subject\": \"string\",\n         \"body\": \"string\",\n         \"expire\": \"2024-01-15\",\n         \"count\": 1,\n         \"requireAuth\": true\n       }'"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nid = \"VALUE\"  # The unique identifier (UUID) of the entity.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/folders/{id}/actions/requestFile\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n  \"to\": [\n  \"string\"\n],\n  \"subject\": \"string\",\n  \"body\": \"string\",\n  \"expire\": \"2024-01-15\",\n  \"count\": 1,\n  \"requireAuth\": true\n}\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/requestFile/{ref}": {
      "get": {
        "summary": "Returns Request File Info by ref",
        "description": "### Description:\n  Retrieves detailed information about a Request File using the provided reference (ref).\n### Precondition:\n  The user must have valid authentication and appropriate access to view the request file information.\n### Response:\n  Returns the details of the specified request file, including its associated metadata and status.\n",
        "tags": [
          "requestFile"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "ref",
            "required": true,
            "description": "The unique reference of the Request File upload link.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "read",
            "required": false,
            "description": "Indicates whether to log the view event. Defaults to true.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The Request File Info, including the details of the specified request file.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestFile"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized<br /><br /><i>Possible error codes: </i>ERR_AUTH_INVALID_CSRF, ERR_AUTH_REQUEST_FILE, ERR_AUTH_UNAUTHORIZED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_AUTH_INVALID_CSRF": {
                    "summary": "Invalid CSRF Authentication",
                    "description": "Invalid CSRF Authentication",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_AUTH_INVALID_CSRF",
                          "message": "Invalid CSRF Authentication"
                        }
                      ]
                    }
                  },
                  "ERR_AUTH_REQUEST_FILE": {
                    "summary": "Operation not permitted. This request requires authorization",
                    "description": "Operation not permitted. This request requires authorization",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_AUTH_REQUEST_FILE",
                          "message": "Operation not permitted. This request requires authorization"
                        }
                      ]
                    }
                  },
                  "ERR_AUTH_UNAUTHORIZED": {
                    "summary": "Unauthorized",
                    "description": "Unauthorized",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_AUTH_UNAUTHORIZED",
                          "message": "Unauthorized"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_ACCESS_USER, ERR_ENTITY_DELETED, ERR_ENTITY_REQUEST_FILE_EXPIRED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_ACCESS_USER",
                          "message": "Insufficient access permissions"
                        }
                      ]
                    }
                  },
                  "ERR_ENTITY_DELETED": {
                    "summary": "Entity is deleted",
                    "description": "Entity is deleted",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_ENTITY_DELETED",
                          "message": "Entity is deleted"
                        }
                      ]
                    }
                  },
                  "ERR_ENTITY_REQUEST_FILE_EXPIRED": {
                    "summary": "The request file has expired",
                    "description": "The request file has expired",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_ENTITY_REQUEST_FILE_EXPIRED",
                          "message": "The request file has expired"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/requestFile/:ref\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nref = \"VALUE\"  # The unique reference of the Request File upload link.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/requestFile/{ref}\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      },
      "delete": {
        "tags": [
          "requestFile"
        ],
        "summary": "Expire a request file link",
        "description": "Marks the request file link as expired, preventing any further file uploads through it. **Requires the authenticated user to be the user who created the request file link.**",
        "responses": {
          "204": {
            "description": "The request file link was successfully expired. Returns no content."
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "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": "ref",
            "description": "The unique reference of the Request File upload link.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X DELETE \\\n  \"https://{instance}.kiteworks.com/rest/requestFile/:ref\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nref = \"VALUE\"  # The unique reference of the Request File upload link.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/requestFile/{ref}\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.delete(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/requestFile/{ref}/preview/{object_id}": {
      "get": {
        "tags": [
          "requestFile"
        ],
        "summary": "Get preview metadata for a source file",
        "description": "Gets the preview metadata for a source file attached to the request file link. If the source file's action is set to `view`, the preview is generated with the Viewer role.",
        "responses": {
          "200": {
            "description": "Returns the preview metadata for the specified source file.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Preview"
                },
                "examples": {
                  "Preview ready": {
                    "summary": "Preview is available for the source file",
                    "value": {
                      "link": "/preview/files/7/preview.html",
                      "pdf": null,
                      "view_url": "https://viewer.example.com/view?token=abc123",
                      "status": "Preview",
                      "mime": "application/pdf",
                      "native": true,
                      "watermark": null,
                      "tdfOriginalExtension": null
                    }
                  },
                  "Preview processing": {
                    "summary": "Preview is still being generated",
                    "value": {
                      "link": null,
                      "pdf": null,
                      "view_url": null,
                      "status": "Processing",
                      "mime": null,
                      "native": false,
                      "watermark": null,
                      "tdfOriginalExtension": null
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "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": "ref",
            "description": "The unique reference of the Request File upload link.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object_id",
            "description": "The unique identifier (UUID) of the source file.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/requestFile/:ref/preview/:object_id\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nref = \"VALUE\"  # The unique reference of the Request File upload link.\nobject_id = \"VALUE\"  # The unique identifier (UUID) of the source file.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/requestFile/{ref}/preview/{object_id}\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/requestFile/{ref}/sources": {
      "get": {
        "tags": [
          "requestFile"
        ],
        "summary": "Get source files attached by the requester",
        "description": "Returns the list of files the requester attached to the request file link for the uploader to view or download. Each entry includes computed permissions based on DLP policy and the configured action (`view` or `download`).",
        "responses": {
          "200": {
            "description": "Returns a paginated list of source file records attached to the request file link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RequestFileSource"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/MetaData"
                    }
                  }
                },
                "examples": {
                  "Source file list": {
                    "summary": "Two source files, one view-only and one downloadable",
                    "value": {
                      "data": [
                        {
                          "id": 1,
                          "file_id": 7,
                          "requestfile_id": 12,
                          "action_id": 1,
                          "permissions": [
                            {
                              "name": "view",
                              "enabled": true
                            },
                            {
                              "name": "download",
                              "enabled": false
                            }
                          ]
                        },
                        {
                          "id": 2,
                          "file_id": 8,
                          "requestfile_id": 12,
                          "action_id": 2,
                          "permissions": [
                            {
                              "name": "view",
                              "enabled": true
                            },
                            {
                              "name": "download",
                              "enabled": true
                            }
                          ]
                        }
                      ],
                      "total": 2,
                      "page": 1,
                      "pageSize": 20
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "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": "ref",
            "description": "The unique reference of the Request File upload link.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/requestFile/:ref/sources\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nref = \"VALUE\"  # The unique reference of the Request File upload link.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/requestFile/{ref}/sources\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/requestFile/{ref}/sources/{object_id}": {
      "get": {
        "tags": [
          "requestFile"
        ],
        "summary": "Get source file metadata",
        "description": "Gets the file metadata for a specific source file attached to the request file link.",
        "responses": {
          "200": {
            "description": "Returns the file metadata for the specified source file.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                },
                "examples": {
                  "Source file metadata": {
                    "summary": "Metadata for a source file attached to the request link",
                    "value": {
                      "id": 7,
                      "name": "onboarding-checklist.pdf",
                      "parent_id": 3,
                      "size": 102400,
                      "mime": "application/pdf",
                      "created": "2024-01-10T09:00:00+00:00",
                      "modified": "2024-03-01T14:30:00+00:00",
                      "deleted": false,
                      "locked": 0
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "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": "ref",
            "description": "The unique reference of the Request File upload link.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object_id",
            "description": "The unique identifier (UUID) of the source 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/requestFile/:ref/sources/:object_id\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nref = \"VALUE\"  # The unique reference of the Request File upload link.\nobject_id = \"VALUE\"  # The unique identifier (UUID) of the source file.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/requestFile/{ref}/sources/{object_id}\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/requestFile/{ref}/uploads": {
      "get": {
        "tags": [
          "requestFile"
        ],
        "summary": "Get files uploaded by the current user",
        "description": "Returns the list of files the currently authenticated user has uploaded for the specified request file link. Returns an empty list when the link does not require authentication (`require_auth=false`).",
        "responses": {
          "200": {
            "description": "Returns a paginated list of upload records for the current user. Returns `{data: []}` when the link does not require authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RequestFileUpload"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/MetaData"
                    }
                  }
                },
                "examples": {
                  "Upload list": {
                    "summary": "Files uploaded by the current authenticated user",
                    "value": {
                      "data": [
                        {
                          "id": 10,
                          "file_id": 55,
                          "requestfile_id": 12
                        },
                        {
                          "id": 11,
                          "file_id": 56,
                          "requestfile_id": 12
                        }
                      ],
                      "total": 2,
                      "page": 1,
                      "pageSize": 20
                    }
                  },
                  "No auth required": {
                    "summary": "Empty list returned when the link does not require authentication",
                    "value": {
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "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": "ref",
            "description": "The unique reference of the Request File upload link.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X GET \\\n  \"https://{instance}.kiteworks.com/rest/requestFile/:ref/uploads\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nref = \"VALUE\"  # The unique reference of the Request File upload link.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/requestFile/{ref}/uploads\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/requestFile/{ref}/uploads/{object_id}": {
      "get": {
        "tags": [
          "requestFile"
        ],
        "summary": "Get uploaded file metadata",
        "description": "Gets the file metadata for a specific file uploaded through the request file link. Only accessible when the link requires authentication (`require_auth=true`). The uploader's email address is stripped from the displayed file name before it is returned.",
        "responses": {
          "200": {
            "description": "Returns the file metadata for the specified uploaded file, with the uploader's email suffix removed from the file name.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                },
                "examples": {
                  "Uploaded file metadata": {
                    "summary": "Metadata for a file uploaded through the request link",
                    "value": {
                      "id": 55,
                      "name": "signed-agreement.pdf",
                      "parent_id": 3,
                      "size": 85000,
                      "mime": "application/pdf",
                      "created": "2024-03-20T11:00:00+00:00",
                      "modified": "2024-03-20T11:00:00+00:00",
                      "deleted": false,
                      "locked": 0
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_ACCESS_USER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "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": "ref",
            "description": "The unique reference of the Request File upload link.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object_id",
            "description": "The unique identifier (UUID) of the uploaded 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/requestFile/:ref/uploads/:object_id\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nref = \"VALUE\"  # The unique reference of the Request File upload link.\nobject_id = \"VALUE\"  # The unique identifier (UUID) of the uploaded file.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/requestFile/{ref}/uploads/{object_id}\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
          }
        ]
      },
      "delete": {
        "tags": [
          "requestFile"
        ],
        "summary": "Delete an uploaded file",
        "description": "Deletes a file that was uploaded through the request file link. Only accessible when the link requires authentication (`require_auth=true`) and has not expired.",
        "responses": {
          "204": {
            "description": "The uploaded file was successfully deleted. Returns no content."
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_ACCESS_USER, ERR_ENTITY_LOCKED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": {
                        "code": "ERR_ACCESS_USER",
                        "message": "Insufficient access permissions"
                      }
                    }
                  },
                  "ERR_ENTITY_LOCKED": {
                    "summary": "File is locked",
                    "description": "File is locked",
                    "value": {
                      "errors": {
                        "code": "ERR_ENTITY_LOCKED",
                        "message": "File is locked"
                      }
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "path",
            "name": "ref",
            "description": "The unique reference of the Request File upload link.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object_id",
            "description": "The unique identifier (UUID) of the uploaded file.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X DELETE \\\n  \"https://{instance}.kiteworks.com/rest/requestFile/:ref/uploads/:object_id\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\""
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nref = \"VALUE\"  # The unique reference of the Request File upload link.\nobject_id = \"VALUE\"  # The unique identifier (UUID) of the uploaded file.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/requestFile/{ref}/uploads/{object_id}\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n}\nresponse = requests.delete(url, headers=headers)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/mail/actions/requestFile": {
      "post": {
        "summary": "Request files to inbox",
        "description": "### Description:\n  Sends a request files to inbox message.\n### Precondition:\n  Must be assigned a user profile with the ability to request files to inbox.\n### Response:\n  Sends the message requesting files to your inbox.\n",
        "tags": [
          "requestFile"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "returnEntity",
            "required": false,
            "description": "If true, includes the entity in the response body.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "with",
            "required": false,
            "description": "Specifies additional fields to include in the response.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "required": false,
            "description": "Determines the detail level of the response body.",
            "schema": {
              "type": "string",
              "enum": [
                "compact",
                "full_no_links",
                "full_with_links",
                "full"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestFileToInboxPostRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Request File to Inbox request has been successfully created."
          },
          "400": {
            "description": "Bad Request<br /><br /><i>Possible error codes: </i>ERR_REQUEST_INVALID_JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_REQUEST_INVALID_JSON": {
                    "summary": "Invalid json provided",
                    "description": "Invalid json provided",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_REQUEST_INVALID_JSON",
                          "message": "Invalid json provided"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized<br /><br /><i>Possible error codes: </i>ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_AUTH_INVALID_CSRF": {
                    "summary": "Invalid CSRF Authentication",
                    "description": "Invalid CSRF Authentication",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_AUTH_INVALID_CSRF",
                          "message": "Invalid CSRF Authentication"
                        }
                      ]
                    }
                  },
                  "ERR_AUTH_UNAUTHORIZED": {
                    "summary": "Unauthorized",
                    "description": "Unauthorized",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_AUTH_UNAUTHORIZED",
                          "message": "Unauthorized"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_INPUT_EMAIL_IS_DISTRIBUTION_LIST, ERR_LICENSE_MAX_USERS_COUNT_REACHED, ERR_SYSTEM_REQUEST_FILE_DISABLED, ERR_USER_HAS_NO_USER_TYPE, ERR_PROFILE_SEND_FILE_EXTERNAL_DISABLED, ERR_USER_TYPE_NO_ACCESS",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_INPUT_EMAIL_IS_DISTRIBUTION_LIST": {
                    "summary": "Distribution list user is not allowed to register",
                    "description": "Distribution list user is not allowed to register",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_INPUT_EMAIL_IS_DISTRIBUTION_LIST",
                          "message": "Distribution list user is not allowed to register"
                        }
                      ]
                    }
                  },
                  "ERR_LICENSE_MAX_USERS_COUNT_REACHED": {
                    "summary": "License count has been reached",
                    "description": "License count has been reached",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_LICENSE_MAX_USERS_COUNT_REACHED",
                          "message": "License count has been reached"
                        }
                      ]
                    }
                  },
                  "ERR_SYSTEM_REQUEST_FILE_DISABLED": {
                    "summary": "Request file feature is not enabled on this system.",
                    "description": "Request file feature is not enabled on this system.",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_SYSTEM_REQUEST_FILE_DISABLED",
                          "message": "Request file feature is not enabled on this system."
                        }
                      ]
                    }
                  },
                  "ERR_USER_HAS_NO_USER_TYPE": {
                    "summary": "User has no profile",
                    "description": "User has no profile",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_USER_HAS_NO_USER_TYPE",
                          "message": "User has no profile"
                        }
                      ]
                    }
                  },
                  "ERR_PROFILE_SEND_FILE_EXTERNAL_DISABLED": {
                    "summary": "This profile is not allowed to send files to external users",
                    "description": "This profile is not allowed to send files to external users",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_PROFILE_SEND_FILE_EXTERNAL_DISABLED",
                          "message": "This profile is not allowed to send files to external users"
                        }
                      ]
                    }
                  },
                  "ERR_USER_TYPE_NO_ACCESS": {
                    "summary": "Permission denied",
                    "description": "Permission denied",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_USER_TYPE_NO_ACCESS",
                          "message": "Permission denied"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content<br /><br /><i>Possible error codes: </i>ERR_INPUT_HYPERLINK, ERR_INPUT_INVALID_DATE, ERR_INPUT_REQUIRED, ERR_INVALID_PARAMETER",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_INPUT_HYPERLINK": {
                    "summary": "Not allowed hyperlink domain. Hyperlink domain should not different from anchored text domain.",
                    "description": "Not allowed hyperlink domain. Hyperlink domain should not different from anchored text domain.",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_INPUT_HYPERLINK",
                          "message": "Not allowed hyperlink domain. Hyperlink domain should not different from anchored text domain."
                        }
                      ]
                    }
                  },
                  "ERR_INPUT_INVALID_DATE": {
                    "summary": "The input is not a valid date.",
                    "description": "The input is not a valid date.",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_INPUT_INVALID_DATE",
                          "message": "The input is not a valid date."
                        }
                      ]
                    }
                  },
                  "ERR_INPUT_REQUIRED": {
                    "summary": "Field is required",
                    "description": "Field is required",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_INPUT_REQUIRED",
                          "message": "Field is required"
                        }
                      ]
                    }
                  },
                  "ERR_INVALID_PARAMETER": {
                    "summary": "Invalid Parameter Exception",
                    "description": "Invalid Parameter Exception",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_INVALID_PARAMETER",
                          "message": "Invalid Parameter Exception"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X POST \\\n  \"https://{instance}.kiteworks.com/rest/mail/actions/requestFile\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n         \"to\": [\n         \"string\"\n       ],\n         \"subject\": \"string\",\n         \"body\": \"string\",\n         \"expire\": \"2024-01-15\",\n         \"fileLimit\": 1,\n         \"requireAuth\": true\n       }'"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nurl = \"https://{instance}.kiteworks.com/rest/mail/actions/requestFile\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n  \"to\": [\n  \"string\"\n],\n  \"subject\": \"string\",\n  \"body\": \"string\",\n  \"expire\": \"2024-01-15\",\n  \"fileLimit\": 1,\n  \"requireAuth\": true\n}\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.json())"
          }
        ]
      }
    },
    "/rest/requestFile/{ref}/reply": {
      "post": {
        "summary": "Reply to Request File",
        "description": "### Description:\n  Processes a reply to a specific Request File.\n### Precondition:\n  The user must be authenticated and have the proper access to reply to the specified request file.\n### Response:\n  The reply to the request file is processed, and a successful response is returned with the status of the action.\n",
        "tags": [
          "requestFile"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "ref",
            "required": true,
            "description": "The unique reference of the Request File upload link.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestFileReplyPostRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The reply to the Request File has been successfully processed."
          },
          "400": {
            "description": "Bad Request<br /><br /><i>Possible error codes: </i>ERR_REQUEST_INVALID_JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_REQUEST_INVALID_JSON": {
                    "summary": "Invalid json provided",
                    "description": "Invalid json provided",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_REQUEST_INVALID_JSON",
                          "message": "Invalid json provided"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized<br /><br /><i>Possible error codes: </i>ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_AUTH_INVALID_CSRF": {
                    "summary": "Invalid CSRF Authentication",
                    "description": "Invalid CSRF Authentication",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_AUTH_INVALID_CSRF",
                          "message": "Invalid CSRF Authentication"
                        }
                      ]
                    }
                  },
                  "ERR_AUTH_UNAUTHORIZED": {
                    "summary": "Unauthorized",
                    "description": "Unauthorized",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_AUTH_UNAUTHORIZED",
                          "message": "Unauthorized"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden<br /><br /><i>Possible error codes: </i>ERR_ACCESS_USER, ERR_ENTITY_REQUEST_FILE_NO_FILE_UPLOADED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_ACCESS_USER": {
                    "summary": "Insufficient access permissions",
                    "description": "Insufficient access permissions",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_ACCESS_USER",
                          "message": "Insufficient access permissions"
                        }
                      ]
                    }
                  },
                  "ERR_ENTITY_REQUEST_FILE_NO_FILE_UPLOADED": {
                    "summary": "No file has been uploaded for the request file",
                    "description": "No file has been uploaded for the request file",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_ENTITY_REQUEST_FILE_NO_FILE_UPLOADED",
                          "message": "No file has been uploaded for the request file"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content<br /><br /><i>Possible error codes: </i>ERR_INPUT_HYPERLINK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "ERR_INPUT_HYPERLINK": {
                    "summary": "Not allowed hyperlink domain. Hyperlink domain should not different from anchored text domain.",
                    "description": "Not allowed hyperlink domain. Hyperlink domain should not different from anchored text domain.",
                    "value": {
                      "errors": [
                        {
                          "code": "ERR_INPUT_HYPERLINK",
                          "message": "Not allowed hyperlink domain. Hyperlink domain should not different from anchored text domain."
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "490": {
            "description": "Request blocked by WAF"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl -X POST \\\n  \"https://{instance}.kiteworks.com/rest/requestFile/:ref/reply\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n         \"body\": \"string\"\n       }'"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "import requests\n\nref = \"VALUE\"  # The unique reference of the Request File upload link.\n\nurl = f\"https://{{instance}}.kiteworks.com/rest/requestFile/{ref}/reply\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n}\npayload = {\n  \"body\": \"string\"\n}\nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.json())"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "RequestFileToFolderPostRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "array",
            "description": "List of email addresses to send the files to.",
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 998,
            "description": "Subject of the email. Must be between 1 and 998 characters."
          },
          "body": {
            "type": "string",
            "description": "The body of the email."
          },
          "expire": {
            "type": "string",
            "format": "date",
            "description": "The expiration date of the request file link."
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "description": "The maximum number of files to attach."
          },
          "requireAuth": {
            "type": "boolean",
            "description": "Indicates if authentication is required to access the files."
          },
          "files": {
            "type": "array",
            "description": "List of object GUIDs representing the files to be sent.",
            "items": {
              "type": "string"
            }
          },
          "actionId": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2,
            "description": "The action to allow recipients to perform on viewable files.<br>`1` – View only.<br>`2` – View and download."
          },
          "showToken": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1,
            "description": "Whether to include the request file token in the response.<br>`0` – Do not include the token.<br>`1` – Include the token."
          }
        },
        "required": [
          "subject",
          "to"
        ]
      },
      "Errors": {
        "type": "object",
        "properties": {
          "error": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RequestFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier for the request file."
          },
          "type": {
            "type": "string",
            "description": "The type of the request file."
          },
          "requestor": {
            "description": "Information about the requestor (user who initiated the request).",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasic1"
              }
            ]
          },
          "recipient": {
            "description": "Information about the recipient (user to whom the file is sent).",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasic1"
              }
            ]
          },
          "remaining": {
            "type": "integer",
            "description": "The number of remaining files or actions."
          },
          "fileLimit": {
            "type": "integer",
            "description": "The maximum number of files allowed for this request."
          },
          "email": {
            "description": "Details of the email associated with the request file.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Mail2"
              }
            ]
          },
          "message": {
            "type": "string",
            "description": "Message or note associated with the request file."
          },
          "requireAuth": {
            "type": "boolean",
            "description": "Indicates whether authentication is required to access the request file."
          },
          "expire": {
            "type": "string",
            "format": "date",
            "description": "The expiration date of the request file."
          },
          "config": {
            "description": "Configuration details for the request file.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RequestFileConfig"
              }
            ]
          },
          "uploadLink": {
            "type": "string",
            "description": "Link for uploading the request file."
          },
          "ref": {
            "type": "string",
            "description": "Reference or identifier for the request file."
          }
        }
      },
      "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"
          }
        }
      },
      "RequestFileSource": {
        "description": "Class RequestFileSource",
        "properties": {
          "fileId": {
            "description": "The unique identifier of the source file",
            "type": "integer"
          },
          "requestFileId": {
            "description": "The unique identifier of the associated request file",
            "type": "integer"
          },
          "actionId": {
            "description": "The available permissions on the source file for the uploader",
            "type": "integer"
          },
          "permissions": {
            "description": "Request file permissions for the source file",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequestFilePermission"
            }
          }
        }
      },
      "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."
          }
        }
      },
      "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."
          }
        }
      },
      "RequestFileUpload": {
        "description": "Class RequestFileUpload",
        "properties": {
          "fileId": {
            "description": "The unique identifier of the uploaded file",
            "type": "string"
          },
          "requestFileId": {
            "description": "The unique identifier of the associated request file",
            "type": "integer"
          }
        }
      },
      "RequestFileToInboxPostRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "array",
            "description": "List of email addresses to send the files to.",
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 998,
            "description": "Subject of the email. Must be between 1 and 998 characters."
          },
          "body": {
            "type": "string",
            "description": "The body of the email."
          },
          "expire": {
            "type": "string",
            "format": "date",
            "description": "The expiration date of the request file link."
          },
          "fileLimit": {
            "type": "integer",
            "minimum": 0,
            "description": "The maximum number of files to attach."
          },
          "requireAuth": {
            "type": "boolean",
            "description": "Indicates if authentication is required to access the files."
          },
          "returnReceipts": {
            "type": "array",
            "description": "List of email addresses to send read receipts to.",
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "sharedMailboxId": {
            "type": "string",
            "description": "Unique identifier for the Shared Mailbox. Used to search for results belonging to this Shared Mailbox."
          }
        },
        "required": [
          "subject",
          "to"
        ]
      },
      "RequestFileReplyPostRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "description": "The body of the reply. This field is optional."
          }
        }
      },
      "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."
          }
        }
      },
      "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)."
          }
        }
      },
      "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
          }
        }
      },
      "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."
          }
        }
      },
      "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"
          }
        }
      },
      "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."
          }
        }
      },
      "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."
          }
        }
      },
      "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"
              }
            ]
          }
        }
      },
      "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"
          }
        }
      },
      "RequestFilePermission": {
        "properties": {
          "name": {
            "description": "Action name",
            "type": "string"
          },
          "enabled": {
            "description": "Determines if action is valid",
            "type": "boolean"
          }
        }
      },
      "UserBasic1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier (UUID) for the user."
          },
          "email": {
            "type": "string",
            "description": "Email address associated with the user."
          }
        }
      },
      "Mail2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the email."
          },
          "subject": {
            "type": "string",
            "description": "Subject line of the email."
          },
          "body": {
            "type": "string",
            "description": "The body of the email."
          },
          "fullHtmlBody": {
            "type": "string",
            "description": "Full HTML body of the email."
          },
          "parentEmailId": {
            "type": "string",
            "description": "Unique identifier of the parent email, if applicable."
          },
          "emailPackageId": {
            "type": "string",
            "description": "Unique identifier of the associated email package."
          },
          "senderId": {
            "type": "string",
            "description": "Unique identifier of the sender."
          },
          "sharedMailboxId": {
            "type": "string",
            "description": "Unique identifier of the shared mailbox, if applicable."
          }
        }
      },
      "RequestFileConfig": {
        "type": "object",
        "properties": {
          "excludedFileExtensions": {
            "type": "array",
            "description": "List of file extensions not allowed for upload via this file request.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Error code"
          },
          "message": {
            "type": "string",
            "description": "Error message"
          }
        }
      }
    }
  }
}
