# Save file This function saves a file in a directory and encodes it in a character set. When you disable the File Storage role, the system this function. Endpoint: GET /Fileman/save_file_content Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `file` (string, required) The files to retrieve. Example: "example.html" - `content` (string) The new file's contents. If you do use this parameter, the function creates a blank file. Example: "hi" - `dir` (string) The directory that contains the selected file. This parameter defaults to the currently-authenticated user's directory. Example: "/home/username/public_html" - `fallback` (integer) Whether the function will return an error or save in the default character set if it cannot save in the specified character set. * — Save in the default character set. * — Return an error. Enum: 0, 1 - `from_charset` (string) The character set encoding of the parameter's value. Example: "UTF-8" - `to_charset` (string) The character set encoding in which to encode the file. Example: "ASCII" ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "save_file_content" - `module` (string) The name of the module called. Example: "Fileman" - `result` (object) - `result.data` (object) - `result.data.from_charset` (string) The file's character set. Example: "UTF-8" - `result.data.path` (string) The path to the file. Example: "/home/user/public_html/example.html" - `result.data.to_charset` (string) The file's new character set. Example: "ASCII" - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.status` (integer) * — Success. * — Failed. Check the field for more details. Enum: 0, 1 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.