### Install Filemail CLI Source: https://docs.filemail.com/tools/cli.md Install the CLI globally using NPM. ```bash npm install -g filemail-cli ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.filemail.com/api Perform an HTTP GET request to the documentation URL with 'ask' and 'goal' parameters to retrieve information dynamically. ```http GET https://docs.filemail.com/api.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.filemail.com/managing-transfers/renaming-a-file-in-a-transfer.md Perform an HTTP GET request to the current page URL to ask questions and provide context for the documentation search. ```http GET https://docs.filemail.com/managing-transfers/renaming-a-file-in-a-transfer.md?ask=&goal= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.filemail.com/api/sending-files/initialize.md Perform an HTTP GET request to the documentation URL to retrieve answers to specific questions. ```http GET https://docs.filemail.com/api/sending-files/initialize.md?ask=&goal= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.filemail.com/api/sending-files/complete.md Perform an HTTP GET request to the documentation URL with query parameters to retrieve specific information. ```http GET https://docs.filemail.com/api/sending-files/complete.md?ask=&goal= ``` -------------------------------- ### GET /api/fetching-user-information.md Source: https://docs.filemail.com/api/fetching-user-information.md Perform an HTTP GET request to query the documentation dynamically for specific information. ```APIDOC ## GET /api/fetching-user-information.md ### Description Queries the documentation dynamically to retrieve an answer to a specific question, along with relevant excerpts and sources. ### Method GET ### Endpoint https://docs.filemail.com/api/fetching-user-information.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /api/sending-files/complete.md Source: https://docs.filemail.com/api/sending-files/complete.md Perform an HTTP GET request to query the documentation for specific information. ```APIDOC ## GET /api/sending-files/complete.md ### Description Queries the documentation dynamically to retrieve answers and relevant excerpts based on a specific question. ### Method GET ### Endpoint https://docs.filemail.com/api/sending-files/complete.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /filemail-api-2.0/getting-started.md Source: https://docs.filemail.com/filemail-api-2.0/getting-started.md Queries the documentation dynamically by providing a question and an optional goal to receive a tailored response. ```APIDOC ## GET /filemail-api-2.0/getting-started.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically. This allows for retrieving specific answers, clarifications, or related documentation sections. ### Method GET ### Endpoint https://docs.filemail.com/filemail-api-2.0/getting-started.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask, written in natural language. - **goal** (string) - Optional - Describes the broader end goal to help tailor the response. ``` -------------------------------- ### GET /tools.md Source: https://docs.filemail.com/tools Queries the documentation dynamically by providing a question and an optional goal. ```APIDOC ## GET /tools.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically using natural language. ### Method GET ### Endpoint https://docs.filemail.com/tools.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ### Request Example GET https://docs.filemail.com/tools.md?ask=How do I use the CLI?&goal=Automate file transfers ``` -------------------------------- ### Verify File Chunk Integrity Request and Response Source: https://docs.filemail.com/downloading-files.md Example of a GET request to the GetRangeHash endpoint and the corresponding JSON response containing the MD5 hash. ```json GET https://8888.filemail.com/GetRangeHash.ashx? transferid=gaaihvyksuejqub& thefilename=path%2Fto%2Ffile.jpg& position=0& length=93073 --- { "responsestatus": "OK", "hash": "d47d82f98f02b204e9200a98ecf8417e" } ``` -------------------------------- ### GET /api/sending-files/initialize.md Source: https://docs.filemail.com/api/sending-files/initialize.md Perform a query against the documentation to retrieve answers or context related to the current page. ```APIDOC ## GET /api/sending-files/initialize.md ### Description Queries the documentation dynamically to retrieve information not explicitly present in the current page or to get clarification. ### Method GET ### Endpoint https://docs.filemail.com/api/sending-files/initialize.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.filemail.com/api/getting-received-files.md Use this request format to ask specific questions about the documentation and provide context via the goal parameter. ```http GET https://docs.filemail.com/api/getting-received-files.md?ask=&goal= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.filemail.com/managing-transfers/editing-a-transfer.md Use this request to ask specific questions about the documentation and provide context for the end goal. ```http GET https://docs.filemail.com/managing-transfers/editing-a-transfer.md?ask=&goal= ``` -------------------------------- ### GET /downloading-files.md Source: https://docs.filemail.com/downloading-files.md Queries the documentation page for specific information using natural language. ```APIDOC ## GET /downloading-files.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically using natural language questions. ### Method GET ### Endpoint https://docs.filemail.com/downloading-files.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask, written in natural language. - **goal** (string) - Optional - Describes the broader end goal to help tailor the response. ``` -------------------------------- ### GET /tools/cli.md Source: https://docs.filemail.com/tools/cli.md Queries the documentation page dynamically using a natural language question and an optional goal. ```APIDOC ## GET /tools/cli.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically. ### Method GET ### Endpoint https://docs.filemail.com/tools/cli.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - Describes the broader end goal to tailor the answer. ``` -------------------------------- ### C# Chunked Download Implementation Source: https://docs.filemail.com/downloading-files.md A simplified example demonstrating how to download a file in chunks using HttpClient and Range headers. This implementation includes MD5 verification but lacks production-ready error handling and parallelism. ```csharp var transferId = "gaaihvyksuejqub"; var fileName = "path/to/file.jpg"; var downloadUrl = "https://8888.filemail.com/api/file/get?filekey=n94A8Bc5..."; var fileSize = 93073; using var outputFile = new FileStream("file.jpg", FileMode.Create, FileAccess.ReadWrite); var httpClient = new HttpClient(); var start = 0L; var chunkSize = 50000L * 3; while (start < fileSize) { var end = start + chunkSize - 1; if (end >= fileSize) { end = fileSize - 1; } var httpRequest = new HttpRequestMessage(HttpMethod.Get, new Uri(downloadUrl)); httpRequest.Headers.Add("x-api-key", "mJE5v1zHs...."); httpRequest.Headers.Range = new System.Net.Http.Headers.RangeHeaderValue(start, end); httpRequest.Headers.UserAgent.ParseAdd("FilemailDemoClient/2.5.1"); var responseStream = await httpClient.SendAsync(httpRequest, cancel); outputFile.Seek(start, SeekOrigin.Begin); await responseStream.Content.CopyToAsync(outputFile); Console.WriteLine($"chunk {start}-{end} complete"); Console.WriteLine($"verifying md5"); var localMD5 = await LocalChunkMD5(outputFile, start, end); var remoteMD5 = await GetRangeHash(downloadUrl, transferId, fileName, start, end - start + 1); if (false == string.Equals(localMD5, remoteMD5, StringComparison.OrdinalIgnoreCase)) { throw new ApplicationException($"{fileName} MD5 mismatch {start}-{end} / {localMD5} / {remoteMD5}"); } Console.WriteLine($"md5 OK"); start = end + 1; } Console.WriteLine($"file {fileName} complete"); Console.ReadLine(); ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.filemail.com/getting-transfer-details.md Use this request to ask specific questions and provide context for broader goals to retrieve documentation excerpts. ```http GET https://docs.filemail.com/getting-transfer-details.md?ask=&goal= ``` -------------------------------- ### GET /user/me Source: https://docs.filemail.com/api/fetching-user-information.md Retrieves all details about the current authenticated user. ```APIDOC ## GET /user/me ### Description Retrieves all details about the current authenticated user. Authentication must be performed beforehand using an API key. ### Method GET ### Endpoint /user/me ### Response #### Success Response (200) - **data** (User) - The user information object. - **responsestatus** (FilemailStatusEnum) - The status of the response. #### Error Response (401) - **errorid** (string) - Identifier for the error. - **errormessage** (string) - Description of the unauthorized error. ``` -------------------------------- ### GET /integrations.md Source: https://docs.filemail.com/integrations Perform a natural language query against the documentation to retrieve answers and relevant excerpts. ```APIDOC ## GET /integrations.md ### Description Perform an HTTP GET request on the documentation page URL to query information dynamically using natural language. ### Method GET ### Endpoint https://docs.filemail.com/integrations.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### GET /api/getting-received-files.md Source: https://docs.filemail.com/api/getting-received-files.md Queries the documentation dynamically by sending a natural language question as a query parameter. ```APIDOC ## GET /api/getting-received-files.md ### Description Performs a dynamic query against the documentation to retrieve answers, excerpts, and sources based on a specific question. ### Method GET ### Endpoint https://docs.filemail.com/api/getting-received-files.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.filemail.com/getting-sent-files.md Use this request to retrieve information from the documentation by providing a specific question and an optional end goal. ```http GET https://docs.filemail.com/getting-sent-files.md?ask=&goal= ``` -------------------------------- ### Query documentation via HTTP GET Source: https://docs.filemail.com/api/sending-files.md Use this request to ask specific questions about the documentation when information is not explicitly available on the page. ```http GET https://docs.filemail.com/api/sending-files.md?ask=&goal= ``` -------------------------------- ### GET /api/sending-files/cancel.md Source: https://docs.filemail.com/api/sending-files/cancel.md Queries the documentation for information related to the current page. ```APIDOC ## GET /api/sending-files/cancel.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically. ### Method GET ### Endpoint https://docs.filemail.com/api/sending-files/cancel.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question in natural language. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ### Request Example GET https://docs.filemail.com/api/sending-files/cancel.md?ask=How+do+I+cancel+a+file+transfer?&goal=troubleshooting ``` -------------------------------- ### GET /handling-contacts.md Source: https://docs.filemail.com/handling-contacts.md Performs a dynamic query against the documentation page to retrieve answers and context. ```APIDOC ## GET /handling-contacts.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically for specific information. ### Method GET ### Endpoint https://docs.filemail.com/handling-contacts.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask, written in natural language. - **goal** (string) - Optional - Describes the broader end goal to help tailor the response. ### Response - **answer** (string) - A direct answer to the question. - **excerpts** (array) - Relevant excerpts and sources from the documentation. ``` -------------------------------- ### GET /user/me Source: https://docs.filemail.com/api/fetching-user-information.md Retrieves the profile and account information for the currently authenticated user. ```APIDOC ## GET /user/me ### Description Retrieves the profile and account information for the currently authenticated user. ### Method GET ### Endpoint /user/me ``` -------------------------------- ### HTTP Chunked Upload Request Source: https://docs.filemail.com/api/sending-files/upload-files.md Example of a POST request for uploading a specific file chunk. ```http POST https://8888.filemail.com/savefile.ashx? transferid=JIRPAXTDQMVAJZB& transferkey=5812ea4388e24035abe5ba7cb06b3b47& thefilename=big%20file.jpg& chunksize=10000000& chunks=13& chunk=7& retry=2 Host: 8888.filemail.com Content-Type: application/octet-stream ``` -------------------------------- ### GET /custom-authentication.md Source: https://docs.filemail.com/custom-authentication.md Perform a dynamic query against the documentation to retrieve specific information or context. ```APIDOC ## GET /custom-authentication.md ### Description Queries the documentation dynamically to retrieve answers to specific questions or to get context for a broader goal. ### Method GET ### Endpoint https://docs.filemail.com/custom-authentication.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /managing-transfers/renaming-a-file-in-a-transfer.md Source: https://docs.filemail.com/managing-transfers/renaming-a-file-in-a-transfer.md Queries the documentation for specific information by providing a question and an optional goal. ```APIDOC ## GET /managing-transfers/renaming-a-file-in-a-transfer.md ### Description Queries the documentation dynamically to retrieve answers, excerpts, or sources related to a specific question. ### Method GET ### Endpoint https://docs.filemail.com/managing-transfers/renaming-a-file-in-a-transfer.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask the documentation. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### Example transfer response Source: https://docs.filemail.com/downloading-files.md A sample JSON response showing the structure of a transfer, including individual file download URLs and a compressed archive URL. ```json "transfer": { "id": "gaaihvyksuejqub", "url": "https://app.filemail.com/d/gaaihvyksuejqub", "compressedfileurl": "https://8888.filemail.com/api/file/get?compressedfilekey=GIhUF8z7...", "files": [ { "filename": "path/to/file.jpg", "filesize": 93073, "downloadurl": "https://8888.filemail.com/api/file/get?filekey=n94A8Bc5...", "md5": "247797b2eb3e8e4ce398f66dbd9e7879" }, { "filename": "..." ... } ] } ``` -------------------------------- ### GET /managing-transfers/forwarding-a-transfer.md Source: https://docs.filemail.com/managing-transfers/forwarding-a-transfer.md Perform a query against the documentation page to retrieve information about forwarding a transfer. ```APIDOC ## GET /managing-transfers/forwarding-a-transfer.md ### Description Queries the documentation for information regarding forwarding a transfer. This endpoint allows you to ask specific questions about the process. ### Method GET ### Endpoint https://docs.filemail.com/managing-transfers/forwarding-a-transfer.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific question you want to ask about forwarding a transfer. - **goal** (string) - Optional - The broader end goal you are trying to accomplish. ``` -------------------------------- ### OpenAPI Specification for GET /user/me Source: https://docs.filemail.com/api/fetching-user-information.md Defines the endpoint structure, response schemas, and error handling for retrieving user information. ```json {"openapi":"3.0.4","info":{"title":"Filemail REST API","version":"2.0"},"tags":[{"name":"User"}],"servers":[{"url":"https://api-public.filemail.com","description":"Production"}],"paths":{"/user/me":{"get":{"tags":["User"],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/UserBaseResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/UserBaseResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/UserBaseResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"UserBaseResponse":{"type":"object","properties":{"responsestatus":{"$ref":"#/components/schemas/FilemailStatusEnum"},"errorid":{"type":"string","nullable":true},"errormessage":{"type":"string","nullable":true},"data":{"$ref":"#/components/schemas/User"},"errorcode":{"type":"integer","description":"Numeric representation of the `responsestatus` ``` -------------------------------- ### GET /managing-transfers.md Source: https://docs.filemail.com/managing-transfers.md Queries the documentation dynamically to retrieve information or clarification regarding transfer management operations. ```APIDOC ## GET /managing-transfers.md ### Description Perform an HTTP GET request on the documentation page URL to ask questions and retrieve relevant excerpts or documentation sources. ### Method GET ### Endpoint https://docs.filemail.com/managing-transfers.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question written in natural language. - **goal** (string) - Optional - Describes the broader end goal to tailor the answer. ### Response #### Success Response (200) - **response** (string) - Contains a direct answer to the question and relevant excerpts from the documentation. ``` -------------------------------- ### C# Chunked File Upload Source: https://docs.filemail.com/api/sending-files/upload-files.md Implementation for uploading a file in 5MB chunks using HttpClient. Note that this example loads chunks into memory. ```csharp // WARNING: example code, not production-ready public async Task UploadFile(string filePath) { /// ----- values obtained from /transfer/initialize var transferid = "..."; var transferkey = "..."; var transferurl = "..."; /// ----- const int chunkSize = 5000000; var chunk = -1; var fi = new FileInfo(filePath); var chunks = (int)Math.Ceiling((double)fi.Length / chunkSize); var query = System.Web.HttpUtility.ParseQueryString(string.Empty); query["transferid"] = transferid; query["transferkey"] = transferkey; query["thefilename"] = fi.Name; query["chunks"] = chunks.ToString(); query["chunksize"] = chunkSize.ToString(); var buffer = new byte[chunkSize]; var httpClient = new HttpClient(); var uriBuilder = new UriBuilder(transferurl); using (var fs = fi.OpenRead()) { int read; while ((read = await fs.ReadAsync(buffer, 0, buffer.Length)) > 0) { chunk += 1; query["chunk"] = chunk.ToString(); uriBuilder.Query = query.ToString(); var request = new HttpRequestMessage(HttpMethod.Post, uriBuilder.ToString()); request.Content = new ByteArrayContent(buffer, 0, read); request.Content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(System.Net.Mime.MediaTypeNames.Application.Octet); var response = await httpClient.SendAsync(request); // a single chunk is uploaded now // TODO: do something with the chunk response } } // entire file is uploaded now - move on to next file in the transfer } ``` -------------------------------- ### GET /handling-contacts.md Source: https://docs.filemail.com/llms.txt Performs a natural language query against the documentation index to retrieve answers and relevant excerpts. ```APIDOC ## GET /handling-contacts.md ### Description Perform an HTTP GET request on the documentation index with the `ask` parameter, and the optional `goal` parameter to retrieve answers and relevant excerpts from the documentation. ### Method GET ### Endpoint https://docs.filemail.com/handling-contacts.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask, written in natural language. - **goal** (string) - Optional - Describes the broader end goal to help tailor the answer. ### Response #### Success Response (200) - **answer** (string) - A direct answer to the question. - **excerpts** (array) - Relevant excerpts and sources from the documentation. ``` -------------------------------- ### GET /getting-sent-files.md Source: https://docs.filemail.com/getting-sent-files.md Performs a dynamic query against the documentation to retrieve answers and relevant excerpts based on a specific question and optional end goal. ```APIDOC ## GET /getting-sent-files.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically for information not explicitly present in the page. ### Method GET ### Endpoint https://docs.filemail.com/getting-sent-files.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask, written in natural language. - **goal** (string) - Optional - Describes the broader end goal to help tailor the response. ### Response #### Success Response (200) - **answer** (string) - A direct answer to the question. - **excerpts** (array) - Relevant excerpts from the documentation. - **sources** (array) - Sources used to generate the answer. ``` -------------------------------- ### GET /getting-transfer-details.md Source: https://docs.filemail.com/getting-transfer-details.md Perform a query against the documentation to retrieve answers and relevant excerpts based on a specific question and optional end goal. ```APIDOC ## GET https://docs.filemail.com/getting-transfer-details.md ### Description Queries the documentation dynamically to receive a direct answer along with relevant excerpts and sources. ### Method GET ### Endpoint https://docs.filemail.com/getting-transfer-details.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask the documentation. - **goal** (string) - Optional - The broader end goal to help tailor the response. ### Response #### Success Response (200) - **answer** (string) - The direct answer to the question. - **excerpts** (array) - Relevant excerpts from the documentation. - **sources** (array) - Sources used to generate the answer. ``` -------------------------------- ### GET /api/sending-files/upload-files.md Source: https://docs.filemail.com/api/sending-files/upload-files.md Performs a dynamic query on the documentation page to retrieve answers and relevant excerpts based on a specific question and optional goal. ```APIDOC ## GET /api/sending-files/upload-files.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically. This is useful for retrieving information not explicitly present in the current page or for clarifying context. ### Method GET ### Endpoint https://docs.filemail.com/api/sending-files/upload-files.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask, written in natural language. - **goal** (string) - Optional - Describes the broader end goal to help tailor the response. ``` -------------------------------- ### GET /managing-transfers/sharing-a-transfer.md Source: https://docs.filemail.com/managing-transfers/sharing-a-transfer.md Queries the documentation page for specific information using a natural language question and an optional goal. ```APIDOC ## GET /managing-transfers/sharing-a-transfer.md ### Description Queries the documentation dynamically by providing a specific question and an optional goal to receive a tailored answer with relevant excerpts. ### Method GET ### Endpoint https://docs.filemail.com/managing-transfers/sharing-a-transfer.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /filemail-api-2.0/error-handling.md Source: https://docs.filemail.com/filemail-api-2.0/error-handling.md Queries the documentation page dynamically to retrieve answers based on a specific question and optional goal. ```APIDOC ## GET /filemail-api-2.0/error-handling.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically for information not explicitly present in the page. ### Method GET ### Endpoint https://docs.filemail.com/filemail-api-2.0/error-handling.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask, written in natural language. - **goal** (string) - Optional - Describes the broader end goal to help tailor the response. ``` -------------------------------- ### GET /managing-transfers/editing-a-transfer.md Source: https://docs.filemail.com/managing-transfers/editing-a-transfer.md Perform a query against the documentation to receive a direct answer and relevant excerpts based on a specific question and optional goal. ```APIDOC ## GET /managing-transfers/editing-a-transfer.md ### Description Queries the documentation for information by providing a specific question and an optional end goal to receive a tailored response. ### Method GET ### Endpoint https://docs.filemail.com/managing-transfers/editing-a-transfer.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### Create a configuration file Source: https://docs.filemail.com/tools/cli.md Store credentials and settings in a JSON file to avoid passing them as command-line arguments. ```json { "username": "my@login.com", "password": "myS3cretP4ssword", "from": "your@email.com" } ``` -------------------------------- ### View CLI help Source: https://docs.filemail.com/tools/cli.md Display the available commands and options for the Filemail CLI. ```text Usage: filemail [options] [command] CLI for sending files to Filemail.com. Options: -V, --version output the version number -h, --help display help for command Commands: login [options] Login to Filemail API and get login token. logout Logout from Filemail API and destroy login token. upload [options] Upload files to Filemail.com. help [command] display help for command ``` -------------------------------- ### Use configuration file with CLI Source: https://docs.filemail.com/tools/cli.md Execute an upload command using a previously created JSON configuration file. ```bash filemail upload testFile.txt --config-file "c:\filemail-config.json" ``` -------------------------------- ### GET /transfer/sent Source: https://docs.filemail.com/getting-sent-files.md Retrieves a list of file transfers that have been sent by the user. ```APIDOC ## GET /transfer/sent ### Description Retrieves a list of file transfers that have been sent by the user. ### Method GET ### Endpoint /transfer/sent ``` -------------------------------- ### GET /transfer/sent Source: https://docs.filemail.com/getting-sent-files.md Retrieves a list or details of sent file transfers. ```APIDOC ## GET /transfer/sent ### Description Retrieves information about sent file transfers. ### Method GET ### Endpoint /transfer/sent ``` -------------------------------- ### GET /transfer/sent Source: https://docs.filemail.com/getting-sent-files.md Retrieves a list of transfers sent by the authenticated user. ```APIDOC ## GET /transfer/sent ### Description Retrieves a list of transfers that match the request specification for the authenticated user. ### Method GET ### Endpoint /transfer/sent ### Response #### Success Response (200) - **responsestatus** (FilemailStatusEnum) - The status of the response. - **errorid** (string) - Unique identifier for an error, if applicable. - **errormessage** (string) - Descriptive error message, if applicable. - **data** (TransferListDto) - The list of transfers and associated metadata. - **errorcode** (integer) - Numeric representation of the responsestatus field. #### Response Example { "responsestatus": "OK", "data": { "transfers": [], "portal": {}, "inboxOwner": {} } } ``` -------------------------------- ### GET /transfer/inbox Source: https://docs.filemail.com/api/getting-received-files.md Retrieves the list of files currently in the user's inbox. ```APIDOC ## GET /transfer/inbox ### Description Retrieves the list of files currently in the user's inbox. ### Method GET ### Endpoint /transfer/inbox ``` -------------------------------- ### GET /transfer/inbox Source: https://docs.filemail.com/api/getting-received-files.md Retrieves the list of transfers received in the user's inbox. ```APIDOC ## GET /transfer/inbox ### Description Retrieves a list of transfers that have been received in the user's inbox. ### Method GET ### Endpoint /transfer/inbox ``` -------------------------------- ### GET /transfer/inbox Source: https://docs.filemail.com/api/getting-received-files.md Retrieves the list of transfers currently in the user's inbox. ```APIDOC ## GET /transfer/inbox ### Description Retrieves a list of transfers that match the request specification for the user's inbox. ### Method GET ### Endpoint /transfer/inbox ### Response #### Success Response (200) - **responsestatus** (FilemailStatusEnum) - The status of the request. - **data** (TransferListDto) - The list of transfers and inbox details. #### Response Example { "responsestatus": "OK", "data": { "transfers": [], "portal": {}, "inboxOwner": {} } } ``` -------------------------------- ### POST /transfer/initialize Source: https://docs.filemail.com/api/sending-files/initialize.md Initializes a new transfer session and returns the necessary connection details. ```APIDOC ## POST /transfer/initialize ### Description Initializes a new file transfer session. This is the first step in the file upload process. ### Method POST ### Endpoint /transfer/initialize ### Response #### Success Response (200) - **transferid** (string) - Unique identifier for the transfer. - **transferkey** (string) - Security key for the transfer. - **transferurl** (string) - The URL associated with the transfer. - **region** (string) - The region where the transfer is hosted. - **alternate_urls** (array) - List of alternative URLs for the transfer. - **transferip** (string) - The IP address of the transfer server. - **udpport** (integer) - UDP port for accelerated transfers. - **udpthreshold** (integer) - Threshold for UDP usage. - **customfields** (object) - Custom fields associated with the transfer. ``` -------------------------------- ### POST /transfer/initialize Source: https://docs.filemail.com/api/sending-files/initialize.md Initializes a new file transfer. This endpoint supports linking transfers to file requests, incoming pages, and custom fields. ```APIDOC ## POST /transfer/initialize ### Description Initializes a new file transfer. This endpoint is used to set up the transfer parameters, including optional fields for incoming transfers and file requests. ### Method POST ### Endpoint /transfer/initialize ### Parameters #### Request Body - **sourcedetails** (string) - Optional - Informational field to mark the code library or user-agent used to create the transfer. - **companyid** (string) - Optional - Identifier of a corporation when creating an 'Incoming' transfer. - **fileRequestId** (string) - Optional - ID of the associated file request when creating an 'Incoming' transfer. - **fileRequestShareId** (string) - Optional - ID of the associated file request share when creating an 'Incoming' transfer. - **incomingpageid** (string) - Optional - ID of the associated incoming page when creating an 'Incoming' transfer. - **incomingpassword** (string) - Optional - Password for the incoming page if it is password protected. - **customfields** (array) - Optional - List of objects representing custom fields for the transfer. ``` -------------------------------- ### GET /GetRangeHash.ashx Source: https://docs.filemail.com/downloading-files.md Retrieves the MD5 hash for a specific chunk of a file to verify its integrity. ```APIDOC ## GET https://[host]/GetRangeHash.ashx ### Description Retrieves the MD5 hash for a specific chunk of a file to verify its integrity. This endpoint is used to compare the server-side hash with a locally calculated hash of the downloaded chunk. ### Method GET ### Endpoint https://[host]/GetRangeHash.ashx ### Parameters #### Query Parameters - **transferid** (string) - Required - The transfer ID from transfer details. - **thefilename** (string) - Required - The URL-encoded filename from transfer details. - **position** (integer) - Required - The start byte 0-based index of the chunk. - **length** (integer) - Required - The number of bytes in the chunk. ### Request Example GET https://8888.filemail.com/GetRangeHash.ashx?transferid=gaaihvyksuejqub&thefilename=path%2Fto%2Ffile.jpg&position=0&length=93073 ### Response #### Success Response (200) - **responsestatus** (string) - The status of the request (e.g., "OK"). - **hash** (string) - The MD5 hash of the chunk as a lowercase hex-string. #### Response Example { "responsestatus": "OK", "hash": "d47d82f98f02b204e9200a98ecf8417e" } ``` -------------------------------- ### Upload files and folders via CLI Source: https://docs.filemail.com/tools/cli.md Sends multiple files and a directory to specified recipients with end-to-end encryption enabled. ```bash filemail upload --username nicole@email.com --e2ee-key superPassword --to patrick@email.com monica@email.com john@email.com -- c:\file1.txt c:\log.log c:\myFolder ``` -------------------------------- ### GET /managing-transfers/deleting-a-transfer.md Source: https://docs.filemail.com/managing-transfers/deleting-a-transfer.md Queries the documentation for information using a natural language question and an optional goal. ```APIDOC ## GET /managing-transfers/deleting-a-transfer.md ### Description Perform a query against the documentation to retrieve answers, excerpts, and sources based on a specific question. ### Method GET ### Endpoint https://docs.filemail.com/managing-transfers/deleting-a-transfer.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### OpenAPI definition for GET /transfer/sent Source: https://docs.filemail.com/getting-sent-files.md The OpenAPI specification for the endpoint, detailing parameters for filtering and pagination. ```json {"openapi":"3.0.4","info":{"title":"Filemail REST API","version":"2.0"},"tags":[{"name":"Transfer"}],"servers":[{"url":"https://api-public.filemail.com","description":"Production"}],"paths":{"/transfer/sent":{"get":{"tags":["Transfer"],"description":"Returns a list of transfers sent by currently authenticated user, or sent by all users in the authenticated user's organization. Optionally allows to include expired transfers.","parameters":[{"name":"getexpired","in":"query","description":"When set to true the response will include also expired transfers.","schema":{"type":"boolean"}},{"name":"getforallusers","in":"query","description":"When set to true the response will include also transfers sent by other users in the organization. In case current user is not an organization administrator - this flag will be ignored.","schema":{"type":"boolean"}},{"name":"search","in":"query","description":"Optional search phrase, which will filter transfers by ID, subject, message, sender, recipients and custom fields.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Optional amount of sent items to fetch (paging). Defaults to custom max page size specified for a company account, or system default (1000).","schema":{"type":"integer","format":"int32"}},{"name":"skip","in":"query","description":"Optional amount of sent items to skip (paging). ``` -------------------------------- ### Embed Portal with Prefilled Values Source: https://docs.filemail.com/integrations/integrate-portal-page.md Use data attributes to pass query parameters to the portal for pre-populating fields. ```html
``` -------------------------------- ### POST /login Source: https://docs.filemail.com/custom-authentication.md Authenticates a user with an email and password to receive a login token and a refresh token. ```APIDOC ## POST /login ### Description Authenticates a user using their email and password. Returns a login token and a refresh token. The refresh token can be used later to obtain a new login token. ### Method POST ### Endpoint /login ### Request Body - **email** (string) - Required - Email of the user. - **password** (string) - Required - Password matching the user email. ### Request Example { "email": "user@example.com", "password": "yourpassword" } ### Response #### Success Response (200) - **data** (object) - Contains the login token, expiration date, and refresh token. #### Response Example { "responsestatus": "OK", "data": { "logintoken": "string", "logintokenExpireDate": "string", "refreshtoken": "string" } } ``` -------------------------------- ### GET /managing-transfers/deleting-a-file-in-a-transfer.md Source: https://docs.filemail.com/managing-transfers/deleting-a-file-in-a-transfer.md Perform a query against the documentation to retrieve answers, excerpts, or context related to a specific question. ```APIDOC ## GET /managing-transfers/deleting-a-file-in-a-transfer.md ### Description Queries the documentation dynamically to receive a direct answer and relevant excerpts based on a provided question. ### Method GET ### Endpoint https://docs.filemail.com/managing-transfers/deleting-a-file-in-a-transfer.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### POST /transfer/initialize Source: https://docs.filemail.com/api/sending-files/initialize.md Creates a new transfer, returns upload URL and credentials. This operation must be performed before any files can be uploaded to Filemail. ```APIDOC ## POST /transfer/initialize ### Description Creates a new transfer, returns upload URL and credentials. This operation must be performed before any files can be uploaded to Filemail. ### Method POST ### Endpoint /transfer/initialize ### Request Body - **to** (array of strings) - Optional - List of recipients (email addresses). After transfer is complete we will send out download URL to every email in this list. - **subject** (string) - Required - Transfer subject. This value will be used on download pages as the main title, and as the subject of emails that are sent to recipients. - **message** (string) - Optional - Transfer message. We will use this text as the introductory paragraph on download pages, and as the main body of emails that are sent to recipients. - **password** (string) - Optional - Optional password that protects the transfer. - **confirmation** (boolean) - Optional - When set to true we will send out a confirmation email to the sender after transfer is complete. - **notify** (boolean) - Optional - When set to true we will send out a confirmation email to the sender after transfer is downloaded. - **days** (integer) - Optional - The number of days until the transfer expires. Use -1 to create a permanent transfer. - **transfersize** (integer) - Optional - Informational field - expected size of the transfer in bytes. ``` -------------------------------- ### C# Streaming Upload Alternative Source: https://docs.filemail.com/api/sending-files/upload-files.md Alternative approach using StreamContent to reduce memory pressure during file uploads. ```csharp var request = new HttpRequestMessage(HttpMethod.Post, uri); request.Content = new StreamContent(fs); ```