TOC
cURL cURL Java JS Ruby PHP .NET Python Golang CLI
  • Introduction
  • SDKs
  • REST API
  • Authentication with API Key
  • Authentication with a Session
  • Response Codes / Errors
  • Account Line Items
  • Actions
  • Action Notification Exports
  • Action Notification Export Results
  • Action Webhook Failures
  • Api Keys
  • Apps
  • As2 Incoming Messages
  • As2 Outgoing Messages
  • As2 Partners
  • As2 Stations
  • Automations
  • Automation Runs
  • Bandwidth Snapshots
  • Behaviors
  • Bundles
  • Bundle Downloads
  • Bundle Notifications
  • Bundle Recipients
  • Bundle Registrations
  • Clickwraps
  • Dns Records
  • Email Incoming Messages
  • External Events
  • Files/Folders
  • File Uploading
  • File Actions
  • File Comments
  • File Comment Reactions
  • File Migrations
  • File Upload Parts
  • Form Field Sets
  • Gpg Keys
  • Groups
  • Group Users
  • History Exports
  • History Export Results
  • Inbox Recipients
  • Inbox Registrations
  • Inbox Uploads
  • Ip Addresses
  • Locks
  • Messages
  • Message Comments
  • Message Comment Reactions
  • Message Reactions
  • Notifications
  • Permissions
  • Priorities
  • Projects
  • Public Ip Addresses
  • Public Keys
  • Remote Bandwidth Snapshots
  • Remote Servers
  • Remote Server Configuration Files
  • Requests
  • Sessions
  • Settings Changes
  • Sftp Host Keys
  • Share Groups
  • Sites
  • Site
  • Snapshots
  • Sso Strategies
  • Styles
  • Usage Daily Snapshots
  • Usage Snapshots
  • Users
  • User Cipher Uses
  • User Requests
  • Webhook Tests
  • Introduction

    Welcome to the Files.com API and SDK documentation! Our REST API and SDKs are designed for people who require the highest level of integration between Files.com and their own application, website, or database.

    The Files.com web interface, Desktop app, and FTP backend uses this exact same API, so everything you can do in the UI can also be accomplished using the API or with one of our SDKs.

    SDKs

    Files.com publishes SDKs for all popular programming languages. We strongly recommend using our SDKs over directly implementing our REST API, especially if working with files. Our SDKs include developer-friendly features such as support for automatic pagination and tight integration with the File APIs in your language of choice.

    Plus we have invested time into optimizing file operations, including parallelization of uploads and downloads in some SDKs. As we add support for more remote server backends via our Sync and Mount features, we will always update our SDKs with any optimizations that are available.

    JavaScript SDK

    The JavaScript SDK can be installed via NPM or it can be retrieved directly at GitHub.

    Ruby SDK

    The Ruby SDK can be installed via Rubygems/Bundler or it can be retrieved directly at GitHub.

    PHP SDK

    The PHP SDK can be installed via Packagist or it can be retrieved directly at GitHub.

    Microsoft .NET SDK

    The .NET SDK can be installed via NuGet or it can be retrieved directly at GitHub.

    Python SDK

    The Python SDK can be installed via PyPI or it can be retrieved directly at GitHub.

    Java SDK

    The Java SDK can be installed via at GitHub.

    Go SDK

    The Go SDK can be installed via at GitHub.

    REST API

    The REST API uses plain JSON or XML over HTTP. Resources (such as Users or Groups) are manipulated individually using HTTP verbs such as GET, POST, PUT, PATCH, and DELETE.

    OpenAPI (f/k/a Swagger) v2 Definition File

    Files.com also publishes a OpenAPI/Swagger v2 Definition File for the API. This swagger_doc.json file includes much of the information available on this documentation site in a machine-readable JSON format.

    The most common use of the OpenAPI definition file is in conjunction with API debugging tools like Postman.

    It can also be used to generate SDKs in languages that we don't support, but we'd prefer that you reach out to us if you find yourself in that situation. We'd much rather provide an officially supported SDK.

    Command Line Interface (CLI) App

    A Command Line Interface (CLI) app for Windows, macOS, and Linux can be found here.

    Mock Server For Your Integration Tests

    Files.com publishes a Files.com API server, which is useful for testing your use of the Files.com SDKs and other direct integrations against the Files.com API in an integration test environment.

    It is a Ruby app that operates as a minimal server for the purpose of testing basic network operations and JSON encoding for your SDK or API client. It does not maintain state and it does not deeply inspect your submissions for correctness.

    Eventually we will add more features intended for integration testing, such as the ability to intentionally provoke errors.

    Download the server as a Docker image via Docker Hub.

    The Source Code is also available on GitHub.

    A README is available on the GitHub link.

    Attaching Files to API Requests

    Certain API endpoints allow you to upload files to configure certain objects on the API. Examples of this include uploading avatars to a user record or custom background image for your login screen.

    The process used to upload these sorts of files to the API is separate from the main process of uploading files to your Files.com site as part of an actual business file transfer.

    Any time an API endpoint accepts a parameter with type File, there are two different ways to upload that file.

    One way is to upload it as an HTTP POST parameter using the HTTP multipart/form-data standard. This is the same way that a file that gets uploaded by web browsers when you create a <form method="post" enctype="mulitpart/form-data"> form in HTML that contains an <input type="file" /> field. The upside of this approach is that it uses a completely standard HTTP technique for uploading files. The downside to this approach is that it breaks from the pattern used everywhere else in our API where JSON bodies are preferred for POST/PUT requests.

    As a result of that, the preferred way to upload a file to our API uses a non-standard technique of encoding the file as Base64 and including that Base64 representation in the standard JSON body of the POST/PUT request. When using this approach, you will provide a JSON object with 3 elements:

    Please see the cURL example code on the right for an example of the exact format.

    When using our SDKs and integrations, please be aware that (unfortunately) support for File Attachments to API requests is somewhat inconsistent. We are very interested in adding support to any SDKs where a customer needs this capability, so please reach out to us and we'll be happy to help.

    Paginating List Requests

    Example Paginating List Requests

    curl https://SUBDOMAIN.files.com/api/rest/v1/users.json?cursor=CURSOR \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://SUBDOMAIN.files.com/api/rest/v1/users.xml?cursor=CURSOR \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    // List root folder with auto pagination (loads each page into memory)
    for (Folder item : Folder.listFor("/", null).listAutoPaging()) {
        System.out.println(item.path);
    }
    
    // List root folder with manual pagination (loads each page into memory)
    ListIterator<Folder> listing = Folder.listFor("/", null);
    do {
        for (Folder item : listing.loadNextPage()) {
            System.out.println(item.path);
        }
    } while (listing.hasNextPage());
    
    // if auto-pagination executed, we'll see results from all pages
    Files.configureNetwork({
        autoPaginate: true,
    })
    
    const allPageItems = await Folder.listFor('/')
    
    # if auto-paginng executed, we'll see results from all pages
    Files::User.list.auto_paging_each { |u| puts u.username }
    
    // true by default
    Files::$autoPaginate = true;
    
    \Files\Model\User::list();
    
    // List root folder with auto pagination (loads each page into memory)
    foreach (var file in Folder.ListFor("/").ListAutoPaging())
    {
        Console.WriteLine("- Path: {0}", file.Path);
    }
    
    // List root folder with manual pagination (loads each page into memory)
    FilesList<RemoteFile> listing = Folder.ListFor("/");
    do
    {
        foreach (var file in await listing.LoadNextPage())
        {
            Console.WriteLine("- Path: {0}", file.Path);
        }
    } while (listing.HasNextPage);
    
    
    list_obj = files_sdk.folder.list_for('/')
    
    # Iterating with with auto_paging_iter
    for f in list_obj.auto_paging_iter():
        print(f.type, f.path)
    
    # Iterating manually
    while list_obj.has_next_page:
        list_obj.load_next_page()
        for f in list_obj:
            print(f.type, f.path)
    
    // To have it auto-paginate set ListParams.MaxPages, default is 1.
    user.List(files_sdk.UserListParams{
        ListParams: files_sdk.ListParams{
            MaxPages: 10,
        },
    })
    
    Auto-paging is enabled by default. Change --max-pages option to limit the number of pages.
    
    files-cli folders ls --max-pages=2
    

    Certain API list endpoints return lists of objects. For example, the GET /users endpoint returns a list of User objects. When the number of objects in the list is large, the API will paginate the results.

    All of our APIs provide iterator methods that will automatically paginate through lists that span more than one page of results. Check the documentation for your preferred SDK for additional information.

    When using the API directly, there are two GET parameters that control pagination on list requests:

    Parameter Description
    cursor string Cursor representing a point from a previous list request to resume from on this request.
    per_page integer Number of records to show per page. Default: 1,000. Max: 10,000. 1,000 or less is recommended.

    List requests that have another page of records available will return the HTTP header X-Files-Cursor-Next. This header will contain a value to be used as the cursor parameter when you load the next page of the list.

    If a cursor was provided to access the page, the API will also return X-Files-Cursor-Prev which is a cursor that can be used to navigate to the previous page of results.

    When using a cursor, you must keep the per_page value (number of records per page) consistent between pages.

    Extracting Information from the Cursor

    The cursor is a string which consists of a page number prefix and an encrypted cursor part separated by a colon (:).

    Example: PAGE_NUMBER:encrypted_cursor_part. You can use the page number to show a page number in a UI, if applicable.

    Authentication with API Key

    Authenticating with an API key is the recommended authentication method for most scenarios, and is the method used in the examples on this site.

    Files.com also supports authentication with user sessions.

    Example of authenticating with an API key

    curl https://SUBDOMAIN.files.com/api/rest/v1/users.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://SUBDOMAIN.files.com/api/rest/v1/users.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    # Alternatively, you can specify the API key on a per-request basis in the final parameter to any method or initializer.
    Files::User.new(params, api_key: 'YOUR_API_KEY')
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    \Files\Files::setBaseUrl('https://SUBDOMAIN.files.com');
    
    # Alternatively, you can specify the API key on a per-object basis in the second parameter to a model constructor.
    $user = new \Files\Model\User($params, array('api_key' => 'YOUR_API_KEY'));
    
    # You may also specify the API key on a per-request basis in the final parameter to static methods.
    \Files\Model\User::find($id, $params, array('api_key' => 'YOUR_API_KEY'));
    
    FilesClient.apiKey = "YOUR_API_KEY";
    // Alternatively, you can specify the API key on a per-object
    // basis in options HashMap to a model constructor.
    
    HashMap<String, Object> requestOptions = new HashMap()<>;
    requestOptions.put("api_key", "my-key");
    User user = new User(params, requestParameters);
    
    // You may also specify the API key on a per-request basis in
    // in the final parameter to static methods.
    HashMap<String, Object> requestOptions = new HashMap()<>;
    requestOptions.put("api_key", "my-key");
    User.find(id, params, requestOptions);
    
    Files.setApiKey('YOUR_API_KEY')
    Files.setBaseUrl('https://SUBDOMAIN.files.com')
    
    // Alternatively, you can specify the API key on a per-object basis in the second parameter to a model constructor.
    const user = new User(params, { apiKey: 'YOUR_API_KEY' })
    
    // You may also specify the API key on a per-request basis in the final parameter to static methods.
    await User.find(id, params, { apiKey: 'YOUR_API_KEY' })
    
    // Using manual configuration
    var config = new FilesConfiguration();
    config.ApiKey = 'YOUR_API_KEY'
    
    new FilesClient(config);
    
    // In app.config
    <configSections>
        <sectionGroup name="files.com">
            <section
                name="filesConfiguration"
                type="Files.FilesConfiguration, Files.com"
            />
        </sectionGroup>
    </configSections>
    <files.com>
        <filesConfiguration ApiKey="YOUR_API_KEY" />
    </files.com>
    
    new FilesClient();
    
    // You may also specify the API key on a per-request basis in the final parameter to static methods.
    var options = Dictionary<string, object>();
    options.Add("api_key", "YOUR_API_KEY");
    User.Find(id, params, options);
    
    files_sdk.set_api_key("YOUR_API_KEY")
    
    # Alternatively, you can specify the API key on a per-request basis in the final parameter to any method or initializer.
    files_sdk.user.list(params, {"api_key": "YOUR_API_KEY"})
    
    files_sdk.APIKey = "YOUR_API_KEY"
    
    // Alternatively, you can specify the API key on a per-request basis using the Config struct.
    config := files_sdk.Config{APIKey: "XXXX-XXXX..."}
    client := folder.Client{Config: config}
    client.ListFor(context.Background(), files_sdk.FolderListForParams{})
    
    files-cli folders list-for --api-key=YOUR_API_KEY
    

    Make sure to replace YOUR_API_KEY with your API key.

    To use the API or SDKs with an API Key, first generate an API key from the web interface or via the API or an SDK.

    Note that when using a user-specific API key, if the user is an administrator, you will have full access to the entire API. If the user is not an administrator, you will only be able to access files that user can access, and no access will be granted to site administration functions in the API.

    You may provide the key to the API one of two ways. The simplest way is to set the X-FilesAPI-Key header with the value of the key.

    Alternatively, you may use HTTP Basic Authentication. You should pass in the API Key as the Username field in HTTP Basic Authentication. The password field may be left blank, or you may use a dummy value, such as x.

    SDKs can be configured to use a single API key or you can pass the API key to each individual method on the SDK.

    Authentication with a Session

    You can also authenticate to the REST API or SDKs by creating a user session using the username and password of an active user. If the user is an administrator, the session will have full access to the entire API. Sessions created from regular user accounts will only be able to access files that user can access, and no access will be granted to site administration functions.

    API sessions use the exact same session timeout settings as web interface sessions. When an API session times out, simply create a new session and resume where you left off. This process is not automatically handled by SDKs because we do not want to store password information in memory without your explicit consent.

    Logging in

    Example Request

    curl https://SUBDOMAIN.files.com/api/rest/v1/sessions.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"username": "motor", "password": "vroom"}'
    
    curl https://SUBDOMAIN.files.com/api/rest/v1/sessions.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<session><username>motor</username><password>vroom</password></session>'
    
    $session = \Files\Model\Session::create(['username' => 'motor', 'password' => 'vroom']);
    
    HashMap<String, Object> sessionParameters = new HashMap<>()
    sessionParameters.put("username", "username");
    sessionParameters.put("password", "password");
    Session session = Session.create(parameters)
    
    const session = await Session.create({ username: 'motor', password: 'vroom' })
    
    session = files_sdk.session.create({ "username": "motor", "password": "vroom" })
    
    config := files_sdk.Config{Subdomain: "SUBDOMAIN"}
    client := session.Client{Config: config}
    session := client.Create(
      context.Background(),
      files_sdk.SessionCreateParams{
        Username: "motor",
        Password: "vroom",
      }
    )
    
    files-cli config-set --subdomain SUBDOMAIN --username motor
    files-cli folders list-for
    > password: vroom
    

    Example Response

    {
      "id": "8c2e9f493dd8a857d5cdddbb7bf64ece0b7fb599"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <session>
      <id>8c2e9f493dd8a857d5cdddbb7bf64ece0b7fb599</id>
    </session>
    

    To create a session, a POST request is made to /sessions with the user’s username and password.

    The id field in the response is the session ID that must be provided to subsequent requests in order to use this session.

    HTTP Request

    POST /sessions.(json|xml)

    Using a session

    Example Request

    curl https://SUBDOMAIN.files.com/api/rest/v1/users.json \
      -H 'X-FilesAPI-Auth: 8c2e9f493dd8a857d5cdddbb7bf64ece0b7fb599'
    
    curl https://SUBDOMAIN.files.com/api/rest/v1/users.xml \
      -H 'X-FilesAPI-Auth: 8c2e9f493dd8a857d5cdddbb7bf64ece0b7fb599'
    
    # You may set the returned session ID to be used by default for subsequent requests.
    \Files\Files::setSessionId($session->id);
    \Files\Files::setBaseUrl('https://SUBDOMAIN.files.com');
    
    # Alternatively, you can specify the session ID on a per-object basis in the second parameter to a model constructor.
    $user = new \Files\Model\User($params, array('session_id' => $session->id));
    
    # You may also specify the session ID on a per-request basis in the final parameter to static methods.
    \Files\Model\User::find($id, $params, array('session_id' => $session->id));
    
    // You may set the returned session to be used by default for subsequent requests.
    FilesClient.session = session;
    
    // Alternatively, you can specify the session ID on a per-object basis
    // in the second parameter to a model constructor.
    
    HashMap<String, Object> requestParameters = new HashMap<>();
    requestParameters.put("session_id", session.getId());
    User.find(id, params, requestParameters);
    
    // You may set the returned session ID to be used by default for subsequent requests.
    Files.setSessionId(session.id)
    Files.setBaseUrl('https://SUBDOMAIN.files.com')
    
    // Alternatively, you can specify the session ID on a per-object basis in the second parameter to a model constructor.
    const user = new User(params, { session_id: session.id })
    
    // You may also specify the session ID on a per-request basis in the final parameter to static methods.
    await User.find(id, params, { session_id: session.id })
    
    # You may set the returned session to be used by default for subsequent requests.
    files_sdk.set_session(session)
    files_sdk.base_url = "https://SUBDOMAIN.files.com"
    
    # Alternatively, you can specify the session ID on a per-object basis in the second parameter to a model constructor.
    user = files_sdk.user.User(params, {"session_id": session.id})
    
    # You may also specify the session ID on a per-request basis in the final parameter to static methods.
    files_sdk.user.find(id, params, {"session_id": session.id})
    
    config := files_sdk.Config{SessionId: session.Id, Subdomain: "SUBDOMAIN"}
    
    userClient := users.Client{Config: config}
    userClient.Find(context.Background(), files_sdk.UserFindParams{id: "1"})
    
    files-cli config-set --subdomain SUBDOMAIN --username motor
    files-cli folders list-for
    > password: vroom
    

    Once a session has been created, you authenticate to the REST API by sending a header called X-FilesAPI-Auth set to the value of the session ID.

    Reauthentication

    Example Request

    curl https://SUBDOMAIN.files.com/api/rest/v1/users/123.json \
      -X PUT \
      -H 'Content-Type: application/json' \
      -H 'X-FilesAPI-Auth: 8c2e9f493dd8a857d5cdddbb7bf64ece0b7fb599' \
      -H 'X-Files-Reauthentication: password:YourPasswordHere' \
      -d '{"password": "NewPassword"}'
    
    curl https://SUBDOMAIN.files.com/api/rest/v1/users/123.xml \
      -X PUT \
      -H 'Content-Type: application/xml' \
      -H 'X-FilesAPI-Auth: 8c2e9f493dd8a857d5cdddbb7bf64ece0b7fb599' \
      -H 'X-Files-Reauthentication: password:YourPasswordHere' \
      -d '<user><password>NewPassword</password></user>'
    

    If authenticating to the API via a session ID (as opposed to an API key), we require that you provide the session user’s password again in a X-Files-Reauthentication header for certain types of requests where we want to add an additional level of security. We call this process Reauthentication.

    Currently, reauthentication is required for the following actions:

    Logging out

    Example Request

    curl https://SUBDOMAIN.files.com/api/rest/v1/sessions.json \
      -H 'X-FilesAPI-Auth: 8c2e9f493dd8a857d5cdddbb7bf64ece0b7fb599' \
      -X DELETE
    
    curl https://SUBDOMAIN.files.com/api/rest/v1/sessions.xml \
      -H 'X-FilesAPI-Auth: 8c2e9f493dd8a857d5cdddbb7bf64ece0b7fb599' \
      -X DELETE
    
    Session::destroy();
    
    session.destroy()
    
    await Session.destroy()
    
    session.destroy()
    
    session.Delete(context.Background(), files_sdk.SessionDeleteParams{Session: session})
    

    Example Response

    []
    
    <?xml version="1.0" encoding="UTF-8"?>
    <nil-classes type="array"/>
    

    User sessions can be ended by sending a DELETE request to /sessions. If a valid user session ID is passed in via the X-FilesAPI-Auth header, then that user session will be deleted, which is similar to the user logging out. Note that sending a DELETE request at this endpoint will always result in a response of an empty array, even if an invalid user session was passed in.

    HTTP Request

    DELETE /sessions.(json|xml)

    Response Codes / Errors

    Example Response: Invalid API key

    {
       "error":"Unauthorized. The API key or Session token is either missing or invalid.",
       "http-code":401,
       "instance":"a69f6b06-6ba9-4e71-8542-60d2ff3d96f2",
       "title":"Authentication Required",
       "type":"not-authorized/authentication-required"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <error_response>
      <error>Unauthorized. The API key or Session token is either missing or invalid.</error>
      <http-code type="integer">401</http-code>
      <instance>df517ee8-91ec-4120-bf54-642db67e483d</instance>
      <title>Authentication Required</title>
      <type>not-authorized/authentication-required</type>
    </error_response>
    

    Example Response: Invalid username or password

    {
       "error":"Invalid username or password",
       "http-code":401,
       "instance":"d895ebaa-7e7e-4ced-87c9-2acf743a19c3",
       "title":"Invalid Username Or Password",
       "type":"bad-request/invalid-username-or-password"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <error_response>
      <error>Invalid username or password</error>
      <http-code type="integer">401</http-code>
      <instance>8bbd89f7-f0eb-4295-8b23-4ab4bec17546</instance>
      <title>Invalid Username Or Password</title>
      <type>bad-request/invalid-username-or-password</type>
    </error_response>
    

    Example Response: No read permission for path

    {
       "error":"You do not have read permission for this path, file.txt",
       "http-code":403,
       "instance":"37ffdbfb-8faa-4af9-8091-29162f0be67c",
       "title":"Read Permission Required",
       "type":"not-authorized/read-permission-required"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <error_response>
      <error>You do not have read permission for this path, file.txt</error>
      <http-code type="integer">403</http-code>
      <instance>03df05f8-9a1b-4d25-83cc-01278cb43682</instance>
      <title>Read Permission Required</title>
      <type>not-authorized/read-permission-required</type>
    </error_response>
    

    Example Response: Model Save Error

    {
      "error": "Error saving model.",
      "http-code": 422,
      "instance": "508503b0-2423-4edc-a46f-77d77ac4a7e3",
      "model_errors": {
        "username": [
          "Username must not contain multiple spaces together",
          "Username must not begin or end with a space"
        ]
      },
      "model_error_keys": {
        "username": [
          "multiple_spaces",
          "leading_trailing_space"
        ]
      },
      "errors": [
        "Username must not contain multiple spaces together",
        "Username must not begin or end with a space"
      ],
      "title": "Model Save Error",
      "type": "processing-failure/model-save-error"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <error_response>
      <error>Error saving model.</error>
      <http-code type="integer">422</http-code>
      <instance>f94c6af9-b968-44dd-be09-4e5aedfd115c</instance>
      <model_errors>
        <username type="array">
          <username>Username must not contain multiple spaces together</username>
          <username>Username must not begin or end with a space</username>
        </username>
      </model_errors>
      <model_error_keys>
        <username type="array">
          <username type="symbol">multiple_spaces</username>
          <username type="symbol">leading_trailing_space</username>
        </username>
      </model_error_keys>
      <errors type="array">
        <error>Username must not contain multiple spaces together</error>
        <error>Username must not begin or end with a space</error>
      </errors>
      <title>Model Save Error</title>
      <type>processing-failure/model-save-error</type>
    </error_response>
    
    {
      "detail": "Error saving model.",
      "error": "Error saving model.",
      "errors": [
        "Username must not contain multiple spaces together",
        "Username must not begin or end with a space"
      ],
      "http-code": 422,
      "instance": "14846924-ee4f-45ae-836e-406cad383adb",
      "model_errors": {
        "avatar_file": [],
        "username": [
          "Username must not contain multiple spaces together",
          "Username must not begin or end with a space"
        ]
      },
      "title": "Model save error",
      "type": "model-save-error"
    }
    

    The Files.com API returns standard HTTP success (2xx) or error (4xx, 5xx) status codes. Status codes in the 5xx range are unexpected and indicate an error occurred with our API. Wait some time and then try again. If you get a 500 repeatedly, it may be a bug. Please report it.

    Note that success codes can include 200, 201, and 204.

    The Files.com API returns errors in a standard structure for both JSON and XML API requests as well as our SDKs. Because different types of errors will share the same HTTP response code, it is strongly recommended to use the type attribute of the returned error object and not the HTTP response code when handling errors.

    When the request encounters an error while creating or updating a record, the response will include three additional JSON objects: errors, model_errors, and model_error_keys. The errors object contains user friendly error strings translated into your site's default language. The model_errors object contains the user friendly error strings from the errors object mapped to the parameter that caused the error. The model_error_keys object contains the translation keys used to generate the user friendly entries in model_errors. These keys can be used for language independent error handling logic. For errors which do not have translation keys, the model_error_keys entries will instead contain the English error string.

    Each SDK implements exception handling in a native way using these error types. You can catch/rescue individual error types as well as error type families.

    Error Types

    Type Description
    bad-request Bad Request
    bad-request/agent-upgrade-required Agent Upgrade Required
    bad-request/attachment-too-large Attachment Too Large
    bad-request/cannot-download-directory Cannot Download Directory
    bad-request/cant-move-with-multiple-locations Cant Move With Multiple Locations
    bad-request/datetime-parse Datetime Parse
    bad-request/destination-same Destination Same
    bad-request/folder-must-not-be-a-file Folder Must Not Be A File
    bad-request/invalid-body Invalid Body
    bad-request/invalid-cursor Invalid Cursor
    bad-request/invalid-cursor-type-for-sort Invalid Cursor Type For Sort
    bad-request/invalid-etags Invalid Etags
    bad-request/invalid-filter-alias-combination Invalid Filter Alias Combination
    bad-request/invalid-filter-combination Invalid Filter Combination
    bad-request/invalid-filter-field Invalid Filter Field
    bad-request/invalid-filter-param Invalid Filter Param
    bad-request/invalid-filter-param-value Invalid Filter Param Value
    bad-request/invalid-input-encoding Invalid Input Encoding
    bad-request/invalid-interface Invalid Interface
    bad-request/invalid-oauth-provider Invalid Oauth Provider
    bad-request/invalid-path Invalid Path
    bad-request/invalid-return-to-url Invalid Return To Url
    bad-request/invalid-upload-offset Invalid Upload Offset
    bad-request/invalid-upload-part-gap Invalid Upload Part Gap
    bad-request/invalid-upload-part-size Invalid Upload Part Size
    bad-request/method-not-allowed Method Not Allowed
    bad-request/no-valid-input-params No Valid Input Params
    bad-request/operation-on-non-scim-resource Operation On Non Scim Resource
    bad-request/part-number-too-large Part Number Too Large
    bad-request/reauthentication-needed-fields Reauthentication Needed Fields
    bad-request/request-param-path-cannot-have-trailing-whitespace Request Param Path Cannot Have Trailing Whitespace
    bad-request/request-params-contain-invalid-character Request Params Contain Invalid Character
    bad-request/request-params-invalid Request Params Invalid
    bad-request/request-params-required Request Params Required
    bad-request/search-all-on-child-path Search All On Child Path
    bad-request/unsupported-currency Unsupported Currency
    bad-request/unsupported-http-response-format Unsupported Http Response Format
    bad-request/unsupported-media-type Unsupported Media Type
    bad-request/user-id-invalid User Id Invalid
    bad-request/user-id-on-user-endpoint User Id On User Endpoint
    bad-request/user-required User Required
    not-authenticated/authentication-required Authentication Required
    not-authenticated/bundle-registration-code-failed Bundle Registration Code Failed
    not-authenticated/files-agent-token-failed Files Agent Token Failed
    not-authenticated/inbox-registration-code-failed Inbox Registration Code Failed
    not-authenticated/invalid-credentials Invalid Credentials
    not-authenticated/invalid-oauth Invalid Oauth
    not-authenticated/invalid-or-expired-code Invalid Or Expired Code
    not-authenticated/invalid-username-or-password Invalid Username Or Password
    not-authenticated/locked-out Locked Out
    not-authenticated/lockout-region-mismatch Lockout Region Mismatch
    not-authenticated/one-time-password-incorrect One Time Password Incorrect
    not-authenticated/two-factor-authentication-error Two Factor Authentication Error
    not-authenticated/two-factor-authentication-setup-expired Two Factor Authentication Setup Expired
    not-authorized/api-key-is-disabled Api Key Is Disabled
    not-authorized/api-key-is-path-restricted Api Key Is Path Restricted
    not-authorized/api-key-only-for-desktop-app Api Key Only For Desktop App
    not-authorized/api-key-only-for-mobile-app Api Key Only For Mobile App
    not-authorized/api-key-only-for-office-integration Api Key Only For Office Integration
    not-authorized/billing-permission-required Billing Permission Required
    not-authorized/bundle-maximum-uses-reached Bundle Maximum Uses Reached
    not-authorized/cannot-login-while-using-key Cannot Login While Using Key
    not-authorized/cant-act-for-other-user Cant Act For Other User
    not-authorized/contact-admin-for-password-change-help Contact Admin For Password Change Help
    not-authorized/files-agent-failed-authorization Files Agent Failed Authorization
    not-authorized/folder-admin-or-billing-permission-required Folder Admin Or Billing Permission Required
    not-authorized/folder-admin-permission-required Folder Admin Permission Required
    not-authorized/full-permission-required Full Permission Required
    not-authorized/history-permission-required History Permission Required
    not-authorized/insufficient-permission-for-params Insufficient Permission For Params
    not-authorized/must-authenticate-with-api-key Must Authenticate With Api Key
    not-authorized/need-admin-permission-for-inbox Need Admin Permission For Inbox
    not-authorized/non-admins-must-query-by-folder-or-path Non Admins Must Query By Folder Or Path
    not-authorized/not-allowed-to-create-bundle Not Allowed To Create Bundle
    not-authorized/password-change-not-required Password Change Not Required
    not-authorized/password-change-required Password Change Required
    not-authorized/read-only-session Read Only Session
    not-authorized/read-permission-required Read Permission Required
    not-authorized/reauthentication-failed Reauthentication Failed
    not-authorized/reauthentication-failed-final Reauthentication Failed Final
    not-authorized/reauthentication-needed-action Reauthentication Needed Action
    not-authorized/recaptcha-failed Recaptcha Failed
    not-authorized/self-managed-required Self Managed Required
    not-authorized/site-admin-required Site Admin Required
    not-authorized/site-files-are-immutable Site Files Are Immutable
    not-authorized/two-factor-authentication-required Two Factor Authentication Required
    not-authorized/user-id-without-site-admin User Id Without Site Admin
    not-authorized/write-and-bundle-permission-required Write And Bundle Permission Required
    not-authorized/write-permission-required Write Permission Required
    not-authorized/zip-download-ip-mismatch Zip Download Ip Mismatch
    not-found Not Found
    not-found/api-key-not-found Api Key Not Found
    not-found/bundle-path-not-found Bundle Path Not Found
    not-found/bundle-registration-not-found Bundle Registration Not Found
    not-found/code-not-found Code Not Found
    not-found/file-not-found File Not Found
    not-found/file-upload-not-found File Upload Not Found
    not-found/folder-not-found Folder Not Found
    not-found/group-not-found Group Not Found
    not-found/inbox-not-found Inbox Not Found
    not-found/nested-not-found Nested Not Found
    not-found/plan-not-found Plan Not Found
    not-found/site-not-found Site Not Found
    not-found/user-not-found User Not Found
    processing-failure/automation-cannot-be-run-manually Automation Cannot Be Run Manually
    processing-failure/bundle-only-allows-previews Bundle Only Allows Previews
    processing-failure/bundle-operation-requires-subfolder Bundle Operation Requires Subfolder
    processing-failure/could-not-create-parent Could Not Create Parent
    processing-failure/destination-exists Destination Exists
    processing-failure/destination-folder-limited Destination Folder Limited
    processing-failure/destination-parent-conflict Destination Parent Conflict
    processing-failure/destination-parent-does-not-exist Destination Parent Does Not Exist
    processing-failure/expired-private-key Expired Private Key
    processing-failure/expired-public-key Expired Public Key
    processing-failure/export-failure Export Failure
    processing-failure/export-not-ready Export Not Ready
    processing-failure/failed-to-change-password Failed To Change Password
    processing-failure/file-locked File Locked
    processing-failure/file-not-uploaded File Not Uploaded
    processing-failure/file-pending-processing File Pending Processing
    processing-failure/file-too-big-to-decrypt File Too Big To Decrypt
    processing-failure/file-too-big-to-encrypt File Too Big To Encrypt
    processing-failure/file-uploaded-to-wrong-region File Uploaded To Wrong Region
    processing-failure/folder-locked Folder Locked
    processing-failure/folder-not-empty Folder Not Empty
    processing-failure/history-unavailable History Unavailable
    processing-failure/invalid-bundle-code Invalid Bundle Code
    processing-failure/invalid-file-type Invalid File Type
    processing-failure/invalid-filename Invalid Filename
    processing-failure/invalid-range Invalid Range
    processing-failure/model-save-error Model Save Error
    processing-failure/multiple-processing-errors Multiple Processing Errors
    processing-failure/path-too-long Path Too Long
    processing-failure/recipient-already-shared Recipient Already Shared
    processing-failure/remote-server-error Remote Server Error
    processing-failure/resource-locked Resource Locked
    processing-failure/subfolder-locked Subfolder Locked
    processing-failure/two-factor-authentication-code-already-sent Two Factor Authentication Code Already Sent
    processing-failure/two-factor-authentication-country-blacklisted Two Factor Authentication Country Blacklisted
    processing-failure/two-factor-authentication-general-error Two Factor Authentication General Error
    processing-failure/two-factor-authentication-unsubscribed-recipient Two Factor Authentication Unsubscribed Recipient
    processing-failure/updates-not-allowed-for-remotes Updates Not Allowed For Remotes
    rate-limited/duplicate-share-recipient Duplicate Share Recipient
    rate-limited/reauthentication-rate-limited Reauthentication Rate Limited
    rate-limited/too-many-concurrent-requests Too Many Concurrent Requests
    rate-limited/too-many-login-attempts Too Many Login Attempts
    rate-limited/too-many-requests Too Many Requests
    rate-limited/too-many-shares Too Many Shares
    service-unavailable/agent-unavailable Agent Unavailable
    service-unavailable/automations-unavailable Automations Unavailable
    service-unavailable/uploads-unavailable Uploads Unavailable
    site-configuration/account-already-exists Account Already Exists
    site-configuration/account-overdue Account Overdue
    site-configuration/no-account-for-site No Account For Site
    site-configuration/site-was-removed Site Was Removed
    site-configuration/trial-expired Trial Expired
    site-configuration/trial-locked Trial Locked
    site-configuration/user-requests-enabled-required User Requests Enabled Required

    Account Line Items

    The AccountLineItems resource in the REST API allows you to operate on AccountLineItems.

    The AccountLineItem object

    Example AccountLineItem Object

    {
      "id": 1,
      "amount": 1.0,
      "balance": 1.0,
      "created_at": "2000-01-01T01:00:00Z",
      "currency": "USD",
      "download_uri": "https://url...",
      "invoice_line_items": [
        {
          "amount": 1.0,
          "created_at": "2000-01-01T01:00:00Z",
          "description": "Service from 2019-01-01 through 2019-12-31",
          "type": "invoice",
          "service_end_at": "2000-01-01T01:00:00Z",
          "service_start_at": "2000-01-01T01:00:00Z",
          "plan": "Premier",
          "site": "My site"
        }
      ],
      "method": "paypal",
      "payment_line_items": [
        {
          "amount": 1.0,
          "created_at": "2000-01-01T01:00:00Z",
          "invoice_id": 1,
          "payment_id": 1
        }
      ],
      "payment_reversed_at": "2000-01-01T01:00:00Z",
      "payment_type": "example",
      "site_name": "My Site",
      "type": "invoice"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <account-line-item>
      <id type="integer">1</id>
      <amount type="float">1.0</amount>
      <balance type="float">1.0</balance>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <currency>USD</currency>
      <download_uri>https://url...</download_uri>
      <invoice_line_items type="array">
        <invoice_line_item>
          <amount type="float">1.0</amount>
          <created_at>2000-01-01T01:00:00Z</created_at>
          <description>Service from 2019-01-01 through 2019-12-31</description>
          <type>invoice</type>
          <service_end_at>2000-01-01T01:00:00Z</service_end_at>
          <service_start_at>2000-01-01T01:00:00Z</service_start_at>
          <plan>Premier</plan>
          <site>My site</site>
        </invoice_line_item>
      </invoice_line_items>
      <method>paypal</method>
      <payment_line_items type="array">
        <payment_line_item>
          <amount type="float">1.0</amount>
          <created_at>2000-01-01T01:00:00Z</created_at>
          <invoice_id type="integer">1</invoice_id>
          <payment_id type="integer">1</payment_id>
        </payment_line_item>
      </payment_line_items>
      <payment_reversed_at>2000-01-01T01:00:00Z</payment_reversed_at>
      <payment_type>example</payment_type>
      <site_name>My Site</site_name>
      <type>invoice</type>
    </account-line-item>
    
    
    Attribute Description
    id int64 Line item Id
    amount double Line item amount
    balance double Line item balance
    created_at date-time Line item created at
    currency string Line item currency
    download_uri string Line item download uri
    invoice_line_items array Associated invoice line items
    method string Line item payment method
    payment_line_items array Associated payment line items
    payment_reversed_at date-time Date/time payment was reversed if applicable
    payment_type string Type of payment if applicable
    site_name string Site name this line item is for
    type string Type of line item, either payment or invoice

    List Invoices

    Example Request

    curl "https://app.files.com/api/rest/v1/invoices.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/invoices.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Invoice.list(
      per_page: 1
    )
    
    \Files\Model\Invoice::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    Invoice.list(parameters).all()
    
    await Invoice.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await Invoice.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.invoice.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    invoice.List(context.Background(), files_sdk.InvoiceListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli invoices list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "amount": 1.0,
        "balance": 1.0,
        "created_at": "2000-01-01T01:00:00Z",
        "currency": "USD",
        "download_uri": "https://url...",
        "invoice_line_items": [
          {
            "amount": 1.0,
            "created_at": "2000-01-01T01:00:00Z",
            "description": "Service from 2019-01-01 through 2019-12-31",
            "type": "invoice",
            "service_end_at": "2000-01-01T01:00:00Z",
            "service_start_at": "2000-01-01T01:00:00Z",
            "plan": "Premier",
            "site": "My site"
          }
        ],
        "method": "paypal",
        "payment_line_items": [
          {
            "amount": 1.0,
            "created_at": "2000-01-01T01:00:00Z",
            "invoice_id": 1,
            "payment_id": 1
          }
        ],
        "payment_reversed_at": "2000-01-01T01:00:00Z",
        "payment_type": "example",
        "site_name": "My Site",
        "type": "invoice"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <account-line-items type="array">
      <account-line-item>
        <id type="integer">1</id>
        <amount type="float">1.0</amount>
        <balance type="float">1.0</balance>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <currency>USD</currency>
        <download_uri>https://url...</download_uri>
        <invoice_line_items type="array">
          <invoice_line_item>
            <amount type="float">1.0</amount>
            <created_at>2000-01-01T01:00:00Z</created_at>
            <description>Service from 2019-01-01 through 2019-12-31</description>
            <type>invoice</type>
            <service_end_at>2000-01-01T01:00:00Z</service_end_at>
            <service_start_at>2000-01-01T01:00:00Z</service_start_at>
            <plan>Premier</plan>
            <site>My site</site>
          </invoice_line_item>
        </invoice_line_items>
        <method>paypal</method>
        <payment_line_items type="array">
          <payment_line_item>
            <amount type="float">1.0</amount>
            <created_at>2000-01-01T01:00:00Z</created_at>
            <invoice_id type="integer">1</invoice_id>
            <payment_id type="integer">1</payment_id>
          </payment_line_item>
        </payment_line_items>
        <payment_reversed_at>2000-01-01T01:00:00Z</payment_reversed_at>
        <payment_type>example</payment_type>
        <site_name>My Site</site_name>
        <type>invoice</type>
      </account-line-item>
    </account-line-items>
    
    

    HTTPS Request

    GET /invoices

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    List Payments

    Example Request

    curl "https://app.files.com/api/rest/v1/payments.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/payments.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Payment.list(
      per_page: 1
    )
    
    \Files\Model\Payment::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    Payment.list(parameters).all()
    
    await Payment.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await Payment.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.payment.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    payment.List(context.Background(), files_sdk.PaymentListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli payments list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "amount": 1.0,
        "balance": 1.0,
        "created_at": "2000-01-01T01:00:00Z",
        "currency": "USD",
        "download_uri": "https://url...",
        "invoice_line_items": [
          {
            "amount": 1.0,
            "created_at": "2000-01-01T01:00:00Z",
            "description": "Service from 2019-01-01 through 2019-12-31",
            "type": "invoice",
            "service_end_at": "2000-01-01T01:00:00Z",
            "service_start_at": "2000-01-01T01:00:00Z",
            "plan": "Premier",
            "site": "My site"
          }
        ],
        "method": "paypal",
        "payment_line_items": [
          {
            "amount": 1.0,
            "created_at": "2000-01-01T01:00:00Z",
            "invoice_id": 1,
            "payment_id": 1
          }
        ],
        "payment_reversed_at": "2000-01-01T01:00:00Z",
        "payment_type": "example",
        "site_name": "My Site",
        "type": "invoice"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <account-line-items type="array">
      <account-line-item>
        <id type="integer">1</id>
        <amount type="float">1.0</amount>
        <balance type="float">1.0</balance>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <currency>USD</currency>
        <download_uri>https://url...</download_uri>
        <invoice_line_items type="array">
          <invoice_line_item>
            <amount type="float">1.0</amount>
            <created_at>2000-01-01T01:00:00Z</created_at>
            <description>Service from 2019-01-01 through 2019-12-31</description>
            <type>invoice</type>
            <service_end_at>2000-01-01T01:00:00Z</service_end_at>
            <service_start_at>2000-01-01T01:00:00Z</service_start_at>
            <plan>Premier</plan>
            <site>My site</site>
          </invoice_line_item>
        </invoice_line_items>
        <method>paypal</method>
        <payment_line_items type="array">
          <payment_line_item>
            <amount type="float">1.0</amount>
            <created_at>2000-01-01T01:00:00Z</created_at>
            <invoice_id type="integer">1</invoice_id>
            <payment_id type="integer">1</payment_id>
          </payment_line_item>
        </payment_line_items>
        <payment_reversed_at>2000-01-01T01:00:00Z</payment_reversed_at>
        <payment_type>example</payment_type>
        <site_name>My Site</site_name>
        <type>invoice</type>
      </account-line-item>
    </account-line-items>
    
    

    HTTPS Request

    GET /payments

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Show Invoice

    Example Request

    curl https://app.files.com/api/rest/v1/invoices/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/invoices/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Invoice.find(id)
    
    \Files\Model\Invoice::find($id);
    
    
    Invoice.find(, parameters
    
    await Invoice.find(id)
    
    
    await Invoice.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.invoice.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    invoice.Find(context.Background(), files_sdk.InvoiceFindParams{
      Id: 1,
    })
    
    
    files-cli invoices find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "amount": 1.0,
      "balance": 1.0,
      "created_at": "2000-01-01T01:00:00Z",
      "currency": "USD",
      "download_uri": "https://url...",
      "invoice_line_items": [
        {
          "amount": 1.0,
          "created_at": "2000-01-01T01:00:00Z",
          "description": "Service from 2019-01-01 through 2019-12-31",
          "type": "invoice",
          "service_end_at": "2000-01-01T01:00:00Z",
          "service_start_at": "2000-01-01T01:00:00Z",
          "plan": "Premier",
          "site": "My site"
        }
      ],
      "method": "paypal",
      "payment_line_items": [
        {
          "amount": 1.0,
          "created_at": "2000-01-01T01:00:00Z",
          "invoice_id": 1,
          "payment_id": 1
        }
      ],
      "payment_reversed_at": "2000-01-01T01:00:00Z",
      "payment_type": "example",
      "site_name": "My Site",
      "type": "invoice"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <account-line-item>
      <id type="integer">1</id>
      <amount type="float">1.0</amount>
      <balance type="float">1.0</balance>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <currency>USD</currency>
      <download_uri>https://url...</download_uri>
      <invoice_line_items type="array">
        <invoice_line_item>
          <amount type="float">1.0</amount>
          <created_at>2000-01-01T01:00:00Z</created_at>
          <description>Service from 2019-01-01 through 2019-12-31</description>
          <type>invoice</type>
          <service_end_at>2000-01-01T01:00:00Z</service_end_at>
          <service_start_at>2000-01-01T01:00:00Z</service_start_at>
          <plan>Premier</plan>
          <site>My site</site>
        </invoice_line_item>
      </invoice_line_items>
      <method>paypal</method>
      <payment_line_items type="array">
        <payment_line_item>
          <amount type="float">1.0</amount>
          <created_at>2000-01-01T01:00:00Z</created_at>
          <invoice_id type="integer">1</invoice_id>
          <payment_id type="integer">1</payment_id>
        </payment_line_item>
      </payment_line_items>
      <payment_reversed_at>2000-01-01T01:00:00Z</payment_reversed_at>
      <payment_type>example</payment_type>
      <site_name>My Site</site_name>
      <type>invoice</type>
    </account-line-item>
    
    

    HTTPS Request

    GET /invoices/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Invoice ID.

    Show Payment

    Example Request

    curl https://app.files.com/api/rest/v1/payments/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/payments/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Payment.find(id)
    
    \Files\Model\Payment::find($id);
    
    
    Payment.find(, parameters
    
    await Payment.find(id)
    
    
    await Payment.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.payment.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    payment.Find(context.Background(), files_sdk.PaymentFindParams{
      Id: 1,
    })
    
    
    files-cli payments find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "amount": 1.0,
      "balance": 1.0,
      "created_at": "2000-01-01T01:00:00Z",
      "currency": "USD",
      "download_uri": "https://url...",
      "invoice_line_items": [
        {
          "amount": 1.0,
          "created_at": "2000-01-01T01:00:00Z",
          "description": "Service from 2019-01-01 through 2019-12-31",
          "type": "invoice",
          "service_end_at": "2000-01-01T01:00:00Z",
          "service_start_at": "2000-01-01T01:00:00Z",
          "plan": "Premier",
          "site": "My site"
        }
      ],
      "method": "paypal",
      "payment_line_items": [
        {
          "amount": 1.0,
          "created_at": "2000-01-01T01:00:00Z",
          "invoice_id": 1,
          "payment_id": 1
        }
      ],
      "payment_reversed_at": "2000-01-01T01:00:00Z",
      "payment_type": "example",
      "site_name": "My Site",
      "type": "invoice"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <account-line-item>
      <id type="integer">1</id>
      <amount type="float">1.0</amount>
      <balance type="float">1.0</balance>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <currency>USD</currency>
      <download_uri>https://url...</download_uri>
      <invoice_line_items type="array">
        <invoice_line_item>
          <amount type="float">1.0</amount>
          <created_at>2000-01-01T01:00:00Z</created_at>
          <description>Service from 2019-01-01 through 2019-12-31</description>
          <type>invoice</type>
          <service_end_at>2000-01-01T01:00:00Z</service_end_at>
          <service_start_at>2000-01-01T01:00:00Z</service_start_at>
          <plan>Premier</plan>
          <site>My site</site>
        </invoice_line_item>
      </invoice_line_items>
      <method>paypal</method>
      <payment_line_items type="array">
        <payment_line_item>
          <amount type="float">1.0</amount>
          <created_at>2000-01-01T01:00:00Z</created_at>
          <invoice_id type="integer">1</invoice_id>
          <payment_id type="integer">1</payment_id>
        </payment_line_item>
      </payment_line_items>
      <payment_reversed_at>2000-01-01T01:00:00Z</payment_reversed_at>
      <payment_type>example</payment_type>
      <site_name>My Site</site_name>
      <type>invoice</type>
    </account-line-item>
    
    

    HTTPS Request

    GET /payments/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Payment ID.

    Actions

    All File and Login actions on Files.com are recorded and can be queried via our History API.

    This set of endpoints only provides access to recent actions (actions created within 24 hours). In most cases, you would be better served to create a Webhook, which sends actions to your server, rather than poll this endpoint.

    The HistoryExport set of endpoints provides a richer ability to query and filter, as well as search the entire lifetime of your history log.

    The Action object

    Example Action Object

    {
      "id": 1,
      "path": "",
      "when": "2000-01-01T01:00:00Z",
      "destination": "/to_path",
      "display": "Actual text of the action here.",
      "ip": "192.283.128.182",
      "source": "/from_path",
      "targets": [
    
      ],
      "user_id": 1,
      "username": "user",
      "action": "create",
      "failure_type": "none",
      "interface": "web"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <action>
      <id type="integer">1</id>
      <path></path>
      <when>2000-01-01T01:00:00Z</when>
      <destination>/to_path</destination>
      <display>Actual text of the action here.</display>
      <ip>192.283.128.182</ip>
      <source>/from_path</source>
      <targets type="array"/>
      <user_id type="integer">1</user_id>
      <username>user</username>
      <action>create</action>
      <failure_type>none</failure_type>
      <interface>web</interface>
    </action>
    
    
    Attribute Description
    id int64 Action ID
    path string Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    when date-time Action occurrence date/time
    destination string The destination path for this action, if applicable
    display string Friendly displayed output
    ip string IP Address that performed this action
    source string The source path for this action, if applicable
    targets array Targets
    user_id int64 User ID
    username string Username
    action string Type of action
    Possible values: create, read, update, destroy, move, login, failedlogin, copy, user_create, user_update, user_destroy, group_create, group_update, group_destroy, permission_create, permission_destroy, api_key_create, api_key_update, api_key_destroy
    failure_type string Failure type. If action was a user login or session failure, why did it fail?
    Possible values: expired_trial, account_overdue, locked_out, ip_mismatch, password_mismatch, site_mismatch, username_not_found, none, no_ftp_permission, no_web_permission, no_directory, errno_enoent, no_sftp_permission, no_dav_permission, no_restapi_permission, key_mismatch, region_mismatch, expired_access, desktop_ip_mismatch, desktop_api_key_not_used_quickly_enough, disabled, country_mismatch
    interface string Interface on which this action occurred.
    Possible values: web, ftp, robot, jsapi, webdesktopapi, sftp, dav, desktop, restapi, scim, office, mobile, as2, inbound_email, remote

    List history for specific file

    Example Request

    curl "https://app.files.com/api/rest/v1/history/files/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/history/files/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::History.list_for_file(path, 
      display: "Actual text of the action here.", 
      per_page: 1
    )
    
    \Files\Model\History::listForFile($path, array(
      'display' => "Actual text of the action here.", 
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("display", Actual text of the action here.);
    requestParams.put("per_page", 1);
    History.listForFile(parameters).all()
    
    await History.listForFile(path, {
      display: "Actual text of the action here.", 
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("display", "Actual text of the action here.");
    parameters.Add("per_page", (Int64?) 1);
    
    await History.ListForFile(path, parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.history.list_for_file(path, {
      "display": "Actual text of the action here.",
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    history.ListForFile(context.Background(), files_sdk.HistoryListForFileParams{
      StartAt: "",
      EndAt: "",
      Display: "Actual text of the action here.",
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Path: "path",
    })
    
    
    files-cli histories list-for-file \
      --start-at="" \
      --end-at="" \
      --display="Actual text of the action here." \
      --cursor="" \
      --per-page=1 \
      --path="path" \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "path": "",
        "when": "2000-01-01T01:00:00Z",
        "destination": "/to_path",
        "display": "Actual text of the action here.",
        "ip": "192.283.128.182",
        "source": "/from_path",
        "targets": [
    
        ],
        "user_id": 1,
        "username": "user",
        "action": "create",
        "failure_type": "none",
        "interface": "web"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <actions type="array">
      <action>
        <id type="integer">1</id>
        <path></path>
        <when>2000-01-01T01:00:00Z</when>
        <destination>/to_path</destination>
        <display>Actual text of the action here.</display>
        <ip>192.283.128.182</ip>
        <source>/from_path</source>
        <targets type="array"/>
        <user_id type="integer">1</user_id>
        <username>user</username>
        <action>create</action>
        <failure_type>none</failure_type>
        <interface>web</interface>
      </action>
    </actions>
    
    

    HTTPS Request

    GET /history/files/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    start_at string Leave blank or set to a date/time to filter earlier entries.
    end_at string Leave blank or set to a date/time to filter later entries.
    display string Display format. Leave blank or set to full or parent.
    path string Required Path to operate on.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[user_id]=desc). Valid fields are user_id and created_at.

    List history for specific folder

    Example Request

    curl "https://app.files.com/api/rest/v1/history/folders/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/history/folders/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::History.list_for_folder(path, 
      display: "Actual text of the action here.", 
      per_page: 1
    )
    
    \Files\Model\History::listForFolder($path, array(
      'display' => "Actual text of the action here.", 
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("display", Actual text of the action here.);
    requestParams.put("per_page", 1);
    History.listForFolder(parameters).all()
    
    await History.listForFolder(path, {
      display: "Actual text of the action here.", 
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("display", "Actual text of the action here.");
    parameters.Add("per_page", (Int64?) 1);
    
    await History.ListForFolder(path, parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.history.list_for_folder(path, {
      "display": "Actual text of the action here.",
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    history.ListForFolder(context.Background(), files_sdk.HistoryListForFolderParams{
      StartAt: "",
      EndAt: "",
      Display: "Actual text of the action here.",
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Path: "path",
    })
    
    
    files-cli histories list-for-folder \
      --start-at="" \
      --end-at="" \
      --display="Actual text of the action here." \
      --cursor="" \
      --per-page=1 \
      --path="path" \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "path": "",
        "when": "2000-01-01T01:00:00Z",
        "destination": "/to_path",
        "display": "Actual text of the action here.",
        "ip": "192.283.128.182",
        "source": "/from_path",
        "targets": [
    
        ],
        "user_id": 1,
        "username": "user",
        "action": "create",
        "failure_type": "none",
        "interface": "web"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <actions type="array">
      <action>
        <id type="integer">1</id>
        <path></path>
        <when>2000-01-01T01:00:00Z</when>
        <destination>/to_path</destination>
        <display>Actual text of the action here.</display>
        <ip>192.283.128.182</ip>
        <source>/from_path</source>
        <targets type="array"/>
        <user_id type="integer">1</user_id>
        <username>user</username>
        <action>create</action>
        <failure_type>none</failure_type>
        <interface>web</interface>
      </action>
    </actions>
    
    

    HTTPS Request

    GET /history/folders/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    start_at string Leave blank or set to a date/time to filter earlier entries.
    end_at string Leave blank or set to a date/time to filter later entries.
    display string Display format. Leave blank or set to full or parent.
    path string Required Path to operate on.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[user_id]=desc). Valid fields are user_id and created_at.

    List history for specific user

    Example Request

    curl "https://app.files.com/api/rest/v1/history/users/{user_id}.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/history/users/{user_id}.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::History.list_for_user(user_id, 
      display: "Actual text of the action here.", 
      per_page: 1
    )
    
    \Files\Model\History::listForUser($user_id, array(
      'display' => "Actual text of the action here.", 
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("display", Actual text of the action here.);
    requestParams.put("per_page", 1);
    History.listForUser(parameters).all()
    
    await History.listForUser(user_id, {
      display: "Actual text of the action here.", 
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("display", "Actual text of the action here.");
    parameters.Add("per_page", (Int64?) 1);
    
    await History.ListForUser(user_id, parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.history.list_for_user(user_id, {
      "display": "Actual text of the action here.",
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    history.ListForUser(context.Background(), files_sdk.HistoryListForUserParams{
      StartAt: "",
      EndAt: "",
      Display: "Actual text of the action here.",
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      UserId: 1,
    })
    
    
    files-cli histories list-for-user \
      --start-at="" \
      --end-at="" \
      --display="Actual text of the action here." \
      --cursor="" \
      --per-page=1 \
      --user-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "path": "",
        "when": "2000-01-01T01:00:00Z",
        "destination": "/to_path",
        "display": "Actual text of the action here.",
        "ip": "192.283.128.182",
        "source": "/from_path",
        "targets": [
    
        ],
        "user_id": 1,
        "username": "user",
        "action": "create",
        "failure_type": "none",
        "interface": "web"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <actions type="array">
      <action>
        <id type="integer">1</id>
        <path></path>
        <when>2000-01-01T01:00:00Z</when>
        <destination>/to_path</destination>
        <display>Actual text of the action here.</display>
        <ip>192.283.128.182</ip>
        <source>/from_path</source>
        <targets type="array"/>
        <user_id type="integer">1</user_id>
        <username>user</username>
        <action>create</action>
        <failure_type>none</failure_type>
        <interface>web</interface>
      </action>
    </actions>
    
    

    HTTPS Request

    GET /history/users/{user_id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    start_at string Leave blank or set to a date/time to filter earlier entries.
    end_at string Leave blank or set to a date/time to filter later entries.
    display string Display format. Leave blank or set to full or parent.
    user_id int64 Required User ID.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[user_id]=desc). Valid fields are user_id and created_at.

    List site login history

    Example Request

    curl "https://app.files.com/api/rest/v1/history/login.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/history/login.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::History.list_logins(
      display: "Actual text of the action here.", 
      per_page: 1
    )
    
    \Files\Model\History::listLogins(array(
      'display' => "Actual text of the action here.", 
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("display", Actual text of the action here.);
    requestParams.put("per_page", 1);
    History.listLogins(parameters).all()
    
    await History.listLogins({
      display: "Actual text of the action here.", 
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("display", "Actual text of the action here.");
    parameters.Add("per_page", (Int64?) 1);
    
    await History.ListLogins(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.history.list_logins({
      "display": "Actual text of the action here.",
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    history.ListLogins(context.Background(), files_sdk.HistoryListLoginsParams{
      StartAt: "",
      EndAt: "",
      Display: "Actual text of the action here.",
      Cursor: "",
      PerPage: 1,
      SortBy: "",
    })
    
    
    files-cli histories list-logins \
      --start-at="" \
      --end-at="" \
      --display="Actual text of the action here." \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "path": "",
        "when": "2000-01-01T01:00:00Z",
        "destination": "/to_path",
        "display": "Actual text of the action here.",
        "ip": "192.283.128.182",
        "source": "/from_path",
        "targets": [
    
        ],
        "user_id": 1,
        "username": "user",
        "action": "create",
        "failure_type": "none",
        "interface": "web"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <actions type="array">
      <action>
        <id type="integer">1</id>
        <path></path>
        <when>2000-01-01T01:00:00Z</when>
        <destination>/to_path</destination>
        <display>Actual text of the action here.</display>
        <ip>192.283.128.182</ip>
        <source>/from_path</source>
        <targets type="array"/>
        <user_id type="integer">1</user_id>
        <username>user</username>
        <action>create</action>
        <failure_type>none</failure_type>
        <interface>web</interface>
      </action>
    </actions>
    
    

    HTTPS Request

    GET /history/login

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    start_at string Leave blank or set to a date/time to filter earlier entries.
    end_at string Leave blank or set to a date/time to filter later entries.
    display string Display format. Leave blank or set to full or parent.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[user_id]=desc). Valid fields are user_id and created_at.

    List site full action history

    Example Request

    curl "https://app.files.com/api/rest/v1/history.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/history.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::History.list(
      display: "Actual text of the action here.", 
      per_page: 1
    )
    
    \Files\Model\History::list(array(
      'display' => "Actual text of the action here.", 
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("display", Actual text of the action here.);
    requestParams.put("per_page", 1);
    History.list(parameters).all()
    
    await History.list({
      display: "Actual text of the action here.", 
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("display", "Actual text of the action here.");
    parameters.Add("per_page", (Int64?) 1);
    
    await History.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.history.list({
      "display": "Actual text of the action here.",
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    history.List(context.Background(), files_sdk.HistoryListParams{
      StartAt: "",
      EndAt: "",
      Display: "Actual text of the action here.",
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterPrefix: "",
    })
    
    
    files-cli histories list \
      --start-at="" \
      --end-at="" \
      --display="Actual text of the action here." \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "path": "",
        "when": "2000-01-01T01:00:00Z",
        "destination": "/to_path",
        "display": "Actual text of the action here.",
        "ip": "192.283.128.182",
        "source": "/from_path",
        "targets": [
    
        ],
        "user_id": 1,
        "username": "user",
        "action": "create",
        "failure_type": "none",
        "interface": "web"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <actions type="array">
      <action>
        <id type="integer">1</id>
        <path></path>
        <when>2000-01-01T01:00:00Z</when>
        <destination>/to_path</destination>
        <display>Actual text of the action here.</display>
        <ip>192.283.128.182</ip>
        <source>/from_path</source>
        <targets type="array"/>
        <user_id type="integer">1</user_id>
        <username>user</username>
        <action>create</action>
        <failure_type>none</failure_type>
        <interface>web</interface>
      </action>
    </actions>
    
    

    HTTPS Request

    GET /history

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    start_at string Leave blank or set to a date/time to filter earlier entries.
    end_at string Leave blank or set to a date/time to filter later entries.
    display string Display format. Leave blank or set to full or parent.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[path]=desc). Valid fields are path, folder, user_id or created_at.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are user_id, folder or path.
    filter_prefix object If set, return records where the specified field is prefixed by the supplied value. Valid fields are path.

    Action Notification Exports

    The Action Notification Export API provides access to outgoing webhook logs. Querying webhook logs is a little different than other APIs.

    All queries against the archive must be submitted as Exports. (Even our Web UI creates an Export behind the scenes.)

    In any query field in this API, you may specify multiple values separated by commas. That means that commas cannot be searched for themselves, and neither can single quotation marks.

    Use the following steps to complete an export:

    1. Initiate the export by using the Create Action Notification Export endpoint. Non Site Admins must query by folder or path.
    2. Using the id from the response to step 1, poll the Show Action Notification Export endpoint. Check the status field until it is ready.
    3. You can download the results of the export as a CSV file using the results_url field in the response from step 2. If you want to page through the records in JSON format, use the List Action Notification Export Results endpoint, passing the id that you got in step 1 as the action_notification_export_id parameter. Check the X-Files-Cursor-Next header to see if there are more records available, and resubmit the same request with a cursor parameter to fetch the next page of results. Unlike most API Endpoints, this endpoint does not provide X-Files-Cursor-Prev cursors allowing reverse pagination through the results. This is due to limitations in Amazon Athena, the underlying data lake for these records.

    If you intend to use this API for high volume or automated use, please contact us with more information about your use case.

    Example Queries

    The ActionNotificationExport object

    Example ActionNotificationExport Object

    {
      "id": 1,
      "export_version": "example",
      "start_at": "2000-01-01T01:00:00Z",
      "end_at": "2000-01-01T01:00:00Z",
      "status": "ready",
      "query_path": "MyFile.txt",
      "query_folder": "MyFolder",
      "query_message": "Connection Refused",
      "query_request_method": "GET",
      "query_request_url": "http://example.com/webhook",
      "query_status": "200",
      "query_success": true,
      "results_url": "https://files.com/action_notification_results.csv"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <action-notification-export>
      <id type="integer">1</id>
      <export_version>example</export_version>
      <start_at>2000-01-01T01:00:00Z</start_at>
      <end_at>2000-01-01T01:00:00Z</end_at>
      <status>ready</status>
      <query_path>MyFile.txt</query_path>
      <query_folder>MyFolder</query_folder>
      <query_message>Connection Refused</query_message>
      <query_request_method>GET</query_request_method>
      <query_request_url>http://example.com/webhook</query_request_url>
      <query_status>200</query_status>
      <query_success type="boolean">true</query_success>
      <results_url>https://files.com/action_notification_results.csv</results_url>
    </action-notification-export>
    
    
    Attribute Description
    id int64 History Export ID
    export_version string Version of the underlying records for the export.
    start_at date-time Start date/time of export range.
    end_at date-time End date/time of export range.
    status string Status of export. Valid values: building, ready, or failed
    query_path string Return notifications that were triggered by actions on this specific path.
    query_folder string Return notifications that were triggered by actions in this folder.
    query_message string Error message associated with the request, if any.
    query_request_method string The HTTP request method used by the webhook.
    query_request_url string The target webhook URL.
    query_status string The HTTP status returned from the server in response to the webhook request.
    query_success boolean true if the webhook request succeeded (i.e. returned a 200 or 204 response status). false otherwise.
    results_url string If status is ready, this will be a URL where all the results can be downloaded at once as a CSV.
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.

    Show Action Notification Export

    Example Request

    curl https://app.files.com/api/rest/v1/action_notification_exports/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/action_notification_exports/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ActionNotificationExport.find(id)
    
    \Files\Model\ActionNotificationExport::find($id);
    
    
    ActionNotificationExport.find(, parameters
    
    await ActionNotificationExport.find(id)
    
    
    await ActionNotificationExport.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.action_notification_export.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    actionnotificationexport.Find(context.Background(), files_sdk.ActionNotificationExportFindParams{
      Id: 1,
    })
    
    
    files-cli action-notification-exports find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "export_version": "example",
      "start_at": "2000-01-01T01:00:00Z",
      "end_at": "2000-01-01T01:00:00Z",
      "status": "ready",
      "query_path": "MyFile.txt",
      "query_folder": "MyFolder",
      "query_message": "Connection Refused",
      "query_request_method": "GET",
      "query_request_url": "http://example.com/webhook",
      "query_status": "200",
      "query_success": true,
      "results_url": "https://files.com/action_notification_results.csv"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <action-notification-export>
      <id type="integer">1</id>
      <export_version>example</export_version>
      <start_at>2000-01-01T01:00:00Z</start_at>
      <end_at>2000-01-01T01:00:00Z</end_at>
      <status>ready</status>
      <query_path>MyFile.txt</query_path>
      <query_folder>MyFolder</query_folder>
      <query_message>Connection Refused</query_message>
      <query_request_method>GET</query_request_method>
      <query_request_url>http://example.com/webhook</query_request_url>
      <query_status>200</query_status>
      <query_success type="boolean">true</query_success>
      <results_url>https://files.com/action_notification_results.csv</results_url>
    </action-notification-export>
    
    

    HTTPS Request

    GET /action_notification_exports/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Action Notification Export ID.

    Create Action Notification Export

    Example Request

    curl https://app.files.com/api/rest/v1/action_notification_exports.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"start_at":"2000-01-01T01:00:00Z","end_at":"2000-01-01T01:00:00Z","query_message":"Connection Refused","query_request_method":"GET","query_request_url":"http://example.com/webhook","query_status":"200","query_success":true,"query_path":"MyFile.txt","query_folder":"MyFolder"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/action_notification_exports.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<action-notification-export>
           <user_id type="integer">1</user_id>
           <start_at>2000-01-01T01:00:00Z</start_at>
           <end_at>2000-01-01T01:00:00Z</end_at>
           <query_message>Connection Refused</query_message>
           <query_request_method>GET</query_request_method>
           <query_request_url>http://example.com/webhook</query_request_url>
           <query_status>200</query_status>
           <query_success type="boolean">true</query_success>
           <query_path>MyFile.txt</query_path>
           <query_folder>MyFolder</query_folder>
         </action-notification-export>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ActionNotificationExport.create(
      user_id: 1, 
      start_at: "2000-01-01T01:00:00Z", 
      end_at: "2000-01-01T01:00:00Z", 
      query_message: "Connection Refused", 
      query_request_method: "GET", 
      query_request_url: "http://example.com/webhook", 
      query_status: "200", 
      query_success: true, 
      query_path: "MyFile.txt", 
      query_folder: "MyFolder"
    )
    
    \Files\Model\ActionNotificationExport::create(array(
      'user_id' => 1, 
      'start_at' => "2000-01-01T01:00:00Z", 
      'end_at' => "2000-01-01T01:00:00Z", 
      'query_message' => "Connection Refused", 
      'query_request_method' => "GET", 
      'query_request_url' => "http://example.com/webhook", 
      'query_status' => "200", 
      'query_success' => true, 
      'query_path' => "MyFile.txt", 
      'query_folder' => "MyFolder"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("start_at", 2000-01-01T01:00:00Z);
    requestParams.put("end_at", 2000-01-01T01:00:00Z);
    requestParams.put("query_message", Connection Refused);
    requestParams.put("query_request_method", GET);
    requestParams.put("query_request_url", http://example.com/webhook);
    requestParams.put("query_status", 200);
    requestParams.put("query_success", true);
    requestParams.put("query_path", MyFile.txt);
    requestParams.put("query_folder", MyFolder);
    ActionNotificationExport.create(parameters)
    
    await ActionNotificationExport.create({
      user_id: 1, 
      start_at: "2000-01-01T01:00:00Z", 
      end_at: "2000-01-01T01:00:00Z", 
      query_message: "Connection Refused", 
      query_request_method: "GET", 
      query_request_url: "http://example.com/webhook", 
      query_status: "200", 
      query_success: true, 
      query_path: "MyFile.txt", 
      query_folder: "MyFolder",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("start_at", "2000-01-01T01:00:00Z");
    parameters.Add("end_at", "2000-01-01T01:00:00Z");
    parameters.Add("query_message", "Connection Refused");
    parameters.Add("query_request_method", "GET");
    parameters.Add("query_request_url", "http://example.com/webhook");
    parameters.Add("query_status", "200");
    parameters.Add("query_success", true);
    parameters.Add("query_path", "MyFile.txt");
    parameters.Add("query_folder", "MyFolder");
    
    await ActionNotificationExport.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.action_notification_export.create({
      "user_id": 1,
      "start_at": "2000-01-01T01:00:00Z",
      "end_at": "2000-01-01T01:00:00Z",
      "query_message": "Connection Refused",
      "query_request_method": "GET",
      "query_request_url": "http://example.com/webhook",
      "query_status": "200",
      "query_success": True,
      "query_path": "MyFile.txt",
      "query_folder": "MyFolder"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    actionnotificationexport.Create(context.Background(), files_sdk.ActionNotificationExportCreateParams{
      UserId: 1,
      StartAt: "2000-01-01T01:00:00Z",
      EndAt: "2000-01-01T01:00:00Z",
      QueryMessage: "Connection Refused",
      QueryRequestMethod: "GET",
      QueryRequestUrl: "http://example.com/webhook",
      QueryStatus: []string{"200"},
      QuerySuccess: lib.Bool(true),
      QueryPath: "MyFile.txt",
      QueryFolder: "MyFolder",
    })
    
    
    files-cli action-notification-exports create \
      --user-id=1 \
      --start-at="2000-01-01T01:00:00Z" \
      --end-at="2000-01-01T01:00:00Z" \
      --query-message="Connection Refused" \
      --query-request-method="GET" \
      --query-request-url="http://example.com/webhook" \
      --query-status="200" \
      --query-path="MyFile.txt" \
      --query-folder="MyFolder" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "export_version": "example",
      "start_at": "2000-01-01T01:00:00Z",
      "end_at": "2000-01-01T01:00:00Z",
      "status": "ready",
      "query_path": "MyFile.txt",
      "query_folder": "MyFolder",
      "query_message": "Connection Refused",
      "query_request_method": "GET",
      "query_request_url": "http://example.com/webhook",
      "query_status": "200",
      "query_success": true,
      "results_url": "https://files.com/action_notification_results.csv"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <action-notification-export>
      <id type="integer">1</id>
      <export_version>example</export_version>
      <start_at>2000-01-01T01:00:00Z</start_at>
      <end_at>2000-01-01T01:00:00Z</end_at>
      <status>ready</status>
      <query_path>MyFile.txt</query_path>
      <query_folder>MyFolder</query_folder>
      <query_message>Connection Refused</query_message>
      <query_request_method>GET</query_request_method>
      <query_request_url>http://example.com/webhook</query_request_url>
      <query_status>200</query_status>
      <query_success type="boolean">true</query_success>
      <results_url>https://files.com/action_notification_results.csv</results_url>
    </action-notification-export>
    
    

    HTTPS Request

    POST /action_notification_exports

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    start_at string Start date/time of export range.
    end_at string End date/time of export range.
    query_message string Error message associated with the request, if any.
    query_request_method string The HTTP request method used by the webhook.
    query_request_url string The target webhook URL.
    query_status string The HTTP status returned from the server in response to the webhook request.
    query_success boolean true if the webhook request succeeded (i.e. returned a 200 or 204 response status). false otherwise.
    query_path string Return notifications that were triggered by actions on this specific path.
    query_folder string Return notifications that were triggered by actions in this folder.

    Action Notification Export Results

    The ActionNotificationExportResults resource in the REST API allows you to operate on ActionNotificationExportResults.

    The ActionNotificationExportResult object

    Example ActionNotificationExportResult Object

    {
      "id": 1,
      "created_at": 1,
      "status": 200,
      "message": "Success",
      "success": true,
      "request_headers": "{\"User-Agent\":\"Files.com Webhook\"}",
      "request_method": "GET",
      "request_url": "www.example.com/webhook_receiver",
      "path": "MyFolder/MyFile.txt",
      "folder": "MyFolder"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <action-notification-export-result>
      <id type="integer">1</id>
      <created_at type="integer">1</created_at>
      <status type="integer">200</status>
      <message>Success</message>
      <success type="boolean">true</success>
      <request_headers>{"User-Agent":"Files.com Webhook"}</request_headers>
      <request_method>GET</request_method>
      <request_url>www.example.com/webhook_receiver</request_url>
      <path>MyFolder/MyFile.txt</path>
      <folder>MyFolder</folder>
    </action-notification-export-result>
    
    
    Attribute Description
    id int64 Notification ID
    created_at int64 When the notification was sent.
    status int64 HTTP status code returned in the webhook response.
    message string A message indicating the overall status of the webhook notification.
    success boolean true if the webhook succeeded by receiving a 200 or 204 response.
    request_headers string A JSON-encoded string with headers that were sent with the webhook.
    request_method string The HTTP verb used to perform the webhook.
    request_url string The webhook request URL.
    path string The path to the actual file that triggered this notification. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    folder string The folder associated with the triggering action for this notification.

    List Action Notification Export Results

    Example Request

    curl "https://app.files.com/api/rest/v1/action_notification_export_results.json?user_id=1&action_notification_export_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/action_notification_export_results.xml?user_id=1&action_notification_export_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ActionNotificationExportResult.list(
      user_id: 1, 
      per_page: 1, 
      action_notification_export_id: 1
    )
    
    \Files\Model\ActionNotificationExportResult::list(array(
      'user_id' => 1, 
      'per_page' => 1, 
      'action_notification_export_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    requestParams.put("action_notification_export_id", 1);
    ActionNotificationExportResult.list(parameters).all()
    
    await ActionNotificationExportResult.list({
      user_id: 1, 
      per_page: 1, 
      action_notification_export_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("action_notification_export_id", (Int64?) 1);
    
    await ActionNotificationExportResult.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.action_notification_export_result.list({
      "user_id": 1,
      "per_page": 1,
      "action_notification_export_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    actionnotificationexportresult.List(context.Background(), files_sdk.ActionNotificationExportResultListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
      ActionNotificationExportId: 1,
    })
    
    
    files-cli action-notification-export-results list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --action-notification-export-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "created_at": 1,
        "status": 200,
        "message": "Success",
        "success": true,
        "request_headers": "{\"User-Agent\":\"Files.com Webhook\"}",
        "request_method": "GET",
        "request_url": "www.example.com/webhook_receiver",
        "path": "MyFolder/MyFile.txt",
        "folder": "MyFolder"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <action-notification-export-results type="array">
      <action-notification-export-result>
        <id type="integer">1</id>
        <created_at type="integer">1</created_at>
        <status type="integer">200</status>
        <message>Success</message>
        <success type="boolean">true</success>
        <request_headers>{"User-Agent":"Files.com Webhook"}</request_headers>
        <request_method>GET</request_method>
        <request_url>www.example.com/webhook_receiver</request_url>
        <path>MyFolder/MyFile.txt</path>
        <folder>MyFolder</folder>
      </action-notification-export-result>
    </action-notification-export-results>
    
    

    HTTPS Request

    GET /action_notification_export_results

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    action_notification_export_id int64 Required ID of the associated action notification export.

    Pagination Params

    Read more about Paginating List Requests.

    Action Webhook Failures

    The ActionWebhookFailures resource in the REST API allows you to operate on ActionWebhookFailures.

    retry Action Webhook Failure

    Example Request

    curl https://app.files.com/api/rest/v1/action_webhook_failures/{id}/retry.json \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/action_webhook_failures/{id}/retry.xml \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    action_webhook_failure = Files::ActionWebhookFailure.new
    action_webhook_failure.retry
    
    $action_webhook_failure = new \Files\Model\ActionWebhookFailure();
    $action_webhook_failure->retry();
    
    HashMap<Object, String> attributes = new HashMap<>();
    ActionWebhookFailure actionWebhookFailure = new ActionWebhookFailure(attributes);
    
    actionWebhookFailure.retry();
    
    const actionWebhookFailure = new ActionWebhookFailure()
    await actionWebhookFailure.retry()
    
    
    await actionWebhookFailure.Retry();
    
    files_sdk.set_api_key("my-key")
    
    action_webhook_failure = files_sdk.action_webhook_failure()
    action_webhook_failure.retry()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    actionwebhookfailure.Retry(context.Background(), files_sdk.ActionWebhookFailureRetryParams{
      Id: 1,
    })
    
    files-cli action-webhook-failures retry \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    POST /action_webhook_failures/{id}/retry

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Action Webhook Failure ID.

    Api Keys

    API Keys allow programmatic access to your Site. API keys confer all the permissions of the user who owns them. If an API key is created without a user owner, it is considered a site-wide API key, which has full permissions to do anything on the Site.

    The ApiKey object

    Example ApiKey Object

    {
      "id": 1,
      "descriptive_label": "Site-wide API key for https://site.files.com/ (key ID #1)",
      "description": "example",
      "created_at": "2000-01-01T01:00:00Z",
      "expires_at": "2000-01-01T01:00:00Z",
      "key": "[key]",
      "last_use_at": "2000-01-01T01:00:00Z",
      "name": "My Main API Key",
      "permission_set": "full",
      "platform": "win32",
      "url": "example",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <api-key>
      <id type="integer">1</id>
      <descriptive_label>Site-wide API key for https://site.files.com/ (key ID #1)</descriptive_label>
      <description>example</description>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <key>[key]</key>
      <last_use_at>2000-01-01T01:00:00Z</last_use_at>
      <name>My Main API Key</name>
      <permission_set>full</permission_set>
      <platform>win32</platform>
      <url>example</url>
      <user_id type="integer">1</user_id>
    </api-key>
    
    
    Attribute Description
    id int64 API Key ID
    descriptive_label string Unique label that describes this API key. Useful for external systems where you may have API keys from multiple accounts and want a human-readable label for each key.
    description string User-supplied description of API key.
    created_at date-time Time which API Key was created
    expires_at date-time API Key expiration date
    key string API Key actual key string
    last_use_at date-time API Key last used - note this value is only updated once per 3 hour period, so the 'actual' time of last use may be up to 3 hours later than this timestamp.
    name string Internal name for the API Key. For your use.
    permission_set string Permissions for this API Key. It must be full for site-wide API Keys. Keys with the desktop_app permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
    Possible values: none, full, desktop_app, sync_app, office_integration, mobile_app
    platform string If this API key represents a Desktop app, what platform was it created on?
    url string URL for API host.
    user_id int64 User ID for the owner of this API Key. May be blank for Site-wide API Keys.

    List Api Keys

    Example Request

    curl "https://app.files.com/api/rest/v1/api_keys.json?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/api_keys.xml?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ApiKey.list(
      user_id: 1, 
      per_page: 1
    )
    
    \Files\Model\ApiKey::list(array(
      'user_id' => 1, 
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    ApiKey.list(parameters).all()
    
    await ApiKey.list({
      user_id: 1, 
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    
    await ApiKey.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.api_key.list({
      "user_id": 1,
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    apikey.List(context.Background(), files_sdk.ApiKeyListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterGt: "",
      FilterGteq: "",
      FilterLt: "",
      FilterLteq: "",
    })
    
    
    files-cli api-keys list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "descriptive_label": "Site-wide API key for https://site.files.com/ (key ID #1)",
        "description": "example",
        "created_at": "2000-01-01T01:00:00Z",
        "expires_at": "2000-01-01T01:00:00Z",
        "key": "[key]",
        "last_use_at": "2000-01-01T01:00:00Z",
        "name": "My Main API Key",
        "permission_set": "full",
        "platform": "win32",
        "url": "example",
        "user_id": 1
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <api-keys type="array">
      <api-key>
        <id type="integer">1</id>
        <descriptive_label>Site-wide API key for https://site.files.com/ (key ID #1)</descriptive_label>
        <description>example</description>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <expires_at>2000-01-01T01:00:00Z</expires_at>
        <key>[key]</key>
        <last_use_at>2000-01-01T01:00:00Z</last_use_at>
        <name>My Main API Key</name>
        <permission_set>full</permission_set>
        <platform>win32</platform>
        <url>example</url>
        <user_id type="integer">1</user_id>
      </api-key>
    </api-keys>
    
    

    HTTPS Request

    GET /api_keys

    Authentication Required

    Not available to user API keys or sessions from users that are marked as Shared/Bot users.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[expires_at]=desc). Valid fields are expires_at.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are expires_at.
    filter_gt object If set, return records where the specified field is greater than the supplied value. Valid fields are expires_at.
    filter_gteq object If set, return records where the specified field is greater than or equal the supplied value. Valid fields are expires_at.
    filter_lt object If set, return records where the specified field is less than the supplied value. Valid fields are expires_at.
    filter_lteq object If set, return records where the specified field is less than or equal the supplied value. Valid fields are expires_at.

    Show information about current API key. (Requires current API connection to be using an API key.)

    Example Request

    curl https://app.files.com/api/rest/v1/api_key.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/api_key.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ApiKey.find_current
    
    \Files\Model\ApiKey::findCurrent();
    
    
    ApiKey.findCurrent(, parameters
    
    await ApiKey.findCurrent()
    
    
    await ApiKey.FindCurrent();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.api_key.find_current()
    
    files_sdk.APIKey = "YOUR_API_KEY"
    apikey.FindCurrent
    
    
    files-cli api-keys find-current \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "descriptive_label": "Site-wide API key for https://site.files.com/ (key ID #1)",
      "description": "example",
      "created_at": "2000-01-01T01:00:00Z",
      "expires_at": "2000-01-01T01:00:00Z",
      "key": "[key]",
      "last_use_at": "2000-01-01T01:00:00Z",
      "name": "My Main API Key",
      "permission_set": "full",
      "platform": "win32",
      "url": "example",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <api-key>
      <id type="integer">1</id>
      <descriptive_label>Site-wide API key for https://site.files.com/ (key ID #1)</descriptive_label>
      <description>example</description>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <key>[key]</key>
      <last_use_at>2000-01-01T01:00:00Z</last_use_at>
      <name>My Main API Key</name>
      <permission_set>full</permission_set>
      <platform>win32</platform>
      <url>example</url>
      <user_id type="integer">1</user_id>
    </api-key>
    
    

    HTTPS Request

    GET /api_key

    Authentication Required

    Available to all authenticated keys or sessions.

    Show Api Key

    Example Request

    curl https://app.files.com/api/rest/v1/api_keys/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/api_keys/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ApiKey.find(id)
    
    \Files\Model\ApiKey::find($id);
    
    
    ApiKey.find(, parameters
    
    await ApiKey.find(id)
    
    
    await ApiKey.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.api_key.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    apikey.Find(context.Background(), files_sdk.ApiKeyFindParams{
      Id: 1,
    })
    
    
    files-cli api-keys find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "descriptive_label": "Site-wide API key for https://site.files.com/ (key ID #1)",
      "description": "example",
      "created_at": "2000-01-01T01:00:00Z",
      "expires_at": "2000-01-01T01:00:00Z",
      "key": "[key]",
      "last_use_at": "2000-01-01T01:00:00Z",
      "name": "My Main API Key",
      "permission_set": "full",
      "platform": "win32",
      "url": "example",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <api-key>
      <id type="integer">1</id>
      <descriptive_label>Site-wide API key for https://site.files.com/ (key ID #1)</descriptive_label>
      <description>example</description>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <key>[key]</key>
      <last_use_at>2000-01-01T01:00:00Z</last_use_at>
      <name>My Main API Key</name>
      <permission_set>full</permission_set>
      <platform>win32</platform>
      <url>example</url>
      <user_id type="integer">1</user_id>
    </api-key>
    
    

    HTTPS Request

    GET /api_keys/{id}

    Authentication Required

    Not available to user API keys or sessions from users that are marked as Shared/Bot users.

    Request Parameters

    Parameter Description
    id int64 Required Api Key ID.

    Create Api Key

    Example Request

    curl https://app.files.com/api/rest/v1/api_keys.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"description":"example","expires_at":"2000-01-01T01:00:00Z","permission_set":"full","name":"My Main API Key"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/api_keys.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<api-key>
           <user_id type="integer">1</user_id>
           <description>example</description>
           <expires_at>2000-01-01T01:00:00Z</expires_at>
           <permission_set>full</permission_set>
           <name>My Main API Key</name>
         </api-key>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ApiKey.create(
      user_id: 1, 
      description: "example", 
      expires_at: "2000-01-01T01:00:00Z", 
      permission_set: "full", 
      name: "My Main API Key"
    )
    
    \Files\Model\ApiKey::create(array(
      'user_id' => 1, 
      'description' => "example", 
      'expires_at' => "2000-01-01T01:00:00Z", 
      'permission_set' => "full", 
      'name' => "My Main API Key"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("description", example);
    requestParams.put("expires_at", 2000-01-01T01:00:00Z);
    requestParams.put("permission_set", full);
    requestParams.put("name", My Main API Key);
    ApiKey.create(parameters)
    
    await ApiKey.create({
      user_id: 1, 
      description: "example", 
      expires_at: "2000-01-01T01:00:00Z", 
      permission_set: "full", 
      name: "My Main API Key",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("description", "example");
    parameters.Add("expires_at", "2000-01-01T01:00:00Z");
    parameters.Add("permission_set", "full");
    parameters.Add("name", "My Main API Key");
    
    await ApiKey.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.api_key.create({
      "user_id": 1,
      "description": "example",
      "expires_at": "2000-01-01T01:00:00Z",
      "permission_set": "full",
      "name": "My Main API Key"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    apikey.Create(context.Background(), files_sdk.ApiKeyCreateParams{
      UserId: 1,
      Description: "example",
      ExpiresAt: "2000-01-01T01:00:00Z",
      PermissionSet: "full",
      Name: "My Main API Key",
    })
    
    
    files-cli api-keys create \
      --user-id=1 \
      --description="example" \
      --expires-at="2000-01-01T01:00:00Z" \
      --permission-set="full" \
      --name="My Main API Key" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "descriptive_label": "Site-wide API key for https://site.files.com/ (key ID #1)",
      "description": "example",
      "created_at": "2000-01-01T01:00:00Z",
      "expires_at": "2000-01-01T01:00:00Z",
      "key": "[key]",
      "last_use_at": "2000-01-01T01:00:00Z",
      "name": "My Main API Key",
      "permission_set": "full",
      "platform": "win32",
      "url": "example",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <api-key>
      <id type="integer">1</id>
      <descriptive_label>Site-wide API key for https://site.files.com/ (key ID #1)</descriptive_label>
      <description>example</description>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <key>[key]</key>
      <last_use_at>2000-01-01T01:00:00Z</last_use_at>
      <name>My Main API Key</name>
      <permission_set>full</permission_set>
      <platform>win32</platform>
      <url>example</url>
      <user_id type="integer">1</user_id>
    </api-key>
    
    

    HTTPS Request

    POST /api_keys

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    description string User-supplied description of API key.
    expires_at string API Key expiration date
    permission_set string Permissions for this API Key. It must be full for site-wide API Keys. Keys with the desktop_app permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
    Possible values: none, full, desktop_app, sync_app, office_integration, mobile_app
    name string Required Internal name for the API Key. For your use.

    Update current API key. (Requires current API connection to be using an API key.)

    Example Request

    curl https://app.files.com/api/rest/v1/api_key.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"expires_at":"2000-01-01T01:00:00Z","name":"My Main API Key","permission_set":"full"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/api_key.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<api-key>
           <expires_at>2000-01-01T01:00:00Z</expires_at>
           <name>My Main API Key</name>
           <permission_set>full</permission_set>
         </api-key>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ApiKey.update_current(
      expires_at: "2000-01-01T01:00:00Z", 
      name: "My Main API Key", 
      permission_set: "full"
    )
    
    \Files\Model\ApiKey::updateCurrent(array(
      'expires_at' => "2000-01-01T01:00:00Z", 
      'name' => "My Main API Key", 
      'permission_set' => "full"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("expires_at", 2000-01-01T01:00:00Z);
    requestParams.put("name", My Main API Key);
    requestParams.put("permission_set", full);
    ApiKey.updateCurrent(parameters)
    
    await ApiKey.updateCurrent({
      expires_at: "2000-01-01T01:00:00Z", 
      name: "My Main API Key", 
      permission_set: "full",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("expires_at", "2000-01-01T01:00:00Z");
    parameters.Add("name", "My Main API Key");
    parameters.Add("permission_set", "full");
    
    await ApiKey.UpdateCurrent(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.api_key.update_current({
      "expires_at": "2000-01-01T01:00:00Z",
      "name": "My Main API Key",
      "permission_set": "full"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    apikey.UpdateCurrent(context.Background(), files_sdk.ApiKeyUpdateCurrentParams{
      ExpiresAt: "2000-01-01T01:00:00Z",
      Name: "My Main API Key",
      PermissionSet: "full",
    })
    
    
    files-cli api-keys update-current \
      --expires-at="2000-01-01T01:00:00Z" \
      --name="My Main API Key" \
      --permission-set="full" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "descriptive_label": "Site-wide API key for https://site.files.com/ (key ID #1)",
      "description": "example",
      "created_at": "2000-01-01T01:00:00Z",
      "expires_at": "2000-01-01T01:00:00Z",
      "key": "[key]",
      "last_use_at": "2000-01-01T01:00:00Z",
      "name": "My Main API Key",
      "permission_set": "full",
      "platform": "win32",
      "url": "example",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <api-key>
      <id type="integer">1</id>
      <descriptive_label>Site-wide API key for https://site.files.com/ (key ID #1)</descriptive_label>
      <description>example</description>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <key>[key]</key>
      <last_use_at>2000-01-01T01:00:00Z</last_use_at>
      <name>My Main API Key</name>
      <permission_set>full</permission_set>
      <platform>win32</platform>
      <url>example</url>
      <user_id type="integer">1</user_id>
    </api-key>
    
    

    HTTPS Request

    PATCH /api_key

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    expires_at string API Key expiration date
    name string Internal name for the API Key. For your use.
    permission_set string Permissions for this API Key. It must be full for site-wide API Keys. Keys with the desktop_app permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
    Possible values: none, full, desktop_app, sync_app, office_integration, mobile_app

    Update Api Key

    Example Request

    curl https://app.files.com/api/rest/v1/api_keys/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"description":"example","expires_at":"2000-01-01T01:00:00Z","permission_set":"full","name":"My Main API Key"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/api_keys/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<api-key>
           <description>example</description>
           <expires_at>2000-01-01T01:00:00Z</expires_at>
           <permission_set>full</permission_set>
           <name>My Main API Key</name>
         </api-key>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    api_key = Files::ApiKey.list.first
    api_key.update(
      description: "example",
      expires_at: "2000-01-01T01:00:00Z",
      permission_set: "full",
      name: "My Main API Key"
    )
    
    $api_key = \Files\Model\ApiKey::list()[0];
    $api_key->update(array(
      'description' => "example", 
      'expires_at' => "2000-01-01T01:00:00Z", 
      'permission_set' => "full", 
      'name' => "My Main API Key"
    ));
    
    ApiKey apiKey = ApiKey.list()[0];
    apiKey.setDescription("example");
    apiKey.setExpiresAt("2000-01-01T01:00:00Z");
    apiKey.setPermissionSet("full");
    apiKey.setName("My Main API Key");
    apiKey.update();
    
    const apiKey = (await ApiKey.list())[0]
    await apiKey.update({ 
      description: "example", 
      expires_at: "2000-01-01T01:00:00Z", 
      permission_set: "full", 
      name: "My Main API Key",
    })
    
    var apiKey = (await ApiKey.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("description", "example");
    parameters.Add("expires_at", "2000-01-01T01:00:00Z");
    parameters.Add("permission_set", "full");
    parameters.Add("name", "My Main API Key");
    
    await apiKey.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    api_key = files_sdk.api_key.find(id)
    api_key.update({
      "description": "example",
      "expires_at": "2000-01-01T01:00:00Z",
      "permission_set": "full",
      "name": "My Main API Key"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    apikey.Update(context.Background(), files_sdk.ApiKeyUpdateParams{
      Id: 1,
      Description: "example",
      ExpiresAt: "2000-01-01T01:00:00Z",
      PermissionSet: "full",
      Name: "My Main API Key",
    })
    
    files-cli api-keys update \
      --id=1 \
      --description="example" \
      --expires-at="2000-01-01T01:00:00Z" \
      --permission-set="full" \
      --name="My Main API Key" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "descriptive_label": "Site-wide API key for https://site.files.com/ (key ID #1)",
      "description": "example",
      "created_at": "2000-01-01T01:00:00Z",
      "expires_at": "2000-01-01T01:00:00Z",
      "key": "[key]",
      "last_use_at": "2000-01-01T01:00:00Z",
      "name": "My Main API Key",
      "permission_set": "full",
      "platform": "win32",
      "url": "example",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <api-key>
      <id type="integer">1</id>
      <descriptive_label>Site-wide API key for https://site.files.com/ (key ID #1)</descriptive_label>
      <description>example</description>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <key>[key]</key>
      <last_use_at>2000-01-01T01:00:00Z</last_use_at>
      <name>My Main API Key</name>
      <permission_set>full</permission_set>
      <platform>win32</platform>
      <url>example</url>
      <user_id type="integer">1</user_id>
    </api-key>
    
    

    HTTPS Request

    PATCH /api_keys/{id}

    Authentication Required

    Not available to user API keys or sessions from users that are marked as Shared/Bot users.

    Request Parameters

    Parameter Description
    id int64 Required Api Key ID.
    description string User-supplied description of API key.
    expires_at string API Key expiration date
    permission_set string Permissions for this API Key. It must be full for site-wide API Keys. Keys with the desktop_app permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
    Possible values: none, full, desktop_app, sync_app, office_integration, mobile_app
    name string Internal name for the API Key. For your use.

    Delete current API key. (Requires current API connection to be using an API key.)

    Example Request

    curl https://app.files.com/api/rest/v1/api_key.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/api_key.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ApiKey.delete_current
    
    \Files\Model\ApiKey::deleteCurrent();
    
    
    ApiKey.deleteCurrent(, parameters
    
    await ApiKey.deleteCurrent()
    
    
    await ApiKey.DeleteCurrent();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.api_key.delete_current()
    
    files_sdk.APIKey = "YOUR_API_KEY"
    apikey.DeleteCurrent
    
    
    files-cli api-keys delete-current \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /api_key

    Authentication Required

    Available to all authenticated keys or sessions.

    Delete Api Key

    Example Request

    curl https://app.files.com/api/rest/v1/api_keys/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/api_keys/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    api_key = Files::ApiKey.list.first
    api_key.delete
    
    $api_key = \Files\Model\ApiKey::list()[0];
    $api_key->delete();
    
    ApiKey apiKey = ApiKey.list()[0];
    
    apiKey.delete();
    
    const apiKey = (await ApiKey.list())[0]
    await apiKey.delete()
    
    var apiKey = (await ApiKey.List())[0];
    
    await apiKey.Delete();
    
    files_sdk.set_api_key("my-key")
    
    api_key = files_sdk.api_key.find(id)
    api_key.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    apikey.Delete(context.Background(), files_sdk.ApiKeyDeleteParams{
      Id: 1,
    })
    
    files-cli api-keys delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /api_keys/{id}

    Authentication Required

    Not available to user API keys or sessions from users that are marked as Shared/Bot users.

    Request Parameters

    Parameter Description
    id int64 Required Api Key ID.

    Apps

    Apps are the API/SDK term for the various integrations provided by Files.com.

    If you have an idea for a new integration, please let us know as we are continuously adding to this list.

    The App object

    Example App Object

    {
      "app_type": "example",
      "documentation_links": {
        "Important Info": "http://files.test/learn-more"
      },
      "extended_description": "example",
      "extended_description_for_marketing_site": "example",
      "external_homepage_url": "example",
      "featured": true,
      "folder_behavior_type": "example",
      "icon_url": "example",
      "logo_thumbnail_url": "example",
      "logo_url": "example",
      "marketing_intro": "example",
      "marketing_youtube_url": "example",
      "name": "example",
      "package_manager_install_command": "example",
      "remote_server_type": "example",
      "screenshot_list_urls": [
        "example"
      ],
      "sdk_installation_instructions_link": "example",
      "short_description": "example",
      "sso_strategy_type": "example",
      "tutorial_youtube_url": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <app>
      <app_type>example</app_type>
      <documentation_links>
        <Important Info>http://files.test/learn-more</Important Info>
      </documentation_links>
      <extended_description>example</extended_description>
      <extended_description_for_marketing_site>example</extended_description_for_marketing_site>
      <external_homepage_url>example</external_homepage_url>
      <featured type="boolean">true</featured>
      <folder_behavior_type>example</folder_behavior_type>
      <icon_url>example</icon_url>
      <logo_thumbnail_url>example</logo_thumbnail_url>
      <logo_url>example</logo_url>
      <marketing_intro>example</marketing_intro>
      <marketing_youtube_url>example</marketing_youtube_url>
      <name>example</name>
      <package_manager_install_command>example</package_manager_install_command>
      <remote_server_type>example</remote_server_type>
      <screenshot_list_urls type="array">
        <screenshot_list_url>example</screenshot_list_url>
      </screenshot_list_urls>
      <sdk_installation_instructions_link>example</sdk_installation_instructions_link>
      <short_description>example</short_description>
      <sso_strategy_type>example</sso_strategy_type>
      <tutorial_youtube_url>example</tutorial_youtube_url>
    </app>
    
    
    Attribute Description
    app_type string The type of the App
    Possible values: sdk, sso, remote_server, folder_behavior, client_app, app_integration
    documentation_links object Collection of named links to documentation
    extended_description string Long description for the in-App landing page
    extended_description_for_marketing_site string Long form description of the App
    external_homepage_url string Link to external homepage
    featured boolean Is featured on the App listing?
    folder_behavior_type string Associated Folder Behavior type, if any
    Possible values: webhook, file_expiration, auto_encrypt, lock_subfolders, storage_region, serve_publicly, create_user_folders, remote_server_sync, inbox, limit_file_extensions, limit_file_regex, amazon_sns, watermark, remote_server_mount, slack_webhook, auto_decrypt, override_upload_filename, permission_fence
    icon_url string App icon
    logo_thumbnail_url string Logo thumbnail for the App
    logo_url string Full size logo for the App
    marketing_intro string Marketing introdution of the App
    marketing_youtube_url string Marketing video page
    name string Name of the App
    package_manager_install_command string Package manager install command
    remote_server_type string Associated Remote Server type, if any
    Possible values: ftp, sftp, s3, google_cloud_storage, webdav, wasabi, backblaze_b2, one_drive, rackspace, box, dropbox, google_drive, azure, sharepoint, s3_compatible, azure_files, files_agent, filebase, cloudflare, linode
    screenshot_list_urls array Screenshots of the App
    sdk_installation_instructions_link string Link to SDK installation instructions
    short_description string Short description of the App
    sso_strategy_type string Associated SSO Strategy type, if any
    Possible values: google, auth0, okta, atlassian, azure, box, dropbox, slack, onelogin, saml, idaptive, ldap, scim
    tutorial_youtube_url string Tutorial video page

    List Apps

    Example Request

    curl "https://app.files.com/api/rest/v1/apps.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/apps.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::App.list(
      per_page: 1
    )
    
    \Files\Model\App::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    App.list(parameters).all()
    
    await App.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await App.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.app.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    app.List(context.Background(), files_sdk.AppListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterPrefix: "",
    })
    
    
    files-cli apps list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "app_type": "example",
        "documentation_links": {
          "Important Info": "http://files.test/learn-more"
        },
        "extended_description": "example",
        "extended_description_for_marketing_site": "example",
        "external_homepage_url": "example",
        "featured": true,
        "folder_behavior_type": "example",
        "icon_url": "example",
        "logo_thumbnail_url": "example",
        "logo_url": "example",
        "marketing_intro": "example",
        "marketing_youtube_url": "example",
        "name": "example",
        "package_manager_install_command": "example",
        "remote_server_type": "example",
        "screenshot_list_urls": [
          "example"
        ],
        "sdk_installation_instructions_link": "example",
        "short_description": "example",
        "sso_strategy_type": "example",
        "tutorial_youtube_url": "example"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <apps type="array">
      <app>
        <app_type>example</app_type>
        <documentation_links>
          <Important Info>http://files.test/learn-more</Important Info>
        </documentation_links>
        <extended_description>example</extended_description>
        <extended_description_for_marketing_site>example</extended_description_for_marketing_site>
        <external_homepage_url>example</external_homepage_url>
        <featured type="boolean">true</featured>
        <folder_behavior_type>example</folder_behavior_type>
        <icon_url>example</icon_url>
        <logo_thumbnail_url>example</logo_thumbnail_url>
        <logo_url>example</logo_url>
        <marketing_intro>example</marketing_intro>
        <marketing_youtube_url>example</marketing_youtube_url>
        <name>example</name>
        <package_manager_install_command>example</package_manager_install_command>
        <remote_server_type>example</remote_server_type>
        <screenshot_list_urls type="array">
          <screenshot_list_url>example</screenshot_list_url>
        </screenshot_list_urls>
        <sdk_installation_instructions_link>example</sdk_installation_instructions_link>
        <short_description>example</short_description>
        <sso_strategy_type>example</sso_strategy_type>
        <tutorial_youtube_url>example</tutorial_youtube_url>
      </app>
    </apps>
    
    

    HTTPS Request

    GET /apps

    Authentication Required

    No authentication required; you may call this endpoint without a key or session.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[name]=desc). Valid fields are name and app_type.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are name and app_type. Valid field combinations are [ name, app_type ] and [ app_type, name ].
    filter_prefix object If set, return records where the specified field is prefixed by the supplied value. Valid fields are name.

    As2 Incoming Messages

    An As2 Incoming Message is created for each individual AS2 file transfer incoming from a Partner. It contains the message details and tracks the lifecycle status with milestones of the transfer.

    The As2IncomingMessage object

    Example As2IncomingMessage Object

    {
      "id": 1,
      "as2_partner_id": 1,
      "as2_station_id": 1,
      "uuid": "example",
      "content_type": "example",
      "http_headers": {
        "key": "example value"
      },
      "activity_log": "example",
      "processing_result": "example",
      "processing_result_description": "example",
      "mic": "example",
      "mic_algo": "example",
      "as2_to": "example",
      "as2_from": "example",
      "message_id": "example",
      "subject": "example",
      "date": "example",
      "body_size": "example",
      "attachment_filename": "example",
      "ip": "example",
      "created_at": "2000-01-01T01:00:00Z",
      "http_response_code": "example",
      "http_response_headers": {
        "key": "example value"
      },
      "recipient_serial": "example",
      "hex_recipient_serial": "A5:EB:C1:95:DC:D8:2B:E7",
      "recipient_issuer": "example",
      "message_received": true,
      "message_decrypted": true,
      "message_signature_verified": true,
      "message_processing_success": true,
      "message_mdn_returned": true,
      "encrypted_uri": "example",
      "smime_signed_uri": "example",
      "smime_uri": "example",
      "raw_uri": "example",
      "mdn_response_uri": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-incoming-message>
      <id type="integer">1</id>
      <as2_partner_id type="integer">1</as2_partner_id>
      <as2_station_id type="integer">1</as2_station_id>
      <uuid>example</uuid>
      <content_type>example</content_type>
      <http_headers>
        <key>example value</key>
      </http_headers>
      <activity_log>example</activity_log>
      <processing_result>example</processing_result>
      <processing_result_description>example</processing_result_description>
      <mic>example</mic>
      <mic_algo>example</mic_algo>
      <as2_to>example</as2_to>
      <as2_from>example</as2_from>
      <message_id>example</message_id>
      <subject>example</subject>
      <date>example</date>
      <body_size>example</body_size>
      <attachment_filename>example</attachment_filename>
      <ip>example</ip>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <http_response_code>example</http_response_code>
      <http_response_headers>
        <key>example value</key>
      </http_response_headers>
      <recipient_serial>example</recipient_serial>
      <hex_recipient_serial>A5:EB:C1:95:DC:D8:2B:E7</hex_recipient_serial>
      <recipient_issuer>example</recipient_issuer>
      <message_received type="boolean">true</message_received>
      <message_decrypted type="boolean">true</message_decrypted>
      <message_signature_verified type="boolean">true</message_signature_verified>
      <message_processing_success type="boolean">true</message_processing_success>
      <message_mdn_returned type="boolean">true</message_mdn_returned>
      <encrypted_uri>example</encrypted_uri>
      <smime_signed_uri>example</smime_signed_uri>
      <smime_uri>example</smime_uri>
      <raw_uri>example</raw_uri>
      <mdn_response_uri>example</mdn_response_uri>
    </as2-incoming-message>
    
    
    Attribute Description
    id int64 Id of the AS2 Partner.
    as2_partner_id int64 Id of the AS2 Partner associated with this message.
    as2_station_id int64 Id of the AS2 Station associated with this message.
    uuid string UUID assigned to this message.
    content_type string Content Type header of the incoming message.
    http_headers object HTTP Headers sent with this message.
    activity_log string JSON Structure of the activity log.
    processing_result string Result of processing.
    Possible values: not_started, unable_to_find_station, unable_to_find_partner, unable_to_validate_signature, decrypt_fail, file_save_fail, success
    processing_result_description string Result of processing description.
    mic string AS2 Message Integrity Check
    mic_algo string AS2 Message Integrity Check Algorithm Used
    as2_to string AS2 TO header of message
    as2_from string AS2 FROM header of message
    message_id string AS2 Message Id
    subject string AS2 Subject Header
    date string Date Header
    body_size string Encrypted Payload Body Size
    attachment_filename string Filename of the file being received.
    ip string IP Address of the Sender
    created_at date-time Message creation date/time
    http_response_code string HTTP Response Code sent for this message
    http_response_headers object HTTP Headers sent for this message.
    recipient_serial string Incoming Message Recipient(the Client Cert used to encrypt this message)'s serial
    hex_recipient_serial string Incoming Message Recipient(the Client Cert used to encrypt this message)'s serial in hex format.
    recipient_issuer string Incoming Message Recipient(the Client Cert used to encrypt this message)'s issuer
    message_received boolean Message body received?
    message_decrypted boolean Message decrypted successfully?
    message_signature_verified boolean Message signature verified?
    message_processing_success boolean Message processed successfully?
    message_mdn_returned boolean MDN returned?
    encrypted_uri string URL to download the encrypted signed smime that is to sent as AS2 body
    smime_signed_uri string URL to download the file contents as smime with signature
    smime_uri string URL to download the file contents encoded as smime
    raw_uri string URL to download the original file contents
    mdn_response_uri string URL to download the http response body

    List As2 Incoming Messages

    Example Request

    curl "https://app.files.com/api/rest/v1/as2_incoming_messages.json?as2_partner_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/as2_incoming_messages.xml?as2_partner_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::As2IncomingMessage.list(
      per_page: 1, 
      as2_partner_id: 1
    )
    
    \Files\Model\As2IncomingMessage::list(array(
      'per_page' => 1, 
      'as2_partner_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("as2_partner_id", 1);
    As2IncomingMessage.list(parameters).all()
    
    await As2IncomingMessage.list({
      per_page: 1, 
      as2_partner_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("as2_partner_id", (Int64?) 1);
    
    await As2IncomingMessage.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.as2_incoming_message.list({
      "per_page": 1,
      "as2_partner_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    as2incomingmessage.List(context.Background(), files_sdk.As2IncomingMessageListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterGt: "",
      FilterGteq: "",
      FilterLt: "",
      FilterLteq: "",
      As2PartnerId: 1,
    })
    
    
    files-cli as2-incoming-messages list \
      --cursor="" \
      --per-page=1 \
      --as2-partner-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "as2_partner_id": 1,
        "as2_station_id": 1,
        "uuid": "example",
        "content_type": "example",
        "http_headers": {
          "key": "example value"
        },
        "activity_log": "example",
        "processing_result": "example",
        "processing_result_description": "example",
        "mic": "example",
        "mic_algo": "example",
        "as2_to": "example",
        "as2_from": "example",
        "message_id": "example",
        "subject": "example",
        "date": "example",
        "body_size": "example",
        "attachment_filename": "example",
        "ip": "example",
        "created_at": "2000-01-01T01:00:00Z",
        "http_response_code": "example",
        "http_response_headers": {
          "key": "example value"
        },
        "recipient_serial": "example",
        "hex_recipient_serial": "A5:EB:C1:95:DC:D8:2B:E7",
        "recipient_issuer": "example",
        "message_received": true,
        "message_decrypted": true,
        "message_signature_verified": true,
        "message_processing_success": true,
        "message_mdn_returned": true,
        "encrypted_uri": "example",
        "smime_signed_uri": "example",
        "smime_uri": "example",
        "raw_uri": "example",
        "mdn_response_uri": "example"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-incoming-messages type="array">
      <as2-incoming-message>
        <id type="integer">1</id>
        <as2_partner_id type="integer">1</as2_partner_id>
        <as2_station_id type="integer">1</as2_station_id>
        <uuid>example</uuid>
        <content_type>example</content_type>
        <http_headers>
          <key>example value</key>
        </http_headers>
        <activity_log>example</activity_log>
        <processing_result>example</processing_result>
        <processing_result_description>example</processing_result_description>
        <mic>example</mic>
        <mic_algo>example</mic_algo>
        <as2_to>example</as2_to>
        <as2_from>example</as2_from>
        <message_id>example</message_id>
        <subject>example</subject>
        <date>example</date>
        <body_size>example</body_size>
        <attachment_filename>example</attachment_filename>
        <ip>example</ip>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <http_response_code>example</http_response_code>
        <http_response_headers>
          <key>example value</key>
        </http_response_headers>
        <recipient_serial>example</recipient_serial>
        <hex_recipient_serial>A5:EB:C1:95:DC:D8:2B:E7</hex_recipient_serial>
        <recipient_issuer>example</recipient_issuer>
        <message_received type="boolean">true</message_received>
        <message_decrypted type="boolean">true</message_decrypted>
        <message_signature_verified type="boolean">true</message_signature_verified>
        <message_processing_success type="boolean">true</message_processing_success>
        <message_mdn_returned type="boolean">true</message_mdn_returned>
        <encrypted_uri>example</encrypted_uri>
        <smime_signed_uri>example</smime_signed_uri>
        <smime_uri>example</smime_uri>
        <raw_uri>example</raw_uri>
        <mdn_response_uri>example</mdn_response_uri>
      </as2-incoming-message>
    </as2-incoming-messages>
    
    

    HTTPS Request

    GET /as2_incoming_messages

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    as2_partner_id int64 As2 Partner ID. If provided, will return message specific to that partner.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[created_at]=desc). Valid fields are created_at and as2_partner_id.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are created_at.
    filter_gt object If set, return records where the specified field is greater than the supplied value. Valid fields are created_at.
    filter_gteq object If set, return records where the specified field is greater than or equal the supplied value. Valid fields are created_at.
    filter_lt object If set, return records where the specified field is less than the supplied value. Valid fields are created_at.
    filter_lteq object If set, return records where the specified field is less than or equal the supplied value. Valid fields are created_at.

    As2 Outgoing Messages

    An As2 Outgoing Message is created for each individual AS2 file transfer out to a Partner. It contains the message details and tracks the lifecycle status with milestones of the transfer.

    The As2OutgoingMessage object

    Example As2OutgoingMessage Object

    {
      "id": 1,
      "as2_partner_id": 1,
      "as2_station_id": 1,
      "uuid": "example",
      "http_headers": {
        "key": "example value"
      },
      "activity_log": "example",
      "processing_result": "example",
      "processing_result_description": "example",
      "mic": "example",
      "mic_sha_256": "example",
      "as2_to": "example",
      "as2_from": "example",
      "date": "example",
      "message_id": "example",
      "body_size": "example",
      "attachment_filename": "example",
      "created_at": "2000-01-01T01:00:00Z",
      "http_response_code": "example",
      "http_response_headers": {
        "key": "example value"
      },
      "http_transmission_duration": 1.0,
      "mdn_received": true,
      "mdn_valid": true,
      "mdn_signature_verified": true,
      "mdn_message_id_matched": true,
      "mdn_mic_matched": true,
      "mdn_processing_success": true,
      "raw_uri": "example",
      "smime_uri": "example",
      "smime_signed_uri": "example",
      "encrypted_uri": "example",
      "mdn_response_uri": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-outgoing-message>
      <id type="integer">1</id>
      <as2_partner_id type="integer">1</as2_partner_id>
      <as2_station_id type="integer">1</as2_station_id>
      <uuid>example</uuid>
      <http_headers>
        <key>example value</key>
      </http_headers>
      <activity_log>example</activity_log>
      <processing_result>example</processing_result>
      <processing_result_description>example</processing_result_description>
      <mic>example</mic>
      <mic_sha_256>example</mic_sha_256>
      <as2_to>example</as2_to>
      <as2_from>example</as2_from>
      <date>example</date>
      <message_id>example</message_id>
      <body_size>example</body_size>
      <attachment_filename>example</attachment_filename>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <http_response_code>example</http_response_code>
      <http_response_headers>
        <key>example value</key>
      </http_response_headers>
      <http_transmission_duration type="float">1.0</http_transmission_duration>
      <mdn_received type="boolean">true</mdn_received>
      <mdn_valid type="boolean">true</mdn_valid>
      <mdn_signature_verified type="boolean">true</mdn_signature_verified>
      <mdn_message_id_matched type="boolean">true</mdn_message_id_matched>
      <mdn_mic_matched type="boolean">true</mdn_mic_matched>
      <mdn_processing_success type="boolean">true</mdn_processing_success>
      <raw_uri>example</raw_uri>
      <smime_uri>example</smime_uri>
      <smime_signed_uri>example</smime_signed_uri>
      <encrypted_uri>example</encrypted_uri>
      <mdn_response_uri>example</mdn_response_uri>
    </as2-outgoing-message>
    
    
    Attribute Description
    id int64 Id of the AS2 Partner.
    as2_partner_id int64 Id of the AS2 Partner associated with this message.
    as2_station_id int64 Id of the AS2 Station associated with this message.
    uuid string UUID assigned to this message.
    http_headers object HTTP Headers sent with this message.
    activity_log string JSON Structure of the activity log.
    processing_result string Result of processing.
    Possible values: not_started, send_failed, send_success, send_success_mdn_invalid, send_success_mic_mismatch, send_success_message_id_mismatch, send_success_signature_mismatch, send_success_processing_failure, send_failed_unknown_host, send_failed_bad_http_response_code, send_failed_ssl_error, send_failed_connection_refused
    processing_result_description string Result of processing description.
    mic string AS2 Message Integrity Check SHA1
    mic_sha_256 string AS2 Message Integrity Check SHA256
    as2_to string AS2 TO
    as2_from string AS2 FROM
    date string Date Header
    message_id string AS2 Message Id
    body_size string Encrypted Payload Body Size
    attachment_filename string Filename of the file being sent.
    created_at date-time Message creation date/time
    http_response_code string HTTP Response Code received for this message
    http_response_headers object HTTP Headers received for this message.
    http_transmission_duration double HTTP transmission duration in seceonds
    mdn_received boolean Did the partner give a response body?
    mdn_valid boolean Is the response in MDN format?
    mdn_signature_verified boolean MDN signature verified?
    mdn_message_id_matched boolean MDN message id matched?
    mdn_mic_matched boolean MDN MIC matched?
    mdn_processing_success boolean MDN disposition indicate a successful processing?
    raw_uri string URL to download the original file contents
    smime_uri string URL to download the file contents encoded as smime
    smime_signed_uri string URL to download the file contents as smime with signature
    encrypted_uri string URL to download the encrypted signed smime that is to sent as AS2 body
    mdn_response_uri string URL to download the http response body

    List As2 Outgoing Messages

    Example Request

    curl "https://app.files.com/api/rest/v1/as2_outgoing_messages.json?as2_partner_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/as2_outgoing_messages.xml?as2_partner_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::As2OutgoingMessage.list(
      per_page: 1, 
      as2_partner_id: 1
    )
    
    \Files\Model\As2OutgoingMessage::list(array(
      'per_page' => 1, 
      'as2_partner_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("as2_partner_id", 1);
    As2OutgoingMessage.list(parameters).all()
    
    await As2OutgoingMessage.list({
      per_page: 1, 
      as2_partner_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("as2_partner_id", (Int64?) 1);
    
    await As2OutgoingMessage.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.as2_outgoing_message.list({
      "per_page": 1,
      "as2_partner_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    as2outgoingmessage.List(context.Background(), files_sdk.As2OutgoingMessageListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterGt: "",
      FilterGteq: "",
      FilterLt: "",
      FilterLteq: "",
      As2PartnerId: 1,
    })
    
    
    files-cli as2-outgoing-messages list \
      --cursor="" \
      --per-page=1 \
      --as2-partner-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "as2_partner_id": 1,
        "as2_station_id": 1,
        "uuid": "example",
        "http_headers": {
          "key": "example value"
        },
        "activity_log": "example",
        "processing_result": "example",
        "processing_result_description": "example",
        "mic": "example",
        "mic_sha_256": "example",
        "as2_to": "example",
        "as2_from": "example",
        "date": "example",
        "message_id": "example",
        "body_size": "example",
        "attachment_filename": "example",
        "created_at": "2000-01-01T01:00:00Z",
        "http_response_code": "example",
        "http_response_headers": {
          "key": "example value"
        },
        "http_transmission_duration": 1.0,
        "mdn_received": true,
        "mdn_valid": true,
        "mdn_signature_verified": true,
        "mdn_message_id_matched": true,
        "mdn_mic_matched": true,
        "mdn_processing_success": true,
        "raw_uri": "example",
        "smime_uri": "example",
        "smime_signed_uri": "example",
        "encrypted_uri": "example",
        "mdn_response_uri": "example"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-outgoing-messages type="array">
      <as2-outgoing-message>
        <id type="integer">1</id>
        <as2_partner_id type="integer">1</as2_partner_id>
        <as2_station_id type="integer">1</as2_station_id>
        <uuid>example</uuid>
        <http_headers>
          <key>example value</key>
        </http_headers>
        <activity_log>example</activity_log>
        <processing_result>example</processing_result>
        <processing_result_description>example</processing_result_description>
        <mic>example</mic>
        <mic_sha_256>example</mic_sha_256>
        <as2_to>example</as2_to>
        <as2_from>example</as2_from>
        <date>example</date>
        <message_id>example</message_id>
        <body_size>example</body_size>
        <attachment_filename>example</attachment_filename>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <http_response_code>example</http_response_code>
        <http_response_headers>
          <key>example value</key>
        </http_response_headers>
        <http_transmission_duration type="float">1.0</http_transmission_duration>
        <mdn_received type="boolean">true</mdn_received>
        <mdn_valid type="boolean">true</mdn_valid>
        <mdn_signature_verified type="boolean">true</mdn_signature_verified>
        <mdn_message_id_matched type="boolean">true</mdn_message_id_matched>
        <mdn_mic_matched type="boolean">true</mdn_mic_matched>
        <mdn_processing_success type="boolean">true</mdn_processing_success>
        <raw_uri>example</raw_uri>
        <smime_uri>example</smime_uri>
        <smime_signed_uri>example</smime_signed_uri>
        <encrypted_uri>example</encrypted_uri>
        <mdn_response_uri>example</mdn_response_uri>
      </as2-outgoing-message>
    </as2-outgoing-messages>
    
    

    HTTPS Request

    GET /as2_outgoing_messages

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    as2_partner_id int64 As2 Partner ID. If provided, will return message specific to that partner.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[created_at]=desc). Valid fields are created_at and as2_partner_id.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are created_at.
    filter_gt object If set, return records where the specified field is greater than the supplied value. Valid fields are created_at.
    filter_gteq object If set, return records where the specified field is greater than or equal the supplied value. Valid fields are created_at.
    filter_lt object If set, return records where the specified field is less than the supplied value. Valid fields are created_at.
    filter_lteq object If set, return records where the specified field is less than or equal the supplied value. Valid fields are created_at.

    As2 Partners

    As2 Partner defines a Files.com hosted AS2 server that can receive data into Files.com and send data from Files.com

    The As2Partner object

    Example As2Partner Object

    {
      "id": 1,
      "as2_station_id": 1,
      "name": "AS2 Partner Name",
      "uri": "example",
      "server_certificate": "require_match",
      "enable_dedicated_ips": true,
      "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
      "public_certificate_md5": "example",
      "public_certificate_subject": "example",
      "public_certificate_issuer": "example",
      "public_certificate_serial": "example",
      "public_certificate_not_before": "example",
      "public_certificate_not_after": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-partner>
      <id type="integer">1</id>
      <as2_station_id type="integer">1</as2_station_id>
      <name>AS2 Partner Name</name>
      <uri>example</uri>
      <server_certificate>require_match</server_certificate>
      <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
      <hex_public_certificate_serial>A5:EB:C1:95:DC:D8:2B:E7</hex_public_certificate_serial>
      <public_certificate_md5>example</public_certificate_md5>
      <public_certificate_subject>example</public_certificate_subject>
      <public_certificate_issuer>example</public_certificate_issuer>
      <public_certificate_serial>example</public_certificate_serial>
      <public_certificate_not_before>example</public_certificate_not_before>
      <public_certificate_not_after>example</public_certificate_not_after>
    </as2-partner>
    
    
    Attribute Description
    id int64 Id of the AS2 Partner.
    as2_station_id int64 Id of the AS2 Station associated with this partner.
    name string The partner's formal AS2 name.
    uri string Public URI for sending AS2 message to.
    server_certificate string Remote server certificate security setting
    Possible values: require_match, allow_any
    enable_dedicated_ips boolean true if remote server only accepts connections from dedicated IPs
    hex_public_certificate_serial string Serial of public certificate used for message security in hex format.
    public_certificate_md5 string MD5 hash of public certificate used for message security.
    public_certificate_subject string Subject of public certificate used for message security.
    public_certificate_issuer string Issuer of public certificate used for message security.
    public_certificate_serial string Serial of public certificate used for message security.
    public_certificate_not_before string Not before value of public certificate used for message security.
    public_certificate_not_after string Not after value of public certificate used for message security.
    public_certificate string

    List As2 Partners

    Example Request

    curl "https://app.files.com/api/rest/v1/as2_partners.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/as2_partners.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::As2Partner.list(
      per_page: 1
    )
    
    \Files\Model\As2Partner::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    As2Partner.list(parameters).all()
    
    await As2Partner.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await As2Partner.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.as2_partner.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    as2partner.List(context.Background(), files_sdk.As2PartnerListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli as2-partners list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "as2_station_id": 1,
        "name": "AS2 Partner Name",
        "uri": "example",
        "server_certificate": "require_match",
        "enable_dedicated_ips": true,
        "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
        "public_certificate_md5": "example",
        "public_certificate_subject": "example",
        "public_certificate_issuer": "example",
        "public_certificate_serial": "example",
        "public_certificate_not_before": "example",
        "public_certificate_not_after": "example"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-partners type="array">
      <as2-partner>
        <id type="integer">1</id>
        <as2_station_id type="integer">1</as2_station_id>
        <name>AS2 Partner Name</name>
        <uri>example</uri>
        <server_certificate>require_match</server_certificate>
        <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
        <hex_public_certificate_serial>A5:EB:C1:95:DC:D8:2B:E7</hex_public_certificate_serial>
        <public_certificate_md5>example</public_certificate_md5>
        <public_certificate_subject>example</public_certificate_subject>
        <public_certificate_issuer>example</public_certificate_issuer>
        <public_certificate_serial>example</public_certificate_serial>
        <public_certificate_not_before>example</public_certificate_not_before>
        <public_certificate_not_after>example</public_certificate_not_after>
      </as2-partner>
    </as2-partners>
    
    

    HTTPS Request

    GET /as2_partners

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Show As2 Partner

    Example Request

    curl https://app.files.com/api/rest/v1/as2_partners/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/as2_partners/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::As2Partner.find(id)
    
    \Files\Model\As2Partner::find($id);
    
    
    As2Partner.find(, parameters
    
    await As2Partner.find(id)
    
    
    await As2Partner.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.as2_partner.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    as2partner.Find(context.Background(), files_sdk.As2PartnerFindParams{
      Id: 1,
    })
    
    
    files-cli as2-partners find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "as2_station_id": 1,
      "name": "AS2 Partner Name",
      "uri": "example",
      "server_certificate": "require_match",
      "enable_dedicated_ips": true,
      "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
      "public_certificate_md5": "example",
      "public_certificate_subject": "example",
      "public_certificate_issuer": "example",
      "public_certificate_serial": "example",
      "public_certificate_not_before": "example",
      "public_certificate_not_after": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-partner>
      <id type="integer">1</id>
      <as2_station_id type="integer">1</as2_station_id>
      <name>AS2 Partner Name</name>
      <uri>example</uri>
      <server_certificate>require_match</server_certificate>
      <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
      <hex_public_certificate_serial>A5:EB:C1:95:DC:D8:2B:E7</hex_public_certificate_serial>
      <public_certificate_md5>example</public_certificate_md5>
      <public_certificate_subject>example</public_certificate_subject>
      <public_certificate_issuer>example</public_certificate_issuer>
      <public_certificate_serial>example</public_certificate_serial>
      <public_certificate_not_before>example</public_certificate_not_before>
      <public_certificate_not_after>example</public_certificate_not_after>
    </as2-partner>
    
    

    HTTPS Request

    GET /as2_partners/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required As2 Partner ID.

    Create As2 Partner

    Example Request

    curl https://app.files.com/api/rest/v1/as2_partners.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"name":"name","uri":"uri","public_certificate":"public_certificate","as2_station_id":1,"server_certificate":"require_match","enable_dedicated_ips":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/as2_partners.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<as2-partner>
           <name>name</name>
           <uri>uri</uri>
           <public_certificate>public_certificate</public_certificate>
           <as2_station_id type="integer">1</as2_station_id>
           <server_certificate>require_match</server_certificate>
           <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
         </as2-partner>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::As2Partner.create(
      name: "name", 
      uri: "uri", 
      public_certificate: "public_certificate", 
      as2_station_id: 1, 
      server_certificate: "require_match", 
      enable_dedicated_ips: true
    )
    
    \Files\Model\As2Partner::create(array(
      'name' => "name", 
      'uri' => "uri", 
      'public_certificate' => "public_certificate", 
      'as2_station_id' => 1, 
      'server_certificate' => "require_match", 
      'enable_dedicated_ips' => true
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("name", name);
    requestParams.put("uri", uri);
    requestParams.put("public_certificate", public_certificate);
    requestParams.put("as2_station_id", 1);
    requestParams.put("server_certificate", require_match);
    requestParams.put("enable_dedicated_ips", true);
    As2Partner.create(parameters)
    
    await As2Partner.create({
      name: "name", 
      uri: "uri", 
      public_certificate: "public_certificate", 
      as2_station_id: 1, 
      server_certificate: "require_match", 
      enable_dedicated_ips: true,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("name", "name");
    parameters.Add("uri", "uri");
    parameters.Add("public_certificate", "public_certificate");
    parameters.Add("as2_station_id", (Int64?) 1);
    parameters.Add("server_certificate", "require_match");
    parameters.Add("enable_dedicated_ips", true);
    
    await As2Partner.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.as2_partner.create({
      "name": "name",
      "uri": "uri",
      "public_certificate": "public_certificate",
      "as2_station_id": 1,
      "server_certificate": "require_match",
      "enable_dedicated_ips": True
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    as2partner.Create(context.Background(), files_sdk.As2PartnerCreateParams{
      Name: "name",
      Uri: "uri",
      PublicCertificate: "public_certificate",
      As2StationId: 1,
      ServerCertificate: "require_match",
      EnableDedicatedIps: lib.Bool(true),
    })
    
    
    files-cli as2-partners create \
      --name="name" \
      --uri="uri" \
      --public-certificate="public_certificate" \
      --as2-station-id=1 \
      --server-certificate="require_match" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "as2_station_id": 1,
      "name": "AS2 Partner Name",
      "uri": "example",
      "server_certificate": "require_match",
      "enable_dedicated_ips": true,
      "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
      "public_certificate_md5": "example",
      "public_certificate_subject": "example",
      "public_certificate_issuer": "example",
      "public_certificate_serial": "example",
      "public_certificate_not_before": "example",
      "public_certificate_not_after": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-partner>
      <id type="integer">1</id>
      <as2_station_id type="integer">1</as2_station_id>
      <name>AS2 Partner Name</name>
      <uri>example</uri>
      <server_certificate>require_match</server_certificate>
      <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
      <hex_public_certificate_serial>A5:EB:C1:95:DC:D8:2B:E7</hex_public_certificate_serial>
      <public_certificate_md5>example</public_certificate_md5>
      <public_certificate_subject>example</public_certificate_subject>
      <public_certificate_issuer>example</public_certificate_issuer>
      <public_certificate_serial>example</public_certificate_serial>
      <public_certificate_not_before>example</public_certificate_not_before>
      <public_certificate_not_after>example</public_certificate_not_after>
    </as2-partner>
    
    

    HTTPS Request

    POST /as2_partners

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    name string Required AS2 Name
    uri string Required URL base for AS2 responses
    public_certificate string Required
    as2_station_id int64 Required Id of As2Station for this partner
    server_certificate string Remote server certificate security setting
    enable_dedicated_ips boolean

    Update As2 Partner

    Example Request

    curl https://app.files.com/api/rest/v1/as2_partners/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"name":"AS2 Partner Name","uri":"example","server_certificate":"require_match","enable_dedicated_ips":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/as2_partners/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<as2-partner>
           <name>AS2 Partner Name</name>
           <uri>example</uri>
           <server_certificate>require_match</server_certificate>
           <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
         </as2-partner>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    as2_partner = Files::As2Partner.list.first
    as2_partner.update(
      name: "AS2 Partner Name",
      uri: "example",
      server_certificate: "require_match",
      enable_dedicated_ips: true
    )
    
    $as2_partner = \Files\Model\As2Partner::list()[0];
    $as2_partner->update(array(
      'name' => "AS2 Partner Name", 
      'uri' => "example", 
      'server_certificate' => "require_match", 
      'enable_dedicated_ips' => true
    ));
    
    As2Partner as2Partner = As2Partner.list()[0];
    as2Partner.setName("AS2 Partner Name");
    as2Partner.setUri("example");
    as2Partner.setServerCertificate("require_match");
    as2Partner.setEnableDedicatedIps(true);
    as2Partner.update();
    
    const as2Partner = (await As2Partner.list())[0]
    await as2Partner.update({ 
      name: "AS2 Partner Name", 
      uri: "example", 
      server_certificate: "require_match", 
      enable_dedicated_ips: true,
    })
    
    var as2Partner = (await As2Partner.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("name", "AS2 Partner Name");
    parameters.Add("uri", "example");
    parameters.Add("server_certificate", "require_match");
    parameters.Add("enable_dedicated_ips", true);
    
    await as2Partner.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    as2_partner = files_sdk.as2_partner.find(id)
    as2_partner.update({
      "name": "AS2 Partner Name",
      "uri": "example",
      "server_certificate": "require_match",
      "enable_dedicated_ips": True
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    as2partner.Update(context.Background(), files_sdk.As2PartnerUpdateParams{
      Id: 1,
      Name: "AS2 Partner Name",
      Uri: "example",
      ServerCertificate: "require_match",
      PublicCertificate: "",
      EnableDedicatedIps: lib.Bool(true),
    })
    
    files-cli as2-partners update \
      --id=1 \
      --name="AS2 Partner Name" \
      --uri="example" \
      --server-certificate="require_match" \
      --public-certificate="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "as2_station_id": 1,
      "name": "AS2 Partner Name",
      "uri": "example",
      "server_certificate": "require_match",
      "enable_dedicated_ips": true,
      "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
      "public_certificate_md5": "example",
      "public_certificate_subject": "example",
      "public_certificate_issuer": "example",
      "public_certificate_serial": "example",
      "public_certificate_not_before": "example",
      "public_certificate_not_after": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-partner>
      <id type="integer">1</id>
      <as2_station_id type="integer">1</as2_station_id>
      <name>AS2 Partner Name</name>
      <uri>example</uri>
      <server_certificate>require_match</server_certificate>
      <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
      <hex_public_certificate_serial>A5:EB:C1:95:DC:D8:2B:E7</hex_public_certificate_serial>
      <public_certificate_md5>example</public_certificate_md5>
      <public_certificate_subject>example</public_certificate_subject>
      <public_certificate_issuer>example</public_certificate_issuer>
      <public_certificate_serial>example</public_certificate_serial>
      <public_certificate_not_before>example</public_certificate_not_before>
      <public_certificate_not_after>example</public_certificate_not_after>
    </as2-partner>
    
    

    HTTPS Request

    PATCH /as2_partners/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required As2 Partner ID.
    name string AS2 Name
    uri string URL base for AS2 responses
    server_certificate string Remote server certificate security setting
    public_certificate string
    enable_dedicated_ips boolean

    Delete As2 Partner

    Example Request

    curl https://app.files.com/api/rest/v1/as2_partners/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/as2_partners/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    as2_partner = Files::As2Partner.list.first
    as2_partner.delete
    
    $as2_partner = \Files\Model\As2Partner::list()[0];
    $as2_partner->delete();
    
    As2Partner as2Partner = As2Partner.list()[0];
    
    as2Partner.delete();
    
    const as2Partner = (await As2Partner.list())[0]
    await as2Partner.delete()
    
    var as2Partner = (await As2Partner.List())[0];
    
    await as2Partner.Delete();
    
    files_sdk.set_api_key("my-key")
    
    as2_partner = files_sdk.as2_partner.find(id)
    as2_partner.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    as2partner.Delete(context.Background(), files_sdk.As2PartnerDeleteParams{
      Id: 1,
    })
    
    files-cli as2-partners delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /as2_partners/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required As2 Partner ID.

    As2 Stations

    As2 Station defines a remote AS2 server that can send data into Files.com and received data from Files.com

    The As2Station object

    Example As2Station Object

    {
      "id": 1,
      "name": "AS2 Station Name",
      "uri": "example",
      "domain": "domain.test",
      "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
      "public_certificate_md5": "example",
      "private_key_md5": "example",
      "public_certificate_subject": "example",
      "public_certificate_issuer": "example",
      "public_certificate_serial": "example",
      "public_certificate_not_before": "example",
      "public_certificate_not_after": "example",
      "private_key_password_md5": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-station>
      <id type="integer">1</id>
      <name>AS2 Station Name</name>
      <uri>example</uri>
      <domain>domain.test</domain>
      <hex_public_certificate_serial>A5:EB:C1:95:DC:D8:2B:E7</hex_public_certificate_serial>
      <public_certificate_md5>example</public_certificate_md5>
      <private_key_md5>example</private_key_md5>
      <public_certificate_subject>example</public_certificate_subject>
      <public_certificate_issuer>example</public_certificate_issuer>
      <public_certificate_serial>example</public_certificate_serial>
      <public_certificate_not_before>example</public_certificate_not_before>
      <public_certificate_not_after>example</public_certificate_not_after>
      <private_key_password_md5>example</private_key_password_md5>
    </as2-station>
    
    
    Attribute Description
    id int64 Id of the AS2 Station.
    name string The station's formal AS2 name.
    uri string Public URI for sending AS2 message to.
    domain string The station's AS2 domain name.
    hex_public_certificate_serial string Serial of public certificate used for message security in hex format.
    public_certificate_md5 string MD5 hash of public certificate used for message security.
    private_key_md5 string MD5 hash of private key used for message security.
    public_certificate_subject string Subject of public certificate used for message security.
    public_certificate_issuer string Issuer of public certificate used for message security.
    public_certificate_serial string Serial of public certificate used for message security.
    public_certificate_not_before string Not before value of public certificate used for message security.
    public_certificate_not_after string Not after value of public certificate used for message security.
    private_key_password_md5 string MD5 hash of private key password used for message security.
    public_certificate string
    private_key string
    private_key_password string

    List As2 Stations

    Example Request

    curl "https://app.files.com/api/rest/v1/as2_stations.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/as2_stations.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::As2Station.list(
      per_page: 1
    )
    
    \Files\Model\As2Station::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    As2Station.list(parameters).all()
    
    await As2Station.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await As2Station.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.as2_station.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    as2station.List(context.Background(), files_sdk.As2StationListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli as2-stations list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "name": "AS2 Station Name",
        "uri": "example",
        "domain": "domain.test",
        "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
        "public_certificate_md5": "example",
        "private_key_md5": "example",
        "public_certificate_subject": "example",
        "public_certificate_issuer": "example",
        "public_certificate_serial": "example",
        "public_certificate_not_before": "example",
        "public_certificate_not_after": "example",
        "private_key_password_md5": "example"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-stations type="array">
      <as2-station>
        <id type="integer">1</id>
        <name>AS2 Station Name</name>
        <uri>example</uri>
        <domain>domain.test</domain>
        <hex_public_certificate_serial>A5:EB:C1:95:DC:D8:2B:E7</hex_public_certificate_serial>
        <public_certificate_md5>example</public_certificate_md5>
        <private_key_md5>example</private_key_md5>
        <public_certificate_subject>example</public_certificate_subject>
        <public_certificate_issuer>example</public_certificate_issuer>
        <public_certificate_serial>example</public_certificate_serial>
        <public_certificate_not_before>example</public_certificate_not_before>
        <public_certificate_not_after>example</public_certificate_not_after>
        <private_key_password_md5>example</private_key_password_md5>
      </as2-station>
    </as2-stations>
    
    

    HTTPS Request

    GET /as2_stations

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Show As2 Station

    Example Request

    curl https://app.files.com/api/rest/v1/as2_stations/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/as2_stations/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::As2Station.find(id)
    
    \Files\Model\As2Station::find($id);
    
    
    As2Station.find(, parameters
    
    await As2Station.find(id)
    
    
    await As2Station.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.as2_station.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    as2station.Find(context.Background(), files_sdk.As2StationFindParams{
      Id: 1,
    })
    
    
    files-cli as2-stations find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "AS2 Station Name",
      "uri": "example",
      "domain": "domain.test",
      "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
      "public_certificate_md5": "example",
      "private_key_md5": "example",
      "public_certificate_subject": "example",
      "public_certificate_issuer": "example",
      "public_certificate_serial": "example",
      "public_certificate_not_before": "example",
      "public_certificate_not_after": "example",
      "private_key_password_md5": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-station>
      <id type="integer">1</id>
      <name>AS2 Station Name</name>
      <uri>example</uri>
      <domain>domain.test</domain>
      <hex_public_certificate_serial>A5:EB:C1:95:DC:D8:2B:E7</hex_public_certificate_serial>
      <public_certificate_md5>example</public_certificate_md5>
      <private_key_md5>example</private_key_md5>
      <public_certificate_subject>example</public_certificate_subject>
      <public_certificate_issuer>example</public_certificate_issuer>
      <public_certificate_serial>example</public_certificate_serial>
      <public_certificate_not_before>example</public_certificate_not_before>
      <public_certificate_not_after>example</public_certificate_not_after>
      <private_key_password_md5>example</private_key_password_md5>
    </as2-station>
    
    

    HTTPS Request

    GET /as2_stations/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required As2 Station ID.

    Create As2 Station

    Example Request

    curl https://app.files.com/api/rest/v1/as2_stations.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"name":"name","public_certificate":"public_certificate","private_key":"private_key"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/as2_stations.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<as2-station>
           <name>name</name>
           <public_certificate>public_certificate</public_certificate>
           <private_key>private_key</private_key>
         </as2-station>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::As2Station.create(
      name: "name", 
      public_certificate: "public_certificate", 
      private_key: "private_key"
    )
    
    \Files\Model\As2Station::create(array(
      'name' => "name", 
      'public_certificate' => "public_certificate", 
      'private_key' => "private_key"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("name", name);
    requestParams.put("public_certificate", public_certificate);
    requestParams.put("private_key", private_key);
    As2Station.create(parameters)
    
    await As2Station.create({
      name: "name", 
      public_certificate: "public_certificate", 
      private_key: "private_key",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("name", "name");
    parameters.Add("public_certificate", "public_certificate");
    parameters.Add("private_key", "private_key");
    
    await As2Station.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.as2_station.create({
      "name": "name",
      "public_certificate": "public_certificate",
      "private_key": "private_key"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    as2station.Create(context.Background(), files_sdk.As2StationCreateParams{
      Name: "name",
      PublicCertificate: "public_certificate",
      PrivateKey: "private_key",
      PrivateKeyPassword: "",
    })
    
    
    files-cli as2-stations create \
      --name="name" \
      --public-certificate="public_certificate" \
      --private-key="private_key" \
      --private-key-password="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "AS2 Station Name",
      "uri": "example",
      "domain": "domain.test",
      "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
      "public_certificate_md5": "example",
      "private_key_md5": "example",
      "public_certificate_subject": "example",
      "public_certificate_issuer": "example",
      "public_certificate_serial": "example",
      "public_certificate_not_before": "example",
      "public_certificate_not_after": "example",
      "private_key_password_md5": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-station>
      <id type="integer">1</id>
      <name>AS2 Station Name</name>
      <uri>example</uri>
      <domain>domain.test</domain>
      <hex_public_certificate_serial>A5:EB:C1:95:DC:D8:2B:E7</hex_public_certificate_serial>
      <public_certificate_md5>example</public_certificate_md5>
      <private_key_md5>example</private_key_md5>
      <public_certificate_subject>example</public_certificate_subject>
      <public_certificate_issuer>example</public_certificate_issuer>
      <public_certificate_serial>example</public_certificate_serial>
      <public_certificate_not_before>example</public_certificate_not_before>
      <public_certificate_not_after>example</public_certificate_not_after>
      <private_key_password_md5>example</private_key_password_md5>
    </as2-station>
    
    

    HTTPS Request

    POST /as2_stations

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    name string Required AS2 Name
    public_certificate string Required
    private_key string Required
    private_key_password string

    Update As2 Station

    Example Request

    curl https://app.files.com/api/rest/v1/as2_stations/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"name":"AS2 Station Name"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/as2_stations/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<as2-station>
           <name>AS2 Station Name</name>
         </as2-station>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    as2_station = Files::As2Station.list.first
    as2_station.update(
      name: "AS2 Station Name"
    )
    
    $as2_station = \Files\Model\As2Station::list()[0];
    $as2_station->update(array(
      'name' => "AS2 Station Name"
    ));
    
    As2Station as2Station = As2Station.list()[0];
    as2Station.setName("AS2 Station Name");
    as2Station.update();
    
    const as2Station = (await As2Station.list())[0]
    await as2Station.update({ 
      name: "AS2 Station Name",
    })
    
    var as2Station = (await As2Station.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("name", "AS2 Station Name");
    
    await as2Station.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    as2_station = files_sdk.as2_station.find(id)
    as2_station.update({
      "name": "AS2 Station Name"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    as2station.Update(context.Background(), files_sdk.As2StationUpdateParams{
      Id: 1,
      Name: "AS2 Station Name",
      PublicCertificate: "",
      PrivateKey: "",
      PrivateKeyPassword: "",
    })
    
    files-cli as2-stations update \
      --id=1 \
      --name="AS2 Station Name" \
      --public-certificate="" \
      --private-key="" \
      --private-key-password="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "AS2 Station Name",
      "uri": "example",
      "domain": "domain.test",
      "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
      "public_certificate_md5": "example",
      "private_key_md5": "example",
      "public_certificate_subject": "example",
      "public_certificate_issuer": "example",
      "public_certificate_serial": "example",
      "public_certificate_not_before": "example",
      "public_certificate_not_after": "example",
      "private_key_password_md5": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <as2-station>
      <id type="integer">1</id>
      <name>AS2 Station Name</name>
      <uri>example</uri>
      <domain>domain.test</domain>
      <hex_public_certificate_serial>A5:EB:C1:95:DC:D8:2B:E7</hex_public_certificate_serial>
      <public_certificate_md5>example</public_certificate_md5>
      <private_key_md5>example</private_key_md5>
      <public_certificate_subject>example</public_certificate_subject>
      <public_certificate_issuer>example</public_certificate_issuer>
      <public_certificate_serial>example</public_certificate_serial>
      <public_certificate_not_before>example</public_certificate_not_before>
      <public_certificate_not_after>example</public_certificate_not_after>
      <private_key_password_md5>example</private_key_password_md5>
    </as2-station>
    
    

    HTTPS Request

    PATCH /as2_stations/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required As2 Station ID.
    name string AS2 Name
    public_certificate string
    private_key string
    private_key_password string

    Delete As2 Station

    Example Request

    curl https://app.files.com/api/rest/v1/as2_stations/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/as2_stations/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    as2_station = Files::As2Station.list.first
    as2_station.delete
    
    $as2_station = \Files\Model\As2Station::list()[0];
    $as2_station->delete();
    
    As2Station as2Station = As2Station.list()[0];
    
    as2Station.delete();
    
    const as2Station = (await As2Station.list())[0]
    await as2Station.delete()
    
    var as2Station = (await As2Station.List())[0];
    
    await as2Station.Delete();
    
    files_sdk.set_api_key("my-key")
    
    as2_station = files_sdk.as2_station.find(id)
    as2_station.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    as2station.Delete(context.Background(), files_sdk.As2StationDeleteParams{
      Id: 1,
    })
    
    files-cli as2-stations delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /as2_stations/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required As2 Station ID.

    Automations

    Automations allow you to automate workflows on your Files.com site.

    Automations are different from Behaviors because Behaviors are associated with a current folder, while Automations apply across your entire site.

    Automations are never removed when folders are removed, while Behaviors are removed when the associated folder is removed.

    Path Matching

    The path attribute specifies which folders this automation applies to. It gets combined with the source attribute to determine which files are actually affected by the automation. Note that the path attribute supports globs, and only refers to folders. It's the source attribute combined with the path attribute that determines which files are affected, and automations only operate on the files themselves. Additionally, paths in Automations can refer to folders which don't yet exist.

    Path Globs

    Although Automations may have a path specified, it can be a glob (which includes wildcards), which affects multiple folders.

    * matches any folder at that level of the path, but not subfolders. For example, path/to/* matches path/to/folder1 and path/to/folder2, but not path/to/folder1/subfolder.

    ** matches subfolders recursively. For example, path/to/** matches path/to/folder1, path/to/folder1/subfolder, path/to/folder2, path/to/folder2/subfolder, etc.

    ? matches any one character.

    Use square brackets [] to match any character from a set. This works like a regular expression, including negation using ^.

    Globs are not supported on remote paths of any kind.

    Automation Triggers

    Automations can be triggered in the following ways:

    Future enhancements will allow Automations to be triggered by an incoming email, or by other services.

    Currently, all Automation types support all triggers, with the following exceptions: Create Folder and Run Remote Server Sync are not supported by the action trigger.

    Automations can be triggered manually if trigger is not set to action.

    Destinations

    The destinations parameter is a list of paths where files will be copied, moved, or created. It may include formatting parameters to dynamically determine the destination at runtime.

    Relative vs. Absolute Paths

    In order to specify a relative path, it must start with either ./ or ../. All other paths are considered absolute. In general, leading slashes should never be used on Files.com paths, including here. Paths are interpreted as absolute in all contexts, even without a leading slash.

    Files vs. Folders

    If the destination path ends with a /, the filename from the source path will be preserved and put into the folder of this name. If the destination path does not end with a /, it will be interpreted as a filename and will override the source file's filename entirely.

    Formatting Parameters

    Action-Triggered Automations

    For example, if the triggering file is at path/to/file.txt, then the automation destination path/to/dest/incoming-%tf will result in the actual destination being path/to/dest/incoming-file.txt.

    Parent Folders

    To reference the parent folder of a source file, use %p1, %p2, %p3, etc. for the first, second, third, etc. parent folder, respectively.

    For example, if the source file is at accounts/file.txt, then the automation destination path/to/dest/%p1/some_file_name.txt will result in the actual destination being path/to/dest/accounts/some_file_name.txt.

    Dates and Times

    For example, if the current date is June 23, 2023 and the source file is named daily_sales.csv, then the following automation destination path/to/dest/%Y/%m/%d/ will result in the actual destination being path/to/dest/2023/06/23/daily_sales.csv.

    Replacing Text

    To replace text in the source filename, use the destination_replace_from and destination_replace_to parameters. This will perform a simple text replacement on the source filename before inserting it into the destination path.

    For example, if the destination_replace_from is incoming and the destination_replace_to is outgoing, then path/to/incoming.txt will translate to path/to/outgoing.txt.

    Automation Types

    There are several types of automations: Create Folder, Copy File, Move File, Delete File and, Run Remote Server Sync.

    Create Folder

    Creates the folder with named by destinations in the path named by path. Destination may include formatting parameters to insert the date/time into the destination name.

    Example Use case: Our business files sales tax for each division in 11 states every quarter. I want to create the folders where those sales tax forms and data will be collected.

    I could create a Create Folder automation as follows:

    Note this assumes you have folders in AccountingAndTax/SalesTax/State/ already created for each state, e.g. AccountingAndTax/SalesTax/State/CA/.

    Delete File

    Deletes the file with path matching source (wildcards allowed) in the path named by path.

    Copy File

    Copies files in the folder named by path to the path specified in destinations. The automation will only fire on files matching the source (wildcards allowed). In the case of an action-triggered automation, it will only operate on the actual file that triggered the automation. If the parameter limit exists, the automation will only copy the newest limit files in each matching folder.

    Move File

    Moves files in the folder named by path to the path specified in destinations. The automation will only fire on files matching the source (wildcards allowed). In the case of an action-triggered automation, it will only operate on the actual file that triggered the automation. If the parameter limit exists, the automation will only move the newest limit files in each matching folder. Note that for a move with multiple destinations, all but one destination is treated as a copy.

    Run Remote Server Sync

    The Run Remote Server Sync automation runs the remote server syncs specified by the sync_ids.

    Typically when this automation is used, the remote server syncs in question are set to the manual scheduling mode (manual to true via the API) to disable the built in sync scheduler.

    Help us build the future of Automations

    Do you have an idea for something that would work well as a Files.com Automation? Let us know! We are actively improving the types of automations offered on our platform.

    The Automation object

    Example Automation Object

    {
      "id": 1,
      "always_overwrite_size_matching_files": true,
      "automation": "create_folder",
      "deleted": true,
      "description": "example",
      "destination_replace_from": "example",
      "destination_replace_to": "example",
      "destinations": [
        "destination"
      ],
      "disabled": true,
      "group_ids": [
        1,
        2
      ],
      "interval": "week",
      "last_modified_at": "2000-01-01T01:00:00Z",
      "name": "example",
      "path": "example",
      "recurring_day": 25,
      "schedule": "example",
      "human_readable_schedule": "Triggered every Monday, Wednesday at 6:30 AM,\n  2:30 PM Eastern Time (US & Canada) TZ",
      "schedule_days_of_week": [
        0,
        2,
        4
      ],
      "schedule_times_of_day": [
        "06:30",
        "14:30"
      ],
      "schedule_time_zone": "Eastern Time (US & Canada)",
      "source": "example",
      "sync_ids": [
        1,
        2
      ],
      "trigger_actions": [
        "create"
      ],
      "trigger": "daily",
      "user_id": 1,
      "user_ids": [
        1,
        2
      ],
      "value": {
        "limit": "1"
      },
      "webhook_url": "https://app.files.com/api/webhooks/abc123"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <automation>
      <id type="integer">1</id>
      <always_overwrite_size_matching_files type="boolean">true</always_overwrite_size_matching_files>
      <automation>create_folder</automation>
      <deleted type="boolean">true</deleted>
      <description>example</description>
      <destination_replace_from>example</destination_replace_from>
      <destination_replace_to>example</destination_replace_to>
      <destinations type="array">
        <destination>destination</destination>
      </destinations>
      <disabled type="boolean">true</disabled>
      <group_ids type="array">
        <group_id type="integer">1</group_id>
        <group_id type="integer">2</group_id>
      </group_ids>
      <interval>week</interval>
      <last_modified_at>2000-01-01T01:00:00Z</last_modified_at>
      <name>example</name>
      <path>example</path>
      <recurring_day type="integer">25</recurring_day>
      <schedule>example</schedule>
      <human_readable_schedule>Triggered every Monday, Wednesday at 6:30 AM,
      2:30 PM Eastern Time (US &amp; Canada) TZ</human_readable_schedule>
      <schedule_days_of_week type="array">
        <schedule_days_of_week type="integer">0</schedule_days_of_week>
        <schedule_days_of_week type="integer">2</schedule_days_of_week>
        <schedule_days_of_week type="integer">4</schedule_days_of_week>
      </schedule_days_of_week>
      <schedule_times_of_day type="array">
        <schedule_times_of_day>06:30</schedule_times_of_day>
        <schedule_times_of_day>14:30</schedule_times_of_day>
      </schedule_times_of_day>
      <schedule_time_zone>Eastern Time (US &amp; Canada)</schedule_time_zone>
      <source>example</source>
      <sync_ids type="array">
        <sync_id type="integer">1</sync_id>
        <sync_id type="integer">2</sync_id>
      </sync_ids>
      <trigger_actions type="array">
        <trigger_action>create</trigger_action>
      </trigger_actions>
      <trigger>daily</trigger>
      <user_id type="integer">1</user_id>
      <user_ids type="array">
        <user_id type="integer">1</user_id>
        <user_id type="integer">2</user_id>
      </user_ids>
      <value>
        <limit>1</limit>
      </value>
      <webhook_url>https://app.files.com/api/webhooks/abc123</webhook_url>
    </automation>
    
    
    Attribute Description
    id int64 Automation ID
    always_overwrite_size_matching_files boolean Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is true we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
    automation string Automation type
    Possible values: create_folder, delete_file, copy_file, move_file, as2_send, run_sync
    deleted boolean Indicates if the automation has been deleted.
    description string Description for the this Automation.
    destination_replace_from string If set, this string in the destination path will be replaced with the value in destination_replace_to.
    destination_replace_to string If set, this string will replace the value destination_replace_from in the destination filename. You can use special patterns here.
    destinations array Destination Paths
    disabled boolean If true, this automation will not run.
    group_ids array IDs of Groups for the Automation (i.e. who to Request File from)
    interval string If trigger is daily, this specifies how often to run this automation. One of: day, week, week_end, month, month_end, quarter, quarter_end, year, year_end
    last_modified_at date-time Time when automation was last modified. Does not change for name or description updates.
    name string Name for this automation.
    path string Path on which this Automation runs. Supports globs, except on remote mounts. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    recurring_day int64 If trigger type is daily, this specifies a day number to run in one of the supported intervals: week, month, quarter, year.
    schedule object If trigger is custom_schedule, Custom schedule description for when the automation should be run in json format.
    human_readable_schedule string If trigger is custom_schedule, Human readable Custom schedule description for when the automation should be run.
    schedule_days_of_week array If trigger is custom_schedule, Custom schedule description for when the automation should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
    schedule_times_of_day array If trigger is custom_schedule, Custom schedule description for when the automation should be run. Times of day in HH:MM format.
    schedule_time_zone string If trigger is custom_schedule, Custom schedule Time Zone for when the automation should be run.
    source string Source Path
    sync_ids array IDs of remote sync folder behaviors to run by this Automation
    trigger_actions array If trigger is action, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
    trigger string How this automation is triggered to run.
    Possible values: daily, custom_schedule, webhook, email, action
    user_id int64 User ID of the Automation's creator.
    user_ids array IDs of Users for the Automation (i.e. who to Request File from)
    value object A Hash of attributes specific to the automation type.
    webhook_url string If trigger is webhook, this is the URL of the webhook to trigger the Automation.
    destination string DEPRECATED: Destination Path. Use destinations instead.

    List Automations

    Example Request

    curl "https://app.files.com/api/rest/v1/automations.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/automations.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Automation.list(
      per_page: 1, 
      with_deleted: true
    )
    
    \Files\Model\Automation::list(array(
      'per_page' => 1, 
      'with_deleted' => true
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("with_deleted", true);
    Automation.list(parameters).all()
    
    await Automation.list({
      per_page: 1, 
      with_deleted: true,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("with_deleted", true);
    
    await Automation.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.automation.list({
      "per_page": 1,
      "with_deleted": True
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    automation.List(context.Background(), files_sdk.AutomationListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterGt: "",
      FilterGteq: "",
      FilterLt: "",
      FilterLteq: "",
      WithDeleted: lib.Bool(true),
    })
    
    
    files-cli automations list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "always_overwrite_size_matching_files": true,
        "automation": "create_folder",
        "deleted": true,
        "description": "example",
        "destination_replace_from": "example",
        "destination_replace_to": "example",
        "destinations": [
          "destination"
        ],
        "disabled": true,
        "group_ids": [
          1,
          2
        ],
        "interval": "week",
        "last_modified_at": "2000-01-01T01:00:00Z",
        "name": "example",
        "path": "example",
        "recurring_day": 25,
        "schedule": "example",
        "human_readable_schedule": "Triggered every Monday, Wednesday at 6:30 AM,\n  2:30 PM Eastern Time (US & Canada) TZ",
        "schedule_days_of_week": [
          0,
          2,
          4
        ],
        "schedule_times_of_day": [
          "06:30",
          "14:30"
        ],
        "schedule_time_zone": "Eastern Time (US & Canada)",
        "source": "example",
        "sync_ids": [
          1,
          2
        ],
        "trigger_actions": [
          "create"
        ],
        "trigger": "daily",
        "user_id": 1,
        "user_ids": [
          1,
          2
        ],
        "value": {
          "limit": "1"
        },
        "webhook_url": "https://app.files.com/api/webhooks/abc123"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <automations type="array">
      <automation>
        <id type="integer">1</id>
        <always_overwrite_size_matching_files type="boolean">true</always_overwrite_size_matching_files>
        <automation>create_folder</automation>
        <deleted type="boolean">true</deleted>
        <description>example</description>
        <destination_replace_from>example</destination_replace_from>
        <destination_replace_to>example</destination_replace_to>
        <destinations type="array">
          <destination>destination</destination>
        </destinations>
        <disabled type="boolean">true</disabled>
        <group_ids type="array">
          <group_id type="integer">1</group_id>
          <group_id type="integer">2</group_id>
        </group_ids>
        <interval>week</interval>
        <last_modified_at>2000-01-01T01:00:00Z</last_modified_at>
        <name>example</name>
        <path>example</path>
        <recurring_day type="integer">25</recurring_day>
        <schedule>example</schedule>
        <human_readable_schedule>Triggered every Monday, Wednesday at 6:30 AM,
      2:30 PM Eastern Time (US &amp; Canada) TZ</human_readable_schedule>
        <schedule_days_of_week type="array">
          <schedule_days_of_week type="integer">0</schedule_days_of_week>
          <schedule_days_of_week type="integer">2</schedule_days_of_week>
          <schedule_days_of_week type="integer">4</schedule_days_of_week>
        </schedule_days_of_week>
        <schedule_times_of_day type="array">
          <schedule_times_of_day>06:30</schedule_times_of_day>
          <schedule_times_of_day>14:30</schedule_times_of_day>
        </schedule_times_of_day>
        <schedule_time_zone>Eastern Time (US &amp; Canada)</schedule_time_zone>
        <source>example</source>
        <sync_ids type="array">
          <sync_id type="integer">1</sync_id>
          <sync_id type="integer">2</sync_id>
        </sync_ids>
        <trigger_actions type="array">
          <trigger_action>create</trigger_action>
        </trigger_actions>
        <trigger>daily</trigger>
        <user_id type="integer">1</user_id>
        <user_ids type="array">
          <user_id type="integer">1</user_id>
          <user_id type="integer">2</user_id>
        </user_ids>
        <value>
          <limit>1</limit>
        </value>
        <webhook_url>https://app.files.com/api/webhooks/abc123</webhook_url>
      </automation>
    </automations>
    
    

    HTTPS Request

    GET /automations

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    with_deleted boolean Set to true to include deleted automations in the results.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[automation]=desc). Valid fields are automation, disabled, last_modified_at or name.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are disabled, last_modified_at or automation. Valid field combinations are [ automation, disabled ] and [ disabled, automation ].
    filter_gt object If set, return records where the specified field is greater than the supplied value. Valid fields are last_modified_at.
    filter_gteq object If set, return records where the specified field is greater than or equal the supplied value. Valid fields are last_modified_at.
    filter_lt object If set, return records where the specified field is less than the supplied value. Valid fields are last_modified_at.
    filter_lteq object If set, return records where the specified field is less than or equal the supplied value. Valid fields are last_modified_at.

    Show Automation

    Example Request

    curl https://app.files.com/api/rest/v1/automations/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/automations/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Automation.find(id)
    
    \Files\Model\Automation::find($id);
    
    
    Automation.find(, parameters
    
    await Automation.find(id)
    
    
    await Automation.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.automation.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    automation.Find(context.Background(), files_sdk.AutomationFindParams{
      Id: 1,
    })
    
    
    files-cli automations find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "always_overwrite_size_matching_files": true,
      "automation": "create_folder",
      "deleted": true,
      "description": "example",
      "destination_replace_from": "example",
      "destination_replace_to": "example",
      "destinations": [
        "destination"
      ],
      "disabled": true,
      "group_ids": [
        1,
        2
      ],
      "interval": "week",
      "last_modified_at": "2000-01-01T01:00:00Z",
      "name": "example",
      "path": "example",
      "recurring_day": 25,
      "schedule": "example",
      "human_readable_schedule": "Triggered every Monday, Wednesday at 6:30 AM,\n  2:30 PM Eastern Time (US & Canada) TZ",
      "schedule_days_of_week": [
        0,
        2,
        4
      ],
      "schedule_times_of_day": [
        "06:30",
        "14:30"
      ],
      "schedule_time_zone": "Eastern Time (US & Canada)",
      "source": "example",
      "sync_ids": [
        1,
        2
      ],
      "trigger_actions": [
        "create"
      ],
      "trigger": "daily",
      "user_id": 1,
      "user_ids": [
        1,
        2
      ],
      "value": {
        "limit": "1"
      },
      "webhook_url": "https://app.files.com/api/webhooks/abc123"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <automation>
      <id type="integer">1</id>
      <always_overwrite_size_matching_files type="boolean">true</always_overwrite_size_matching_files>
      <automation>create_folder</automation>
      <deleted type="boolean">true</deleted>
      <description>example</description>
      <destination_replace_from>example</destination_replace_from>
      <destination_replace_to>example</destination_replace_to>
      <destinations type="array">
        <destination>destination</destination>
      </destinations>
      <disabled type="boolean">true</disabled>
      <group_ids type="array">
        <group_id type="integer">1</group_id>
        <group_id type="integer">2</group_id>
      </group_ids>
      <interval>week</interval>
      <last_modified_at>2000-01-01T01:00:00Z</last_modified_at>
      <name>example</name>
      <path>example</path>
      <recurring_day type="integer">25</recurring_day>
      <schedule>example</schedule>
      <human_readable_schedule>Triggered every Monday, Wednesday at 6:30 AM,
      2:30 PM Eastern Time (US &amp; Canada) TZ</human_readable_schedule>
      <schedule_days_of_week type="array">
        <schedule_days_of_week type="integer">0</schedule_days_of_week>
        <schedule_days_of_week type="integer">2</schedule_days_of_week>
        <schedule_days_of_week type="integer">4</schedule_days_of_week>
      </schedule_days_of_week>
      <schedule_times_of_day type="array">
        <schedule_times_of_day>06:30</schedule_times_of_day>
        <schedule_times_of_day>14:30</schedule_times_of_day>
      </schedule_times_of_day>
      <schedule_time_zone>Eastern Time (US &amp; Canada)</schedule_time_zone>
      <source>example</source>
      <sync_ids type="array">
        <sync_id type="integer">1</sync_id>
        <sync_id type="integer">2</sync_id>
      </sync_ids>
      <trigger_actions type="array">
        <trigger_action>create</trigger_action>
      </trigger_actions>
      <trigger>daily</trigger>
      <user_id type="integer">1</user_id>
      <user_ids type="array">
        <user_id type="integer">1</user_id>
        <user_id type="integer">2</user_id>
      </user_ids>
      <value>
        <limit>1</limit>
      </value>
      <webhook_url>https://app.files.com/api/webhooks/abc123</webhook_url>
    </automation>
    
    

    HTTPS Request

    GET /automations/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Automation ID.

    Create Automation

    Example Request

    curl https://app.files.com/api/rest/v1/automations.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"source":"source","destinations":["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}],"destination_replace_from":"example","destination_replace_to":"example","interval":"year","path":"example","sync_ids":[1,2],"user_ids":[1,2],"group_ids":[1,2],"schedule_days_of_week":[0,1,3],"schedule_times_of_day":["7:30","11:30"],"schedule_time_zone":"Eastern Time (US & Canada)","always_overwrite_size_matching_files":true,"description":"example","disabled":true,"name":"example","trigger":"daily","trigger_actions":["create"],"value":{"limit":"1"},"recurring_day":25,"automation":"create_folder"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/automations.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<automation>
           <source>source</source>
           <destinations type="array">
             <destination>folder_a/file_a.txt</destination>
             <destination>
               <folder_path>folder_b</folder_path>
               <file_path>file_b.txt</file_path>
             </destination>
             <destination>
               <folder_path>folder_c</folder_path>
             </destination>
           </destinations>
           <destination_replace_from>example</destination_replace_from>
           <destination_replace_to>example</destination_replace_to>
           <interval>year</interval>
           <path>example</path>
           <sync_ids type="array">
             <sync_id type="integer">1</sync_id>
             <sync_id type="integer">2</sync_id>
           </sync_ids>
           <user_ids type="array">
             <user_id type="integer">1</user_id>
             <user_id type="integer">2</user_id>
           </user_ids>
           <group_ids type="array">
             <group_id type="integer">1</group_id>
             <group_id type="integer">2</group_id>
           </group_ids>
           <schedule_days_of_week type="array">
             <schedule_days_of_week type="integer">0</schedule_days_of_week>
             <schedule_days_of_week type="integer">1</schedule_days_of_week>
             <schedule_days_of_week type="integer">3</schedule_days_of_week>
           </schedule_days_of_week>
           <schedule_times_of_day type="array">
             <schedule_times_of_day>7:30</schedule_times_of_day>
             <schedule_times_of_day>11:30</schedule_times_of_day>
           </schedule_times_of_day>
           <schedule_time_zone>Eastern Time (US &amp; Canada)</schedule_time_zone>
           <always_overwrite_size_matching_files type="boolean">true</always_overwrite_size_matching_files>
           <description>example</description>
           <disabled type="boolean">true</disabled>
           <name>example</name>
           <trigger>daily</trigger>
           <trigger_actions type="array">
             <trigger_action>create</trigger_action>
           </trigger_actions>
           <value>
             <limit>1</limit>
           </value>
           <recurring_day type="integer">25</recurring_day>
           <automation>create_folder</automation>
         </automation>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Automation.create(
      source: "source", 
      destinations: ["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}], 
      destination_replace_from: "example", 
      destination_replace_to: "example", 
      interval: "year", 
      path: "example", 
      sync_ids: [1,2], 
      user_ids: [1,2], 
      group_ids: [1,2], 
      schedule_days_of_week: [0,1,3], 
      schedule_times_of_day: ["7:30","11:30"], 
      schedule_time_zone: "Eastern Time (US & Canada)", 
      always_overwrite_size_matching_files: true, 
      description: "example", 
      disabled: true, 
      name: "example", 
      trigger: "daily", 
      trigger_actions: ["create"], 
      value: {"limit":"1"}, 
      recurring_day: 25, 
      automation: "create_folder"
    )
    
    \Files\Model\Automation::create(array(
      'source' => "source", 
      'destinations' => ["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}], 
      'destination_replace_from' => "example", 
      'destination_replace_to' => "example", 
      'interval' => "year", 
      'path' => "example", 
      'sync_ids' => [1,2], 
      'user_ids' => [1,2], 
      'group_ids' => [1,2], 
      'schedule_days_of_week' => [0,1,3], 
      'schedule_times_of_day' => ["7:30","11:30"], 
      'schedule_time_zone' => "Eastern Time (US & Canada)", 
      'always_overwrite_size_matching_files' => true, 
      'description' => "example", 
      'disabled' => true, 
      'name' => "example", 
      'trigger' => "daily", 
      'trigger_actions' => ["create"], 
      'value' => {"limit":"1"}, 
      'recurring_day' => 25, 
      'automation' => "create_folder"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("source", source);
    requestParams.put("destinations", ["folder_a/file_a.txt", {"folder_path"=>"folder_b", "file_path"=>"file_b.txt"}, {"folder_path"=>"folder_c"}]);
    requestParams.put("destination_replace_from", example);
    requestParams.put("destination_replace_to", example);
    requestParams.put("interval", year);
    requestParams.put("path", example);
    requestParams.put("sync_ids", [1, 2]);
    requestParams.put("user_ids", [1, 2]);
    requestParams.put("group_ids", [1, 2]);
    requestParams.put("schedule_days_of_week", [0, 1, 3]);
    requestParams.put("schedule_times_of_day", ["7:30", "11:30"]);
    requestParams.put("schedule_time_zone", Eastern Time (US & Canada));
    requestParams.put("always_overwrite_size_matching_files", true);
    requestParams.put("description", example);
    requestParams.put("disabled", true);
    requestParams.put("name", example);
    requestParams.put("trigger", daily);
    requestParams.put("trigger_actions", ["create"]);
    requestParams.put("value", {"limit"=>"1"});
    requestParams.put("recurring_day", 25);
    requestParams.put("automation", create_folder);
    Automation.create(parameters)
    
    await Automation.create({
      source: "source", 
      destinations: ["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}], 
      destination_replace_from: "example", 
      destination_replace_to: "example", 
      interval: "year", 
      path: "example", 
      sync_ids: [1,2], 
      user_ids: [1,2], 
      group_ids: [1,2], 
      schedule_days_of_week: [0,1,3], 
      schedule_times_of_day: ["7:30","11:30"], 
      schedule_time_zone: "Eastern Time (US & Canada)", 
      always_overwrite_size_matching_files: true, 
      description: "example", 
      disabled: true, 
      name: "example", 
      trigger: "daily", 
      trigger_actions: ["create"], 
      value: {"limit":"1"}, 
      recurring_day: 25, 
      automation: "create_folder",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("source", "source");
    parameters.Add("destinations", (string[]) ["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}]);
    parameters.Add("destination_replace_from", "example");
    parameters.Add("destination_replace_to", "example");
    parameters.Add("interval", "year");
    parameters.Add("path", "example");
    parameters.Add("sync_ids", [1,2]);
    parameters.Add("user_ids", [1,2]);
    parameters.Add("group_ids", [1,2]);
    parameters.Add("schedule_days_of_week", (Nullable<Int64>[]) [0,1,3]);
    parameters.Add("schedule_times_of_day", (string[]) ["7:30","11:30"]);
    parameters.Add("schedule_time_zone", "Eastern Time (US & Canada)");
    parameters.Add("always_overwrite_size_matching_files", true);
    parameters.Add("description", "example");
    parameters.Add("disabled", true);
    parameters.Add("name", "example");
    parameters.Add("trigger", "daily");
    parameters.Add("trigger_actions", (string[]) ["create"]);
    parameters.Add("value", (object) {"limit":"1"});
    parameters.Add("recurring_day", (Int64?) 25);
    parameters.Add("automation", "create_folder");
    
    await Automation.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.automation.create({
      "source": "source",
      "destinations": ["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}],
      "destination_replace_from": "example",
      "destination_replace_to": "example",
      "interval": "year",
      "path": "example",
      "sync_ids": [1,2],
      "user_ids": [1,2],
      "group_ids": [1,2],
      "schedule_days_of_week": [0,1,3],
      "schedule_times_of_day": ["7:30","11:30"],
      "schedule_time_zone": "Eastern Time (US & Canada)",
      "always_overwrite_size_matching_files": True,
      "description": "example",
      "disabled": True,
      "name": "example",
      "trigger": "daily",
      "trigger_actions": ["create"],
      "value": {"limit":"1"},
      "recurring_day": 25,
      "automation": "create_folder"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    automation.Create(context.Background(), files_sdk.AutomationCreateParams{
      Source: "source",
      Destination: "",
      Destinations: []string{"folder_a/file_a.txt", "{\"folder_path\"=>\"folder_b\", \"file_path\"=>\"file_b.txt\"}", "{\"folder_path\"=>\"folder_c\"}"},
      DestinationReplaceFrom: "example",
      DestinationReplaceTo: "example",
      Interval: "year",
      Path: "example",
      SyncIds: []string{"1", "2"},
      UserIds: []string{"1", "2"},
      GroupIds: []string{"1", "2"},
      ScheduleDaysOfWeek: []int64{[0,1,3]},
      ScheduleTimesOfDay: []string{"7:30", "11:30"},
      ScheduleTimeZone: "Eastern Time (US & Canada)",
      AlwaysOverwriteSizeMatchingFiles: lib.Bool(true),
      Description: "example",
      Disabled: lib.Bool(true),
      Name: "example",
      Trigger: "daily",
      TriggerActions: []string{"create"},
      Value: `{"limit":"1"}`,
      RecurringDay: 25,
      Automation: "create_folder",
    })
    
    
    files-cli automations create \
      --source="source" \
      --destination="" \
      --destinations="["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}]" \
      --destination-replace-from="example" \
      --destination-replace-to="example" \
      --interval="year" \
      --path="example" \
      --sync-ids="[1,2]" \
      --user-ids="[1,2]" \
      --group-ids="[1,2]" \
      --schedule-days-of-week="[0,1,3]" \
      --schedule-times-of-day="["7:30","11:30"]" \
      --schedule-time-zone="Eastern Time (US & Canada)" \
      --description="example" \
      --name="example" \
      --trigger="daily" \
      --trigger-actions="["create"]" \
      --recurring-day=25 \
      --automation="create_folder" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "always_overwrite_size_matching_files": true,
      "automation": "create_folder",
      "deleted": true,
      "description": "example",
      "destination_replace_from": "example",
      "destination_replace_to": "example",
      "destinations": [
        "destination"
      ],
      "disabled": true,
      "group_ids": [
        1,
        2
      ],
      "interval": "week",
      "last_modified_at": "2000-01-01T01:00:00Z",
      "name": "example",
      "path": "example",
      "recurring_day": 25,
      "schedule": "example",
      "human_readable_schedule": "Triggered every Monday, Wednesday at 6:30 AM,\n  2:30 PM Eastern Time (US & Canada) TZ",
      "schedule_days_of_week": [
        0,
        2,
        4
      ],
      "schedule_times_of_day": [
        "06:30",
        "14:30"
      ],
      "schedule_time_zone": "Eastern Time (US & Canada)",
      "source": "example",
      "sync_ids": [
        1,
        2
      ],
      "trigger_actions": [
        "create"
      ],
      "trigger": "daily",
      "user_id": 1,
      "user_ids": [
        1,
        2
      ],
      "value": {
        "limit": "1"
      },
      "webhook_url": "https://app.files.com/api/webhooks/abc123"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <automation>
      <id type="integer">1</id>
      <always_overwrite_size_matching_files type="boolean">true</always_overwrite_size_matching_files>
      <automation>create_folder</automation>
      <deleted type="boolean">true</deleted>
      <description>example</description>
      <destination_replace_from>example</destination_replace_from>
      <destination_replace_to>example</destination_replace_to>
      <destinations type="array">
        <destination>destination</destination>
      </destinations>
      <disabled type="boolean">true</disabled>
      <group_ids type="array">
        <group_id type="integer">1</group_id>
        <group_id type="integer">2</group_id>
      </group_ids>
      <interval>week</interval>
      <last_modified_at>2000-01-01T01:00:00Z</last_modified_at>
      <name>example</name>
      <path>example</path>
      <recurring_day type="integer">25</recurring_day>
      <schedule>example</schedule>
      <human_readable_schedule>Triggered every Monday, Wednesday at 6:30 AM,
      2:30 PM Eastern Time (US &amp; Canada) TZ</human_readable_schedule>
      <schedule_days_of_week type="array">
        <schedule_days_of_week type="integer">0</schedule_days_of_week>
        <schedule_days_of_week type="integer">2</schedule_days_of_week>
        <schedule_days_of_week type="integer">4</schedule_days_of_week>
      </schedule_days_of_week>
      <schedule_times_of_day type="array">
        <schedule_times_of_day>06:30</schedule_times_of_day>
        <schedule_times_of_day>14:30</schedule_times_of_day>
      </schedule_times_of_day>
      <schedule_time_zone>Eastern Time (US &amp; Canada)</schedule_time_zone>
      <source>example</source>
      <sync_ids type="array">
        <sync_id type="integer">1</sync_id>
        <sync_id type="integer">2</sync_id>
      </sync_ids>
      <trigger_actions type="array">
        <trigger_action>create</trigger_action>
      </trigger_actions>
      <trigger>daily</trigger>
      <user_id type="integer">1</user_id>
      <user_ids type="array">
        <user_id type="integer">1</user_id>
        <user_id type="integer">2</user_id>
      </user_ids>
      <value>
        <limit>1</limit>
      </value>
      <webhook_url>https://app.files.com/api/webhooks/abc123</webhook_url>
    </automation>
    
    

    HTTPS Request

    POST /automations

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    source string Source Path
    destination string DEPRECATED: Destination Path. Use destinations instead.
    destinations array(string) A list of String destination paths or Hash of folder_path and optional file_path.
    destination_replace_from string If set, this string in the destination path will be replaced with the value in destination_replace_to.
    destination_replace_to string If set, this string will replace the value destination_replace_from in the destination filename. You can use special patterns here.
    interval string How often to run this automation? One of: day, week, week_end, month, month_end, quarter, quarter_end, year, year_end
    path string Path on which this Automation runs. Supports globs.
    sync_ids string A list of sync IDs the automation is associated with. If sent as a string, it should be comma-delimited.
    user_ids string A list of user IDs the automation is associated with. If sent as a string, it should be comma-delimited.
    group_ids string A list of group IDs the automation is associated with. If sent as a string, it should be comma-delimited.
    schedule_days_of_week array(int64) If trigger is custom_schedule. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
    schedule_times_of_day array(string) If trigger is custom_schedule. A list of times of day to run this automation. 24-hour time format.
    schedule_time_zone string If trigger is custom_schedule. Time zone for the schedule.
    always_overwrite_size_matching_files boolean Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is true we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
    description string Description for the this Automation.
    disabled boolean If true, this automation will not run.
    name string Name for this automation.
    trigger string How this automation is triggered to run.
    Possible values: daily, custom_schedule, webhook, email, action
    trigger_actions array(string) If trigger is action, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
    value object A Hash of attributes specific to the automation type.
    recurring_day int64 If trigger type is daily, this specifies a day number to run in one of the supported intervals: week, month, quarter, year.
    automation string Required Automation type
    Possible values: create_folder, delete_file, copy_file, move_file, as2_send, run_sync

    Manually run automation

    Example Request

    curl https://app.files.com/api/rest/v1/automations/{id}/manual_run.json \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/automations/{id}/manual_run.xml \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    automation = Files::Automation.list.first
    automation.manual_run
    
    $automation = \Files\Model\Automation::list()[0];
    $automation->manualRun();
    
    Automation automation = Automation.list()[0];
    
    automation.manualRun();
    
    const automation = (await Automation.list())[0]
    await automation.manualRun()
    
    var automation = (await Automation.List())[0];
    
    await automation.ManualRun();
    
    files_sdk.set_api_key("my-key")
    
    automation = files_sdk.automation.find(id)
    automation.manual_run()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    automation.ManualRun(context.Background(), files_sdk.AutomationManualRunParams{
      Id: 1,
    })
    
    files-cli automations manual-run \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    POST /automations/{id}/manual_run

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Automation ID.

    Update Automation

    Example Request

    curl https://app.files.com/api/rest/v1/automations/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"source":"source","destinations":["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}],"destination_replace_from":"example","destination_replace_to":"example","interval":"year","path":"example","sync_ids":[1,2],"user_ids":[1,2],"group_ids":[1,2],"schedule_days_of_week":[0,1,3],"schedule_times_of_day":["7:30","11:30"],"schedule_time_zone":"Eastern Time (US & Canada)","always_overwrite_size_matching_files":true,"description":"example","disabled":true,"name":"example","trigger":"daily","trigger_actions":["create"],"value":{"limit":"1"},"recurring_day":25,"automation":"create_folder"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/automations/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<automation>
           <source>source</source>
           <destinations type="array">
             <destination>folder_a/file_a.txt</destination>
             <destination>
               <folder_path>folder_b</folder_path>
               <file_path>file_b.txt</file_path>
             </destination>
             <destination>
               <folder_path>folder_c</folder_path>
             </destination>
           </destinations>
           <destination_replace_from>example</destination_replace_from>
           <destination_replace_to>example</destination_replace_to>
           <interval>year</interval>
           <path>example</path>
           <sync_ids type="array">
             <sync_id type="integer">1</sync_id>
             <sync_id type="integer">2</sync_id>
           </sync_ids>
           <user_ids type="array">
             <user_id type="integer">1</user_id>
             <user_id type="integer">2</user_id>
           </user_ids>
           <group_ids type="array">
             <group_id type="integer">1</group_id>
             <group_id type="integer">2</group_id>
           </group_ids>
           <schedule_days_of_week type="array">
             <schedule_days_of_week type="integer">0</schedule_days_of_week>
             <schedule_days_of_week type="integer">1</schedule_days_of_week>
             <schedule_days_of_week type="integer">3</schedule_days_of_week>
           </schedule_days_of_week>
           <schedule_times_of_day type="array">
             <schedule_times_of_day>7:30</schedule_times_of_day>
             <schedule_times_of_day>11:30</schedule_times_of_day>
           </schedule_times_of_day>
           <schedule_time_zone>Eastern Time (US &amp; Canada)</schedule_time_zone>
           <always_overwrite_size_matching_files type="boolean">true</always_overwrite_size_matching_files>
           <description>example</description>
           <disabled type="boolean">true</disabled>
           <name>example</name>
           <trigger>daily</trigger>
           <trigger_actions type="array">
             <trigger_action>create</trigger_action>
           </trigger_actions>
           <value>
             <limit>1</limit>
           </value>
           <recurring_day type="integer">25</recurring_day>
           <automation>create_folder</automation>
         </automation>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    automation = Files::Automation.list.first
    automation.update(
      source: "source",
      destinations: ["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}],
      destination_replace_from: "example",
      destination_replace_to: "example",
      interval: "year",
      path: "example",
      sync_ids: [1,2],
      user_ids: [1,2],
      group_ids: [1,2],
      schedule_days_of_week: [0,1,3],
      schedule_times_of_day: ["7:30","11:30"],
      schedule_time_zone: "Eastern Time (US & Canada)",
      always_overwrite_size_matching_files: true,
      description: "example",
      disabled: true,
      name: "example",
      trigger: "daily",
      trigger_actions: ["create"],
      value: {"limit":"1"},
      recurring_day: 25,
      automation: "create_folder"
    )
    
    $automation = \Files\Model\Automation::list()[0];
    $automation->update(array(
      'source' => "source", 
      'destinations' => ["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}], 
      'destination_replace_from' => "example", 
      'destination_replace_to' => "example", 
      'interval' => "year", 
      'path' => "example", 
      'sync_ids' => [1,2], 
      'user_ids' => [1,2], 
      'group_ids' => [1,2], 
      'schedule_days_of_week' => [0,1,3], 
      'schedule_times_of_day' => ["7:30","11:30"], 
      'schedule_time_zone' => "Eastern Time (US & Canada)", 
      'always_overwrite_size_matching_files' => true, 
      'description' => "example", 
      'disabled' => true, 
      'name' => "example", 
      'trigger' => "daily", 
      'trigger_actions' => ["create"], 
      'value' => {"limit":"1"}, 
      'recurring_day' => 25, 
      'automation' => "create_folder"
    ));
    
    Automation automation = Automation.list()[0];
    automation.setSource("source");
    automation.setDestinations(["folder_a/file_a.txt", {"folder_path"=>"folder_b", "file_path"=>"file_b.txt"}, {"folder_path"=>"folder_c"}]);
    automation.setDestinationReplaceFrom("example");
    automation.setDestinationReplaceTo("example");
    automation.setInterval("year");
    automation.setPath("example");
    automation.setSyncIds("[1, 2]");
    automation.setUserIds("[1, 2]");
    automation.setGroupIds("[1, 2]");
    automation.setScheduleDaysOfWeek([0, 1, 3]);
    automation.setScheduleTimesOfDay(["7:30", "11:30"]);
    automation.setScheduleTimeZone("Eastern Time (US & Canada)");
    automation.setAlwaysOverwriteSizeMatchingFiles(true);
    automation.setDescription("example");
    automation.setDisabled(true);
    automation.setName("example");
    automation.setTrigger("daily");
    automation.setTriggerActions(["create"]);
    automation.setValue({"limit"=>"1"});
    automation.setRecurringDay(25);
    automation.setAutomation("create_folder");
    automation.update();
    
    const automation = (await Automation.list())[0]
    await automation.update({ 
      source: "source", 
      destinations: ["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}], 
      destination_replace_from: "example", 
      destination_replace_to: "example", 
      interval: "year", 
      path: "example", 
      sync_ids: [1,2], 
      user_ids: [1,2], 
      group_ids: [1,2], 
      schedule_days_of_week: [0,1,3], 
      schedule_times_of_day: ["7:30","11:30"], 
      schedule_time_zone: "Eastern Time (US & Canada)", 
      always_overwrite_size_matching_files: true, 
      description: "example", 
      disabled: true, 
      name: "example", 
      trigger: "daily", 
      trigger_actions: ["create"], 
      value: {"limit":"1"}, 
      recurring_day: 25, 
      automation: "create_folder",
    })
    
    var automation = (await Automation.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("source", "source");
    parameters.Add("destinations", (string[]), shorthand: true) ["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}]);
    parameters.Add("destination_replace_from", "example");
    parameters.Add("destination_replace_to", "example");
    parameters.Add("interval", "year");
    parameters.Add("path", "example");
    parameters.Add("sync_ids", [1,2]);
    parameters.Add("user_ids", [1,2]);
    parameters.Add("group_ids", [1,2]);
    parameters.Add("schedule_days_of_week", (Nullable<Int64>[]), shorthand: true) [0,1,3]);
    parameters.Add("schedule_times_of_day", (string[]), shorthand: true) ["7:30","11:30"]);
    parameters.Add("schedule_time_zone", "Eastern Time (US & Canada)");
    parameters.Add("always_overwrite_size_matching_files", true);
    parameters.Add("description", "example");
    parameters.Add("disabled", true);
    parameters.Add("name", "example");
    parameters.Add("trigger", "daily");
    parameters.Add("trigger_actions", (string[]), shorthand: true) ["create"]);
    parameters.Add("value", (object), shorthand: true) {"limit":"1"});
    parameters.Add("recurring_day", (Nullable<Int64>), shorthand: true) 25);
    parameters.Add("automation", "create_folder");
    
    await automation.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    automation = files_sdk.automation.find(id)
    automation.update({
      "source": "source",
      "destinations": ["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}],
      "destination_replace_from": "example",
      "destination_replace_to": "example",
      "interval": "year",
      "path": "example",
      "sync_ids": [1,2],
      "user_ids": [1,2],
      "group_ids": [1,2],
      "schedule_days_of_week": [0,1,3],
      "schedule_times_of_day": ["7:30","11:30"],
      "schedule_time_zone": "Eastern Time (US & Canada)",
      "always_overwrite_size_matching_files": True,
      "description": "example",
      "disabled": True,
      "name": "example",
      "trigger": "daily",
      "trigger_actions": ["create"],
      "value": {"limit":"1"},
      "recurring_day": 25,
      "automation": "create_folder"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    automation.Update(context.Background(), files_sdk.AutomationUpdateParams{
      Id: 1,
      Source: "source",
      Destination: "",
      Destinations: []string{"folder_a/file_a.txt", "{\"folder_path\"=>\"folder_b\", \"file_path\"=>\"file_b.txt\"}", "{\"folder_path\"=>\"folder_c\"}"},
      DestinationReplaceFrom: "example",
      DestinationReplaceTo: "example",
      Interval: "year",
      Path: "example",
      SyncIds: []string{"1", "2"},
      UserIds: []string{"1", "2"},
      GroupIds: []string{"1", "2"},
      ScheduleDaysOfWeek: []int64{[0,1,3]},
      ScheduleTimesOfDay: []string{"7:30", "11:30"},
      ScheduleTimeZone: "Eastern Time (US & Canada)",
      AlwaysOverwriteSizeMatchingFiles: lib.Bool(true),
      Description: "example",
      Disabled: lib.Bool(true),
      Name: "example",
      Trigger: "daily",
      TriggerActions: []string{"create"},
      Value: `{"limit":"1"}`,
      RecurringDay: 25,
      Automation: "create_folder",
    })
    
    files-cli automations update \
      --id=1 \
      --source="source" \
      --destination="" \
      --destinations="["folder_a/file_a.txt",{"folder_path":"folder_b","file_path":"file_b.txt"},{"folder_path":"folder_c"}]" \
      --destination-replace-from="example" \
      --destination-replace-to="example" \
      --interval="year" \
      --path="example" \
      --sync-ids="[1,2]" \
      --user-ids="[1,2]" \
      --group-ids="[1,2]" \
      --schedule-days-of-week="[0,1,3]" \
      --schedule-times-of-day="["7:30","11:30"]" \
      --schedule-time-zone="Eastern Time (US & Canada)" \
      --description="example" \
      --name="example" \
      --trigger="daily" \
      --trigger-actions="["create"]" \
      --recurring-day=25 \
      --automation="create_folder" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "always_overwrite_size_matching_files": true,
      "automation": "create_folder",
      "deleted": true,
      "description": "example",
      "destination_replace_from": "example",
      "destination_replace_to": "example",
      "destinations": [
        "destination"
      ],
      "disabled": true,
      "group_ids": [
        1,
        2
      ],
      "interval": "week",
      "last_modified_at": "2000-01-01T01:00:00Z",
      "name": "example",
      "path": "example",
      "recurring_day": 25,
      "schedule": "example",
      "human_readable_schedule": "Triggered every Monday, Wednesday at 6:30 AM,\n  2:30 PM Eastern Time (US & Canada) TZ",
      "schedule_days_of_week": [
        0,
        2,
        4
      ],
      "schedule_times_of_day": [
        "06:30",
        "14:30"
      ],
      "schedule_time_zone": "Eastern Time (US & Canada)",
      "source": "example",
      "sync_ids": [
        1,
        2
      ],
      "trigger_actions": [
        "create"
      ],
      "trigger": "daily",
      "user_id": 1,
      "user_ids": [
        1,
        2
      ],
      "value": {
        "limit": "1"
      },
      "webhook_url": "https://app.files.com/api/webhooks/abc123"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <automation>
      <id type="integer">1</id>
      <always_overwrite_size_matching_files type="boolean">true</always_overwrite_size_matching_files>
      <automation>create_folder</automation>
      <deleted type="boolean">true</deleted>
      <description>example</description>
      <destination_replace_from>example</destination_replace_from>
      <destination_replace_to>example</destination_replace_to>
      <destinations type="array">
        <destination>destination</destination>
      </destinations>
      <disabled type="boolean">true</disabled>
      <group_ids type="array">
        <group_id type="integer">1</group_id>
        <group_id type="integer">2</group_id>
      </group_ids>
      <interval>week</interval>
      <last_modified_at>2000-01-01T01:00:00Z</last_modified_at>
      <name>example</name>
      <path>example</path>
      <recurring_day type="integer">25</recurring_day>
      <schedule>example</schedule>
      <human_readable_schedule>Triggered every Monday, Wednesday at 6:30 AM,
      2:30 PM Eastern Time (US &amp; Canada) TZ</human_readable_schedule>
      <schedule_days_of_week type="array">
        <schedule_days_of_week type="integer">0</schedule_days_of_week>
        <schedule_days_of_week type="integer">2</schedule_days_of_week>
        <schedule_days_of_week type="integer">4</schedule_days_of_week>
      </schedule_days_of_week>
      <schedule_times_of_day type="array">
        <schedule_times_of_day>06:30</schedule_times_of_day>
        <schedule_times_of_day>14:30</schedule_times_of_day>
      </schedule_times_of_day>
      <schedule_time_zone>Eastern Time (US &amp; Canada)</schedule_time_zone>
      <source>example</source>
      <sync_ids type="array">
        <sync_id type="integer">1</sync_id>
        <sync_id type="integer">2</sync_id>
      </sync_ids>
      <trigger_actions type="array">
        <trigger_action>create</trigger_action>
      </trigger_actions>
      <trigger>daily</trigger>
      <user_id type="integer">1</user_id>
      <user_ids type="array">
        <user_id type="integer">1</user_id>
        <user_id type="integer">2</user_id>
      </user_ids>
      <value>
        <limit>1</limit>
      </value>
      <webhook_url>https://app.files.com/api/webhooks/abc123</webhook_url>
    </automation>
    
    

    HTTPS Request

    PATCH /automations/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Automation ID.
    source string Source Path
    destination string DEPRECATED: Destination Path. Use destinations instead.
    destinations array(string) A list of String destination paths or Hash of folder_path and optional file_path.
    destination_replace_from string If set, this string in the destination path will be replaced with the value in destination_replace_to.
    destination_replace_to string If set, this string will replace the value destination_replace_from in the destination filename. You can use special patterns here.
    interval string How often to run this automation? One of: day, week, week_end, month, month_end, quarter, quarter_end, year, year_end
    path string Path on which this Automation runs. Supports globs.
    sync_ids string A list of sync IDs the automation is associated with. If sent as a string, it should be comma-delimited.
    user_ids string A list of user IDs the automation is associated with. If sent as a string, it should be comma-delimited.
    group_ids string A list of group IDs the automation is associated with. If sent as a string, it should be comma-delimited.
    schedule_days_of_week array(int64) If trigger is custom_schedule. A list of days of the week to run this automation. 0 is Sunday, 1 is Monday, etc.
    schedule_times_of_day array(string) If trigger is custom_schedule. A list of times of day to run this automation. 24-hour time format.
    schedule_time_zone string If trigger is custom_schedule. Time zone for the schedule.
    always_overwrite_size_matching_files boolean Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is true we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
    description string Description for the this Automation.
    disabled boolean If true, this automation will not run.
    name string Name for this automation.
    trigger string How this automation is triggered to run.
    Possible values: daily, custom_schedule, webhook, email, action
    trigger_actions array(string) If trigger is action, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
    value object A Hash of attributes specific to the automation type.
    recurring_day int64 If trigger type is daily, this specifies a day number to run in one of the supported intervals: week, month, quarter, year.
    automation string Automation type
    Possible values: create_folder, delete_file, copy_file, move_file, as2_send, run_sync

    Delete Automation

    Example Request

    curl https://app.files.com/api/rest/v1/automations/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/automations/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    automation = Files::Automation.list.first
    automation.delete
    
    $automation = \Files\Model\Automation::list()[0];
    $automation->delete();
    
    Automation automation = Automation.list()[0];
    
    automation.delete();
    
    const automation = (await Automation.list())[0]
    await automation.delete()
    
    var automation = (await Automation.List())[0];
    
    await automation.Delete();
    
    files_sdk.set_api_key("my-key")
    
    automation = files_sdk.automation.find(id)
    automation.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    automation.Delete(context.Background(), files_sdk.AutomationDeleteParams{
      Id: 1,
    })
    
    files-cli automations delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /automations/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Automation ID.

    Automation Runs

    AutomationRuns represent a single execution of a given Automation.

    The AutomationRun object

    Example AutomationRun Object

    {
      "id": 1,
      "automation_id": 1,
      "completed_at": "2000-01-01T01:00:00Z",
      "created_at": "2000-01-01T01:00:00Z",
      "runtime": "2000-01-01T01:00:00Z",
      "status": "success",
      "run_stage": "planning",
      "successful_operations": 1,
      "failed_operations": 1,
      "status_messages_url": "https://www.example.com/log_file.txt"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <automation-run>
      <id type="integer">1</id>
      <automation_id type="integer">1</automation_id>
      <completed_at>2000-01-01T01:00:00Z</completed_at>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <runtime>2000-01-01T01:00:00Z</runtime>
      <status>success</status>
      <run_stage>planning</run_stage>
      <successful_operations type="integer">1</successful_operations>
      <failed_operations type="integer">1</failed_operations>
      <status_messages_url>https://www.example.com/log_file.txt</status_messages_url>
    </automation-run>
    
    
    Attribute Description
    id int64 ID.
    automation_id int64 ID of the associated Automation.
    completed_at date-time Automation run completion/failure date/time.
    created_at date-time Automation run start date/time.
    runtime date-time Automation run runtime.
    status string The success status of the AutomationRun. One of running, success, partial_failure, or failure.
    Possible values: running, success, partial_failure, failure, skipped, queued
    run_stage string The stage currently being executed in the execution environment. One of queued_for_planning, planning, queued_for_execution, executing, or finished.
    Possible values: queued_for_planning, planning, queued_for_execution, executing, finished
    successful_operations int64 Count of successful operations.
    failed_operations int64 Count of failed operations.
    status_messages_url string Link to status messages log file.

    List Automation Runs

    Example Request

    curl "https://app.files.com/api/rest/v1/automation_runs.json?automation_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/automation_runs.xml?automation_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::AutomationRun.list(
      per_page: 1, 
      automation_id: 1
    )
    
    \Files\Model\AutomationRun::list(array(
      'per_page' => 1, 
      'automation_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("automation_id", 1);
    AutomationRun.list(parameters).all()
    
    await AutomationRun.list({
      per_page: 1, 
      automation_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("automation_id", (Int64?) 1);
    
    await AutomationRun.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.automation_run.list({
      "per_page": 1,
      "automation_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    automationrun.List(context.Background(), files_sdk.AutomationRunListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      AutomationId: 1,
    })
    
    
    files-cli automation-runs list \
      --cursor="" \
      --per-page=1 \
      --automation-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "automation_id": 1,
        "completed_at": "2000-01-01T01:00:00Z",
        "created_at": "2000-01-01T01:00:00Z",
        "runtime": "2000-01-01T01:00:00Z",
        "status": "success",
        "run_stage": "planning",
        "successful_operations": 1,
        "failed_operations": 1,
        "status_messages_url": "https://www.example.com/log_file.txt"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <automation-runs type="array">
      <automation-run>
        <id type="integer">1</id>
        <automation_id type="integer">1</automation_id>
        <completed_at>2000-01-01T01:00:00Z</completed_at>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <runtime>2000-01-01T01:00:00Z</runtime>
        <status>success</status>
        <run_stage>planning</run_stage>
        <successful_operations type="integer">1</successful_operations>
        <failed_operations type="integer">1</failed_operations>
        <status_messages_url>https://www.example.com/log_file.txt</status_messages_url>
      </automation-run>
    </automation-runs>
    
    

    HTTPS Request

    GET /automation_runs

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    automation_id int64 Required ID of the associated Automation.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[automation_id]=desc). Valid fields are automation_id, created_at or status.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are status and automation_id. Valid field combinations are [ automation_id, status ].

    Show Automation Run

    Example Request

    curl https://app.files.com/api/rest/v1/automation_runs/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/automation_runs/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::AutomationRun.find(id)
    
    \Files\Model\AutomationRun::find($id);
    
    
    AutomationRun.find(, parameters
    
    await AutomationRun.find(id)
    
    
    await AutomationRun.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.automation_run.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    automationrun.Find(context.Background(), files_sdk.AutomationRunFindParams{
      Id: 1,
    })
    
    
    files-cli automation-runs find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "automation_id": 1,
      "completed_at": "2000-01-01T01:00:00Z",
      "created_at": "2000-01-01T01:00:00Z",
      "runtime": "2000-01-01T01:00:00Z",
      "status": "success",
      "run_stage": "planning",
      "successful_operations": 1,
      "failed_operations": 1,
      "status_messages_url": "https://www.example.com/log_file.txt"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <automation-run>
      <id type="integer">1</id>
      <automation_id type="integer">1</automation_id>
      <completed_at>2000-01-01T01:00:00Z</completed_at>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <runtime>2000-01-01T01:00:00Z</runtime>
      <status>success</status>
      <run_stage>planning</run_stage>
      <successful_operations type="integer">1</successful_operations>
      <failed_operations type="integer">1</failed_operations>
      <status_messages_url>https://www.example.com/log_file.txt</status_messages_url>
    </automation-run>
    
    

    HTTPS Request

    GET /automation_runs/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Automation Run ID.

    Bandwidth Snapshots

    The BandwidthSnapshots resource in the REST API allows you to operate on BandwidthSnapshots.

    The BandwidthSnapshot object

    Example BandwidthSnapshot Object

    {
      "id": 1,
      "bytes_received": 1.0,
      "bytes_sent": 1.0,
      "sync_bytes_received": 1.0,
      "sync_bytes_sent": 1.0,
      "requests_get": 1.0,
      "requests_put": 1.0,
      "requests_other": 1.0,
      "logged_at": "2000-01-01T01:00:00Z"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bandwidth-snapshot>
      <id type="integer">1</id>
      <bytes_received type="float">1.0</bytes_received>
      <bytes_sent type="float">1.0</bytes_sent>
      <sync_bytes_received type="float">1.0</sync_bytes_received>
      <sync_bytes_sent type="float">1.0</sync_bytes_sent>
      <requests_get type="float">1.0</requests_get>
      <requests_put type="float">1.0</requests_put>
      <requests_other type="float">1.0</requests_other>
      <logged_at>2000-01-01T01:00:00Z</logged_at>
    </bandwidth-snapshot>
    
    
    Attribute Description
    id int64 Site bandwidth ID
    bytes_received double Site bandwidth report bytes received
    bytes_sent double Site bandwidth report bytes sent
    sync_bytes_received double Site sync bandwidth report bytes received
    sync_bytes_sent double Site sync bandwidth report bytes sent
    requests_get double Site bandwidth report get requests
    requests_put double Site bandwidth report put requests
    requests_other double Site bandwidth report other requests
    logged_at date-time Time the site bandwidth report was logged

    List Bandwidth Snapshots

    Example Request

    curl "https://app.files.com/api/rest/v1/bandwidth_snapshots.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/bandwidth_snapshots.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::BandwidthSnapshot.list(
      per_page: 1
    )
    
    \Files\Model\BandwidthSnapshot::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    BandwidthSnapshot.list(parameters).all()
    
    await BandwidthSnapshot.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await BandwidthSnapshot.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.bandwidth_snapshot.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bandwidthsnapshot.List(context.Background(), files_sdk.BandwidthSnapshotListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterGt: "",
      FilterGteq: "",
      FilterLt: "",
      FilterLteq: "",
    })
    
    
    files-cli bandwidth-snapshots list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "bytes_received": 1.0,
        "bytes_sent": 1.0,
        "sync_bytes_received": 1.0,
        "sync_bytes_sent": 1.0,
        "requests_get": 1.0,
        "requests_put": 1.0,
        "requests_other": 1.0,
        "logged_at": "2000-01-01T01:00:00Z"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bandwidth-snapshots type="array">
      <bandwidth-snapshot>
        <id type="integer">1</id>
        <bytes_received type="float">1.0</bytes_received>
        <bytes_sent type="float">1.0</bytes_sent>
        <sync_bytes_received type="float">1.0</sync_bytes_received>
        <sync_bytes_sent type="float">1.0</sync_bytes_sent>
        <requests_get type="float">1.0</requests_get>
        <requests_put type="float">1.0</requests_put>
        <requests_other type="float">1.0</requests_other>
        <logged_at>2000-01-01T01:00:00Z</logged_at>
      </bandwidth-snapshot>
    </bandwidth-snapshots>
    
    

    HTTPS Request

    GET /bandwidth_snapshots

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[logged_at]=desc). Valid fields are logged_at.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are logged_at.
    filter_gt object If set, return records where the specified field is greater than the supplied value. Valid fields are logged_at.
    filter_gteq object If set, return records where the specified field is greater than or equal the supplied value. Valid fields are logged_at.
    filter_lt object If set, return records where the specified field is less than the supplied value. Valid fields are logged_at.
    filter_lteq object If set, return records where the specified field is less than or equal the supplied value. Valid fields are logged_at.

    Behaviors

    Behaviors are the API resource for what are also known as Folder Settings. Every behavior is associated with a folder.

    Depending on the behavior, it may also operate on child folders. It may be overridable at the child folder level or maybe can be added to at the child folder level. The exact options for each behavior type are explained in the table below.

    Additionally, some behaviors are visible to non-admins, and others are even settable by non-admins. All the details are below.

    Each behavior uses a different format for storings its settings value. Next to each behavior type is an example value. Our API and SDKs currently require that the value for behaviors be sent as raw JSON within the value field. Our SDK generator and API documentation generator doesn't fully keep up with this requirement, so if you need any help finding the exact syntax to use for your language or use case, just reach out.

    Note: Append Timestamp behavior removed. Check Override Upload Filename behavior which have even more functionality to modify name on upload.

    Behavior Types

    Webhook Behaviors

    Behavior Details  
    Behavior type webhook
    Only one may be set per folder? No
    Visible to non-admins? No
    Requires attachment? No
    Effect on Child Folders In effect. Behaviors can also be set on child, to be also in effect.
    Value Hash Parameter Description
    urls Array of URLs to send the webhook to.
    method Default: GET. May also be set to POST.
    triggers Leave blank to send webhooks on any action on this folder. Or, for specific actions, you may specify an array of action types. Valid values are: create, read, update, destroy, move, copy.
    triggering_filenames Leave blank to trigger webhooks on any file in this folder. Or you may specify an array of filenames (possibly with wildcards) to match for action path.
    encoding May be JSON, XML, RAW, EV1, or EV2. If set to RAW or left blank, we will deliver the webhook using the HTTP GET params or POST body. If JSON or XML, we will encode the payload accordingly and send a matching Content-Type header. If set to EV1, we will encode the payload to emulate ExaVault's version 1 webhook format. If set to EV2, we will encode the payload to emulate ExaVault's version 2.0 webhook format.
    headers Hash of HTTP Headers to send.
    body Hash of Body Params to send
    verification_token If provided, this token will be used to sign webhook messages cryptographically to allow you to verify the webhook authenticity.
    file_form_field A string specifying the name of a form field containing the contents of the file that triggered this webhook send. If this value is present, the webhook will submit a multipart/form-data POST with no request body encoding.
    file_as_body When sending webhook requests, submit the contents of the file that triggered this webhook send as the request body.
    use_dedicated_ips If set to true, we will send webhooks from dedicated IPs. This is useful if you need to whitelist IPs for your webhook endpoint.
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"urls\":[\"https://mysite.com/url...\"],\"method\":\"POST\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"triggering_filenames\":[\"*.pdf\",\"*so*.jpg\"],\"encoding\":\"RAW\",\"headers\":{\"MY-HEADER\":\"foo\"},\"body\":{\"MY_BODY_PARAM\":\"bar\"},\"verification_token\":\"tok12345\",\"file_form_field\":\"my_form_field\",\"file_as_body\":\"my_file_body\",\"use_dedicated_ips\":false}", "behavior": "webhook", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              webhook
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"urls":["https://mysite.com/url..."],"method":"POST","triggers":["create","read","update","destroy","move","copy"],"triggering_filenames":["*.pdf","*so*.jpg"],"encoding":"RAW","headers":{"MY-HEADER":"foo"},"body":{"MY_BODY_PARAM":"bar"},"verification_token":"tok12345","file_form_field":"my_form_field","file_as_body":"my_file_body","use_dedicated_ips":false}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"urls\":[\"https://mysite.com/url...\"],\"method\":\"POST\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"triggering_filenames\":[\"*.pdf\",\"*so*.jpg\"],\"encoding\":\"RAW\",\"headers\":{\"MY-HEADER\":\"foo\"},\"body\":{\"MY_BODY_PARAM\":\"bar\"},\"verification_token\":\"tok12345\",\"file_form_field\":\"my_form_field\",\"file_as_body\":\"my_file_body\",\"use_dedicated_ips\":false}",
      path: "path",
      behavior: "webhook"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"urls\":[\"https://mysite.com/url...\"],\"method\":\"POST\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"triggering_filenames\":[\"*.pdf\",\"*so*.jpg\"],\"encoding\":\"RAW\",\"headers\":{\"MY-HEADER\":\"foo\"},\"body\":{\"MY_BODY_PARAM\":\"bar\"},\"verification_token\":\"tok12345\",\"file_form_field\":\"my_form_field\",\"file_as_body\":\"my_file_body\",\"use_dedicated_ips\":false}",
      'path' => "path",
      'behavior' => "webhook"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "webhook");
    requestParams.put("value", {"urls":["https://mysite.com/url..."],"method":"POST","triggers":["create","read","update","destroy","move","copy"],"triggering_filenames":["*.pdf","*so*.jpg"],"encoding":"RAW","headers":{"MY-HEADER":"foo"},"body":{"MY_BODY_PARAM":"bar"},"verification_token":"tok12345","file_form_field":"my_form_field","file_as_body":"my_file_body","use_dedicated_ips":false});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"urls\":[\"https://mysite.com/url...\"],\"method\":\"POST\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"triggering_filenames\":[\"*.pdf\",\"*so*.jpg\"],\"encoding\":\"RAW\",\"headers\":{\"MY-HEADER\":\"foo\"},\"body\":{\"MY_BODY_PARAM\":\"bar\"},\"verification_token\":\"tok12345\",\"file_form_field\":\"my_form_field\",\"file_as_body\":\"my_file_body\",\"use_dedicated_ips\":false}",
      path: "path",
      behavior: "webhook",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"urls\":[\"https://mysite.com/url...\"],\"method\":\"POST\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"triggering_filenames\":[\"*.pdf\",\"*so*.jpg\"],\"encoding\":\"RAW\",\"headers\":{\"MY-HEADER\":\"foo\"},\"body\":{\"MY_BODY_PARAM\":\"bar\"},\"verification_token\":\"tok12345\",\"file_form_field\":\"my_form_field\",\"file_as_body\":\"my_file_body\",\"use_dedicated_ips\":false}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "webhook");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"urls\":[\"https://mysite.com/url...\"],\"method\":\"POST\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"triggering_filenames\":[\"*.pdf\",\"*so*.jpg\"],\"encoding\":\"RAW\",\"headers\":{\"MY-HEADER\":\"foo\"},\"body\":{\"MY_BODY_PARAM\":\"bar\"},\"verification_token\":\"tok12345\",\"file_form_field\":\"my_form_field\",\"file_as_body\":\"my_file_body\",\"use_dedicated_ips\":false}",
      "path": "path",
      "behavior": "webhook"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"urls":["https://mysite.com/url..."],"method":"POST","triggers":["create","read","update","destroy","move","copy"],"triggering_filenames":["*.pdf","*so*.jpg"],"encoding":"RAW","headers":{"MY-HEADER":"foo"},"body":{"MY_BODY_PARAM":"bar"},"verification_token":"tok12345","file_form_field":"my_form_field","file_as_body":"my_file_body","use_dedicated_ips":false}`},
      Path: "path",
      Behavior: "webhook",
    })
    
    files-cli behaviors create \
      --value='{\"urls\":[\"https://mysite.com/url...\"],\"method\":\"POST\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"triggering_filenames\":[\"*.pdf\",\"*so*.jpg\"],\"encoding\":\"RAW\",\"headers\":{\"MY-HEADER\":\"foo\"},\"body\":{\"MY_BODY_PARAM\":\"bar\"},\"verification_token\":\"tok12345\",\"file_form_field\":\"my_form_field\",\"file_as_body\":\"my_file_body\",\"use_dedicated_ips\":false}' \
      --path="path" \
      --behavior="webhook" \
      --api-key=YOUR_API_KEY
    

    File Expiration Behaviors

    Behavior Details  
    Behavior type file_expiration
    Only one may be set per folder? Yes
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect. Can be overridden by adding a behavior to the child.

    This behavior type takes a single unnamed argument.

    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "30", "behavior": "file_expiration", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              file_expiration
            </behavior>
            <path>/foo/bar</path>
            <value>
            30
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "30",
      path: "path",
      behavior: "file_expiration"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "30",
      'path' => "path",
      'behavior' => "file_expiration"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "file_expiration");
    requestParams.put("value", 30);
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "30",
      path: "path",
      behavior: "file_expiration",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "30");
    parameters.Add("path", "path");
    parameters.Add("behavior", "file_expiration");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "30",
      "path": "path",
      "behavior": "file_expiration"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`30`},
      Path: "path",
      Behavior: "file_expiration",
    })
    
    files-cli behaviors create \
      --value='30' \
      --path="path" \
      --behavior="file_expiration" \
      --api-key=YOUR_API_KEY
    

    Auto Encrypt Behaviors

    Behavior Details  
    Behavior type auto_encrypt
    Only one may be set per folder? Yes
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect. Can be overridden by adding a behavior to the child.
    Value Hash Parameter Description
    algorithm Must be set to PGP/GPG. If we support other options in the future (like OpenSSL), we will amend this option.
    suffix Suffix to apply to filenames once they've been uploaded.
    key Your GPG public key. Please be sure not to send your private key here. If that happens, we try to detect it and disable the behavior for your security.
    armor If true, encrypted files are written as ascii text.
    gpg_key_id Your GPG Key ID object to use for this encrypt
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"armor\":false,\"gpg_key_id\":1}", "behavior": "auto_encrypt", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              auto_encrypt
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"algorithm":"PGP/GPG","suffix":".gpg","key":"[your GPG public key]","armor":false,"gpg_key_id":1}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"armor\":false,\"gpg_key_id\":1}",
      path: "path",
      behavior: "auto_encrypt"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"armor\":false,\"gpg_key_id\":1}",
      'path' => "path",
      'behavior' => "auto_encrypt"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "auto_encrypt");
    requestParams.put("value", {"algorithm":"PGP/GPG","suffix":".gpg","key":"[your GPG public key]","armor":false,"gpg_key_id":1});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"armor\":false,\"gpg_key_id\":1}",
      path: "path",
      behavior: "auto_encrypt",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"armor\":false,\"gpg_key_id\":1}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "auto_encrypt");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"armor\":false,\"gpg_key_id\":1}",
      "path": "path",
      "behavior": "auto_encrypt"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"algorithm":"PGP/GPG","suffix":".gpg","key":"[your GPG public key]","armor":false,"gpg_key_id":1}`},
      Path: "path",
      Behavior: "auto_encrypt",
    })
    
    files-cli behaviors create \
      --value='{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"armor\":false,\"gpg_key_id\":1}' \
      --path="path" \
      --behavior="auto_encrypt" \
      --api-key=YOUR_API_KEY
    

    Lock Subfolders Behaviors

    Behavior Details  
    Behavior type lock_subfolders
    Only one may be set per folder? Yes
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect. Can be overridden by adding a behavior to the child.
    Value Hash Parameter Description
    level URL key used for the inbox. Can be children_recursive (default), children, self, or none.
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"level\":\"children_recursive\"}", "behavior": "lock_subfolders", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              lock_subfolders
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"level":"children_recursive"}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"level\":\"children_recursive\"}",
      path: "path",
      behavior: "lock_subfolders"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"level\":\"children_recursive\"}",
      'path' => "path",
      'behavior' => "lock_subfolders"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "lock_subfolders");
    requestParams.put("value", {"level":"children_recursive"});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"level\":\"children_recursive\"}",
      path: "path",
      behavior: "lock_subfolders",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"level\":\"children_recursive\"}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "lock_subfolders");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"level\":\"children_recursive\"}",
      "path": "path",
      "behavior": "lock_subfolders"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"level":"children_recursive"}`},
      Path: "path",
      Behavior: "lock_subfolders",
    })
    
    files-cli behaviors create \
      --value='{\"level\":\"children_recursive\"}' \
      --path="path" \
      --behavior="lock_subfolders" \
      --api-key=YOUR_API_KEY
    

    Storage Region Behaviors

    Behavior Details  
    Behavior type storage_region
    Only one may be set per folder? Yes
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect. Can be overridden by adding a behavior to the child.

    This behavior type takes a single unnamed argument.

    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "\"us-east-1\"", "behavior": "storage_region", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              storage_region
            </behavior>
            <path>/foo/bar</path>
            <value>
            "us-east-1"
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "\"us-east-1\"",
      path: "path",
      behavior: "storage_region"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "\"us-east-1\"",
      'path' => "path",
      'behavior' => "storage_region"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "storage_region");
    requestParams.put("value", "us-east-1");
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "\"us-east-1\"",
      path: "path",
      behavior: "storage_region",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "\"us-east-1\"");
    parameters.Add("path", "path");
    parameters.Add("behavior", "storage_region");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "\"us-east-1\"",
      "path": "path",
      "behavior": "storage_region"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`"us-east-1"`},
      Path: "path",
      Behavior: "storage_region",
    })
    
    files-cli behaviors create \
      --value='\"us-east-1\"' \
      --path="path" \
      --behavior="storage_region" \
      --api-key=YOUR_API_KEY
    

    Serve Publicly Behaviors

    Behavior Details  
    Behavior type serve_publicly
    Only one may be set per folder? No
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect. Behaviors can also be set on child, to be also in effect.
    Value Hash Parameter Description
    key URL path for where the stuff is publicly hosted. It will look like https://SUBDOMAIN.hosted-by-files.com/{key}/
    show_index Show an index page listing the folder contents?
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"key\":\"public-photos\",\"show_index\":true}", "behavior": "serve_publicly", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              serve_publicly
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"key":"public-photos","show_index":true}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"key\":\"public-photos\",\"show_index\":true}",
      path: "path",
      behavior: "serve_publicly"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"key\":\"public-photos\",\"show_index\":true}",
      'path' => "path",
      'behavior' => "serve_publicly"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "serve_publicly");
    requestParams.put("value", {"key":"public-photos","show_index":true});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"key\":\"public-photos\",\"show_index\":true}",
      path: "path",
      behavior: "serve_publicly",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"key\":\"public-photos\",\"show_index\":true}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "serve_publicly");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"key\":\"public-photos\",\"show_index\":true}",
      "path": "path",
      "behavior": "serve_publicly"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"key":"public-photos","show_index":true}`},
      Path: "path",
      Behavior: "serve_publicly",
    })
    
    files-cli behaviors create \
      --value='{\"key\":\"public-photos\",\"show_index\":true}' \
      --path="path" \
      --behavior="serve_publicly" \
      --api-key=YOUR_API_KEY
    

    Create User Folders Behaviors

    Behavior Details  
    Behavior type create_user_folders
    Only one may be set per folder? No
    Visible to non-admins? No
    Requires attachment? No
    Effect on Child Folders In effect. Behaviors can also be set on child, to be also in effect.
    Value Hash Parameter Description
    permission What permission level to give the user on his or her new folder? Takes the same options as the Permissions endpoint.
    additional_permission Additional permission level to give the user on his or her new folder. Used to apply a second permission. Takes the same options as the Permissions endpoint.
    existing_users Apply this behavior to existing users or only newly added users?
    group_id Only apply this behavior to users who are members of this group ID.
    new_folder_name What to name the new folder, currently we support 'name' and 'username', name will fall back to username if not present, default value is 'name'
    subfolders Subfolders to create within the new folder
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"permission\":\"full\",\"additional_permission\":\"bundle\",\"existing_users\":true,\"group_id\":1,\"new_folder_name\":\"username\",\"subfolders\":[\"in\",\"out\"]}", "behavior": "create_user_folders", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              create_user_folders
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"permission":"full","additional_permission":"bundle","existing_users":true,"group_id":1,"new_folder_name":"username","subfolders":["in","out"]}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"permission\":\"full\",\"additional_permission\":\"bundle\",\"existing_users\":true,\"group_id\":1,\"new_folder_name\":\"username\",\"subfolders\":[\"in\",\"out\"]}",
      path: "path",
      behavior: "create_user_folders"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"permission\":\"full\",\"additional_permission\":\"bundle\",\"existing_users\":true,\"group_id\":1,\"new_folder_name\":\"username\",\"subfolders\":[\"in\",\"out\"]}",
      'path' => "path",
      'behavior' => "create_user_folders"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "create_user_folders");
    requestParams.put("value", {"permission":"full","additional_permission":"bundle","existing_users":true,"group_id":1,"new_folder_name":"username","subfolders":["in","out"]});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"permission\":\"full\",\"additional_permission\":\"bundle\",\"existing_users\":true,\"group_id\":1,\"new_folder_name\":\"username\",\"subfolders\":[\"in\",\"out\"]}",
      path: "path",
      behavior: "create_user_folders",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"permission\":\"full\",\"additional_permission\":\"bundle\",\"existing_users\":true,\"group_id\":1,\"new_folder_name\":\"username\",\"subfolders\":[\"in\",\"out\"]}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "create_user_folders");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"permission\":\"full\",\"additional_permission\":\"bundle\",\"existing_users\":true,\"group_id\":1,\"new_folder_name\":\"username\",\"subfolders\":[\"in\",\"out\"]}",
      "path": "path",
      "behavior": "create_user_folders"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"permission":"full","additional_permission":"bundle","existing_users":true,"group_id":1,"new_folder_name":"username","subfolders":["in","out"]}`},
      Path: "path",
      Behavior: "create_user_folders",
    })
    
    files-cli behaviors create \
      --value='{\"permission\":\"full\",\"additional_permission\":\"bundle\",\"existing_users\":true,\"group_id\":1,\"new_folder_name\":\"username\",\"subfolders\":[\"in\",\"out\"]}' \
      --path="path" \
      --behavior="create_user_folders" \
      --api-key=YOUR_API_KEY
    

    Remote Server Sync Behaviors

    Behavior Details  
    Behavior type remote_server_sync
    Only one may be set per folder? No
    Visible to non-admins? No
    Requires attachment? No
    Effect on Child Folders In effect. Behaviors can also be set on child, to be also in effect.
    Value Hash Parameter Description
    direction One way or two way sync? Valid values: push_to_server, pull_from_server, two_way
    disabled If true, this sync will not be run automatically. Useful for disabling syncs during testing.
    keep_after_copy If one-way syncing, should we delete or keep files after sync?
    manual If false, this sync will run automatically via the built in scheduler for syncs (default). If true, this sync will not run automatically. A common reason to set this to true is if you intend to use a different scheduling mechanism such as a Webhook or email via an Automation.
    remote_path Path on remote server to sync with. This should be an absolute path on the remote server. This must be slash-delimited, but it must neither start nor end with a slash.
    remote_server_id ID of the remote server to sync with. See the Remote Servers API resource for managing these.
    trigger How this remote sync is scheduled to run. One of: `(empty),daily, orcustom_schedule. If left empty remote sync will be run on everyremote_sync_interval` minutes.
    interval If trigger type is recurring, this specifies how often to run this behavior. One of: day, week, week_end, month, month_end, quarter, quarter_end, year, year_end
    recurring_day If trigger type is daily, this specifies the day of the month.
    schedule If trigger type is custom_schedule, Custom schedule description for when the behavior should be run.
    delete_empty_folders Applies only to one-way syncs. If true, we will remove empty folders on the source. This is a good way to clean up empty folders left by this sync or other automated processes. Note that the removal will occur on the subsequent sync run if the folder was non-empty at any point during the sync run.
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"direction\":\"two_way\",\"disabled\":false,\"keep_after_copy\":\"keep\",\"manual\":false,\"remote_path\":\"\",\"remote_server_id\":\"1\",\"trigger\":\"daily\",\"interval\":\"month\",\"recurring_day\":25,\"schedule\":{\"days_of_week\":[0,2,4],\"times_of_day\":[\"6:30\",\"14:30\"],\"time_zone\":\"Eastern Time (US & Canada)\"},\"delete_empty_folders\":false}", "behavior": "remote_server_sync", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              remote_server_sync
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"direction":"two_way","disabled":false,"keep_after_copy":"keep","manual":false,"remote_path":"","remote_server_id":"1","trigger":"daily","interval":"month","recurring_day":25,"schedule":{"days_of_week":[0,2,4],"times_of_day":["6:30","14:30"],"time_zone":"Eastern Time (US & Canada)"},"delete_empty_folders":false}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"direction\":\"two_way\",\"disabled\":false,\"keep_after_copy\":\"keep\",\"manual\":false,\"remote_path\":\"\",\"remote_server_id\":\"1\",\"trigger\":\"daily\",\"interval\":\"month\",\"recurring_day\":25,\"schedule\":{\"days_of_week\":[0,2,4],\"times_of_day\":[\"6:30\",\"14:30\"],\"time_zone\":\"Eastern Time (US & Canada)\"},\"delete_empty_folders\":false}",
      path: "path",
      behavior: "remote_server_sync"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"direction\":\"two_way\",\"disabled\":false,\"keep_after_copy\":\"keep\",\"manual\":false,\"remote_path\":\"\",\"remote_server_id\":\"1\",\"trigger\":\"daily\",\"interval\":\"month\",\"recurring_day\":25,\"schedule\":{\"days_of_week\":[0,2,4],\"times_of_day\":[\"6:30\",\"14:30\"],\"time_zone\":\"Eastern Time (US & Canada)\"},\"delete_empty_folders\":false}",
      'path' => "path",
      'behavior' => "remote_server_sync"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "remote_server_sync");
    requestParams.put("value", {"direction":"two_way","disabled":false,"keep_after_copy":"keep","manual":false,"remote_path":"","remote_server_id":"1","trigger":"daily","interval":"month","recurring_day":25,"schedule":{"days_of_week":[0,2,4],"times_of_day":["6:30","14:30"],"time_zone":"Eastern Time (US & Canada)"},"delete_empty_folders":false});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"direction\":\"two_way\",\"disabled\":false,\"keep_after_copy\":\"keep\",\"manual\":false,\"remote_path\":\"\",\"remote_server_id\":\"1\",\"trigger\":\"daily\",\"interval\":\"month\",\"recurring_day\":25,\"schedule\":{\"days_of_week\":[0,2,4],\"times_of_day\":[\"6:30\",\"14:30\"],\"time_zone\":\"Eastern Time (US & Canada)\"},\"delete_empty_folders\":false}",
      path: "path",
      behavior: "remote_server_sync",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"direction\":\"two_way\",\"disabled\":false,\"keep_after_copy\":\"keep\",\"manual\":false,\"remote_path\":\"\",\"remote_server_id\":\"1\",\"trigger\":\"daily\",\"interval\":\"month\",\"recurring_day\":25,\"schedule\":{\"days_of_week\":[0,2,4],\"times_of_day\":[\"6:30\",\"14:30\"],\"time_zone\":\"Eastern Time (US & Canada)\"},\"delete_empty_folders\":false}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "remote_server_sync");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"direction\":\"two_way\",\"disabled\":false,\"keep_after_copy\":\"keep\",\"manual\":false,\"remote_path\":\"\",\"remote_server_id\":\"1\",\"trigger\":\"daily\",\"interval\":\"month\",\"recurring_day\":25,\"schedule\":{\"days_of_week\":[0,2,4],\"times_of_day\":[\"6:30\",\"14:30\"],\"time_zone\":\"Eastern Time (US & Canada)\"},\"delete_empty_folders\":false}",
      "path": "path",
      "behavior": "remote_server_sync"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"direction":"two_way","disabled":false,"keep_after_copy":"keep","manual":false,"remote_path":"","remote_server_id":"1","trigger":"daily","interval":"month","recurring_day":25,"schedule":{"days_of_week":[0,2,4],"times_of_day":["6:30","14:30"],"time_zone":"Eastern Time (US & Canada)"},"delete_empty_folders":false}`},
      Path: "path",
      Behavior: "remote_server_sync",
    })
    
    files-cli behaviors create \
      --value='{\"direction\":\"two_way\",\"disabled\":false,\"keep_after_copy\":\"keep\",\"manual\":false,\"remote_path\":\"\",\"remote_server_id\":\"1\",\"trigger\":\"daily\",\"interval\":\"month\",\"recurring_day\":25,\"schedule\":{\"days_of_week\":[0,2,4],\"times_of_day\":[\"6:30\",\"14:30\"],\"time_zone\":\"Eastern Time (US & Canada)\"},\"delete_empty_folders\":false}' \
      --path="path" \
      --behavior="remote_server_sync" \
      --api-key=YOUR_API_KEY
    

    Inbox Behaviors

    Behavior Details  
    Behavior type inbox
    Only one may be set per folder? No
    Visible to non-admins? No
    Requires attachment? No
    Effect on Child Folders In effect. Behaviors can also be set on child, to be also in effect.
    Value Hash Parameter Description
    key URL key used for the inbox. May only contain lowercase alphabetic characters, numbers, and dashes.
    dont_separate_submissions_by_folder Do not create subfolders for files uploaded to this inbox. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.
    dont_allow_folders_in_uploads If set to true, will prevent folders from being created inside an inbox submission. Useful for certain automation use cases where nested folders don't work well.
    require_inbox_recipient If set to true, requires that the inbox be shared with specific recipients rather than being accessed via a URL directly.
    show_on_login_page Show this inbox on the login page of your website. Only settable by admins.
    title Title of the Inbox
    description Description of the inbox shown on the actual inbox page.
    help_text Help text shown on the inbox page.
    require_registration Show a registration page that captures the uploader's name and email address?
    password Password to authenticate to inbox.
    path_template Template for creating submission subfolders. Can use the uploader's name, email address, ip, company, and any custom form data.
    enable_inbound_email_address This is only used when creating/updating a behavior. If set to true, will generate inbound_email_address to this folder. If set to false, will remove inbound_email_address to this folder. Please note that the uploads via email doesn't work if require_registration or password options are set to true.
    notify_senders_on_successful_uploads_via_email Notify senders on successful uploads via email
    allow_whitelisting allow/disallow whitelist
    whitelist Comma-separated string of whitelisted email addresses and domains
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"key\":\"application-forms\",\"dont_separate_submissions_by_folder\":true,\"dont_allow_folders_in_uploads\":false,\"require_inbox_recipient\":false,\"show_on_login_page\":true,\"title\":\"Submit Your Job Applications Here\",\"description\":\"Thanks for coming to the Files.com Job Application Page\",\"help_text\":\"If you have trouble here, please contact your recruiter.\",\"require_registration\":true,\"password\":\"foobar\",\"path_template\":\"{{name}}_{{ip}}\",\"enable_inbound_email_address\":true,\"notify_senders_on_successful_uploads_via_email\":true,\"allow_whitelisting\":true,\"whitelist\":[\"john@test.com\",\"mydomain.com\"]}", "behavior": "inbox", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              inbox
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"key":"application-forms","dont_separate_submissions_by_folder":true,"dont_allow_folders_in_uploads":false,"require_inbox_recipient":false,"show_on_login_page":true,"title":"Submit Your Job Applications Here","description":"Thanks for coming to the Files.com Job Application Page","help_text":"If you have trouble here, please contact your recruiter.","require_registration":true,"password":"foobar","path_template":"{{name}}_{{ip}}","enable_inbound_email_address":true,"notify_senders_on_successful_uploads_via_email":true,"allow_whitelisting":true,"whitelist":["john@test.com","mydomain.com"]}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"key\":\"application-forms\",\"dont_separate_submissions_by_folder\":true,\"dont_allow_folders_in_uploads\":false,\"require_inbox_recipient\":false,\"show_on_login_page\":true,\"title\":\"Submit Your Job Applications Here\",\"description\":\"Thanks for coming to the Files.com Job Application Page\",\"help_text\":\"If you have trouble here, please contact your recruiter.\",\"require_registration\":true,\"password\":\"foobar\",\"path_template\":\"{{name}}_{{ip}}\",\"enable_inbound_email_address\":true,\"notify_senders_on_successful_uploads_via_email\":true,\"allow_whitelisting\":true,\"whitelist\":[\"john@test.com\",\"mydomain.com\"]}",
      path: "path",
      behavior: "inbox"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"key\":\"application-forms\",\"dont_separate_submissions_by_folder\":true,\"dont_allow_folders_in_uploads\":false,\"require_inbox_recipient\":false,\"show_on_login_page\":true,\"title\":\"Submit Your Job Applications Here\",\"description\":\"Thanks for coming to the Files.com Job Application Page\",\"help_text\":\"If you have trouble here, please contact your recruiter.\",\"require_registration\":true,\"password\":\"foobar\",\"path_template\":\"{{name}}_{{ip}}\",\"enable_inbound_email_address\":true,\"notify_senders_on_successful_uploads_via_email\":true,\"allow_whitelisting\":true,\"whitelist\":[\"john@test.com\",\"mydomain.com\"]}",
      'path' => "path",
      'behavior' => "inbox"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "inbox");
    requestParams.put("value", {"key":"application-forms","dont_separate_submissions_by_folder":true,"dont_allow_folders_in_uploads":false,"require_inbox_recipient":false,"show_on_login_page":true,"title":"Submit Your Job Applications Here","description":"Thanks for coming to the Files.com Job Application Page","help_text":"If you have trouble here, please contact your recruiter.","require_registration":true,"password":"foobar","path_template":"{{name}}_{{ip}}","enable_inbound_email_address":true,"notify_senders_on_successful_uploads_via_email":true,"allow_whitelisting":true,"whitelist":["john@test.com","mydomain.com"]});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"key\":\"application-forms\",\"dont_separate_submissions_by_folder\":true,\"dont_allow_folders_in_uploads\":false,\"require_inbox_recipient\":false,\"show_on_login_page\":true,\"title\":\"Submit Your Job Applications Here\",\"description\":\"Thanks for coming to the Files.com Job Application Page\",\"help_text\":\"If you have trouble here, please contact your recruiter.\",\"require_registration\":true,\"password\":\"foobar\",\"path_template\":\"{{name}}_{{ip}}\",\"enable_inbound_email_address\":true,\"notify_senders_on_successful_uploads_via_email\":true,\"allow_whitelisting\":true,\"whitelist\":[\"john@test.com\",\"mydomain.com\"]}",
      path: "path",
      behavior: "inbox",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"key\":\"application-forms\",\"dont_separate_submissions_by_folder\":true,\"dont_allow_folders_in_uploads\":false,\"require_inbox_recipient\":false,\"show_on_login_page\":true,\"title\":\"Submit Your Job Applications Here\",\"description\":\"Thanks for coming to the Files.com Job Application Page\",\"help_text\":\"If you have trouble here, please contact your recruiter.\",\"require_registration\":true,\"password\":\"foobar\",\"path_template\":\"{{name}}_{{ip}}\",\"enable_inbound_email_address\":true,\"notify_senders_on_successful_uploads_via_email\":true,\"allow_whitelisting\":true,\"whitelist\":[\"john@test.com\",\"mydomain.com\"]}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "inbox");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"key\":\"application-forms\",\"dont_separate_submissions_by_folder\":true,\"dont_allow_folders_in_uploads\":false,\"require_inbox_recipient\":false,\"show_on_login_page\":true,\"title\":\"Submit Your Job Applications Here\",\"description\":\"Thanks for coming to the Files.com Job Application Page\",\"help_text\":\"If you have trouble here, please contact your recruiter.\",\"require_registration\":true,\"password\":\"foobar\",\"path_template\":\"{{name}}_{{ip}}\",\"enable_inbound_email_address\":true,\"notify_senders_on_successful_uploads_via_email\":true,\"allow_whitelisting\":true,\"whitelist\":[\"john@test.com\",\"mydomain.com\"]}",
      "path": "path",
      "behavior": "inbox"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"key":"application-forms","dont_separate_submissions_by_folder":true,"dont_allow_folders_in_uploads":false,"require_inbox_recipient":false,"show_on_login_page":true,"title":"Submit Your Job Applications Here","description":"Thanks for coming to the Files.com Job Application Page","help_text":"If you have trouble here, please contact your recruiter.","require_registration":true,"password":"foobar","path_template":"{{name}}_{{ip}}","enable_inbound_email_address":true,"notify_senders_on_successful_uploads_via_email":true,"allow_whitelisting":true,"whitelist":["john@test.com","mydomain.com"]}`},
      Path: "path",
      Behavior: "inbox",
    })
    
    files-cli behaviors create \
      --value='{\"key\":\"application-forms\",\"dont_separate_submissions_by_folder\":true,\"dont_allow_folders_in_uploads\":false,\"require_inbox_recipient\":false,\"show_on_login_page\":true,\"title\":\"Submit Your Job Applications Here\",\"description\":\"Thanks for coming to the Files.com Job Application Page\",\"help_text\":\"If you have trouble here, please contact your recruiter.\",\"require_registration\":true,\"password\":\"foobar\",\"path_template\":\"{{name}}_{{ip}}\",\"enable_inbound_email_address\":true,\"notify_senders_on_successful_uploads_via_email\":true,\"allow_whitelisting\":true,\"whitelist\":[\"john@test.com\",\"mydomain.com\"]}' \
      --path="path" \
      --behavior="inbox" \
      --api-key=YOUR_API_KEY
    

    Limit File Extensions Behaviors

    Behavior Details  
    Behavior type limit_file_extensions
    Only one may be set per folder? Yes
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect. Can be overridden by adding a behavior to the child.
    Value Hash Parameter Description
    extensions Array of whitelisted/blacklisted file extensions, depending on mode
    mode controls whether the behavior acts as a whitelist or as a blacklist. Default is whitelist.
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"extensions\":[\"xls\",\"csv\"],\"mode\":\"whitelist\"}", "behavior": "limit_file_extensions", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              limit_file_extensions
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"extensions":["xls","csv"],"mode":"whitelist"}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"extensions\":[\"xls\",\"csv\"],\"mode\":\"whitelist\"}",
      path: "path",
      behavior: "limit_file_extensions"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"extensions\":[\"xls\",\"csv\"],\"mode\":\"whitelist\"}",
      'path' => "path",
      'behavior' => "limit_file_extensions"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "limit_file_extensions");
    requestParams.put("value", {"extensions":["xls","csv"],"mode":"whitelist"});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"extensions\":[\"xls\",\"csv\"],\"mode\":\"whitelist\"}",
      path: "path",
      behavior: "limit_file_extensions",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"extensions\":[\"xls\",\"csv\"],\"mode\":\"whitelist\"}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "limit_file_extensions");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"extensions\":[\"xls\",\"csv\"],\"mode\":\"whitelist\"}",
      "path": "path",
      "behavior": "limit_file_extensions"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"extensions":["xls","csv"],"mode":"whitelist"}`},
      Path: "path",
      Behavior: "limit_file_extensions",
    })
    
    files-cli behaviors create \
      --value='{\"extensions\":[\"xls\",\"csv\"],\"mode\":\"whitelist\"}' \
      --path="path" \
      --behavior="limit_file_extensions" \
      --api-key=YOUR_API_KEY
    

    Limit File Regex Behaviors

    Behavior Details  
    Behavior type limit_file_regex
    Only one may be set per folder? Yes
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect. Can be overridden by adding a behavior to the child.

    This behavior type takes a single unnamed argument.

    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "[\"/Document-.*/\"]", "behavior": "limit_file_regex", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              limit_file_regex
            </behavior>
            <path>/foo/bar</path>
            <value>
            ["/Document-.*/"]
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "[\"/Document-.*/\"]",
      path: "path",
      behavior: "limit_file_regex"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "[\"/Document-.*/\"]",
      'path' => "path",
      'behavior' => "limit_file_regex"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "limit_file_regex");
    requestParams.put("value", ["/Document-.*/"]);
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "[\"/Document-.*/\"]",
      path: "path",
      behavior: "limit_file_regex",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "[\"/Document-.*/\"]");
    parameters.Add("path", "path");
    parameters.Add("behavior", "limit_file_regex");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "[\"/Document-.*/\"]",
      "path": "path",
      "behavior": "limit_file_regex"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`["/Document-.*/"]`},
      Path: "path",
      Behavior: "limit_file_regex",
    })
    
    files-cli behaviors create \
      --value='[\"/Document-.*/\"]' \
      --path="path" \
      --behavior="limit_file_regex" \
      --api-key=YOUR_API_KEY
    

    Amazon Sns Behaviors

    Behavior Details  
    Behavior type amazon_sns
    Only one may be set per folder? No
    Visible to non-admins? No
    Requires attachment? No
    Effect on Child Folders In effect. Behaviors can also be set on child, to be also in effect.
    Value Hash Parameter Description
    arns Array of ARNs to send the notifications to.
    triggers Leave blank to send an SNS notification on any action on this folder. Or, for specific actions, you may specify an array of action types. Valid values are: create, read, update, destroy, move, copy.
    aws_credentials AWS IAM Credentials to use for sending SNS requests. Must include access_key_id, and secret_access_key.
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"arns\":[\"ARN\"],\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"aws_credentials\":{\"access_key_id\":\"ACCESS_KEY_ID\",\"region\":\"us-east-1\",\"secret_access_key\":\"SECRET_ACCESS_KEY\"}}", "behavior": "amazon_sns", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              amazon_sns
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"arns":["ARN"],"triggers":["create","read","update","destroy","move","copy"],"aws_credentials":{"access_key_id":"ACCESS_KEY_ID","region":"us-east-1","secret_access_key":"SECRET_ACCESS_KEY"}}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"arns\":[\"ARN\"],\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"aws_credentials\":{\"access_key_id\":\"ACCESS_KEY_ID\",\"region\":\"us-east-1\",\"secret_access_key\":\"SECRET_ACCESS_KEY\"}}",
      path: "path",
      behavior: "amazon_sns"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"arns\":[\"ARN\"],\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"aws_credentials\":{\"access_key_id\":\"ACCESS_KEY_ID\",\"region\":\"us-east-1\",\"secret_access_key\":\"SECRET_ACCESS_KEY\"}}",
      'path' => "path",
      'behavior' => "amazon_sns"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "amazon_sns");
    requestParams.put("value", {"arns":["ARN"],"triggers":["create","read","update","destroy","move","copy"],"aws_credentials":{"access_key_id":"ACCESS_KEY_ID","region":"us-east-1","secret_access_key":"SECRET_ACCESS_KEY"}});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"arns\":[\"ARN\"],\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"aws_credentials\":{\"access_key_id\":\"ACCESS_KEY_ID\",\"region\":\"us-east-1\",\"secret_access_key\":\"SECRET_ACCESS_KEY\"}}",
      path: "path",
      behavior: "amazon_sns",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"arns\":[\"ARN\"],\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"aws_credentials\":{\"access_key_id\":\"ACCESS_KEY_ID\",\"region\":\"us-east-1\",\"secret_access_key\":\"SECRET_ACCESS_KEY\"}}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "amazon_sns");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"arns\":[\"ARN\"],\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"aws_credentials\":{\"access_key_id\":\"ACCESS_KEY_ID\",\"region\":\"us-east-1\",\"secret_access_key\":\"SECRET_ACCESS_KEY\"}}",
      "path": "path",
      "behavior": "amazon_sns"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"arns":["ARN"],"triggers":["create","read","update","destroy","move","copy"],"aws_credentials":{"access_key_id":"ACCESS_KEY_ID","region":"us-east-1","secret_access_key":"SECRET_ACCESS_KEY"}}`},
      Path: "path",
      Behavior: "amazon_sns",
    })
    
    files-cli behaviors create \
      --value='{\"arns\":[\"ARN\"],\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"],\"aws_credentials\":{\"access_key_id\":\"ACCESS_KEY_ID\",\"region\":\"us-east-1\",\"secret_access_key\":\"SECRET_ACCESS_KEY\"}}' \
      --path="path" \
      --behavior="amazon_sns" \
      --api-key=YOUR_API_KEY
    

    Watermark Behaviors

    Behavior Details  
    Behavior type watermark
    Only one may be set per folder? Yes
    Visible to non-admins? Yes
    Requires attachment? Yes
    Effect on Child Folders In effect, cannot be overridden.
    Value Hash Parameter Description
    gravity Where to locate the watermark? Valid values: Center, East, NorthEast, North, NorthWest, SouthEast, South, SouthWest, West
    max_height_or_width Max width/height as percent of image preview.
    transparency Percentage applied to the watermark.
    dynamic_text Watermark text. Use {{user}} to embed a username into the string.
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"gravity\":\"SouthWest\",\"max_height_or_width\":20,\"transparency\":25,\"dynamic_text\":\"Confidential: For use by {{user}} only.\"}", "behavior": "watermark", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              watermark
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"gravity":"SouthWest","max_height_or_width":20,"transparency":25,"dynamic_text":"Confidential: For use by {{user}} only."}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"gravity\":\"SouthWest\",\"max_height_or_width\":20,\"transparency\":25,\"dynamic_text\":\"Confidential: For use by {{user}} only.\"}",
      path: "path",
      behavior: "watermark"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"gravity\":\"SouthWest\",\"max_height_or_width\":20,\"transparency\":25,\"dynamic_text\":\"Confidential: For use by {{user}} only.\"}",
      'path' => "path",
      'behavior' => "watermark"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "watermark");
    requestParams.put("value", {"gravity":"SouthWest","max_height_or_width":20,"transparency":25,"dynamic_text":"Confidential: For use by {{user}} only."});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"gravity\":\"SouthWest\",\"max_height_or_width\":20,\"transparency\":25,\"dynamic_text\":\"Confidential: For use by {{user}} only.\"}",
      path: "path",
      behavior: "watermark",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"gravity\":\"SouthWest\",\"max_height_or_width\":20,\"transparency\":25,\"dynamic_text\":\"Confidential: For use by {{user}} only.\"}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "watermark");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"gravity\":\"SouthWest\",\"max_height_or_width\":20,\"transparency\":25,\"dynamic_text\":\"Confidential: For use by {{user}} only.\"}",
      "path": "path",
      "behavior": "watermark"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"gravity":"SouthWest","max_height_or_width":20,"transparency":25,"dynamic_text":"Confidential: For use by {{user}} only."}`},
      Path: "path",
      Behavior: "watermark",
    })
    
    files-cli behaviors create \
      --value='{\"gravity\":\"SouthWest\",\"max_height_or_width\":20,\"transparency\":25,\"dynamic_text\":\"Confidential: For use by {{user}} only.\"}' \
      --path="path" \
      --behavior="watermark" \
      --api-key=YOUR_API_KEY
    

    Remote Server Mount Behaviors

    Behavior Details  
    Behavior type remote_server_mount
    Only one may be set per folder? Yes
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect, cannot be overridden.
    Value Hash Parameter Description
    remote_server_id ID of the remote server to sync with. See the Remote Servers API resource for managing these.
    remote_path Path on remote server to treat as the root of this mount. This should be an absolute path on the remote server. This must be slash-delimited, but it must neither start nor end with a slash.
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"remote_server_id\":\"1\",\"remote_path\":\"\"}", "behavior": "remote_server_mount", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              remote_server_mount
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"remote_server_id":"1","remote_path":""}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"remote_server_id\":\"1\",\"remote_path\":\"\"}",
      path: "path",
      behavior: "remote_server_mount"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"remote_server_id\":\"1\",\"remote_path\":\"\"}",
      'path' => "path",
      'behavior' => "remote_server_mount"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "remote_server_mount");
    requestParams.put("value", {"remote_server_id":"1","remote_path":""});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"remote_server_id\":\"1\",\"remote_path\":\"\"}",
      path: "path",
      behavior: "remote_server_mount",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"remote_server_id\":\"1\",\"remote_path\":\"\"}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "remote_server_mount");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"remote_server_id\":\"1\",\"remote_path\":\"\"}",
      "path": "path",
      "behavior": "remote_server_mount"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"remote_server_id":"1","remote_path":""}`},
      Path: "path",
      Behavior: "remote_server_mount",
    })
    
    files-cli behaviors create \
      --value='{\"remote_server_id\":\"1\",\"remote_path\":\"\"}' \
      --path="path" \
      --behavior="remote_server_mount" \
      --api-key=YOUR_API_KEY
    

    Slack Webhook Behaviors

    Behavior Details  
    Behavior type slack_webhook
    Only one may be set per folder? No
    Visible to non-admins? No
    Requires attachment? No
    Effect on Child Folders In effect. Behaviors can also be set on child, to be also in effect.
    Value Hash Parameter Description
    url Slack issued URL to send the webhook to.
    username Username to display in Slack.
    channel Channel is send the webhook to.
    icon_emoji Slack emoji to display in Slack, e.g. :robot_face:
    triggers Leave blank to send webhooks on any action on this folder. Or, for specific actions, you may specify an array of action types. Valid values are: create, read, update, destroy, move, copy.
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"url\":\"https://mysite.com/url...\",\"username\":\"Files.com\",\"channel\":\"alerts\",\"icon_emoji\":\":robot_face:\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"]}", "behavior": "slack_webhook", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              slack_webhook
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"url":"https://mysite.com/url...","username":"Files.com","channel":"alerts","icon_emoji":":robot_face:","triggers":["create","read","update","destroy","move","copy"]}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"url\":\"https://mysite.com/url...\",\"username\":\"Files.com\",\"channel\":\"alerts\",\"icon_emoji\":\":robot_face:\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"]}",
      path: "path",
      behavior: "slack_webhook"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"url\":\"https://mysite.com/url...\",\"username\":\"Files.com\",\"channel\":\"alerts\",\"icon_emoji\":\":robot_face:\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"]}",
      'path' => "path",
      'behavior' => "slack_webhook"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "slack_webhook");
    requestParams.put("value", {"url":"https://mysite.com/url...","username":"Files.com","channel":"alerts","icon_emoji":":robot_face:","triggers":["create","read","update","destroy","move","copy"]});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"url\":\"https://mysite.com/url...\",\"username\":\"Files.com\",\"channel\":\"alerts\",\"icon_emoji\":\":robot_face:\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"]}",
      path: "path",
      behavior: "slack_webhook",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"url\":\"https://mysite.com/url...\",\"username\":\"Files.com\",\"channel\":\"alerts\",\"icon_emoji\":\":robot_face:\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"]}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "slack_webhook");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"url\":\"https://mysite.com/url...\",\"username\":\"Files.com\",\"channel\":\"alerts\",\"icon_emoji\":\":robot_face:\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"]}",
      "path": "path",
      "behavior": "slack_webhook"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"url":"https://mysite.com/url...","username":"Files.com","channel":"alerts","icon_emoji":":robot_face:","triggers":["create","read","update","destroy","move","copy"]}`},
      Path: "path",
      Behavior: "slack_webhook",
    })
    
    files-cli behaviors create \
      --value='{\"url\":\"https://mysite.com/url...\",\"username\":\"Files.com\",\"channel\":\"alerts\",\"icon_emoji\":\":robot_face:\",\"triggers\":[\"create\",\"read\",\"update\",\"destroy\",\"move\",\"copy\"]}' \
      --path="path" \
      --behavior="slack_webhook" \
      --api-key=YOUR_API_KEY
    

    Auto Decrypt Behaviors

    Behavior Details  
    Behavior type auto_decrypt
    Only one may be set per folder? Yes
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect. Can be overridden by adding a behavior to the child.
    Value Hash Parameter Description
    algorithm Must be set to PGP/GPG. If we support other options in the future (like OpenSSL), we will amend this option.
    suffix Filename suffix that if present will be removed after decryption.
    key Your GPG public key. Please be sure not to send your private key here. If that happens, we try to detect it and disable the behavior for your security.
    private_key Your GPG private key.
    private_key_password Your GPG private key password. Only required for password protected keys.
    ignore_mdc_error Set to true if you want to ignore any errors from the MDC (modification detection code) check. MDC is an important security feature of GPG and this flag should not be set to true unless absolutely necessary
    gpg_key_id Your GPG Key ID object to use for this decrypt
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"private_key\":\"[your GPG private key]\",\"private_key_password\":\"[your GPG private key password]\",\"ignore_mdc_error\":true,\"gpg_key_id\":1}", "behavior": "auto_decrypt", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              auto_decrypt
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"algorithm":"PGP/GPG","suffix":".gpg","key":"[your GPG public key]","private_key":"[your GPG private key]","private_key_password":"[your GPG private key password]","ignore_mdc_error":true,"gpg_key_id":1}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"private_key\":\"[your GPG private key]\",\"private_key_password\":\"[your GPG private key password]\",\"ignore_mdc_error\":true,\"gpg_key_id\":1}",
      path: "path",
      behavior: "auto_decrypt"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"private_key\":\"[your GPG private key]\",\"private_key_password\":\"[your GPG private key password]\",\"ignore_mdc_error\":true,\"gpg_key_id\":1}",
      'path' => "path",
      'behavior' => "auto_decrypt"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "auto_decrypt");
    requestParams.put("value", {"algorithm":"PGP/GPG","suffix":".gpg","key":"[your GPG public key]","private_key":"[your GPG private key]","private_key_password":"[your GPG private key password]","ignore_mdc_error":true,"gpg_key_id":1});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"private_key\":\"[your GPG private key]\",\"private_key_password\":\"[your GPG private key password]\",\"ignore_mdc_error\":true,\"gpg_key_id\":1}",
      path: "path",
      behavior: "auto_decrypt",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"private_key\":\"[your GPG private key]\",\"private_key_password\":\"[your GPG private key password]\",\"ignore_mdc_error\":true,\"gpg_key_id\":1}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "auto_decrypt");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"private_key\":\"[your GPG private key]\",\"private_key_password\":\"[your GPG private key password]\",\"ignore_mdc_error\":true,\"gpg_key_id\":1}",
      "path": "path",
      "behavior": "auto_decrypt"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"algorithm":"PGP/GPG","suffix":".gpg","key":"[your GPG public key]","private_key":"[your GPG private key]","private_key_password":"[your GPG private key password]","ignore_mdc_error":true,"gpg_key_id":1}`},
      Path: "path",
      Behavior: "auto_decrypt",
    })
    
    files-cli behaviors create \
      --value='{\"algorithm\":\"PGP/GPG\",\"suffix\":\".gpg\",\"key\":\"[your GPG public key]\",\"private_key\":\"[your GPG private key]\",\"private_key_password\":\"[your GPG private key password]\",\"ignore_mdc_error\":true,\"gpg_key_id\":1}' \
      --path="path" \
      --behavior="auto_decrypt" \
      --api-key=YOUR_API_KEY
    

    Override Upload Filename Behaviors

    Behavior Details  
    Behavior type override_upload_filename
    Only one may be set per folder? Yes
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect, cannot be overridden.
    Value Hash Parameter Description
    filename_override_pattern Format for filename override. You may use anything from the list %Fl, %Ff, %Fe, %Fb as well as any additions you want to modify the name with.
    time_zone Accepts any valid timezone value from the web interface (e.g. "Eastern Time (US & Canada)") or a UTC offset ("-05:00"). Omit parameter for UTC time.
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"filename_override_pattern\":\"%Fb_addition5%Fe\",\"time_zone\":\"Eastern Time (US & Canada)\"}", "behavior": "override_upload_filename", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              override_upload_filename
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"filename_override_pattern":"%Fb_addition5%Fe","time_zone":"Eastern Time (US & Canada)"}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"filename_override_pattern\":\"%Fb_addition5%Fe\",\"time_zone\":\"Eastern Time (US & Canada)\"}",
      path: "path",
      behavior: "override_upload_filename"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"filename_override_pattern\":\"%Fb_addition5%Fe\",\"time_zone\":\"Eastern Time (US & Canada)\"}",
      'path' => "path",
      'behavior' => "override_upload_filename"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "override_upload_filename");
    requestParams.put("value", {"filename_override_pattern":"%Fb_addition5%Fe","time_zone":"Eastern Time (US & Canada)"});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"filename_override_pattern\":\"%Fb_addition5%Fe\",\"time_zone\":\"Eastern Time (US & Canada)\"}",
      path: "path",
      behavior: "override_upload_filename",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"filename_override_pattern\":\"%Fb_addition5%Fe\",\"time_zone\":\"Eastern Time (US & Canada)\"}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "override_upload_filename");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"filename_override_pattern\":\"%Fb_addition5%Fe\",\"time_zone\":\"Eastern Time (US & Canada)\"}",
      "path": "path",
      "behavior": "override_upload_filename"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"filename_override_pattern":"%Fb_addition5%Fe","time_zone":"Eastern Time (US & Canada)"}`},
      Path: "path",
      Behavior: "override_upload_filename",
    })
    
    files-cli behaviors create \
      --value='{\"filename_override_pattern\":\"%Fb_addition5%Fe\",\"time_zone\":\"Eastern Time (US & Canada)\"}' \
      --path="path" \
      --behavior="override_upload_filename" \
      --api-key=YOUR_API_KEY
    

    Permission Fence Behaviors

    Behavior Details  
    Behavior type permission_fence
    Only one may be set per folder? Yes
    Visible to non-admins? No
    Requires attachment? No
    Effect on Child Folders In effect. Can be overridden by adding a behavior to the child.
    Value Hash Parameter Description
    fenced_permissions Which permissions to fence. Currently only 'all' is supported.
    curl https://app.files.com/api/rest/v1/behaviors.json -X POST -H 'Content-Type: application/json' -d '{"value": "{\"fenced_permissions\":\"all\"}", "behavior": "permission_fence", "path": "/foo/bar" }' -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
            <behavior>
              permission_fence
            </behavior>
            <path>/foo/bar</path>
            <value>
            {"fenced_permissions":"all"}
            </value>
          </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"fenced_permissions\":\"all\"}",
      path: "path",
      behavior: "permission_fence"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"fenced_permissions\":\"all\"}",
      'path' => "path",
      'behavior' => "permission_fence"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("behavior", "permission_fence");
    requestParams.put("value", {"fenced_permissions":"all"});
    Behavior.create(requestParams);
    
    await Behavior.create({
      value: "{\"fenced_permissions\":\"all\"}",
      path: "path",
      behavior: "permission_fence",
    })
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"fenced_permissions\":\"all\"}");
    parameters.Add("path", "path");
    parameters.Add("behavior", "permission_fence");
    
    Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"fenced_permissions\":\"all\"}",
      "path": "path",
      "behavior": "permission_fence"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"fenced_permissions":"all"}`},
      Path: "path",
      Behavior: "permission_fence",
    })
    
    files-cli behaviors create \
      --value='{\"fenced_permissions\":\"all\"}' \
      --path="path" \
      --behavior="permission_fence" \
      --api-key=YOUR_API_KEY
    

    The Behavior object

    Example Behavior Object

    {
      "id": 1,
      "path": "example",
      "attachment_url": "example",
      "behavior": "webhook",
      "name": "example",
      "description": "example",
      "value": {
        "key": "example value"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <behavior>
      <id type="integer">1</id>
      <path>example</path>
      <attachment_url>example</attachment_url>
      <behavior>webhook</behavior>
      <name>example</name>
      <description>example</description>
      <value>
        <key>example value</key>
      </value>
    </behavior>
    
    
    Attribute Description
    id int64 Folder behavior ID
    path string Folder path. Note that Behavior paths cannot be updated once initially set. You will need to remove and re-create the behavior on the new path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    attachment_url string URL for attached file
    behavior string Behavior type.
    name string Name for this behavior.
    description string Description for this behavior.
    value object Settings for this behavior. See the section above for an example value to provide here. Formatting is different for each Behavior type. May be sent as nested JSON or a single JSON-encoded string. If using XML encoding for the API call, this data must be sent as a JSON-encoded string.
    attachment_file file Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
    attachment_delete boolean If true, will delete the file stored in attachment

    List Behaviors

    Example Request

    curl "https://app.files.com/api/rest/v1/behaviors.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/behaviors.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.list(
      per_page: 1
    )
    
    \Files\Model\Behavior::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    Behavior.list(parameters).all()
    
    await Behavior.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await Behavior.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.List(context.Background(), files_sdk.BehaviorListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterPrefix: "",
    })
    
    
    files-cli behaviors list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "path": "example",
        "attachment_url": "example",
        "behavior": "webhook",
        "name": "example",
        "description": "example",
        "value": {
          "key": "example value"
        }
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <behaviors type="array">
      <behavior>
        <id type="integer">1</id>
        <path>example</path>
        <attachment_url>example</attachment_url>
        <behavior>webhook</behavior>
        <name>example</name>
        <description>example</description>
        <value>
          <key>example value</key>
        </value>
      </behavior>
    </behaviors>
    
    

    HTTPS Request

    GET /behaviors

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[behavior]=desc). Valid fields are behavior.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are behavior.
    filter_prefix object If set, return records where the specified field is prefixed by the supplied value. Valid fields are behavior.

    Show Behavior

    Example Request

    curl https://app.files.com/api/rest/v1/behaviors/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.find(id)
    
    \Files\Model\Behavior::find($id);
    
    
    Behavior.find(, parameters
    
    await Behavior.find(id)
    
    
    await Behavior.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Find(context.Background(), files_sdk.BehaviorFindParams{
      Id: 1,
    })
    
    
    files-cli behaviors find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "path": "example",
      "attachment_url": "example",
      "behavior": "webhook",
      "name": "example",
      "description": "example",
      "value": {
        "key": "example value"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <behavior>
      <id type="integer">1</id>
      <path>example</path>
      <attachment_url>example</attachment_url>
      <behavior>webhook</behavior>
      <name>example</name>
      <description>example</description>
      <value>
        <key>example value</key>
      </value>
    </behavior>
    
    

    HTTPS Request

    GET /behaviors/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Behavior ID.

    List Behaviors by path

    Example Request

    curl "https://app.files.com/api/rest/v1/behaviors/folders/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/behaviors/folders/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.list_for(path, 
      per_page: 1, 
      behavior: "webhook"
    )
    
    \Files\Model\Behavior::listFor($path, array(
      'per_page' => 1, 
      'behavior' => "webhook"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("behavior", webhook);
    Behavior.listFor(parameters).all()
    
    await Behavior.listFor(path, {
      per_page: 1, 
      behavior: "webhook",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("behavior", "webhook");
    
    await Behavior.ListFor(path, parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.list_for(path, {
      "per_page": 1,
      "behavior": "webhook"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.ListFor(context.Background(), files_sdk.BehaviorListForParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterPrefix: "",
      Path: "path",
      Recursive: "",
      Behavior: "webhook",
    })
    
    
    files-cli behaviors list-for \
      --cursor="" \
      --per-page=1 \
      --path="path" \
      --recursive="" \
      --behavior="webhook" \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "path": "example",
        "attachment_url": "example",
        "behavior": "webhook",
        "name": "example",
        "description": "example",
        "value": {
          "key": "example value"
        }
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <behaviors type="array">
      <behavior>
        <id type="integer">1</id>
        <path>example</path>
        <attachment_url>example</attachment_url>
        <behavior>webhook</behavior>
        <name>example</name>
        <description>example</description>
        <value>
          <key>example value</key>
        </value>
      </behavior>
    </behaviors>
    
    

    HTTPS Request

    GET /behaviors/folders/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path to operate on.
    recursive string Show behaviors above this path?
    behavior string DEPRECATED: If set only shows folder behaviors matching this behavior type. Use filter[behavior] instead.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[behavior]=desc). Valid fields are behavior.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are behavior.
    filter_prefix object If set, return records where the specified field is prefixed by the supplied value. Valid fields are behavior.

    Create Behavior

    Example Request

    curl https://app.files.com/api/rest/v1/behaviors.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"value":"{\"method\": \"GET\"}","name":"example","description":"example","path":"path","behavior":"webhook"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
           <value>{"method": "GET"}</value>
           <name>example</name>
           <description>example</description>
           <path>path</path>
           <behavior>webhook</behavior>
         </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.create(
      value: "{\"method\": \"GET\"}", 
      name: "example", 
      description: "example", 
      path: "path", 
      behavior: "webhook"
    )
    
    \Files\Model\Behavior::create(array(
      'value' => "{\"method\": \"GET\"}", 
      'name' => "example", 
      'description' => "example", 
      'path' => "path", 
      'behavior' => "webhook"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("value", {"method": "GET"});
    requestParams.put("name", example);
    requestParams.put("description", example);
    requestParams.put("path", path);
    requestParams.put("behavior", webhook);
    Behavior.create(parameters)
    
    await Behavior.create({
      value: "{\"method\": \"GET\"}", 
      name: "example", 
      description: "example", 
      path: "path", 
      behavior: "webhook",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"method\": \"GET\"}");
    parameters.Add("name", "example");
    parameters.Add("description", "example");
    parameters.Add("path", "path");
    parameters.Add("behavior", "webhook");
    
    await Behavior.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.create({
      "value": "{\"method\": \"GET\"}",
      "name": "example",
      "description": "example",
      "path": "path",
      "behavior": "webhook"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Create(context.Background(), files_sdk.BehaviorCreateParams{
      Value: []string{`{"method":"GET"}`},
      AttachmentFile: "",
      Name: "example",
      Description: "example",
      Path: "path",
      Behavior: "webhook",
    })
    
    
    files-cli behaviors create \
      --value="{\"method\": \"GET\"}" \
      --name="example" \
      --description="example" \
      --path="path" \
      --behavior="webhook" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "path": "example",
      "attachment_url": "example",
      "behavior": "webhook",
      "name": "example",
      "description": "example",
      "value": {
        "key": "example value"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <behavior>
      <id type="integer">1</id>
      <path>example</path>
      <attachment_url>example</attachment_url>
      <behavior>webhook</behavior>
      <name>example</name>
      <description>example</description>
      <value>
        <key>example value</key>
      </value>
    </behavior>
    
    

    HTTPS Request

    POST /behaviors

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    value string The value of the folder behavior. Can be an integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
    attachment_file file Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image See Attaching Files to API Requests.
    name string Name for this behavior.
    description string Description for this behavior.
    path string Required Folder behaviors path.
    behavior string Required Behavior type.

    Test webhook

    Example Request

    curl https://app.files.com/api/rest/v1/behaviors/webhook/test.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"url":"https://www.site.com/...","method":"GET","encoding":"RAW","headers":{"x-test-header":"testvalue"},"body":{"test-param":"testvalue"},"action":"test"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors/webhook/test.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
           <url>https://www.site.com/...</url>
           <method>GET</method>
           <encoding>RAW</encoding>
           <headers>
             <x-test-header>testvalue</x-test-header>
           </headers>
           <body>
             <test-param>testvalue</test-param>
           </body>
           <action>test</action>
         </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.webhook_test(
      url: "https://www.site.com/...", 
      method: "GET", 
      encoding: "RAW", 
      headers: {"x-test-header":"testvalue"}, 
      body: {"test-param":"testvalue"}, 
      action: "test"
    )
    
    \Files\Model\Behavior::webhookTest(array(
      'url' => "https://www.site.com/...", 
      'method' => "GET", 
      'encoding' => "RAW", 
      'headers' => {"x-test-header":"testvalue"}, 
      'body' => {"test-param":"testvalue"}, 
      'action' => "test"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("url", https://www.site.com/...);
    requestParams.put("method", GET);
    requestParams.put("encoding", RAW);
    requestParams.put("headers", {"x-test-header"=>"testvalue"});
    requestParams.put("body", {"test-param"=>"testvalue"});
    requestParams.put("action", test);
    Behavior.webhookTest(parameters)
    
    await Behavior.webhookTest({
      url: "https://www.site.com/...", 
      method: "GET", 
      encoding: "RAW", 
      headers: {"x-test-header":"testvalue"}, 
      body: {"test-param":"testvalue"}, 
      action: "test",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("url", "https://www.site.com/...");
    parameters.Add("method", "GET");
    parameters.Add("encoding", "RAW");
    parameters.Add("headers", (object) {"x-test-header":"testvalue"});
    parameters.Add("body", (object) {"test-param":"testvalue"});
    parameters.Add("action", "test");
    
    await Behavior.WebhookTest(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.behavior.webhook_test({
      "url": "https://www.site.com/...",
      "method": "GET",
      "encoding": "RAW",
      "headers": {"x-test-header":"testvalue"},
      "body": {"test-param":"testvalue"},
      "action": "test"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.WebhookTest(context.Background(), files_sdk.BehaviorWebhookTestParams{
      Url: "https://www.site.com/...",
      Method: "GET",
      Encoding: "RAW",
      Headers: `{"x-test-header":"testvalue"}`,
      Body: `{"test-param":"testvalue"}`,
      Action: "test",
    })
    
    
    files-cli behaviors webhook-test \
      --url="https://www.site.com/..." \
      --method="GET" \
      --encoding="RAW" \
      --action="test" \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    POST /behaviors/webhook/test

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    url string Required URL for testing the webhook.
    method string HTTP method(GET or POST).
    encoding string HTTP encoding method. Can be JSON, XML, or RAW (form data).
    headers object Additional request headers.
    body object Additional body parameters.
    action string action for test body

    Update Behavior

    Example Request

    curl https://app.files.com/api/rest/v1/behaviors/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"value":"{\"method\": \"GET\"}","name":"example","description":"example","behavior":"webhook","path":"example","attachment_delete":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<behavior>
           <value>{"method": "GET"}</value>
           <name>example</name>
           <description>example</description>
           <behavior>webhook</behavior>
           <path>example</path>
           <attachment_delete type="boolean">true</attachment_delete>
         </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    behavior = Files::Behavior.list.first
    behavior.update(
      value: "{\"method\": \"GET\"}",
      name: "example",
      description: "example",
      behavior: "webhook",
      path: "example",
      attachment_delete: true
    )
    
    $behavior = \Files\Model\Behavior::list()[0];
    $behavior->update(array(
      'value' => "{\"method\": \"GET\"}", 
      'name' => "example", 
      'description' => "example", 
      'behavior' => "webhook", 
      'path' => "example", 
      'attachment_delete' => true
    ));
    
    Behavior behavior = Behavior.list()[0];
    behavior.setValue("{"method": "GET"}");
    behavior.setName("example");
    behavior.setDescription("example");
    behavior.setBehavior("webhook");
    behavior.setPath("example");
    behavior.setAttachmentDelete(true);
    behavior.update();
    
    const behavior = (await Behavior.list())[0]
    await behavior.update({ 
      value: "{\"method\": \"GET\"}", 
      name: "example", 
      description: "example", 
      behavior: "webhook", 
      path: "example", 
      attachment_delete: true,
    })
    
    var behavior = (await Behavior.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("value", "{\"method\": \"GET\"}");
    parameters.Add("name", "example");
    parameters.Add("description", "example");
    parameters.Add("behavior", "webhook");
    parameters.Add("path", "example");
    parameters.Add("attachment_delete", true);
    
    await behavior.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    behavior = files_sdk.behavior.find(id)
    behavior.update({
      "value": "{\"method\": \"GET\"}",
      "name": "example",
      "description": "example",
      "behavior": "webhook",
      "path": "example",
      "attachment_delete": True
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Update(context.Background(), files_sdk.BehaviorUpdateParams{
      Id: 1,
      Value: []string{`{"method":"GET"}`},
      AttachmentFile: "",
      Name: "example",
      Description: "example",
      Behavior: "webhook",
      Path: "example",
      AttachmentDelete: lib.Bool(true),
    })
    
    files-cli behaviors update \
      --id=1 \
      --value="{\"method\": \"GET\"}" \
      --name="example" \
      --description="example" \
      --behavior="webhook" \
      --path="example" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "path": "example",
      "attachment_url": "example",
      "behavior": "webhook",
      "name": "example",
      "description": "example",
      "value": {
        "key": "example value"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <behavior>
      <id type="integer">1</id>
      <path>example</path>
      <attachment_url>example</attachment_url>
      <behavior>webhook</behavior>
      <name>example</name>
      <description>example</description>
      <value>
        <key>example value</key>
      </value>
    </behavior>
    
    

    HTTPS Request

    PATCH /behaviors/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Behavior ID.
    value string The value of the folder behavior. Can be an integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
    attachment_file file Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image See Attaching Files to API Requests.
    name string Name for this behavior.
    description string Description for this behavior.
    behavior string Behavior type.
    path string Folder behaviors path.
    attachment_delete boolean If true, will delete the file stored in attachment

    Delete Behavior

    Example Request

    curl https://app.files.com/api/rest/v1/behaviors/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/behaviors/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    behavior = Files::Behavior.list.first
    behavior.delete
    
    $behavior = \Files\Model\Behavior::list()[0];
    $behavior->delete();
    
    Behavior behavior = Behavior.list()[0];
    
    behavior.delete();
    
    const behavior = (await Behavior.list())[0]
    await behavior.delete()
    
    var behavior = (await Behavior.List())[0];
    
    await behavior.Delete();
    
    files_sdk.set_api_key("my-key")
    
    behavior = files_sdk.behavior.find(id)
    behavior.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    behavior.Delete(context.Background(), files_sdk.BehaviorDeleteParams{
      Id: 1,
    })
    
    files-cli behaviors delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /behaviors/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Behavior ID.

    Bundles

    Bundles are the API/SDK term for the feature called Share Links in the web interface. The API provides the full set of actions related to Share Links, including sending them via E-Mail.

    Please note that we very closely monitor the E-Mailing feature and any abuse will result in disabling of your site.

    The Bundle object

    Example Bundle Object

    {
      "code": "abc123",
      "color_left": "#0066a7",
      "color_link": "#d34f5d",
      "color_text": "#0066a7",
      "color_top": "#000000",
      "color_top_text": "#ffffff",
      "url": "https://subdomain.files.com/f/12345678",
      "description": "The public description of the bundle.",
      "expires_at": "2000-01-01T01:00:00Z",
      "password_protected": true,
      "permissions": "read",
      "preview_only": true,
      "require_registration": true,
      "require_share_recipient": true,
      "require_logout": true,
      "clickwrap_body": "[Legal text]",
      "form_field_set": {
        "id": 1,
        "title": "Sample Form Title",
        "form_layout": [
          1,
          2,
          3,
          4
        ],
        "form_fields": [
          {
            "id": 1,
            "label": "Sample Label",
            "required": true,
            "help_text": "Help Text",
            "field_type": "text",
            "options_for_select": [
              "red",
              "green",
              "blue"
            ],
            "default_option": "red",
            "form_field_set_id": 1
          }
        ],
        "skip_name": true,
        "skip_email": true,
        "skip_company": true
      },
      "skip_name": true,
      "skip_email": true,
      "start_access_on_date": "2000-01-01T01:00:00Z",
      "skip_company": true,
      "id": 1,
      "created_at": "2000-01-01T01:00:00Z",
      "dont_separate_submissions_by_folder": true,
      "max_uses": 1,
      "note": "The internal note on the bundle.",
      "path_template": "{{name}}_{{ip}}",
      "send_email_receipt_to_uploader": true,
      "snapshot_id": 1,
      "user_id": 1,
      "username": "user",
      "clickwrap_id": 1,
      "inbox_id": 1,
      "watermark_attachment": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "watermark_value": {
        "key": "example value"
      },
      "has_inbox": true,
      "paths": [
        "file.txt"
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle>
      <code>abc123</code>
      <color_left>#0066a7</color_left>
      <color_link>#d34f5d</color_link>
      <color_text>#0066a7</color_text>
      <color_top>#000000</color_top>
      <color_top_text>#ffffff</color_top_text>
      <url>https://subdomain.files.com/f/12345678</url>
      <description>The public description of the bundle.</description>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <password_protected type="boolean">true</password_protected>
      <permissions>read</permissions>
      <preview_only type="boolean">true</preview_only>
      <require_registration type="boolean">true</require_registration>
      <require_share_recipient type="boolean">true</require_share_recipient>
      <require_logout type="boolean">true</require_logout>
      <clickwrap_body>[Legal text]</clickwrap_body>
      <form_field_set>
        <id type="integer">1</id>
        <title>Sample Form Title</title>
        <form_layout type="array">
          <form_layout type="integer">1</form_layout>
          <form_layout type="integer">2</form_layout>
          <form_layout type="integer">3</form_layout>
          <form_layout type="integer">4</form_layout>
        </form_layout>
        <form_fields type="array">
          <form_field>
            <id type="integer">1</id>
            <label>Sample Label</label>
            <required type="boolean">true</required>
            <help_text>Help Text</help_text>
            <field_type>text</field_type>
            <options_for_select type="array">
              <options_for_select>red</options_for_select>
              <options_for_select>green</options_for_select>
              <options_for_select>blue</options_for_select>
            </options_for_select>
            <default_option>red</default_option>
            <form_field_set_id type="integer">1</form_field_set_id>
          </form_field>
        </form_fields>
        <skip_name type="boolean">true</skip_name>
        <skip_email type="boolean">true</skip_email>
        <skip_company type="boolean">true</skip_company>
      </form_field_set>
      <skip_name type="boolean">true</skip_name>
      <skip_email type="boolean">true</skip_email>
      <start_access_on_date>2000-01-01T01:00:00Z</start_access_on_date>
      <skip_company type="boolean">true</skip_company>
      <id type="integer">1</id>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <dont_separate_submissions_by_folder type="boolean">true</dont_separate_submissions_by_folder>
      <max_uses type="integer">1</max_uses>
      <note>The internal note on the bundle.</note>
      <path_template>{{name}}_{{ip}}</path_template>
      <send_email_receipt_to_uploader type="boolean">true</send_email_receipt_to_uploader>
      <snapshot_id type="integer">1</snapshot_id>
      <user_id type="integer">1</user_id>
      <username>user</username>
      <clickwrap_id type="integer">1</clickwrap_id>
      <inbox_id type="integer">1</inbox_id>
      <watermark_attachment>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </watermark_attachment>
      <watermark_value>
        <key>example value</key>
      </watermark_value>
      <has_inbox type="boolean">true</has_inbox>
      <paths type="array">
        <path>file.txt</path>
      </paths>
    </bundle>
    
    
    Attribute Description
    code string Bundle code. This code forms the end part of the Public URL.
    color_left string Page link and button color
    color_link string Top bar link color
    color_text string Page link and button color
    color_top string Top bar background color
    color_top_text string Top bar text color
    url string Public URL of Share Link
    description string Public description
    expires_at date-time Bundle expiration date/time
    password_protected boolean Is this bundle password protected?
    permissions string Permissions that apply to Folders in this Share Link.
    Possible values: read, write, read_write, full, none, preview_only
    preview_only boolean DEPRECATED: Restrict users to previewing files only. Use permissions instead.
    require_registration boolean Show a registration page that captures the downloader's name and email address?
    require_share_recipient boolean Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
    require_logout boolean If true, we will hide the 'Remember Me' box on the Bundle registration page, requiring that the user logout and log back in every time they visit the page.
    clickwrap_body string Legal text that must be agreed to prior to accessing Bundle.
    form_field_set FormFieldSet Custom Form to use
    skip_name boolean BundleRegistrations can be saved without providing name?
    skip_email boolean BundleRegistrations can be saved without providing email?
    start_access_on_date date-time Date when share will start to be accessible. If nil access granted right after create.
    skip_company boolean BundleRegistrations can be saved without providing company?
    id int64 Bundle ID
    created_at date-time Bundle created at date/time
    dont_separate_submissions_by_folder boolean Do not create subfolders for files uploaded to this share. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.
    max_uses int64 Maximum number of times bundle can be accessed
    note string Bundle internal note
    path_template string Template for creating submission subfolders. Can use the uploader's name, email address, ip, company, and any custom form data.
    send_email_receipt_to_uploader boolean Send delivery receipt to the uploader. Note: For writable share only
    snapshot_id int64 ID of the snapshot containing this bundle's contents.
    user_id int64 Bundle creator user ID
    username string Bundle creator username
    clickwrap_id int64 ID of the clickwrap to use with this bundle.
    inbox_id int64 ID of the associated inbox, if available.
    watermark_attachment Image Preview watermark image applied to all bundle items.
    watermark_value object Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
    has_inbox boolean Does this bundle have an associated inbox?
    paths array A list of paths in this bundle. For performance reasons, this is not provided when listing bundles.
    password string Password for this bundle.
    form_field_set_id int64 Id of Form Field Set to use with this bundle
    create_snapshot boolean If true, create a snapshot of this bundle's contents.
    finalize_snapshot boolean If true, finalize the snapshot of this bundle's contents. Note that create_snapshot must also be true.
    watermark_attachment_file file Preview watermark image applied to all bundle items.
    watermark_attachment_delete boolean If true, will delete the file stored in watermark_attachment

    List Bundles

    Example Request

    curl "https://app.files.com/api/rest/v1/bundles.json?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/bundles.xml?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Bundle.list(
      user_id: 1, 
      per_page: 1
    )
    
    \Files\Model\Bundle::list(array(
      'user_id' => 1, 
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    Bundle.list(parameters).all()
    
    await Bundle.list({
      user_id: 1, 
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    
    await Bundle.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.bundle.list({
      "user_id": 1,
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundle.List(context.Background(), files_sdk.BundleListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterGt: "",
      FilterGteq: "",
      FilterLt: "",
      FilterLteq: "",
    })
    
    
    files-cli bundles list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "code": "abc123",
        "color_left": "#0066a7",
        "color_link": "#d34f5d",
        "color_text": "#0066a7",
        "color_top": "#000000",
        "color_top_text": "#ffffff",
        "url": "https://subdomain.files.com/f/12345678",
        "description": "The public description of the bundle.",
        "expires_at": "2000-01-01T01:00:00Z",
        "password_protected": true,
        "permissions": "read",
        "preview_only": true,
        "require_registration": true,
        "require_share_recipient": true,
        "require_logout": true,
        "clickwrap_body": "[Legal text]",
        "form_field_set": {
          "id": 1,
          "title": "Sample Form Title",
          "form_layout": [
            1,
            2,
            3,
            4
          ],
          "form_fields": [
            {
              "id": 1,
              "label": "Sample Label",
              "required": true,
              "help_text": "Help Text",
              "field_type": "text",
              "options_for_select": [
                "red",
                "green",
                "blue"
              ],
              "default_option": "red",
              "form_field_set_id": 1
            }
          ],
          "skip_name": true,
          "skip_email": true,
          "skip_company": true
        },
        "skip_name": true,
        "skip_email": true,
        "start_access_on_date": "2000-01-01T01:00:00Z",
        "skip_company": true,
        "id": 1,
        "created_at": "2000-01-01T01:00:00Z",
        "dont_separate_submissions_by_folder": true,
        "max_uses": 1,
        "note": "The internal note on the bundle.",
        "path_template": "{{name}}_{{ip}}",
        "send_email_receipt_to_uploader": true,
        "snapshot_id": 1,
        "user_id": 1,
        "username": "user",
        "clickwrap_id": 1,
        "inbox_id": 1,
        "watermark_attachment": {
          "name": "My logo",
          "uri": "https://mysite.files.com/.../my_image.png"
        },
        "watermark_value": {
          "key": "example value"
        },
        "has_inbox": true,
        "paths": [
          "file.txt"
        ]
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundles type="array">
      <bundle>
        <code>abc123</code>
        <color_left>#0066a7</color_left>
        <color_link>#d34f5d</color_link>
        <color_text>#0066a7</color_text>
        <color_top>#000000</color_top>
        <color_top_text>#ffffff</color_top_text>
        <url>https://subdomain.files.com/f/12345678</url>
        <description>The public description of the bundle.</description>
        <expires_at>2000-01-01T01:00:00Z</expires_at>
        <password_protected type="boolean">true</password_protected>
        <permissions>read</permissions>
        <preview_only type="boolean">true</preview_only>
        <require_registration type="boolean">true</require_registration>
        <require_share_recipient type="boolean">true</require_share_recipient>
        <require_logout type="boolean">true</require_logout>
        <clickwrap_body>[Legal text]</clickwrap_body>
        <form_field_set>
          <id type="integer">1</id>
          <title>Sample Form Title</title>
          <form_layout type="array">
            <form_layout type="integer">1</form_layout>
            <form_layout type="integer">2</form_layout>
            <form_layout type="integer">3</form_layout>
            <form_layout type="integer">4</form_layout>
          </form_layout>
          <form_fields type="array">
            <form_field>
              <id type="integer">1</id>
              <label>Sample Label</label>
              <required type="boolean">true</required>
              <help_text>Help Text</help_text>
              <field_type>text</field_type>
              <options_for_select type="array">
                <options_for_select>red</options_for_select>
                <options_for_select>green</options_for_select>
                <options_for_select>blue</options_for_select>
              </options_for_select>
              <default_option>red</default_option>
              <form_field_set_id type="integer">1</form_field_set_id>
            </form_field>
          </form_fields>
          <skip_name type="boolean">true</skip_name>
          <skip_email type="boolean">true</skip_email>
          <skip_company type="boolean">true</skip_company>
        </form_field_set>
        <skip_name type="boolean">true</skip_name>
        <skip_email type="boolean">true</skip_email>
        <start_access_on_date>2000-01-01T01:00:00Z</start_access_on_date>
        <skip_company type="boolean">true</skip_company>
        <id type="integer">1</id>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <dont_separate_submissions_by_folder type="boolean">true</dont_separate_submissions_by_folder>
        <max_uses type="integer">1</max_uses>
        <note>The internal note on the bundle.</note>
        <path_template>{{name}}_{{ip}}</path_template>
        <send_email_receipt_to_uploader type="boolean">true</send_email_receipt_to_uploader>
        <snapshot_id type="integer">1</snapshot_id>
        <user_id type="integer">1</user_id>
        <username>user</username>
        <clickwrap_id type="integer">1</clickwrap_id>
        <inbox_id type="integer">1</inbox_id>
        <watermark_attachment>
          <name>My logo</name>
          <uri>https://mysite.files.com/.../my_image.png</uri>
        </watermark_attachment>
        <watermark_value>
          <key>example value</key>
        </watermark_value>
        <has_inbox type="boolean">true</has_inbox>
        <paths type="array">
          <path>file.txt</path>
        </paths>
      </bundle>
    </bundles>
    
    

    HTTPS Request

    GET /bundles

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[created_at]=desc). Valid fields are created_at and code.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are created_at.
    filter_gt object If set, return records where the specified field is greater than the supplied value. Valid fields are created_at.
    filter_gteq object If set, return records where the specified field is greater than or equal the supplied value. Valid fields are created_at.
    filter_lt object If set, return records where the specified field is less than the supplied value. Valid fields are created_at.
    filter_lteq object If set, return records where the specified field is less than or equal the supplied value. Valid fields are created_at.

    Show Bundle

    Example Request

    curl https://app.files.com/api/rest/v1/bundles/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/bundles/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Bundle.find(id)
    
    \Files\Model\Bundle::find($id);
    
    
    Bundle.find(, parameters
    
    await Bundle.find(id)
    
    
    await Bundle.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.bundle.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundle.Find(context.Background(), files_sdk.BundleFindParams{
      Id: 1,
    })
    
    
    files-cli bundles find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "code": "abc123",
      "color_left": "#0066a7",
      "color_link": "#d34f5d",
      "color_text": "#0066a7",
      "color_top": "#000000",
      "color_top_text": "#ffffff",
      "url": "https://subdomain.files.com/f/12345678",
      "description": "The public description of the bundle.",
      "expires_at": "2000-01-01T01:00:00Z",
      "password_protected": true,
      "permissions": "read",
      "preview_only": true,
      "require_registration": true,
      "require_share_recipient": true,
      "require_logout": true,
      "clickwrap_body": "[Legal text]",
      "form_field_set": {
        "id": 1,
        "title": "Sample Form Title",
        "form_layout": [
          1,
          2,
          3,
          4
        ],
        "form_fields": [
          {
            "id": 1,
            "label": "Sample Label",
            "required": true,
            "help_text": "Help Text",
            "field_type": "text",
            "options_for_select": [
              "red",
              "green",
              "blue"
            ],
            "default_option": "red",
            "form_field_set_id": 1
          }
        ],
        "skip_name": true,
        "skip_email": true,
        "skip_company": true
      },
      "skip_name": true,
      "skip_email": true,
      "start_access_on_date": "2000-01-01T01:00:00Z",
      "skip_company": true,
      "id": 1,
      "created_at": "2000-01-01T01:00:00Z",
      "dont_separate_submissions_by_folder": true,
      "max_uses": 1,
      "note": "The internal note on the bundle.",
      "path_template": "{{name}}_{{ip}}",
      "send_email_receipt_to_uploader": true,
      "snapshot_id": 1,
      "user_id": 1,
      "username": "user",
      "clickwrap_id": 1,
      "inbox_id": 1,
      "watermark_attachment": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "watermark_value": {
        "key": "example value"
      },
      "has_inbox": true,
      "paths": [
        "file.txt"
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle>
      <code>abc123</code>
      <color_left>#0066a7</color_left>
      <color_link>#d34f5d</color_link>
      <color_text>#0066a7</color_text>
      <color_top>#000000</color_top>
      <color_top_text>#ffffff</color_top_text>
      <url>https://subdomain.files.com/f/12345678</url>
      <description>The public description of the bundle.</description>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <password_protected type="boolean">true</password_protected>
      <permissions>read</permissions>
      <preview_only type="boolean">true</preview_only>
      <require_registration type="boolean">true</require_registration>
      <require_share_recipient type="boolean">true</require_share_recipient>
      <require_logout type="boolean">true</require_logout>
      <clickwrap_body>[Legal text]</clickwrap_body>
      <form_field_set>
        <id type="integer">1</id>
        <title>Sample Form Title</title>
        <form_layout type="array">
          <form_layout type="integer">1</form_layout>
          <form_layout type="integer">2</form_layout>
          <form_layout type="integer">3</form_layout>
          <form_layout type="integer">4</form_layout>
        </form_layout>
        <form_fields type="array">
          <form_field>
            <id type="integer">1</id>
            <label>Sample Label</label>
            <required type="boolean">true</required>
            <help_text>Help Text</help_text>
            <field_type>text</field_type>
            <options_for_select type="array">
              <options_for_select>red</options_for_select>
              <options_for_select>green</options_for_select>
              <options_for_select>blue</options_for_select>
            </options_for_select>
            <default_option>red</default_option>
            <form_field_set_id type="integer">1</form_field_set_id>
          </form_field>
        </form_fields>
        <skip_name type="boolean">true</skip_name>
        <skip_email type="boolean">true</skip_email>
        <skip_company type="boolean">true</skip_company>
      </form_field_set>
      <skip_name type="boolean">true</skip_name>
      <skip_email type="boolean">true</skip_email>
      <start_access_on_date>2000-01-01T01:00:00Z</start_access_on_date>
      <skip_company type="boolean">true</skip_company>
      <id type="integer">1</id>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <dont_separate_submissions_by_folder type="boolean">true</dont_separate_submissions_by_folder>
      <max_uses type="integer">1</max_uses>
      <note>The internal note on the bundle.</note>
      <path_template>{{name}}_{{ip}}</path_template>
      <send_email_receipt_to_uploader type="boolean">true</send_email_receipt_to_uploader>
      <snapshot_id type="integer">1</snapshot_id>
      <user_id type="integer">1</user_id>
      <username>user</username>
      <clickwrap_id type="integer">1</clickwrap_id>
      <inbox_id type="integer">1</inbox_id>
      <watermark_attachment>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </watermark_attachment>
      <watermark_value>
        <key>example value</key>
      </watermark_value>
      <has_inbox type="boolean">true</has_inbox>
      <paths type="array">
        <path>file.txt</path>
      </paths>
    </bundle>
    
    

    HTTPS Request

    GET /bundles/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Bundle ID.

    Create Bundle

    Example Request

    curl https://app.files.com/api/rest/v1/bundles.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"paths":["file.txt"],"password":"Password","form_field_set_id":1,"create_snapshot":true,"dont_separate_submissions_by_folder":true,"expires_at":"2000-01-01T01:00:00Z","finalize_snapshot":true,"max_uses":1,"description":"The public description of the bundle.","note":"The internal note on the bundle.","code":"abc123","path_template":"{{name}}_{{ip}}","permissions":"read","preview_only":true,"require_registration":true,"clickwrap_id":1,"inbox_id":1,"require_share_recipient":true,"send_email_receipt_to_uploader":true,"skip_email":true,"skip_name":true,"skip_company":true,"start_access_on_date":"2000-01-01T01:00:00Z","snapshot_id":1}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/bundles.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<bundle>
           <user_id type="integer">1</user_id>
           <paths type="array">
             <path>file.txt</path>
           </paths>
           <password>Password</password>
           <form_field_set_id type="integer">1</form_field_set_id>
           <create_snapshot type="boolean">true</create_snapshot>
           <dont_separate_submissions_by_folder type="boolean">true</dont_separate_submissions_by_folder>
           <expires_at>2000-01-01T01:00:00Z</expires_at>
           <finalize_snapshot type="boolean">true</finalize_snapshot>
           <max_uses type="integer">1</max_uses>
           <description>The public description of the bundle.</description>
           <note>The internal note on the bundle.</note>
           <code>abc123</code>
           <path_template>{{name}}_{{ip}}</path_template>
           <permissions>read</permissions>
           <preview_only type="boolean">true</preview_only>
           <require_registration type="boolean">true</require_registration>
           <clickwrap_id type="integer">1</clickwrap_id>
           <inbox_id type="integer">1</inbox_id>
           <require_share_recipient type="boolean">true</require_share_recipient>
           <send_email_receipt_to_uploader type="boolean">true</send_email_receipt_to_uploader>
           <skip_email type="boolean">true</skip_email>
           <skip_name type="boolean">true</skip_name>
           <skip_company type="boolean">true</skip_company>
           <start_access_on_date>2000-01-01T01:00:00Z</start_access_on_date>
           <snapshot_id type="integer">1</snapshot_id>
         </bundle>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Bundle.create(
      user_id: 1, 
      paths: ["file.txt"], 
      password: "Password", 
      form_field_set_id: 1, 
      create_snapshot: true, 
      dont_separate_submissions_by_folder: true, 
      expires_at: "2000-01-01T01:00:00Z", 
      finalize_snapshot: true, 
      max_uses: 1, 
      description: "The public description of the bundle.", 
      note: "The internal note on the bundle.", 
      code: "abc123", 
      path_template: "{{name}}_{{ip}}", 
      permissions: "read", 
      preview_only: true, 
      require_registration: true, 
      clickwrap_id: 1, 
      inbox_id: 1, 
      require_share_recipient: true, 
      send_email_receipt_to_uploader: true, 
      skip_email: true, 
      skip_name: true, 
      skip_company: true, 
      start_access_on_date: "2000-01-01T01:00:00Z", 
      snapshot_id: 1
    )
    
    \Files\Model\Bundle::create(array(
      'user_id' => 1, 
      'paths' => ["file.txt"], 
      'password' => "Password", 
      'form_field_set_id' => 1, 
      'create_snapshot' => true, 
      'dont_separate_submissions_by_folder' => true, 
      'expires_at' => "2000-01-01T01:00:00Z", 
      'finalize_snapshot' => true, 
      'max_uses' => 1, 
      'description' => "The public description of the bundle.", 
      'note' => "The internal note on the bundle.", 
      'code' => "abc123", 
      'path_template' => "{{name}}_{{ip}}", 
      'permissions' => "read", 
      'preview_only' => true, 
      'require_registration' => true, 
      'clickwrap_id' => 1, 
      'inbox_id' => 1, 
      'require_share_recipient' => true, 
      'send_email_receipt_to_uploader' => true, 
      'skip_email' => true, 
      'skip_name' => true, 
      'skip_company' => true, 
      'start_access_on_date' => "2000-01-01T01:00:00Z", 
      'snapshot_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("paths", ["file.txt"]);
    requestParams.put("password", Password);
    requestParams.put("form_field_set_id", 1);
    requestParams.put("create_snapshot", true);
    requestParams.put("dont_separate_submissions_by_folder", true);
    requestParams.put("expires_at", 2000-01-01T01:00:00Z);
    requestParams.put("finalize_snapshot", true);
    requestParams.put("max_uses", 1);
    requestParams.put("description", The public description of the bundle.);
    requestParams.put("note", The internal note on the bundle.);
    requestParams.put("code", abc123);
    requestParams.put("path_template", {{name}}_{{ip}});
    requestParams.put("permissions", read);
    requestParams.put("preview_only", true);
    requestParams.put("require_registration", true);
    requestParams.put("clickwrap_id", 1);
    requestParams.put("inbox_id", 1);
    requestParams.put("require_share_recipient", true);
    requestParams.put("send_email_receipt_to_uploader", true);
    requestParams.put("skip_email", true);
    requestParams.put("skip_name", true);
    requestParams.put("skip_company", true);
    requestParams.put("start_access_on_date", 2000-01-01T01:00:00Z);
    requestParams.put("snapshot_id", 1);
    Bundle.create(parameters)
    
    await Bundle.create({
      user_id: 1, 
      paths: ["file.txt"], 
      password: "Password", 
      form_field_set_id: 1, 
      create_snapshot: true, 
      dont_separate_submissions_by_folder: true, 
      expires_at: "2000-01-01T01:00:00Z", 
      finalize_snapshot: true, 
      max_uses: 1, 
      description: "The public description of the bundle.", 
      note: "The internal note on the bundle.", 
      code: "abc123", 
      path_template: "{{name}}_{{ip}}", 
      permissions: "read", 
      preview_only: true, 
      require_registration: true, 
      clickwrap_id: 1, 
      inbox_id: 1, 
      require_share_recipient: true, 
      send_email_receipt_to_uploader: true, 
      skip_email: true, 
      skip_name: true, 
      skip_company: true, 
      start_access_on_date: "2000-01-01T01:00:00Z", 
      snapshot_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("paths", (string[]) ["file.txt"]);
    parameters.Add("password", "Password");
    parameters.Add("form_field_set_id", (Int64?) 1);
    parameters.Add("create_snapshot", true);
    parameters.Add("dont_separate_submissions_by_folder", true);
    parameters.Add("expires_at", "2000-01-01T01:00:00Z");
    parameters.Add("finalize_snapshot", true);
    parameters.Add("max_uses", (Int64?) 1);
    parameters.Add("description", "The public description of the bundle.");
    parameters.Add("note", "The internal note on the bundle.");
    parameters.Add("code", "abc123");
    parameters.Add("path_template", "{{name}}_{{ip}}");
    parameters.Add("permissions", "read");
    parameters.Add("preview_only", true);
    parameters.Add("require_registration", true);
    parameters.Add("clickwrap_id", (Int64?) 1);
    parameters.Add("inbox_id", (Int64?) 1);
    parameters.Add("require_share_recipient", true);
    parameters.Add("send_email_receipt_to_uploader", true);
    parameters.Add("skip_email", true);
    parameters.Add("skip_name", true);
    parameters.Add("skip_company", true);
    parameters.Add("start_access_on_date", "2000-01-01T01:00:00Z");
    parameters.Add("snapshot_id", (Int64?) 1);
    
    await Bundle.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.bundle.create({
      "user_id": 1,
      "paths": ["file.txt"],
      "password": "Password",
      "form_field_set_id": 1,
      "create_snapshot": True,
      "dont_separate_submissions_by_folder": True,
      "expires_at": "2000-01-01T01:00:00Z",
      "finalize_snapshot": True,
      "max_uses": 1,
      "description": "The public description of the bundle.",
      "note": "The internal note on the bundle.",
      "code": "abc123",
      "path_template": "{{name}}_{{ip}}",
      "permissions": "read",
      "preview_only": True,
      "require_registration": True,
      "clickwrap_id": 1,
      "inbox_id": 1,
      "require_share_recipient": True,
      "send_email_receipt_to_uploader": True,
      "skip_email": True,
      "skip_name": True,
      "skip_company": True,
      "start_access_on_date": "2000-01-01T01:00:00Z",
      "snapshot_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundle.Create(context.Background(), files_sdk.BundleCreateParams{
      UserId: 1,
      Paths: []string{"file.txt"},
      Password: "Password",
      FormFieldSetId: 1,
      CreateSnapshot: lib.Bool(true),
      DontSeparateSubmissionsByFolder: lib.Bool(true),
      ExpiresAt: "2000-01-01T01:00:00Z",
      FinalizeSnapshot: lib.Bool(true),
      MaxUses: 1,
      Description: "The public description of the bundle.",
      Note: "The internal note on the bundle.",
      Code: "abc123",
      PathTemplate: "{{name}}_{{ip}}",
      Permissions: "read",
      PreviewOnly: lib.Bool(true),
      RequireRegistration: lib.Bool(true),
      ClickwrapId: 1,
      InboxId: 1,
      RequireShareRecipient: lib.Bool(true),
      SendEmailReceiptToUploader: lib.Bool(true),
      SkipEmail: lib.Bool(true),
      SkipName: lib.Bool(true),
      SkipCompany: lib.Bool(true),
      StartAccessOnDate: "2000-01-01T01:00:00Z",
      SnapshotId: 1,
      WatermarkAttachmentFile: "",
    })
    
    
    files-cli bundles create \
      --user-id=1 \
      --paths="["file.txt"]" \
      --password="Password" \
      --form-field-set-id=1 \
      --expires-at="2000-01-01T01:00:00Z" \
      --max-uses=1 \
      --description="The public description of the bundle." \
      --note="The internal note on the bundle." \
      --code="abc123" \
      --path-template="{{name}}_{{ip}}" \
      --permissions="read" \
      --clickwrap-id=1 \
      --inbox-id=1 \
      --start-access-on-date="2000-01-01T01:00:00Z" \
      --snapshot-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "code": "abc123",
      "color_left": "#0066a7",
      "color_link": "#d34f5d",
      "color_text": "#0066a7",
      "color_top": "#000000",
      "color_top_text": "#ffffff",
      "url": "https://subdomain.files.com/f/12345678",
      "description": "The public description of the bundle.",
      "expires_at": "2000-01-01T01:00:00Z",
      "password_protected": true,
      "permissions": "read",
      "preview_only": true,
      "require_registration": true,
      "require_share_recipient": true,
      "require_logout": true,
      "clickwrap_body": "[Legal text]",
      "form_field_set": {
        "id": 1,
        "title": "Sample Form Title",
        "form_layout": [
          1,
          2,
          3,
          4
        ],
        "form_fields": [
          {
            "id": 1,
            "label": "Sample Label",
            "required": true,
            "help_text": "Help Text",
            "field_type": "text",
            "options_for_select": [
              "red",
              "green",
              "blue"
            ],
            "default_option": "red",
            "form_field_set_id": 1
          }
        ],
        "skip_name": true,
        "skip_email": true,
        "skip_company": true
      },
      "skip_name": true,
      "skip_email": true,
      "start_access_on_date": "2000-01-01T01:00:00Z",
      "skip_company": true,
      "id": 1,
      "created_at": "2000-01-01T01:00:00Z",
      "dont_separate_submissions_by_folder": true,
      "max_uses": 1,
      "note": "The internal note on the bundle.",
      "path_template": "{{name}}_{{ip}}",
      "send_email_receipt_to_uploader": true,
      "snapshot_id": 1,
      "user_id": 1,
      "username": "user",
      "clickwrap_id": 1,
      "inbox_id": 1,
      "watermark_attachment": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "watermark_value": {
        "key": "example value"
      },
      "has_inbox": true,
      "paths": [
        "file.txt"
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle>
      <code>abc123</code>
      <color_left>#0066a7</color_left>
      <color_link>#d34f5d</color_link>
      <color_text>#0066a7</color_text>
      <color_top>#000000</color_top>
      <color_top_text>#ffffff</color_top_text>
      <url>https://subdomain.files.com/f/12345678</url>
      <description>The public description of the bundle.</description>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <password_protected type="boolean">true</password_protected>
      <permissions>read</permissions>
      <preview_only type="boolean">true</preview_only>
      <require_registration type="boolean">true</require_registration>
      <require_share_recipient type="boolean">true</require_share_recipient>
      <require_logout type="boolean">true</require_logout>
      <clickwrap_body>[Legal text]</clickwrap_body>
      <form_field_set>
        <id type="integer">1</id>
        <title>Sample Form Title</title>
        <form_layout type="array">
          <form_layout type="integer">1</form_layout>
          <form_layout type="integer">2</form_layout>
          <form_layout type="integer">3</form_layout>
          <form_layout type="integer">4</form_layout>
        </form_layout>
        <form_fields type="array">
          <form_field>
            <id type="integer">1</id>
            <label>Sample Label</label>
            <required type="boolean">true</required>
            <help_text>Help Text</help_text>
            <field_type>text</field_type>
            <options_for_select type="array">
              <options_for_select>red</options_for_select>
              <options_for_select>green</options_for_select>
              <options_for_select>blue</options_for_select>
            </options_for_select>
            <default_option>red</default_option>
            <form_field_set_id type="integer">1</form_field_set_id>
          </form_field>
        </form_fields>
        <skip_name type="boolean">true</skip_name>
        <skip_email type="boolean">true</skip_email>
        <skip_company type="boolean">true</skip_company>
      </form_field_set>
      <skip_name type="boolean">true</skip_name>
      <skip_email type="boolean">true</skip_email>
      <start_access_on_date>2000-01-01T01:00:00Z</start_access_on_date>
      <skip_company type="boolean">true</skip_company>
      <id type="integer">1</id>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <dont_separate_submissions_by_folder type="boolean">true</dont_separate_submissions_by_folder>
      <max_uses type="integer">1</max_uses>
      <note>The internal note on the bundle.</note>
      <path_template>{{name}}_{{ip}}</path_template>
      <send_email_receipt_to_uploader type="boolean">true</send_email_receipt_to_uploader>
      <snapshot_id type="integer">1</snapshot_id>
      <user_id type="integer">1</user_id>
      <username>user</username>
      <clickwrap_id type="integer">1</clickwrap_id>
      <inbox_id type="integer">1</inbox_id>
      <watermark_attachment>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </watermark_attachment>
      <watermark_value>
        <key>example value</key>
      </watermark_value>
      <has_inbox type="boolean">true</has_inbox>
      <paths type="array">
        <path>file.txt</path>
      </paths>
    </bundle>
    
    

    HTTPS Request

    POST /bundles

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    paths array(string) Required A list of paths to include in this bundle.
    password string Password for this bundle.
    form_field_set_id int64 Id of Form Field Set to use with this bundle
    create_snapshot boolean If true, create a snapshot of this bundle's contents.
    dont_separate_submissions_by_folder boolean Do not create subfolders for files uploaded to this share. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.
    expires_at string Bundle expiration date/time
    finalize_snapshot boolean If true, finalize the snapshot of this bundle's contents. Note that create_snapshot must also be true.
    max_uses int64 Maximum number of times bundle can be accessed
    description string Public description
    note string Bundle internal note
    code string Bundle code. This code forms the end part of the Public URL.
    path_template string Template for creating submission subfolders. Can use the uploader's name, email address, ip, company, and any custom form data.
    permissions string Permissions that apply to Folders in this Share Link.
    Possible values: read, write, read_write, full, none, preview_only
    preview_only boolean DEPRECATED: Restrict users to previewing files only. Use permissions instead.
    require_registration boolean Show a registration page that captures the downloader's name and email address?
    clickwrap_id int64 ID of the clickwrap to use with this bundle.
    inbox_id int64 ID of the associated inbox, if available.
    require_share_recipient boolean Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
    send_email_receipt_to_uploader boolean Send delivery receipt to the uploader. Note: For writable share only
    skip_email boolean BundleRegistrations can be saved without providing email?
    skip_name boolean BundleRegistrations can be saved without providing name?
    skip_company boolean BundleRegistrations can be saved without providing company?
    start_access_on_date string Date when share will start to be accessible. If nil access granted right after create.
    snapshot_id int64 ID of the snapshot containing this bundle's contents.
    watermark_attachment_file file Preview watermark image applied to all bundle items. See Attaching Files to API Requests.

    Example Request

    curl https://app.files.com/api/rest/v1/bundles/{id}/share.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"to":["johndoe@gmail.com"],"note":"Just a note.","recipients":[{"name":"John Doe","company":"Acme Ltd","recipient":"johndoe@gmail.com"}]}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/bundles/{id}/share.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<bundle>
           <to type="array">
             <to>johndoe@gmail.com</to>
           </to>
           <note>Just a note.</note>
           <recipients type="array">
             <recipient>
               <name>John Doe</name>
               <company>Acme Ltd</company>
               <recipient>johndoe@gmail.com</recipient>
             </recipient>
           </recipients>
         </bundle>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    bundle = Files::Bundle.list.first
    bundle.share(
      to: ["johndoe@gmail.com"],
      note: "Just a note.",
      recipients: [{"name":"John Doe","company":"Acme Ltd","recipient":"johndoe@gmail.com"}]
    )
    
    $bundle = \Files\Model\Bundle::list()[0];
    $bundle->share(array(
      'to' => ["johndoe@gmail.com"], 
      'note' => "Just a note.", 
      'recipients' => [{"name":"John Doe","company":"Acme Ltd","recipient":"johndoe@gmail.com"}]
    ));
    
    Bundle bundle = Bundle.list()[0];
    bundle.setTo(["johndoe@gmail.com"]);
    bundle.setNote("Just a note.");
    bundle.setRecipients([{"name"=>"John Doe", "company"=>"Acme Ltd", "recipient"=>"johndoe@gmail.com"}]);
    bundle.share();
    
    const bundle = (await Bundle.list())[0]
    await bundle.share({ 
      to: ["johndoe@gmail.com"], 
      note: "Just a note.", 
      recipients: [{"name":"John Doe","company":"Acme Ltd","recipient":"johndoe@gmail.com"}],
    })
    
    var bundle = (await Bundle.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("to", (string[]), shorthand: true) ["johndoe@gmail.com"]);
    parameters.Add("note", "Just a note.");
    parameters.Add("recipients", (object[]), shorthand: true) [{"name":"John Doe","company":"Acme Ltd","recipient":"johndoe@gmail.com"}]);
    
    await bundle.Share(parameters);
    
    files_sdk.set_api_key("my-key")
    
    bundle = files_sdk.bundle.find(id)
    bundle.share({
      "to": ["johndoe@gmail.com"],
      "note": "Just a note.",
      "recipients": [{"name":"John Doe","company":"Acme Ltd","recipient":"johndoe@gmail.com"}]
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundle.Share(context.Background(), files_sdk.BundleShareParams{
      Id: 1,
      To: []string{"johndoe@gmail.com"},
      Note: "Just a note.",
      Recipients: []map[string]interface{}{`{"name":"John Doe","company":"Acme Ltd","recipient":"johndoe@gmail.com"}`},
    })
    
    files-cli bundles share \
      --id=1 \
      --to="["johndoe@gmail.com"]" \
      --note="Just a note." \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    POST /bundles/{id}/share

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Bundle ID.
    to array(string) A list of email addresses to share this bundle with. Required unless recipients is used.
    note string Note to include in email.
    recipients array(object) A list of recipients to share this bundle with. Required unless to is used.

    Update Bundle

    Example Request

    curl https://app.files.com/api/rest/v1/bundles/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"paths":["file.txt"],"password":"Password","form_field_set_id":1,"clickwrap_id":1,"code":"abc123","create_snapshot":true,"description":"The public description of the bundle.","dont_separate_submissions_by_folder":true,"expires_at":"2000-01-01T01:00:00Z","finalize_snapshot":true,"inbox_id":1,"max_uses":1,"note":"The internal note on the bundle.","path_template":"{{name}}_{{ip}}","permissions":"read","preview_only":true,"require_registration":true,"require_share_recipient":true,"send_email_receipt_to_uploader":true,"skip_company":true,"start_access_on_date":"2000-01-01T01:00:00Z","skip_email":true,"skip_name":true,"watermark_attachment_delete":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/bundles/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<bundle>
           <paths type="array">
             <path>file.txt</path>
           </paths>
           <password>Password</password>
           <form_field_set_id type="integer">1</form_field_set_id>
           <clickwrap_id type="integer">1</clickwrap_id>
           <code>abc123</code>
           <create_snapshot type="boolean">true</create_snapshot>
           <description>The public description of the bundle.</description>
           <dont_separate_submissions_by_folder type="boolean">true</dont_separate_submissions_by_folder>
           <expires_at>2000-01-01T01:00:00Z</expires_at>
           <finalize_snapshot type="boolean">true</finalize_snapshot>
           <inbox_id type="integer">1</inbox_id>
           <max_uses type="integer">1</max_uses>
           <note>The internal note on the bundle.</note>
           <path_template>{{name}}_{{ip}}</path_template>
           <permissions>read</permissions>
           <preview_only type="boolean">true</preview_only>
           <require_registration type="boolean">true</require_registration>
           <require_share_recipient type="boolean">true</require_share_recipient>
           <send_email_receipt_to_uploader type="boolean">true</send_email_receipt_to_uploader>
           <skip_company type="boolean">true</skip_company>
           <start_access_on_date>2000-01-01T01:00:00Z</start_access_on_date>
           <skip_email type="boolean">true</skip_email>
           <skip_name type="boolean">true</skip_name>
           <watermark_attachment_delete type="boolean">true</watermark_attachment_delete>
         </bundle>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    bundle = Files::Bundle.list.first
    bundle.update(
      paths: ["file.txt"],
      password: "Password",
      form_field_set_id: 1,
      clickwrap_id: 1,
      code: "abc123",
      create_snapshot: true,
      description: "The public description of the bundle.",
      dont_separate_submissions_by_folder: true,
      expires_at: "2000-01-01T01:00:00Z",
      finalize_snapshot: true,
      inbox_id: 1,
      max_uses: 1,
      note: "The internal note on the bundle.",
      path_template: "{{name}}_{{ip}}",
      permissions: "read",
      preview_only: true,
      require_registration: true,
      require_share_recipient: true,
      send_email_receipt_to_uploader: true,
      skip_company: true,
      start_access_on_date: "2000-01-01T01:00:00Z",
      skip_email: true,
      skip_name: true,
      watermark_attachment_delete: true
    )
    
    $bundle = \Files\Model\Bundle::list()[0];
    $bundle->update(array(
      'paths' => ["file.txt"], 
      'password' => "Password", 
      'form_field_set_id' => 1, 
      'clickwrap_id' => 1, 
      'code' => "abc123", 
      'create_snapshot' => true, 
      'description' => "The public description of the bundle.", 
      'dont_separate_submissions_by_folder' => true, 
      'expires_at' => "2000-01-01T01:00:00Z", 
      'finalize_snapshot' => true, 
      'inbox_id' => 1, 
      'max_uses' => 1, 
      'note' => "The internal note on the bundle.", 
      'path_template' => "{{name}}_{{ip}}", 
      'permissions' => "read", 
      'preview_only' => true, 
      'require_registration' => true, 
      'require_share_recipient' => true, 
      'send_email_receipt_to_uploader' => true, 
      'skip_company' => true, 
      'start_access_on_date' => "2000-01-01T01:00:00Z", 
      'skip_email' => true, 
      'skip_name' => true, 
      'watermark_attachment_delete' => true
    ));
    
    Bundle bundle = Bundle.list()[0];
    bundle.setPaths(["file.txt"]);
    bundle.setPassword("Password");
    bundle.setFormFieldSetId(1);
    bundle.setClickwrapId(1);
    bundle.setCode("abc123");
    bundle.setCreateSnapshot(true);
    bundle.setDescription("The public description of the bundle.");
    bundle.setDontSeparateSubmissionsByFolder(true);
    bundle.setExpiresAt("2000-01-01T01:00:00Z");
    bundle.setFinalizeSnapshot(true);
    bundle.setInboxId(1);
    bundle.setMaxUses(1);
    bundle.setNote("The internal note on the bundle.");
    bundle.setPathTemplate("{{name}}_{{ip}}");
    bundle.setPermissions("read");
    bundle.setPreviewOnly(true);
    bundle.setRequireRegistration(true);
    bundle.setRequireShareRecipient(true);
    bundle.setSendEmailReceiptToUploader(true);
    bundle.setSkipCompany(true);
    bundle.setStartAccessOnDate("2000-01-01T01:00:00Z");
    bundle.setSkipEmail(true);
    bundle.setSkipName(true);
    bundle.setWatermarkAttachmentDelete(true);
    bundle.update();
    
    const bundle = (await Bundle.list())[0]
    await bundle.update({ 
      paths: ["file.txt"], 
      password: "Password", 
      form_field_set_id: 1, 
      clickwrap_id: 1, 
      code: "abc123", 
      create_snapshot: true, 
      description: "The public description of the bundle.", 
      dont_separate_submissions_by_folder: true, 
      expires_at: "2000-01-01T01:00:00Z", 
      finalize_snapshot: true, 
      inbox_id: 1, 
      max_uses: 1, 
      note: "The internal note on the bundle.", 
      path_template: "{{name}}_{{ip}}", 
      permissions: "read", 
      preview_only: true, 
      require_registration: true, 
      require_share_recipient: true, 
      send_email_receipt_to_uploader: true, 
      skip_company: true, 
      start_access_on_date: "2000-01-01T01:00:00Z", 
      skip_email: true, 
      skip_name: true, 
      watermark_attachment_delete: true,
    })
    
    var bundle = (await Bundle.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("paths", (string[]), shorthand: true) ["file.txt"]);
    parameters.Add("password", "Password");
    parameters.Add("form_field_set_id", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("clickwrap_id", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("code", "abc123");
    parameters.Add("create_snapshot", true);
    parameters.Add("description", "The public description of the bundle.");
    parameters.Add("dont_separate_submissions_by_folder", true);
    parameters.Add("expires_at", "2000-01-01T01:00:00Z");
    parameters.Add("finalize_snapshot", true);
    parameters.Add("inbox_id", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("max_uses", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("note", "The internal note on the bundle.");
    parameters.Add("path_template", "{{name}}_{{ip}}");
    parameters.Add("permissions", "read");
    parameters.Add("preview_only", true);
    parameters.Add("require_registration", true);
    parameters.Add("require_share_recipient", true);
    parameters.Add("send_email_receipt_to_uploader", true);
    parameters.Add("skip_company", true);
    parameters.Add("start_access_on_date", "2000-01-01T01:00:00Z");
    parameters.Add("skip_email", true);
    parameters.Add("skip_name", true);
    parameters.Add("watermark_attachment_delete", true);
    
    await bundle.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    bundle = files_sdk.bundle.find(id)
    bundle.update({
      "paths": ["file.txt"],
      "password": "Password",
      "form_field_set_id": 1,
      "clickwrap_id": 1,
      "code": "abc123",
      "create_snapshot": True,
      "description": "The public description of the bundle.",
      "dont_separate_submissions_by_folder": True,
      "expires_at": "2000-01-01T01:00:00Z",
      "finalize_snapshot": True,
      "inbox_id": 1,
      "max_uses": 1,
      "note": "The internal note on the bundle.",
      "path_template": "{{name}}_{{ip}}",
      "permissions": "read",
      "preview_only": True,
      "require_registration": True,
      "require_share_recipient": True,
      "send_email_receipt_to_uploader": True,
      "skip_company": True,
      "start_access_on_date": "2000-01-01T01:00:00Z",
      "skip_email": True,
      "skip_name": True,
      "watermark_attachment_delete": True
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundle.Update(context.Background(), files_sdk.BundleUpdateParams{
      Id: 1,
      Paths: []string{"file.txt"},
      Password: "Password",
      FormFieldSetId: 1,
      ClickwrapId: 1,
      Code: "abc123",
      CreateSnapshot: lib.Bool(true),
      Description: "The public description of the bundle.",
      DontSeparateSubmissionsByFolder: lib.Bool(true),
      ExpiresAt: "2000-01-01T01:00:00Z",
      FinalizeSnapshot: lib.Bool(true),
      InboxId: 1,
      MaxUses: 1,
      Note: "The internal note on the bundle.",
      PathTemplate: "{{name}}_{{ip}}",
      Permissions: "read",
      PreviewOnly: lib.Bool(true),
      RequireRegistration: lib.Bool(true),
      RequireShareRecipient: lib.Bool(true),
      SendEmailReceiptToUploader: lib.Bool(true),
      SkipCompany: lib.Bool(true),
      StartAccessOnDate: "2000-01-01T01:00:00Z",
      SkipEmail: lib.Bool(true),
      SkipName: lib.Bool(true),
      WatermarkAttachmentDelete: lib.Bool(true),
      WatermarkAttachmentFile: "",
    })
    
    files-cli bundles update \
      --id=1 \
      --paths="["file.txt"]" \
      --password="Password" \
      --form-field-set-id=1 \
      --clickwrap-id=1 \
      --code="abc123" \
      --description="The public description of the bundle." \
      --expires-at="2000-01-01T01:00:00Z" \
      --inbox-id=1 \
      --max-uses=1 \
      --note="The internal note on the bundle." \
      --path-template="{{name}}_{{ip}}" \
      --permissions="read" \
      --start-access-on-date="2000-01-01T01:00:00Z" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "code": "abc123",
      "color_left": "#0066a7",
      "color_link": "#d34f5d",
      "color_text": "#0066a7",
      "color_top": "#000000",
      "color_top_text": "#ffffff",
      "url": "https://subdomain.files.com/f/12345678",
      "description": "The public description of the bundle.",
      "expires_at": "2000-01-01T01:00:00Z",
      "password_protected": true,
      "permissions": "read",
      "preview_only": true,
      "require_registration": true,
      "require_share_recipient": true,
      "require_logout": true,
      "clickwrap_body": "[Legal text]",
      "form_field_set": {
        "id": 1,
        "title": "Sample Form Title",
        "form_layout": [
          1,
          2,
          3,
          4
        ],
        "form_fields": [
          {
            "id": 1,
            "label": "Sample Label",
            "required": true,
            "help_text": "Help Text",
            "field_type": "text",
            "options_for_select": [
              "red",
              "green",
              "blue"
            ],
            "default_option": "red",
            "form_field_set_id": 1
          }
        ],
        "skip_name": true,
        "skip_email": true,
        "skip_company": true
      },
      "skip_name": true,
      "skip_email": true,
      "start_access_on_date": "2000-01-01T01:00:00Z",
      "skip_company": true,
      "id": 1,
      "created_at": "2000-01-01T01:00:00Z",
      "dont_separate_submissions_by_folder": true,
      "max_uses": 1,
      "note": "The internal note on the bundle.",
      "path_template": "{{name}}_{{ip}}",
      "send_email_receipt_to_uploader": true,
      "snapshot_id": 1,
      "user_id": 1,
      "username": "user",
      "clickwrap_id": 1,
      "inbox_id": 1,
      "watermark_attachment": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "watermark_value": {
        "key": "example value"
      },
      "has_inbox": true,
      "paths": [
        "file.txt"
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle>
      <code>abc123</code>
      <color_left>#0066a7</color_left>
      <color_link>#d34f5d</color_link>
      <color_text>#0066a7</color_text>
      <color_top>#000000</color_top>
      <color_top_text>#ffffff</color_top_text>
      <url>https://subdomain.files.com/f/12345678</url>
      <description>The public description of the bundle.</description>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <password_protected type="boolean">true</password_protected>
      <permissions>read</permissions>
      <preview_only type="boolean">true</preview_only>
      <require_registration type="boolean">true</require_registration>
      <require_share_recipient type="boolean">true</require_share_recipient>
      <require_logout type="boolean">true</require_logout>
      <clickwrap_body>[Legal text]</clickwrap_body>
      <form_field_set>
        <id type="integer">1</id>
        <title>Sample Form Title</title>
        <form_layout type="array">
          <form_layout type="integer">1</form_layout>
          <form_layout type="integer">2</form_layout>
          <form_layout type="integer">3</form_layout>
          <form_layout type="integer">4</form_layout>
        </form_layout>
        <form_fields type="array">
          <form_field>
            <id type="integer">1</id>
            <label>Sample Label</label>
            <required type="boolean">true</required>
            <help_text>Help Text</help_text>
            <field_type>text</field_type>
            <options_for_select type="array">
              <options_for_select>red</options_for_select>
              <options_for_select>green</options_for_select>
              <options_for_select>blue</options_for_select>
            </options_for_select>
            <default_option>red</default_option>
            <form_field_set_id type="integer">1</form_field_set_id>
          </form_field>
        </form_fields>
        <skip_name type="boolean">true</skip_name>
        <skip_email type="boolean">true</skip_email>
        <skip_company type="boolean">true</skip_company>
      </form_field_set>
      <skip_name type="boolean">true</skip_name>
      <skip_email type="boolean">true</skip_email>
      <start_access_on_date>2000-01-01T01:00:00Z</start_access_on_date>
      <skip_company type="boolean">true</skip_company>
      <id type="integer">1</id>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <dont_separate_submissions_by_folder type="boolean">true</dont_separate_submissions_by_folder>
      <max_uses type="integer">1</max_uses>
      <note>The internal note on the bundle.</note>
      <path_template>{{name}}_{{ip}}</path_template>
      <send_email_receipt_to_uploader type="boolean">true</send_email_receipt_to_uploader>
      <snapshot_id type="integer">1</snapshot_id>
      <user_id type="integer">1</user_id>
      <username>user</username>
      <clickwrap_id type="integer">1</clickwrap_id>
      <inbox_id type="integer">1</inbox_id>
      <watermark_attachment>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </watermark_attachment>
      <watermark_value>
        <key>example value</key>
      </watermark_value>
      <has_inbox type="boolean">true</has_inbox>
      <paths type="array">
        <path>file.txt</path>
      </paths>
    </bundle>
    
    

    HTTPS Request

    PATCH /bundles/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Bundle ID.
    paths array(string) A list of paths to include in this bundle.
    password string Password for this bundle.
    form_field_set_id int64 Id of Form Field Set to use with this bundle
    clickwrap_id int64 ID of the clickwrap to use with this bundle.
    code string Bundle code. This code forms the end part of the Public URL.
    create_snapshot boolean If true, create a snapshot of this bundle's contents.
    description string Public description
    dont_separate_submissions_by_folder boolean Do not create subfolders for files uploaded to this share. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.
    expires_at string Bundle expiration date/time
    finalize_snapshot boolean If true, finalize the snapshot of this bundle's contents. Note that create_snapshot must also be true.
    inbox_id int64 ID of the associated inbox, if available.
    max_uses int64 Maximum number of times bundle can be accessed
    note string Bundle internal note
    path_template string Template for creating submission subfolders. Can use the uploader's name, email address, ip, company, and any custom form data.
    permissions string Permissions that apply to Folders in this Share Link.
    Possible values: read, write, read_write, full, none, preview_only
    preview_only boolean DEPRECATED: Restrict users to previewing files only. Use permissions instead.
    require_registration boolean Show a registration page that captures the downloader's name and email address?
    require_share_recipient boolean Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
    send_email_receipt_to_uploader boolean Send delivery receipt to the uploader. Note: For writable share only
    skip_company boolean BundleRegistrations can be saved without providing company?
    start_access_on_date string Date when share will start to be accessible. If nil access granted right after create.
    skip_email boolean BundleRegistrations can be saved without providing email?
    skip_name boolean BundleRegistrations can be saved without providing name?
    watermark_attachment_delete boolean If true, will delete the file stored in watermark_attachment
    watermark_attachment_file file Preview watermark image applied to all bundle items. See Attaching Files to API Requests.

    Delete Bundle

    Example Request

    curl https://app.files.com/api/rest/v1/bundles/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/bundles/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    bundle = Files::Bundle.list.first
    bundle.delete
    
    $bundle = \Files\Model\Bundle::list()[0];
    $bundle->delete();
    
    Bundle bundle = Bundle.list()[0];
    
    bundle.delete();
    
    const bundle = (await Bundle.list())[0]
    await bundle.delete()
    
    var bundle = (await Bundle.List())[0];
    
    await bundle.Delete();
    
    files_sdk.set_api_key("my-key")
    
    bundle = files_sdk.bundle.find(id)
    bundle.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundle.Delete(context.Background(), files_sdk.BundleDeleteParams{
      Id: 1,
    })
    
    files-cli bundles delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /bundles/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Bundle ID.

    Bundle Downloads

    The BundleDownloads resource in the REST API allows you to operate on BundleDownloads.

    The BundleDownload object

    Example BundleDownload Object

    {
      "bundle_registration": "example",
      "download_method": "file",
      "path": "a/b/test.txt",
      "created_at": "2000-01-01T01:00:00Z"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle-download>
      <bundle_registration>example</bundle_registration>
      <download_method>file</download_method>
      <path>a/b/test.txt</path>
      <created_at>2000-01-01T01:00:00Z</created_at>
    </bundle-download>
    
    
    Attribute Description
    bundle_registration BundleRegistration
    download_method string Download method (file or full_zip)
    Possible values: file, full_zip
    path string Download path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    created_at date-time Download date/time

    List Bundle Downloads

    Example Request

    curl "https://app.files.com/api/rest/v1/bundle_downloads.json?bundle_id=1&bundle_registration_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/bundle_downloads.xml?bundle_id=1&bundle_registration_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::BundleDownload.list(
      per_page: 1, 
      bundle_id: 1, 
      bundle_registration_id: 1
    )
    
    \Files\Model\BundleDownload::list(array(
      'per_page' => 1, 
      'bundle_id' => 1, 
      'bundle_registration_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("bundle_id", 1);
    requestParams.put("bundle_registration_id", 1);
    BundleDownload.list(parameters).all()
    
    await BundleDownload.list({
      per_page: 1, 
      bundle_id: 1, 
      bundle_registration_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("bundle_id", (Int64?) 1);
    parameters.Add("bundle_registration_id", (Int64?) 1);
    
    await BundleDownload.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.bundle_download.list({
      "per_page": 1,
      "bundle_id": 1,
      "bundle_registration_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundledownload.List(context.Background(), files_sdk.BundleDownloadListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterGt: "",
      FilterGteq: "",
      FilterLt: "",
      FilterLteq: "",
      BundleId: 1,
      BundleRegistrationId: 1,
    })
    
    
    files-cli bundle-downloads list \
      --cursor="" \
      --per-page=1 \
      --bundle-id=1 \
      --bundle-registration-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "bundle_registration": "example",
        "download_method": "file",
        "path": "a/b/test.txt",
        "created_at": "2000-01-01T01:00:00Z"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle-downloads type="array">
      <bundle-download>
        <bundle_registration>example</bundle_registration>
        <download_method>file</download_method>
        <path>a/b/test.txt</path>
        <created_at>2000-01-01T01:00:00Z</created_at>
      </bundle-download>
    </bundle-downloads>
    
    

    HTTPS Request

    GET /bundle_downloads

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    bundle_id int64 Bundle ID
    bundle_registration_id int64 BundleRegistration ID

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[created_at]=desc). Valid fields are created_at.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are created_at.
    filter_gt object If set, return records where the specified field is greater than the supplied value. Valid fields are created_at.
    filter_gteq object If set, return records where the specified field is greater than or equal the supplied value. Valid fields are created_at.
    filter_lt object If set, return records where the specified field is less than the supplied value. Valid fields are created_at.
    filter_lteq object If set, return records where the specified field is less than or equal the supplied value. Valid fields are created_at.

    Bundle Notifications

    Bundle notifications are emails sent out to users when certain actions are performed on or within a shared set of files and folders.

    The BundleNotification object

    Example BundleNotification Object

    {
      "bundle_id": 1,
      "id": 1,
      "notify_on_registration": true,
      "notify_on_upload": true,
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle-notification>
      <bundle_id type="integer">1</bundle_id>
      <id type="integer">1</id>
      <notify_on_registration type="boolean">true</notify_on_registration>
      <notify_on_upload type="boolean">true</notify_on_upload>
      <user_id type="integer">1</user_id>
    </bundle-notification>
    
    
    Attribute Description
    bundle_id int64 Bundle ID to notify on
    id int64 Bundle Notification ID
    notify_on_registration boolean Triggers bundle notification when a registration action occurs for it.
    notify_on_upload boolean Triggers bundle notification when a upload action occurs for it.
    user_id int64 The id of the user to notify.

    List Bundle Notifications

    Example Request

    curl "https://app.files.com/api/rest/v1/bundle_notifications.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/bundle_notifications.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::BundleNotification.list(
      per_page: 1
    )
    
    \Files\Model\BundleNotification::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    BundleNotification.list(parameters).all()
    
    await BundleNotification.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await BundleNotification.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.bundle_notification.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundlenotification.List(context.Background(), files_sdk.BundleNotificationListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
    })
    
    
    files-cli bundle-notifications list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "bundle_id": 1,
        "id": 1,
        "notify_on_registration": true,
        "notify_on_upload": true,
        "user_id": 1
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle-notifications type="array">
      <bundle-notification>
        <bundle_id type="integer">1</bundle_id>
        <id type="integer">1</id>
        <notify_on_registration type="boolean">true</notify_on_registration>
        <notify_on_upload type="boolean">true</notify_on_upload>
        <user_id type="integer">1</user_id>
      </bundle-notification>
    </bundle-notifications>
    
    

    HTTPS Request

    GET /bundle_notifications

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[bundle_id]=desc). Valid fields are bundle_id.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are bundle_id.

    Show Bundle Notification

    Example Request

    curl https://app.files.com/api/rest/v1/bundle_notifications/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/bundle_notifications/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::BundleNotification.find(id)
    
    \Files\Model\BundleNotification::find($id);
    
    
    BundleNotification.find(, parameters
    
    await BundleNotification.find(id)
    
    
    await BundleNotification.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.bundle_notification.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundlenotification.Find(context.Background(), files_sdk.BundleNotificationFindParams{
      Id: 1,
    })
    
    
    files-cli bundle-notifications find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "bundle_id": 1,
      "id": 1,
      "notify_on_registration": true,
      "notify_on_upload": true,
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle-notification>
      <bundle_id type="integer">1</bundle_id>
      <id type="integer">1</id>
      <notify_on_registration type="boolean">true</notify_on_registration>
      <notify_on_upload type="boolean">true</notify_on_upload>
      <user_id type="integer">1</user_id>
    </bundle-notification>
    
    

    HTTPS Request

    GET /bundle_notifications/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Bundle Notification ID.

    Create Bundle Notification

    Example Request

    curl https://app.files.com/api/rest/v1/bundle_notifications.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"bundle_id":1,"user_id":1,"notify_on_registration":true,"notify_on_upload":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/bundle_notifications.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<bundle-notification>
           <bundle_id type="integer">1</bundle_id>
           <user_id type="integer">1</user_id>
           <notify_on_registration type="boolean">true</notify_on_registration>
           <notify_on_upload type="boolean">true</notify_on_upload>
         </bundle-notification>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::BundleNotification.create(
      bundle_id: 1, 
      user_id: 1, 
      notify_on_registration: true, 
      notify_on_upload: true
    )
    
    \Files\Model\BundleNotification::create(array(
      'bundle_id' => 1, 
      'user_id' => 1, 
      'notify_on_registration' => true, 
      'notify_on_upload' => true
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("bundle_id", 1);
    requestParams.put("user_id", 1);
    requestParams.put("notify_on_registration", true);
    requestParams.put("notify_on_upload", true);
    BundleNotification.create(parameters)
    
    await BundleNotification.create({
      bundle_id: 1, 
      user_id: 1, 
      notify_on_registration: true, 
      notify_on_upload: true,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("bundle_id", (Int64?) 1);
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("notify_on_registration", true);
    parameters.Add("notify_on_upload", true);
    
    await BundleNotification.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.bundle_notification.create({
      "bundle_id": 1,
      "user_id": 1,
      "notify_on_registration": True,
      "notify_on_upload": True
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundlenotification.Create(context.Background(), files_sdk.BundleNotificationCreateParams{
      BundleId: 1,
      UserId: 1,
      NotifyOnRegistration: lib.Bool(true),
      NotifyOnUpload: lib.Bool(true),
    })
    
    
    files-cli bundle-notifications create \
      --bundle-id=1 \
      --user-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "bundle_id": 1,
      "id": 1,
      "notify_on_registration": true,
      "notify_on_upload": true,
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle-notification>
      <bundle_id type="integer">1</bundle_id>
      <id type="integer">1</id>
      <notify_on_registration type="boolean">true</notify_on_registration>
      <notify_on_upload type="boolean">true</notify_on_upload>
      <user_id type="integer">1</user_id>
    </bundle-notification>
    
    

    HTTPS Request

    POST /bundle_notifications

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    bundle_id int64 Required Bundle ID to notify on
    user_id int64 The id of the user to notify.
    notify_on_registration boolean Triggers bundle notification when a registration action occurs for it.
    notify_on_upload boolean Triggers bundle notification when a upload action occurs for it.

    Update Bundle Notification

    Example Request

    curl https://app.files.com/api/rest/v1/bundle_notifications/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"notify_on_registration":true,"notify_on_upload":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/bundle_notifications/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<bundle-notification>
           <notify_on_registration type="boolean">true</notify_on_registration>
           <notify_on_upload type="boolean">true</notify_on_upload>
         </bundle-notification>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    bundle_notification = Files::BundleNotification.list.first
    bundle_notification.update(
      notify_on_registration: true,
      notify_on_upload: true
    )
    
    $bundle_notification = \Files\Model\BundleNotification::list()[0];
    $bundle_notification->update(array(
      'notify_on_registration' => true, 
      'notify_on_upload' => true
    ));
    
    BundleNotification bundleNotification = BundleNotification.list()[0];
    bundleNotification.setNotifyOnRegistration(true);
    bundleNotification.setNotifyOnUpload(true);
    bundleNotification.update();
    
    const bundleNotification = (await BundleNotification.list())[0]
    await bundleNotification.update({ 
      notify_on_registration: true, 
      notify_on_upload: true,
    })
    
    var bundleNotification = (await BundleNotification.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("notify_on_registration", true);
    parameters.Add("notify_on_upload", true);
    
    await bundleNotification.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    bundle_notification = files_sdk.bundle_notification.find(id)
    bundle_notification.update({
      "notify_on_registration": True,
      "notify_on_upload": True
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundlenotification.Update(context.Background(), files_sdk.BundleNotificationUpdateParams{
      Id: 1,
      NotifyOnRegistration: lib.Bool(true),
      NotifyOnUpload: lib.Bool(true),
    })
    
    files-cli bundle-notifications update \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "bundle_id": 1,
      "id": 1,
      "notify_on_registration": true,
      "notify_on_upload": true,
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle-notification>
      <bundle_id type="integer">1</bundle_id>
      <id type="integer">1</id>
      <notify_on_registration type="boolean">true</notify_on_registration>
      <notify_on_upload type="boolean">true</notify_on_upload>
      <user_id type="integer">1</user_id>
    </bundle-notification>
    
    

    HTTPS Request

    PATCH /bundle_notifications/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Bundle Notification ID.
    notify_on_registration boolean Triggers bundle notification when a registration action occurs for it.
    notify_on_upload boolean Triggers bundle notification when a upload action occurs for it.

    Delete Bundle Notification

    Example Request

    curl https://app.files.com/api/rest/v1/bundle_notifications/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/bundle_notifications/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    bundle_notification = Files::BundleNotification.list.first
    bundle_notification.delete
    
    $bundle_notification = \Files\Model\BundleNotification::list()[0];
    $bundle_notification->delete();
    
    BundleNotification bundleNotification = BundleNotification.list()[0];
    
    bundleNotification.delete();
    
    const bundleNotification = (await BundleNotification.list())[0]
    await bundleNotification.delete()
    
    var bundleNotification = (await BundleNotification.List())[0];
    
    await bundleNotification.Delete();
    
    files_sdk.set_api_key("my-key")
    
    bundle_notification = files_sdk.bundle_notification.find(id)
    bundle_notification.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundlenotification.Delete(context.Background(), files_sdk.BundleNotificationDeleteParams{
      Id: 1,
    })
    
    files-cli bundle-notifications delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /bundle_notifications/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Bundle Notification ID.

    Bundle Recipients

    Bundle recipients are people who have had a bundle shared with them. A Bundle can be re-shared with a BundleRecipient by sending a create request with the inbox_id, recipient email address, and share_after_create => true.

    The BundleRecipient object

    Example BundleRecipient Object

    {
      "company": "Acme Inc.",
      "name": "John Doe",
      "note": "Some note.",
      "recipient": "john.doe@example.com",
      "sent_at": "2000-01-01T01:00:00Z"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle-recipient>
      <company>Acme Inc.</company>
      <name>John Doe</name>
      <note>Some note.</note>
      <recipient>john.doe@example.com</recipient>
      <sent_at>2000-01-01T01:00:00Z</sent_at>
    </bundle-recipient>
    
    
    Attribute Description
    company string The recipient's company.
    name string The recipient's name.
    note string A note sent to the recipient with the bundle.
    recipient string The recipient's email address.
    sent_at date-time When the Bundle was shared with this recipient.
    bundle_id int64 Bundle to share.
    share_after_create boolean Set to true to share the link with the recipient upon creation.

    List Bundle Recipients

    Example Request

    curl "https://app.files.com/api/rest/v1/bundle_recipients.json?bundle_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/bundle_recipients.xml?bundle_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::BundleRecipient.list(
      per_page: 1, 
      bundle_id: 1
    )
    
    \Files\Model\BundleRecipient::list(array(
      'per_page' => 1, 
      'bundle_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("bundle_id", 1);
    BundleRecipient.list(parameters).all()
    
    await BundleRecipient.list({
      per_page: 1, 
      bundle_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("bundle_id", (Int64?) 1);
    
    await BundleRecipient.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.bundle_recipient.list({
      "per_page": 1,
      "bundle_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundlerecipient.List(context.Background(), files_sdk.BundleRecipientListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      BundleId: 1,
    })
    
    
    files-cli bundle-recipients list \
      --cursor="" \
      --per-page=1 \
      --bundle-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "company": "Acme Inc.",
        "name": "John Doe",
        "note": "Some note.",
        "recipient": "john.doe@example.com",
        "sent_at": "2000-01-01T01:00:00Z"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle-recipients type="array">
      <bundle-recipient>
        <company>Acme Inc.</company>
        <name>John Doe</name>
        <note>Some note.</note>
        <recipient>john.doe@example.com</recipient>
        <sent_at>2000-01-01T01:00:00Z</sent_at>
      </bundle-recipient>
    </bundle-recipients>
    
    

    HTTPS Request

    GET /bundle_recipients

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    bundle_id int64 Required List recipients for the bundle with this ID.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[has_registrations]=desc). Valid fields are has_registrations.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are has_registrations.

    Create Bundle Recipient

    Example Request

    curl https://app.files.com/api/rest/v1/bundle_recipients.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"bundle_id":1,"recipient":"johndoe@gmail.com","name":"John Smith","company":"Acme Ltd","note":"Just a note.","share_after_create":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/bundle_recipients.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<bundle-recipient>
           <bundle_id type="integer">1</bundle_id>
           <recipient>johndoe@gmail.com</recipient>
           <name>John Smith</name>
           <company>Acme Ltd</company>
           <note>Just a note.</note>
           <share_after_create type="boolean">true</share_after_create>
         </bundle-recipient>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::BundleRecipient.create(
      bundle_id: 1, 
      recipient: "johndoe@gmail.com", 
      name: "John Smith", 
      company: "Acme Ltd", 
      note: "Just a note.", 
      share_after_create: true
    )
    
    \Files\Model\BundleRecipient::create(array(
      'bundle_id' => 1, 
      'recipient' => "johndoe@gmail.com", 
      'name' => "John Smith", 
      'company' => "Acme Ltd", 
      'note' => "Just a note.", 
      'share_after_create' => true
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("bundle_id", 1);
    requestParams.put("recipient", johndoe@gmail.com);
    requestParams.put("name", John Smith);
    requestParams.put("company", Acme Ltd);
    requestParams.put("note", Just a note.);
    requestParams.put("share_after_create", true);
    BundleRecipient.create(parameters)
    
    await BundleRecipient.create({
      bundle_id: 1, 
      recipient: "johndoe@gmail.com", 
      name: "John Smith", 
      company: "Acme Ltd", 
      note: "Just a note.", 
      share_after_create: true,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("bundle_id", (Int64?) 1);
    parameters.Add("recipient", "johndoe@gmail.com");
    parameters.Add("name", "John Smith");
    parameters.Add("company", "Acme Ltd");
    parameters.Add("note", "Just a note.");
    parameters.Add("share_after_create", true);
    
    await BundleRecipient.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.bundle_recipient.create({
      "bundle_id": 1,
      "recipient": "johndoe@gmail.com",
      "name": "John Smith",
      "company": "Acme Ltd",
      "note": "Just a note.",
      "share_after_create": True
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundlerecipient.Create(context.Background(), files_sdk.BundleRecipientCreateParams{
      BundleId: 1,
      Recipient: "johndoe@gmail.com",
      Name: "John Smith",
      Company: "Acme Ltd",
      Note: "Just a note.",
      ShareAfterCreate: lib.Bool(true),
    })
    
    
    files-cli bundle-recipients create \
      --bundle-id=1 \
      --recipient="johndoe@gmail.com" \
      --name="John Smith" \
      --company="Acme Ltd" \
      --note="Just a note." \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "company": "Acme Inc.",
      "name": "John Doe",
      "note": "Some note.",
      "recipient": "john.doe@example.com",
      "sent_at": "2000-01-01T01:00:00Z"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle-recipient>
      <company>Acme Inc.</company>
      <name>John Doe</name>
      <note>Some note.</note>
      <recipient>john.doe@example.com</recipient>
      <sent_at>2000-01-01T01:00:00Z</sent_at>
    </bundle-recipient>
    
    

    HTTPS Request

    POST /bundle_recipients

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    bundle_id int64 Required Bundle to share.
    recipient string Required Email addresses to share this bundle with.
    name string Name of recipient.
    company string Company of recipient.
    note string Note to include in email.
    share_after_create boolean Set to true to share the link with the recipient upon creation.

    Bundle Registrations

    BundleRegistrations record when a Bundle user fills out the form to access the bundle.

    The BundleRegistration object

    Example BundleRegistration Object

    {
      "code": "abc123",
      "name": "account",
      "company": "Action Verb",
      "email": "john.doe@files.com",
      "ip": "10.1.1.1",
      "inbox_code": "abc123",
      "clickwrap_body": "example",
      "form_field_set_id": 1,
      "form_field_data": {
        "key": "example value"
      },
      "bundle_code": "example",
      "bundle_id": 1,
      "bundle_recipient_id": 1,
      "created_at": "2000-01-01T01:00:00Z"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle-registration>
      <code>abc123</code>
      <name>account</name>
      <company>Action Verb</company>
      <email>john.doe@files.com</email>
      <ip>10.1.1.1</ip>
      <inbox_code>abc123</inbox_code>
      <clickwrap_body>example</clickwrap_body>
      <form_field_set_id type="integer">1</form_field_set_id>
      <form_field_data>
        <key>example value</key>
      </form_field_data>
      <bundle_code>example</bundle_code>
      <bundle_id type="integer">1</bundle_id>
      <bundle_recipient_id type="integer">1</bundle_recipient_id>
      <created_at>2000-01-01T01:00:00Z</created_at>
    </bundle-registration>
    
    
    Attribute Description
    code string Registration cookie code
    name string Registrant name
    company string Registrant company name
    email string Registrant email address
    ip string Registrant IP Address
    inbox_code string InboxRegistration cookie code, if there is an associated InboxRegistration
    clickwrap_body string Clickwrap text that was shown to the registrant
    form_field_set_id int64 Id of associated form field set
    form_field_data object Data for form field set with form field ids as keys and user data as values
    bundle_code string Bundle URL code
    bundle_id int64 Id of associated bundle
    bundle_recipient_id int64 Id of associated bundle recipient
    created_at date-time Registration creation date/time

    List Bundle Registrations

    Example Request

    curl "https://app.files.com/api/rest/v1/bundle_registrations.json?bundle_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/bundle_registrations.xml?bundle_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::BundleRegistration.list(
      per_page: 1, 
      bundle_id: 1
    )
    
    \Files\Model\BundleRegistration::list(array(
      'per_page' => 1, 
      'bundle_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("bundle_id", 1);
    BundleRegistration.list(parameters).all()
    
    await BundleRegistration.list({
      per_page: 1, 
      bundle_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("bundle_id", (Int64?) 1);
    
    await BundleRegistration.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.bundle_registration.list({
      "per_page": 1,
      "bundle_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    bundleregistration.List(context.Background(), files_sdk.BundleRegistrationListParams{
      Cursor: "",
      PerPage: 1,
      BundleId: 1,
    })
    
    
    files-cli bundle-registrations list \
      --cursor="" \
      --per-page=1 \
      --bundle-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "code": "abc123",
        "name": "account",
        "company": "Action Verb",
        "email": "john.doe@files.com",
        "ip": "10.1.1.1",
        "inbox_code": "abc123",
        "clickwrap_body": "example",
        "form_field_set_id": 1,
        "form_field_data": {
          "key": "example value"
        },
        "bundle_code": "example",
        "bundle_id": 1,
        "bundle_recipient_id": 1,
        "created_at": "2000-01-01T01:00:00Z"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle-registrations type="array">
      <bundle-registration>
        <code>abc123</code>
        <name>account</name>
        <company>Action Verb</company>
        <email>john.doe@files.com</email>
        <ip>10.1.1.1</ip>
        <inbox_code>abc123</inbox_code>
        <clickwrap_body>example</clickwrap_body>
        <form_field_set_id type="integer">1</form_field_set_id>
        <form_field_data>
          <key>example value</key>
        </form_field_data>
        <bundle_code>example</bundle_code>
        <bundle_id type="integer">1</bundle_id>
        <bundle_recipient_id type="integer">1</bundle_recipient_id>
        <created_at>2000-01-01T01:00:00Z</created_at>
      </bundle-registration>
    </bundle-registrations>
    
    

    HTTPS Request

    GET /bundle_registrations

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    bundle_id int64 ID of the associated Bundle

    Pagination Params

    Read more about Paginating List Requests.

    Clickwraps

    A Clickwrap is a legal agreement (such as an NDA or Terms of Use) that your Users and/or Bundle/Inbox participants will need to agree to via a "Clickwrap" UI before accessing the site, bundle, or inbox.

    The values for use_with_users, use_with_bundles, use_with_inboxes are explained as follows:

    The Clickwrap object

    Example Clickwrap Object

    {
      "id": 1,
      "name": "Example Site NDA for Files.com Use",
      "body": "[Legal body text]",
      "use_with_users": "example",
      "use_with_bundles": "example",
      "use_with_inboxes": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <clickwrap>
      <id type="integer">1</id>
      <name>Example Site NDA for Files.com Use</name>
      <body>[Legal body text]</body>
      <use_with_users>example</use_with_users>
      <use_with_bundles>example</use_with_bundles>
      <use_with_inboxes>example</use_with_inboxes>
    </clickwrap>
    
    
    Attribute Description
    id int64 Clickwrap ID
    name string Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
    body string Body text of Clickwrap (supports Markdown formatting).
    use_with_users string Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
    Possible values: none, require
    use_with_bundles string Use this Clickwrap for Bundles?
    Possible values: none, available, require, available_to_all_users
    use_with_inboxes string Use this Clickwrap for Inboxes?
    Possible values: none, available, require, available_to_all_users

    List Clickwraps

    Example Request

    curl "https://app.files.com/api/rest/v1/clickwraps.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/clickwraps.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Clickwrap.list(
      per_page: 1
    )
    
    \Files\Model\Clickwrap::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    Clickwrap.list(parameters).all()
    
    await Clickwrap.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await Clickwrap.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.clickwrap.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    clickwrap.List(context.Background(), files_sdk.ClickwrapListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli clickwraps list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "name": "Example Site NDA for Files.com Use",
        "body": "[Legal body text]",
        "use_with_users": "example",
        "use_with_bundles": "example",
        "use_with_inboxes": "example"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <clickwraps type="array">
      <clickwrap>
        <id type="integer">1</id>
        <name>Example Site NDA for Files.com Use</name>
        <body>[Legal body text]</body>
        <use_with_users>example</use_with_users>
        <use_with_bundles>example</use_with_bundles>
        <use_with_inboxes>example</use_with_inboxes>
      </clickwrap>
    </clickwraps>
    
    

    HTTPS Request

    GET /clickwraps

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Show Clickwrap

    Example Request

    curl https://app.files.com/api/rest/v1/clickwraps/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/clickwraps/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Clickwrap.find(id)
    
    \Files\Model\Clickwrap::find($id);
    
    
    Clickwrap.find(, parameters
    
    await Clickwrap.find(id)
    
    
    await Clickwrap.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.clickwrap.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    clickwrap.Find(context.Background(), files_sdk.ClickwrapFindParams{
      Id: 1,
    })
    
    
    files-cli clickwraps find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "Example Site NDA for Files.com Use",
      "body": "[Legal body text]",
      "use_with_users": "example",
      "use_with_bundles": "example",
      "use_with_inboxes": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <clickwrap>
      <id type="integer">1</id>
      <name>Example Site NDA for Files.com Use</name>
      <body>[Legal body text]</body>
      <use_with_users>example</use_with_users>
      <use_with_bundles>example</use_with_bundles>
      <use_with_inboxes>example</use_with_inboxes>
    </clickwrap>
    
    

    HTTPS Request

    GET /clickwraps/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Clickwrap ID.

    Create Clickwrap

    Example Request

    curl https://app.files.com/api/rest/v1/clickwraps.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"name":"Example Site NDA for Files.com Use","body":"[Legal body text]","use_with_bundles":"example","use_with_inboxes":"example","use_with_users":"example"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/clickwraps.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<clickwrap>
           <name>Example Site NDA for Files.com Use</name>
           <body>[Legal body text]</body>
           <use_with_bundles>example</use_with_bundles>
           <use_with_inboxes>example</use_with_inboxes>
           <use_with_users>example</use_with_users>
         </clickwrap>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Clickwrap.create(
      name: "Example Site NDA for Files.com Use", 
      body: "[Legal body text]", 
      use_with_bundles: "example", 
      use_with_inboxes: "example", 
      use_with_users: "example"
    )
    
    \Files\Model\Clickwrap::create(array(
      'name' => "Example Site NDA for Files.com Use", 
      'body' => "[Legal body text]", 
      'use_with_bundles' => "example", 
      'use_with_inboxes' => "example", 
      'use_with_users' => "example"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("name", Example Site NDA for Files.com Use);
    requestParams.put("body", [Legal body text]);
    requestParams.put("use_with_bundles", example);
    requestParams.put("use_with_inboxes", example);
    requestParams.put("use_with_users", example);
    Clickwrap.create(parameters)
    
    await Clickwrap.create({
      name: "Example Site NDA for Files.com Use", 
      body: "[Legal body text]", 
      use_with_bundles: "example", 
      use_with_inboxes: "example", 
      use_with_users: "example",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("name", "Example Site NDA for Files.com Use");
    parameters.Add("body", "[Legal body text]");
    parameters.Add("use_with_bundles", "example");
    parameters.Add("use_with_inboxes", "example");
    parameters.Add("use_with_users", "example");
    
    await Clickwrap.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.clickwrap.create({
      "name": "Example Site NDA for Files.com Use",
      "body": "[Legal body text]",
      "use_with_bundles": "example",
      "use_with_inboxes": "example",
      "use_with_users": "example"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    clickwrap.Create(context.Background(), files_sdk.ClickwrapCreateParams{
      Name: "Example Site NDA for Files.com Use",
      Body: "[Legal body text]",
      UseWithBundles: "example",
      UseWithInboxes: "example",
      UseWithUsers: "example",
    })
    
    
    files-cli clickwraps create \
      --name="Example Site NDA for Files.com Use" \
      --body=""[Legal body text]"" \
      --use-with-bundles="example" \
      --use-with-inboxes="example" \
      --use-with-users="example" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "Example Site NDA for Files.com Use",
      "body": "[Legal body text]",
      "use_with_users": "example",
      "use_with_bundles": "example",
      "use_with_inboxes": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <clickwrap>
      <id type="integer">1</id>
      <name>Example Site NDA for Files.com Use</name>
      <body>[Legal body text]</body>
      <use_with_users>example</use_with_users>
      <use_with_bundles>example</use_with_bundles>
      <use_with_inboxes>example</use_with_inboxes>
    </clickwrap>
    
    

    HTTPS Request

    POST /clickwraps

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    name string Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
    body string Body text of Clickwrap (supports Markdown formatting).
    use_with_bundles string Use this Clickwrap for Bundles?
    Possible values: none, available, require, available_to_all_users
    use_with_inboxes string Use this Clickwrap for Inboxes?
    Possible values: none, available, require, available_to_all_users
    use_with_users string Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
    Possible values: none, require

    Update Clickwrap

    Example Request

    curl https://app.files.com/api/rest/v1/clickwraps/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"name":"Example Site NDA for Files.com Use","body":"[Legal body text]","use_with_bundles":"example","use_with_inboxes":"example","use_with_users":"example"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/clickwraps/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<clickwrap>
           <name>Example Site NDA for Files.com Use</name>
           <body>[Legal body text]</body>
           <use_with_bundles>example</use_with_bundles>
           <use_with_inboxes>example</use_with_inboxes>
           <use_with_users>example</use_with_users>
         </clickwrap>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    clickwrap = Files::Clickwrap.list.first
    clickwrap.update(
      name: "Example Site NDA for Files.com Use",
      body: "[Legal body text]",
      use_with_bundles: "example",
      use_with_inboxes: "example",
      use_with_users: "example"
    )
    
    $clickwrap = \Files\Model\Clickwrap::list()[0];
    $clickwrap->update(array(
      'name' => "Example Site NDA for Files.com Use", 
      'body' => "[Legal body text]", 
      'use_with_bundles' => "example", 
      'use_with_inboxes' => "example", 
      'use_with_users' => "example"
    ));
    
    Clickwrap clickwrap = Clickwrap.list()[0];
    clickwrap.setName("Example Site NDA for Files.com Use");
    clickwrap.setBody("[Legal body text]");
    clickwrap.setUseWithBundles("example");
    clickwrap.setUseWithInboxes("example");
    clickwrap.setUseWithUsers("example");
    clickwrap.update();
    
    const clickwrap = (await Clickwrap.list())[0]
    await clickwrap.update({ 
      name: "Example Site NDA for Files.com Use", 
      body: "[Legal body text]", 
      use_with_bundles: "example", 
      use_with_inboxes: "example", 
      use_with_users: "example",
    })
    
    var clickwrap = (await Clickwrap.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("name", "Example Site NDA for Files.com Use");
    parameters.Add("body", "[Legal body text]");
    parameters.Add("use_with_bundles", "example");
    parameters.Add("use_with_inboxes", "example");
    parameters.Add("use_with_users", "example");
    
    await clickwrap.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    clickwrap = files_sdk.clickwrap.find(id)
    clickwrap.update({
      "name": "Example Site NDA for Files.com Use",
      "body": "[Legal body text]",
      "use_with_bundles": "example",
      "use_with_inboxes": "example",
      "use_with_users": "example"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    clickwrap.Update(context.Background(), files_sdk.ClickwrapUpdateParams{
      Id: 1,
      Name: "Example Site NDA for Files.com Use",
      Body: "[Legal body text]",
      UseWithBundles: "example",
      UseWithInboxes: "example",
      UseWithUsers: "example",
    })
    
    files-cli clickwraps update \
      --id=1 \
      --name="Example Site NDA for Files.com Use" \
      --body=""[Legal body text]"" \
      --use-with-bundles="example" \
      --use-with-inboxes="example" \
      --use-with-users="example" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "Example Site NDA for Files.com Use",
      "body": "[Legal body text]",
      "use_with_users": "example",
      "use_with_bundles": "example",
      "use_with_inboxes": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <clickwrap>
      <id type="integer">1</id>
      <name>Example Site NDA for Files.com Use</name>
      <body>[Legal body text]</body>
      <use_with_users>example</use_with_users>
      <use_with_bundles>example</use_with_bundles>
      <use_with_inboxes>example</use_with_inboxes>
    </clickwrap>
    
    

    HTTPS Request

    PATCH /clickwraps/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Clickwrap ID.
    name string Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
    body string Body text of Clickwrap (supports Markdown formatting).
    use_with_bundles string Use this Clickwrap for Bundles?
    Possible values: none, available, require, available_to_all_users
    use_with_inboxes string Use this Clickwrap for Inboxes?
    Possible values: none, available, require, available_to_all_users
    use_with_users string Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
    Possible values: none, require

    Delete Clickwrap

    Example Request

    curl https://app.files.com/api/rest/v1/clickwraps/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/clickwraps/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    clickwrap = Files::Clickwrap.list.first
    clickwrap.delete
    
    $clickwrap = \Files\Model\Clickwrap::list()[0];
    $clickwrap->delete();
    
    Clickwrap clickwrap = Clickwrap.list()[0];
    
    clickwrap.delete();
    
    const clickwrap = (await Clickwrap.list())[0]
    await clickwrap.delete()
    
    var clickwrap = (await Clickwrap.List())[0];
    
    await clickwrap.Delete();
    
    files_sdk.set_api_key("my-key")
    
    clickwrap = files_sdk.clickwrap.find(id)
    clickwrap.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    clickwrap.Delete(context.Background(), files_sdk.ClickwrapDeleteParams{
      Id: 1,
    })
    
    files-cli clickwraps delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /clickwraps/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Clickwrap ID.

    Dns Records

    This resource allows retrieving the DNS records that are needed to configure custom DNS for a Site.

    The DnsRecord object

    Example DnsRecord Object

    {
      "id": "example",
      "domain": "my-custom-domain.com",
      "rrtype": "CNAME",
      "value": "mysite.files.com"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <dns-record>
      <id>example</id>
      <domain>my-custom-domain.com</domain>
      <rrtype>CNAME</rrtype>
      <value>mysite.files.com</value>
    </dns-record>
    
    
    Attribute Description
    id string Unique label for DNS record; used by Zapier and other integrations.
    domain string DNS record domain name
    rrtype string DNS record type
    value string DNS record value

    Show site DNS configuration

    Example Request

    curl "https://app.files.com/api/rest/v1/dns_records.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/dns_records.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::DnsRecord.list(
      per_page: 1
    )
    
    \Files\Model\DnsRecord::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    DnsRecord.list(parameters).all()
    
    await DnsRecord.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await DnsRecord.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.dns_record.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    dnsrecord.List(context.Background(), files_sdk.DnsRecordListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli dns-records list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": "example",
        "domain": "my-custom-domain.com",
        "rrtype": "CNAME",
        "value": "mysite.files.com"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <dns-records type="array">
      <dns-record>
        <id>example</id>
        <domain>my-custom-domain.com</domain>
        <rrtype>CNAME</rrtype>
        <value>mysite.files.com</value>
      </dns-record>
    </dns-records>
    
    

    HTTPS Request

    GET /dns_records

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Email Incoming Messages

    An Email Incoming Message is created to track status of email to inbox uploads.

    The EmailIncomingMessage object

    Example EmailIncomingMessage Object

    {
      "id": 1,
      "inbox_id": 1,
      "sender": "example",
      "sender_name": "example",
      "status": "success",
      "body": "example",
      "message": "example",
      "created_at": "2000-01-01T01:00:00Z",
      "inbox_title": "Inbox Title"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <email-incoming-message>
      <id type="integer">1</id>
      <inbox_id type="integer">1</inbox_id>
      <sender>example</sender>
      <sender_name>example</sender_name>
      <status>success</status>
      <body>example</body>
      <message>example</message>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <inbox_title>Inbox Title</inbox_title>
    </email-incoming-message>
    
    
    Attribute Description
    id int64 Id of the Email Incoming Message
    inbox_id int64 Id of the Inbox associated with this message
    sender string Sender of the email
    sender_name string Sender name
    status string Status of the message
    Possible values: success, partial_failure, failure, skipped
    body string Body of the email
    message string Message describing the failure
    created_at date-time Message creation date/time
    inbox_title string Title of the Inbox associated with this message

    List Email Incoming Messages

    Example Request

    curl "https://app.files.com/api/rest/v1/email_incoming_messages.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/email_incoming_messages.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::EmailIncomingMessage.list(
      per_page: 1
    )
    
    \Files\Model\EmailIncomingMessage::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    EmailIncomingMessage.list(parameters).all()
    
    await EmailIncomingMessage.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await EmailIncomingMessage.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.email_incoming_message.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    emailincomingmessage.List(context.Background(), files_sdk.EmailIncomingMessageListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterGt: "",
      FilterGteq: "",
      FilterPrefix: "",
      FilterLt: "",
      FilterLteq: "",
    })
    
    
    files-cli email-incoming-messages list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "inbox_id": 1,
        "sender": "example",
        "sender_name": "example",
        "status": "success",
        "body": "example",
        "message": "example",
        "created_at": "2000-01-01T01:00:00Z",
        "inbox_title": "Inbox Title"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <email-incoming-messages type="array">
      <email-incoming-message>
        <id type="integer">1</id>
        <inbox_id type="integer">1</inbox_id>
        <sender>example</sender>
        <sender_name>example</sender_name>
        <status>success</status>
        <body>example</body>
        <message>example</message>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <inbox_title>Inbox Title</inbox_title>
      </email-incoming-message>
    </email-incoming-messages>
    
    

    HTTPS Request

    GET /email_incoming_messages

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[created_at]=desc). Valid fields are created_at, sender, status or inbox_id.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are created_at, inbox_id, sender or status. Valid field combinations are [ sender, created_at ], [ status, created_at ], [ inbox_id, created_at ], [ inbox_id, status, created_at ] or [ inbox_id, status, sender, created_at ].
    filter_gt object If set, return records where the specified field is greater than the supplied value. Valid fields are created_at.
    filter_gteq object If set, return records where the specified field is greater than or equal the supplied value. Valid fields are created_at.
    filter_prefix object If set, return records where the specified field is prefixed by the supplied value. Valid fields are sender.
    filter_lt object If set, return records where the specified field is less than the supplied value. Valid fields are created_at.
    filter_lteq object If set, return records where the specified field is less than or equal the supplied value. Valid fields are created_at.

    External Events

    ExternalEvents record activity such as logins, credential syncs, and lockouts.

    The ExternalEvent object

    Example ExternalEvent Object

    {
      "id": 1,
      "event_type": "example",
      "status": "example",
      "body": "example",
      "created_at": "2000-01-01T01:00:00Z",
      "body_url": "example",
      "folder_behavior_id": 1,
      "successful_files": 1,
      "errored_files": 1,
      "bytes_synced": 1,
      "compared_files": 1,
      "compared_folders": 1,
      "remote_server_type": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <external-event>
      <id type="integer">1</id>
      <event_type>example</event_type>
      <status>example</status>
      <body>example</body>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <body_url>example</body_url>
      <folder_behavior_id type="integer">1</folder_behavior_id>
      <successful_files type="integer">1</successful_files>
      <errored_files type="integer">1</errored_files>
      <bytes_synced type="integer">1</bytes_synced>
      <compared_files type="integer">1</compared_files>
      <compared_folders type="integer">1</compared_folders>
      <remote_server_type>example</remote_server_type>
    </external-event>
    
    
    Attribute Description
    id int64 Event ID
    event_type string Type of event being recorded.
    Possible values: ldap_sync, remote_server_sync, lockout, ldap_login, saml_login, client_log, pending_work
    status string Status of event.
    Possible values: success, failure, partial_failure, in_progress, skipped
    body string Event body
    created_at date-time External event create date/time
    body_url string Link to log file.
    folder_behavior_id int64 Folder Behavior ID
    successful_files int64 For sync events, the number of files handled successfully.
    errored_files int64 For sync events, the number of files that encountered errors.
    bytes_synced int64 For sync events, the total number of bytes synced.
    compared_files int64 For sync events, the number of files considered for the sync.
    compared_folders int64 For sync events, the number of folders listed and considered for the sync.
    remote_server_type string Associated Remote Server type, if any

    List External Events

    Example Request

    curl "https://app.files.com/api/rest/v1/external_events.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/external_events.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ExternalEvent.list(
      per_page: 1
    )
    
    \Files\Model\ExternalEvent::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    ExternalEvent.list(parameters).all()
    
    await ExternalEvent.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await ExternalEvent.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.external_event.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    externalevent.List(context.Background(), files_sdk.ExternalEventListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterGt: "",
      FilterGteq: "",
      FilterPrefix: "",
      FilterLt: "",
      FilterLteq: "",
    })
    
    
    files-cli external-events list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "event_type": "example",
        "status": "example",
        "body": "example",
        "created_at": "2000-01-01T01:00:00Z",
        "body_url": "example",
        "folder_behavior_id": 1,
        "successful_files": 1,
        "errored_files": 1,
        "bytes_synced": 1,
        "compared_files": 1,
        "compared_folders": 1,
        "remote_server_type": "example"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <external-events type="array">
      <external-event>
        <id type="integer">1</id>
        <event_type>example</event_type>
        <status>example</status>
        <body>example</body>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <body_url>example</body_url>
        <folder_behavior_id type="integer">1</folder_behavior_id>
        <successful_files type="integer">1</successful_files>
        <errored_files type="integer">1</errored_files>
        <bytes_synced type="integer">1</bytes_synced>
        <compared_files type="integer">1</compared_files>
        <compared_folders type="integer">1</compared_folders>
        <remote_server_type>example</remote_server_type>
      </external-event>
    </external-events>
    
    

    HTTPS Request

    GET /external_events

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[remote_server_type]=desc). Valid fields are remote_server_type, site_id, folder_behavior_id, event_type, created_at or status.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are created_at, event_type, remote_server_type, status or folder_behavior_id. Valid field combinations are [ event_type, status, created_at ], [ event_type, created_at ] or [ status, created_at ].
    filter_gt object If set, return records where the specified field is greater than the supplied value. Valid fields are created_at.
    filter_gteq object If set, return records where the specified field is greater than or equal the supplied value. Valid fields are created_at.
    filter_prefix object If set, return records where the specified field is prefixed by the supplied value. Valid fields are remote_server_type.
    filter_lt object If set, return records where the specified field is less than the supplied value. Valid fields are created_at.
    filter_lteq object If set, return records where the specified field is less than or equal the supplied value. Valid fields are created_at.

    Show External Event

    Example Request

    curl https://app.files.com/api/rest/v1/external_events/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/external_events/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ExternalEvent.find(id)
    
    \Files\Model\ExternalEvent::find($id);
    
    
    ExternalEvent.find(, parameters
    
    await ExternalEvent.find(id)
    
    
    await ExternalEvent.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.external_event.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    externalevent.Find(context.Background(), files_sdk.ExternalEventFindParams{
      Id: 1,
    })
    
    
    files-cli external-events find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "event_type": "example",
      "status": "example",
      "body": "example",
      "created_at": "2000-01-01T01:00:00Z",
      "body_url": "example",
      "folder_behavior_id": 1,
      "successful_files": 1,
      "errored_files": 1,
      "bytes_synced": 1,
      "compared_files": 1,
      "compared_folders": 1,
      "remote_server_type": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <external-event>
      <id type="integer">1</id>
      <event_type>example</event_type>
      <status>example</status>
      <body>example</body>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <body_url>example</body_url>
      <folder_behavior_id type="integer">1</folder_behavior_id>
      <successful_files type="integer">1</successful_files>
      <errored_files type="integer">1</errored_files>
      <bytes_synced type="integer">1</bytes_synced>
      <compared_files type="integer">1</compared_files>
      <compared_folders type="integer">1</compared_folders>
      <remote_server_type>example</remote_server_type>
    </external-event>
    
    

    HTTPS Request

    GET /external_events/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required External Event ID.

    Create External Event

    Example Request

    curl https://app.files.com/api/rest/v1/external_events.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"status":"example","body":"example"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/external_events.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<external-event>
           <status>example</status>
           <body>example</body>
         </external-event>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ExternalEvent.create(
      status: "example", 
      body: "example"
    )
    
    \Files\Model\ExternalEvent::create(array(
      'status' => "example", 
      'body' => "example"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("status", example);
    requestParams.put("body", example);
    ExternalEvent.create(parameters)
    
    await ExternalEvent.create({
      status: "example", 
      body: "example",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("status", "example");
    parameters.Add("body", "example");
    
    await ExternalEvent.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.external_event.create({
      "status": "example",
      "body": "example"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    externalevent.Create(context.Background(), files_sdk.ExternalEventCreateParams{
      Status: "example",
      Body: "example",
    })
    
    
    files-cli external-events create \
      --status="example" \
      --body="example" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "event_type": "example",
      "status": "example",
      "body": "example",
      "created_at": "2000-01-01T01:00:00Z",
      "body_url": "example",
      "folder_behavior_id": 1,
      "successful_files": 1,
      "errored_files": 1,
      "bytes_synced": 1,
      "compared_files": 1,
      "compared_folders": 1,
      "remote_server_type": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <external-event>
      <id type="integer">1</id>
      <event_type>example</event_type>
      <status>example</status>
      <body>example</body>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <body_url>example</body_url>
      <folder_behavior_id type="integer">1</folder_behavior_id>
      <successful_files type="integer">1</successful_files>
      <errored_files type="integer">1</errored_files>
      <bytes_synced type="integer">1</bytes_synced>
      <compared_files type="integer">1</compared_files>
      <compared_folders type="integer">1</compared_folders>
      <remote_server_type>example</remote_server_type>
    </external-event>
    
    

    HTTPS Request

    POST /external_events

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    status string Required Status of event.
    Possible values: success, failure, partial_failure, in_progress, skipped
    body string Required Event body

    Files/Folders

    The File and Folder resources in the API and SDKs allow you to operate on files and folders. While the two resources are similar, they are not exactly the same, so pay close attention to the documentation to ensure that you are operating on the correct resource for the operation you are trying to perform.

    Using SDKs for File/Folder operations

    Wherever possible, Files.com SDKs have implemented file operation interfaces that are as idiomatic as possible in your target language. Meaning that operating on a remote file on Files.com is as close as possible to operating on a local file.

    We will be expanding the documentation on SDK file operations soon, but in the mean time, you can review the SDK's README file to learn more.

    We strongly recommend using SDKs for file/folder operations if we have one in your language.

    In most cases, our SDKs have built-in support for file transfer acceleration, retries, and idiomatic error handling. Plus the retry handling that is built into our SDKs is tuned for higher performance when using Files.com in conjunction with other cloud providers such as Azure.

    Character Encoding when Using Raw HTTP API

    If special characters exist in the path name, you will need to encode them in UTF-8 first, and then URL encode the bytes. For example, to list the contents of a folder with a complete path of Engineering Candidates/Résumés, a GET request would be sent to /folders/Engineering%20Candidates/R%c3%a9sum%c3%a9s.

    The File object

    Example File Object

    {
      "path": "path/file.txt",
      "display_name": "file.txt",
      "type": "file",
      "size": 1024,
      "created_at": "2000-01-01T01:00:00Z",
      "mtime": "2000-01-01T01:00:00Z",
      "provided_mtime": "2000-01-01T01:00:00Z",
      "crc32": "70976923",
      "md5": "17c54824e9931a4688ca032d03f6663c",
      "mime_type": "application/octet-stream",
      "region": "us-east-1",
      "permissions": "rwd",
      "subfolders_locked?": true,
      "is_locked": true,
      "download_uri": "https://mysite.files.com/...",
      "priority_color": "red",
      "preview_id": 1,
      "preview": {
        "id": 1,
        "status": "complete",
        "download_uri": "https://mysite.files.com/...",
        "type": "image",
        "size": "large"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file>
      <path>path/file.txt</path>
      <display_name>file.txt</display_name>
      <type>file</type>
      <size type="integer">1024</size>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <mtime>2000-01-01T01:00:00Z</mtime>
      <provided_mtime>2000-01-01T01:00:00Z</provided_mtime>
      <crc32>70976923</crc32>
      <md5>17c54824e9931a4688ca032d03f6663c</md5>
      <mime_type>application/octet-stream</mime_type>
      <region>us-east-1</region>
      <permissions>rwd</permissions>
      <subfolders_locked? type="boolean">true</subfolders_locked?>
      <is_locked type="boolean">true</is_locked>
      <download_uri>https://mysite.files.com/...</download_uri>
      <priority_color>red</priority_color>
      <preview_id type="integer">1</preview_id>
      <preview>
        <id type="integer">1</id>
        <status>complete</status>
        <download_uri>https://mysite.files.com/...</download_uri>
        <type>image</type>
        <size>large</size>
      </preview>
    </file>
    
    
    Attribute Description
    path string File/Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    display_name string File/Folder display name
    type string Type: directory or file.
    size int64 File/Folder size
    created_at date-time File created date/time
    mtime date-time File last modified date/time, according to the server. This is the timestamp of the last Files.com operation of the file, regardless of what modified timestamp was sent.
    provided_mtime date-time File last modified date/time, according to the client who set it. Files.com allows desktop, FTP, SFTP, and WebDAV clients to set modified at times. This allows Desktop<->Cloud syncing to preserve modified at times.
    crc32 string File CRC32 checksum. This is sometimes delayed, so if you get a blank response, wait and try again.
    md5 string File MD5 checksum. This is sometimes delayed, so if you get a blank response, wait and try again.
    mime_type string MIME Type. This is determined by the filename extension and is not stored separately internally.
    region string Region location
    permissions string A short string representing the current user's permissions. Can be r (Read),w (Write),d (Delete), l (List) or any combination
    subfolders_locked? boolean Are subfolders locked and unable to be modified?
    is_locked boolean Is this folder locked and unable to be modified?
    download_uri string Link to download file. Provided only in response to a download request.
    priority_color string Bookmark/priority color of file/folder
    preview_id int64 File preview ID
    preview Preview File preview
    action string The action to perform. Can be append, attachment, end, upload, put, or may not exist
    length int64 Length of file.
    mkdir_parents boolean Create parent directories if they do not exist?
    part int64 Part if uploading a part.
    parts int64 How many parts to fetch?
    ref string
    restart int64 File byte offset to restart from.
    structure string If copying folder, copy just the structure?
    with_rename boolean Allow file rename instead of overwrite?

    Download file

    Additional SDK Operations For Downloads

    // Download to file on disk.
    file.saveAsLocalFile("/tmp/");
    
    // Download to writable stream.
    file.getInputStream();
    
    // Download to file on disk. (Not available in browser.)
    await file.downloadToFile(localFilePath)
    
    // Download to writable stream. (Not available in browser.)
    await file.downloadToStream(writableStream)
    

    Example Request

    curl "https://app.files.com/api/rest/v1/files/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/files/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file = Files::File.list.first
    file.download(
      with_previews: true,
      with_priority_color: true
    )
    
    $file = \Files\Model\File::list()[0];
    $file->download(array(
      'with_previews' => true, 
      'with_priority_color' => true
    ));
    
    File file = File.list()[0];
    file.setWithPreviews(true);
    file.setWithPriorityColor(true);
    file.download();
    
    const file = (await File.list())[0]
    await file.download({ 
      with_previews: true, 
      with_priority_color: true,
    })
    
    var remoteFile = (await Folder.ListFor("/"))[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("with_previews", true);
    parameters.Add("with_priority_color", true);
    
    await remoteFile.Download(parameters);
    
    files_sdk.set_api_key("my-key")
    
    file = files_sdk.file.find(path)
    file.download({
      "with_previews": True,
      "with_priority_color": True
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    file.Download(context.Background(), files_sdk.FileDownloadParams{
      Path: "path",
      Action: "",
      PreviewSize: "",
      WithPreviews: lib.Bool(true),
      WithPriorityColor: lib.Bool(true),
    })
    
    files-cli files download \
      --path="path" \
      --action="" \
      --preview-size="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "path": "path/file.txt",
      "display_name": "file.txt",
      "type": "file",
      "size": 1024,
      "created_at": "2000-01-01T01:00:00Z",
      "mtime": "2000-01-01T01:00:00Z",
      "provided_mtime": "2000-01-01T01:00:00Z",
      "crc32": "70976923",
      "md5": "17c54824e9931a4688ca032d03f6663c",
      "mime_type": "application/octet-stream",
      "region": "us-east-1",
      "permissions": "rwd",
      "subfolders_locked?": true,
      "is_locked": true,
      "download_uri": "https://mysite.files.com/...",
      "priority_color": "red",
      "preview_id": 1,
      "preview": {
        "id": 1,
        "status": "complete",
        "download_uri": "https://mysite.files.com/...",
        "type": "image",
        "size": "large"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file>
      <path>path/file.txt</path>
      <display_name>file.txt</display_name>
      <type>file</type>
      <size type="integer">1024</size>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <mtime>2000-01-01T01:00:00Z</mtime>
      <provided_mtime>2000-01-01T01:00:00Z</provided_mtime>
      <crc32>70976923</crc32>
      <md5>17c54824e9931a4688ca032d03f6663c</md5>
      <mime_type>application/octet-stream</mime_type>
      <region>us-east-1</region>
      <permissions>rwd</permissions>
      <subfolders_locked? type="boolean">true</subfolders_locked?>
      <is_locked type="boolean">true</is_locked>
      <download_uri>https://mysite.files.com/...</download_uri>
      <priority_color>red</priority_color>
      <preview_id type="integer">1</preview_id>
      <preview>
        <id type="integer">1</id>
        <status>complete</status>
        <download_uri>https://mysite.files.com/...</download_uri>
        <type>image</type>
        <size>large</size>
      </preview>
    </file>
    
    

    HTTPS Request

    GET /files/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path to operate on.
    action string Can be blank, redirect or stat. If set to stat, we will return file information but without a download URL, and without logging a download. If set to redirect we will serve a 302 redirect directly to the file. This is used for integrations with Zapier, and is not recommended for most integrations.
    preview_size string Request a preview size. Can be small (default), large, xlarge, or pdf.
    with_previews boolean Include file preview information?
    with_priority_color boolean Include file priority color information?

    Find file/folder by path

    Example Request

    curl "https://app.files.com/api/rest/v1/file_actions/metadata/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/file_actions/metadata/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::File.find(path, 
      with_previews: true, 
      with_priority_color: true
    )
    
    \Files\Model\File::find($path, array(
      'with_previews' => true, 
      'with_priority_color' => true
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("with_previews", true);
    requestParams.put("with_priority_color", true);
    File.find(parameters)
    
    await File.find(path, {
      with_previews: true, 
      with_priority_color: true,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("with_previews", true);
    parameters.Add("with_priority_color", true);
    
    await RemoteFile.Find(path, parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.file.find(path, {
      "with_previews": True,
      "with_priority_color": True
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    file.Find(context.Background(), files_sdk.FileFindParams{
      Path: "path",
      PreviewSize: "",
      WithPreviews: lib.Bool(true),
      WithPriorityColor: lib.Bool(true),
    })
    
    
    files-cli files find \
      --path="path" \
      --preview-size="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "path": "path/file.txt",
      "display_name": "file.txt",
      "type": "file",
      "size": 1024,
      "created_at": "2000-01-01T01:00:00Z",
      "mtime": "2000-01-01T01:00:00Z",
      "provided_mtime": "2000-01-01T01:00:00Z",
      "crc32": "70976923",
      "md5": "17c54824e9931a4688ca032d03f6663c",
      "mime_type": "application/octet-stream",
      "region": "us-east-1",
      "permissions": "rwd",
      "subfolders_locked?": true,
      "is_locked": true,
      "download_uri": "https://mysite.files.com/...",
      "priority_color": "red",
      "preview_id": 1,
      "preview": {
        "id": 1,
        "status": "complete",
        "download_uri": "https://mysite.files.com/...",
        "type": "image",
        "size": "large"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file>
      <path>path/file.txt</path>
      <display_name>file.txt</display_name>
      <type>file</type>
      <size type="integer">1024</size>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <mtime>2000-01-01T01:00:00Z</mtime>
      <provided_mtime>2000-01-01T01:00:00Z</provided_mtime>
      <crc32>70976923</crc32>
      <md5>17c54824e9931a4688ca032d03f6663c</md5>
      <mime_type>application/octet-stream</mime_type>
      <region>us-east-1</region>
      <permissions>rwd</permissions>
      <subfolders_locked? type="boolean">true</subfolders_locked?>
      <is_locked type="boolean">true</is_locked>
      <download_uri>https://mysite.files.com/...</download_uri>
      <priority_color>red</priority_color>
      <preview_id type="integer">1</preview_id>
      <preview>
        <id type="integer">1</id>
        <status>complete</status>
        <download_uri>https://mysite.files.com/...</download_uri>
        <type>image</type>
        <size>large</size>
      </preview>
    </file>
    
    

    HTTPS Request

    GET /file_actions/metadata/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path to operate on.
    preview_size string Request a preview size. Can be small (default), large, xlarge, or pdf.
    with_previews boolean Include file preview information?
    with_priority_color boolean Include file priority color information?

    List Folders by path

    Example Request

    curl "https://app.files.com/api/rest/v1/folders/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/folders/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Folder.list_for(path, 
      per_page: 1, 
      search_all: true, 
      with_previews: true, 
      with_priority_color: true
    )
    
    \Files\Model\Folder::listFor($path, array(
      'per_page' => 1, 
      'search_all' => true, 
      'with_previews' => true, 
      'with_priority_color' => true
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("search_all", true);
    requestParams.put("with_previews", true);
    requestParams.put("with_priority_color", true);
    Folder.listFor(parameters).all()
    
    await Folder.listFor(path, {
      per_page: 1, 
      search_all: true, 
      with_previews: true, 
      with_priority_color: true,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("search_all", true);
    parameters.Add("with_previews", true);
    parameters.Add("with_priority_color", true);
    
    await Folder.ListFor(path, parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.folder.list_for(path, {
      "per_page": 1,
      "search_all": True,
      "with_previews": True,
      "with_priority_color": True
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    folder.ListFor(context.Background(), files_sdk.FolderListForParams{
      Cursor: "",
      PerPage: 1,
      Path: "path",
      Filter: "",
      PreviewSize: "",
      SortBy: "",
      Search: "",
      SearchAll: lib.Bool(true),
      WithPreviews: lib.Bool(true),
      WithPriorityColor: lib.Bool(true),
    })
    
    
    files-cli folders list-for \
      --cursor="" \
      --per-page=1 \
      --path="path" \
      --filter="" \
      --preview-size="" \
      --search="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "path": "path/file.txt",
        "display_name": "file.txt",
        "type": "file",
        "size": 1024,
        "created_at": "2000-01-01T01:00:00Z",
        "mtime": "2000-01-01T01:00:00Z",
        "provided_mtime": "2000-01-01T01:00:00Z",
        "crc32": "70976923",
        "md5": "17c54824e9931a4688ca032d03f6663c",
        "mime_type": "application/octet-stream",
        "region": "us-east-1",
        "permissions": "rwd",
        "subfolders_locked?": true,
        "is_locked": true,
        "download_uri": "https://mysite.files.com/...",
        "priority_color": "red",
        "preview_id": 1,
        "preview": {
          "id": 1,
          "status": "complete",
          "download_uri": "https://mysite.files.com/...",
          "type": "image",
          "size": "large"
        }
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <files type="array">
      <file>
        <path>path/file.txt</path>
        <display_name>file.txt</display_name>
        <type>file</type>
        <size type="integer">1024</size>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <mtime>2000-01-01T01:00:00Z</mtime>
        <provided_mtime>2000-01-01T01:00:00Z</provided_mtime>
        <crc32>70976923</crc32>
        <md5>17c54824e9931a4688ca032d03f6663c</md5>
        <mime_type>application/octet-stream</mime_type>
        <region>us-east-1</region>
        <permissions>rwd</permissions>
        <subfolders_locked? type="boolean">true</subfolders_locked?>
        <is_locked type="boolean">true</is_locked>
        <download_uri>https://mysite.files.com/...</download_uri>
        <priority_color>red</priority_color>
        <preview_id type="integer">1</preview_id>
        <preview>
          <id type="integer">1</id>
          <status>complete</status>
          <download_uri>https://mysite.files.com/...</download_uri>
          <type>image</type>
          <size>large</size>
        </preview>
      </file>
    </files>
    
    

    HTTPS Request

    GET /folders/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path to operate on.
    preview_size string Request a preview size. Can be small (default), large, xlarge, or pdf.
    search string If search_all is true, provide the search string here. Otherwise, this parameter acts like an alias of filter.
    search_all boolean Search entire site? If set, we will ignore the folder path provided and search the entire site. This is the same API used by the search bar in the UI. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
    with_previews boolean Include file previews?
    with_priority_color boolean Include file priority color information?

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object Search by field and direction. Valid fields are path, size, modified_at_datetime, provided_modified_at. Valid directions are asc and desc. Defaults to {"path":"asc"}.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter string If specified, will filter folders/files list by name. Ignores text before last /. Wildcards of * and ? are acceptable here.

    Upload file

    Uploading files via REST is a multi-step process and it's covered in the File Uploading section.

    Create folder

    Example Request

    curl https://app.files.com/api/rest/v1/folders/{path} \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"mkdir_parents":true,"provided_mtime":"2000-01-01T01:00:00Z"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/folders/{path} \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<file>
           <mkdir_parents type="boolean">true</mkdir_parents>
           <provided_mtime>2000-01-01T01:00:00Z</provided_mtime>
         </file>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Folder.create(path, 
      mkdir_parents: true, 
      provided_mtime: "2000-01-01T01:00:00Z"
    )
    
    \Files\Model\Folder::create($path, array(
      'mkdir_parents' => true, 
      'provided_mtime' => "2000-01-01T01:00:00Z"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("mkdir_parents", true);
    requestParams.put("provided_mtime", 2000-01-01T01:00:00Z);
    Folder.create(parameters)
    
    await Folder.create(path, {
      mkdir_parents: true, 
      provided_mtime: "2000-01-01T01:00:00Z",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("mkdir_parents", true);
    parameters.Add("provided_mtime", "2000-01-01T01:00:00Z");
    
    await Folder.Create(path, parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.folder.create(path, {
      "mkdir_parents": True,
      "provided_mtime": "2000-01-01T01:00:00Z"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    folder.Create(context.Background(), files_sdk.FolderCreateParams{
      Path: "path",
      MkdirParents: lib.Bool(true),
      ProvidedMtime: "2000-01-01T01:00:00Z",
    })
    
    
    files-cli folders create \
      --path="path" \
      --provided-mtime="2000-01-01T01:00:00Z" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "path": "path/file.txt",
      "display_name": "file.txt",
      "type": "file",
      "size": 1024,
      "created_at": "2000-01-01T01:00:00Z",
      "mtime": "2000-01-01T01:00:00Z",
      "provided_mtime": "2000-01-01T01:00:00Z",
      "crc32": "70976923",
      "md5": "17c54824e9931a4688ca032d03f6663c",
      "mime_type": "application/octet-stream",
      "region": "us-east-1",
      "permissions": "rwd",
      "subfolders_locked?": true,
      "is_locked": true,
      "download_uri": "https://mysite.files.com/...",
      "priority_color": "red",
      "preview_id": 1,
      "preview": {
        "id": 1,
        "status": "complete",
        "download_uri": "https://mysite.files.com/...",
        "type": "image",
        "size": "large"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file>
      <path>path/file.txt</path>
      <display_name>file.txt</display_name>
      <type>file</type>
      <size type="integer">1024</size>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <mtime>2000-01-01T01:00:00Z</mtime>
      <provided_mtime>2000-01-01T01:00:00Z</provided_mtime>
      <crc32>70976923</crc32>
      <md5>17c54824e9931a4688ca032d03f6663c</md5>
      <mime_type>application/octet-stream</mime_type>
      <region>us-east-1</region>
      <permissions>rwd</permissions>
      <subfolders_locked? type="boolean">true</subfolders_locked?>
      <is_locked type="boolean">true</is_locked>
      <download_uri>https://mysite.files.com/...</download_uri>
      <priority_color>red</priority_color>
      <preview_id type="integer">1</preview_id>
      <preview>
        <id type="integer">1</id>
        <status>complete</status>
        <download_uri>https://mysite.files.com/...</download_uri>
        <type>image</type>
        <size>large</size>
      </preview>
    </file>
    
    

    HTTPS Request

    POST /folders/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path to operate on.
    mkdir_parents boolean Create parent directories if they do not exist?
    provided_mtime string User provided modification time.

    Update file/folder metadata

    Example Request

    curl https://app.files.com/api/rest/v1/files/{path} \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"provided_mtime":"2000-01-01T01:00:00Z","priority_color":"red"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/files/{path} \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<file>
           <provided_mtime>2000-01-01T01:00:00Z</provided_mtime>
           <priority_color>red</priority_color>
         </file>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file = Files::File.list.first
    file.update(
      provided_mtime: "2000-01-01T01:00:00Z",
      priority_color: "red"
    )
    
    $file = \Files\Model\File::list()[0];
    $file->update(array(
      'provided_mtime' => "2000-01-01T01:00:00Z", 
      'priority_color' => "red"
    ));
    
    File file = File.list()[0];
    file.setProvidedMtime("2000-01-01T01:00:00Z");
    file.setPriorityColor("red");
    file.update();
    
    const file = (await File.list())[0]
    await file.update({ 
      provided_mtime: "2000-01-01T01:00:00Z", 
      priority_color: "red",
    })
    
    var remoteFile = (await Folder.ListFor("/"))[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("provided_mtime", "2000-01-01T01:00:00Z");
    parameters.Add("priority_color", "red");
    
    await remoteFile.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    file = files_sdk.file.find(path)
    file.update({
      "provided_mtime": "2000-01-01T01:00:00Z",
      "priority_color": "red"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    file.Update(context.Background(), files_sdk.FileUpdateParams{
      Path: "path",
      ProvidedMtime: "2000-01-01T01:00:00Z",
      PriorityColor: "red",
    })
    
    files-cli files update \
      --path="path" \
      --provided-mtime="2000-01-01T01:00:00Z" \
      --priority-color="red" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "path": "path/file.txt",
      "display_name": "file.txt",
      "type": "file",
      "size": 1024,
      "created_at": "2000-01-01T01:00:00Z",
      "mtime": "2000-01-01T01:00:00Z",
      "provided_mtime": "2000-01-01T01:00:00Z",
      "crc32": "70976923",
      "md5": "17c54824e9931a4688ca032d03f6663c",
      "mime_type": "application/octet-stream",
      "region": "us-east-1",
      "permissions": "rwd",
      "subfolders_locked?": true,
      "is_locked": true,
      "download_uri": "https://mysite.files.com/...",
      "priority_color": "red",
      "preview_id": 1,
      "preview": {
        "id": 1,
        "status": "complete",
        "download_uri": "https://mysite.files.com/...",
        "type": "image",
        "size": "large"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file>
      <path>path/file.txt</path>
      <display_name>file.txt</display_name>
      <type>file</type>
      <size type="integer">1024</size>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <mtime>2000-01-01T01:00:00Z</mtime>
      <provided_mtime>2000-01-01T01:00:00Z</provided_mtime>
      <crc32>70976923</crc32>
      <md5>17c54824e9931a4688ca032d03f6663c</md5>
      <mime_type>application/octet-stream</mime_type>
      <region>us-east-1</region>
      <permissions>rwd</permissions>
      <subfolders_locked? type="boolean">true</subfolders_locked?>
      <is_locked type="boolean">true</is_locked>
      <download_uri>https://mysite.files.com/...</download_uri>
      <priority_color>red</priority_color>
      <preview_id type="integer">1</preview_id>
      <preview>
        <id type="integer">1</id>
        <status>complete</status>
        <download_uri>https://mysite.files.com/...</download_uri>
        <type>image</type>
        <size>large</size>
      </preview>
    </file>
    
    

    HTTPS Request

    PATCH /files/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path to operate on.
    provided_mtime string Modified time of file.
    priority_color string Priority/Bookmark color of file.

    Delete file/folder

    Example Request

    curl "https://app.files.com/api/rest/v1/files/{path}" \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/files/{path}" \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file = Files::File.list.first
    file.delete(
      recursive: true
    )
    
    $file = \Files\Model\File::list()[0];
    $file->delete(array(
      'recursive' => true
    ));
    
    File file = File.list()[0];
    
    file.delete();
    
    const file = (await File.list())[0]
    await file.delete({ 
      recursive: true,
    })
    
    var remoteFile = (await Folder.ListFor("/"))[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("recursive", true);
    
    await remoteFile.Delete(parameters);
    
    files_sdk.set_api_key("my-key")
    
    file = files_sdk.file.find(path)
    file.delete({
      "recursive": True
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    file.Delete(context.Background(), files_sdk.FileDeleteParams{
      Path: "path",
      Recursive: lib.Bool(true),
    })
    
    files-cli files delete \
      --path="path" \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /files/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path to operate on.
    recursive boolean If true, will recursively delete folers. Otherwise, will error on non-empty folders.

    File Uploading

    In order to support huge files (up to 5TB), the procedure to upload files via the REST API requires multiple steps. We will explain the procedure here.

    If you are using an SDK, you do not need to worry about any of this process, it's all handled for you by the SDK.

    REST API upload steps

    Uploading files using the REST API is done in 3 stages:

    1. Start a new upload by sending a request to REST API to indicate intent to upload a file.
    2. Upload the file to the URL(s) provided by the REST API, possibly in parts via multiple uploads.
    3. Complete the upload by notifying the REST API that the file upload has completed.

    The upload object

    Attribute Description
    ref string Unique identifier to reference this file upload. This identifier is needed for subsequent requests to the REST API to complete the upload or request more upload URLs.
    http_method string Value is PUT or POST, and is the HTTP method used when uploading the file to S3 at the upload_uri.
    upload_uri string The URL where the file is uploaded to.
    partsize integer Recommended size of upload. When uploading file pieces, the piece sizes are required to be between 5 MB and 5 GB (except the last part). This value provides a recommended size to upload for this part without adding another part.
    part_number integer Number of this part, which is always between 1 and 10,000, and will always be 1 for the first upload URL at the beginning of uploading a new file.
    available_parts integer Number of parts available for this upload. For new file uploads this value is always 10,000, but it may be smaller for other uploads. When requesting more upload URLs from the REST API, the part numbers must be between 1 and this number.
    headers key-value pairs A list of required headers and their exact values to send in the file upload. It may be empty if no headers with fixed values are required.
    parameters key-value pairs A list of required parameters and their exact values to send in the file upload. If any values are in this array, it is implied that the upload request is formatted appropriately to send form data parameters. It will always be empty if the body of the request is specified to be where the file upload data goes (see send below).
    send key-value pairs This is an array of values to be sent in the file upload request. Possible sub-values are partsize, partdata, file, and Content-Type:
    • file: where to put the file data for the entire file upload
    • partdata: where to put the file data for this part
    • partsize: where to put the size of the upload for this file part
    • Content-Type: where to put the Content-Type of the file (which can have no bearing on the file's actual type)
    Possible values for these parameters:
    • body: this information is the body of the PUT or POST request
    • required-header <header name>: this information goes in the named header
    • required-parameter <parameter name>: this information goes in the named parameter, and implies this request is formatted appropriately to send form data parameters
    path string Intended destination path of the file upload. Path may change upon finalization, depending on existance of another upload to the same location and the site's overwrite setting.
    action string Value is always write or put for this action.
    ask_about_overwrites boolean If true, a file by this name already exists and will be overwritten when this upload completes if it continues.

    Starting a new upload

    Example Request

    curl https://SUBDOMAIN.files.com/api/rest/v1/files/NewFile.txt \
      -u YOUR_API_KEY:x \
      -X POST \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -d '{
            "action": "put"
          }'
    
    curl https://SUBDOMAIN.files.com/api/rest/v1/files/NewFile.txt \
      -u YOUR_API_KEY:x \
      -X POST \
      -H 'Content-Type: application/xml' \
      -H 'Accept: application/xml' \
      -d '<file>
            <action>put</action>
          </file>'
    
    // Upload a file on disk.
    File.create(path, null).putLocalFile(localPath);
    
    // Upload raw file data.
    java.io.File file = new java.io.File(localPath);
    File.create(path, null).putBufferedInputStream(new BufferedInputStream(new FileInputStream(file)), file.length(), null);
    
    # Upload a file on disk.
    \Files\Model\File::uploadFile($destinationFileName, $sourceFilePath);
    
    # Upload raw file data.
    \Files\Model\File::uploadData($destinationFileName, $fileData);
    
    // Upload a file on disk. (Not available in browser.)
    const file = await File.uploadFile(destinationFileName, sourceFilePath)
    
    // Upload raw file data.
    const file = await File.uploadData(destinationFileName, fileData)
    
    // Upload from readable stream.
    const file = await File.uploadStream(destinationFileName, readableStream)
    
    # Upload a file on disk.
    Files::upload_file(local_path, path)
    
    # Upload raw file data.
    File.open(local_path) do |read_file|
      Files::File.open(path, 'w') do |write_file|
        write_file.write(read_file.read)
      end
    end
    
    // Upload a file from disk.
    await RemoteFile.UploadFile(LocalPath, Path);
    
    // Upload raw file data.
    FileInfo fileInfo = new FileInfo(LocalPath);
    using (FileStream fs = fileInfo.OpenRead())
    {
        await RemoteFile.UploadFile(Path, fs, fileInfo.Length, DateTime.UtcNow);
    }
    
    # Upload a file on disk.
    files_sdk.upload_file(local_path, path)
    
    # Upload raw file data (string)
    with files_sdk.open(path, 'w') as f:
        f.write(string_data)
    
    # Upload raw file data (binary)
    with files_sdk.open(path, 'wb') as f:
        f.write(bytes_data)
    
    // Upload a file on disk.
    uploadPath := "my-file.text"
    files.UploadFile(context.Background(), &files_sdk.UploadParams{Source: uploadPath})
    
    // Upload from io.Reader
    source := strings.NewReader("contents of my file")
    destination := "my-local-file.txt"
    
    files.Upload(context.Background(), source, destination, nil)
    
    files-cli upload my-file.text
    

    Example Response

    {
      "ref": "put-378670",
      "path": "NewFile.txt",
      "action": "put/write",
      "ask_about_overwrites": false,
      "http_method": "PUT",
      "upload_uri": "https://example-upload-proxy-url.com/path/6eee7ad0-bf75-0131-71fc-0eeabbd7a8b4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIEWLY3MN4YGZQOWA%2F20140516%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20140516T221456Z&X-Amz-Expires=180&X-Amz-SignedHeaders=host&partNumber=1&uploadId=xQDI8q.aDdWdWIvSpRGLOFqnPQqJoMGZ88r9g_q7z2gW6U4rNZx8Zb_Wh9m07TDJM1x4rCTM18UCzdXaYjJu.SBH89LAiA4ye698TfMPyam4BO7ifs7HLuiBPrEW.zIz&X-Amz-Signature=69bc7be37c8c42096e78aa4ff752f073ea890481c5f76eac5ad40a5ab9466997",
      "partsize":5242880,
      "part_number":1,
      "available_parts":10000,
      "send": {
        "partsize": "required-parameter Content-Length",
        "partdata": "body"
      },
      "headers": {},
      "parameters": {}
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <upload>
      <ref>put-378670</ref>
      <path>NewFile.txt</path>
      <action>put/write</action>
      <ask_about_overwrites type="boolean">false</ask_about_overwrites>
      <http_method>PUT</http_method>
      <upload_uri>https://example-upload-proxy-url.com/path/6eee7ad0-bf75-0131-71fc-0eeabbd7a8b4?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Credential=AKIAIEWLY3MN4YGZQOWA%2F20140516%2Fus-east-1%2Fs3%2Faws4_request&amp;X-Amz-Date=20140516T221456Z&amp;X-Amz-Expires=180&amp;X-Amz-SignedHeaders=host&amp;partNumber=1&amp;uploadId=xQDI8q.aDdWdWIvSpRGLOFqnPQqJoMGZ88r9g_q7z2gW6U4rNZx8Zb_Wh9m07TDJM1x4rCTM18UCzdXaYjJu.SBH89LAiA4ye698TfMPyam4BO7ifs7HLuiBPrEW.zIz&amp;X-Amz-Signature=69bc7be37c8c42096e78aa4ff752f073ea890481c5f76eac5ad40a5ab9466997</upload_uri>
      <partsize type="integer">5242880</partsize>
      <part_number type="integer">1</part_number>
      <available_parts type="integer">10000</available_parts>
      <send>
        <partsize>required-parameter Content-Length</partsize>
        <partdata>body</partdata>
      </send>
      <headers></headers>
      <parameters></parameters>
    </upload>
    

    The first request to upload a new file is a POST request to /files/PATH_AND_FILENAME.EXT with an action parameter with the value of put.

    HTTP Request

    POST /files/:path_and_filename

    Uploading the file or file parts

    Example Request

    curl "https://example-upload-proxy-url.com/path/6eee7ad0-bf75-0131-71fc-0eeabbd7a8b4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIEWLY3MN4YGZQOWA%2F20140516%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20140516T221456Z&X-Amz-Expires=180&X-Amz-SignedHeaders=host&partNumber=1&uploadId=xQDI8q.aDdWdWIvSpRGLOFqnPQqJoMGZ88r9g_q7z2gW6U4rNZx8Zb_Wh9m07TDJM1x4rCTM18UCzdXaYjJu.SBH89LAiA4ye698TfMPyam4BO7ifs7HLuiBPrEW.zIz&X-Amz-Signature=69bc7be37c8c42096e78aa4ff752f073ea890481c5f76eac5ad40a5ab9466997" \
      --upload-file filename.ext
    

    At this point, you are to send a PUT request to the returned upload_uri with the file data, along with the headers and parameters provided to you from Files.com.

    The upload_uri link is signed by Files.com and must be used within 15 minutes. You will receive an HTTP 200 response with no body upon successful upload.

    Should you wish to upload the file in multiple parts (required if the file size exceeds 5 GB) you will need to request an additional upload URL for the next part.

    Requesting additional upload URLs

    Example Request

    curl https://SUBDOMAIN.files.com/api/rest/v1/files/NewFile.txt \
      -u YOUR_API_KEY:x \
      -X POST \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -d '{
            "action": "put",
            "ref": "put-378670",
            "part": 2
          }'
    
    curl https://SUBDOMAIN.files.com/api/rest/v1/files/NewFile.txt \
      -u YOUR_API_KEY:x \
      -X POST \
      -H 'Content-Type: application/xml' \
      -H 'Accept: application/xml' \
      -d '<file>
            <action>put</action>
            <ref>put-378670</ref>
            <part>2</part>
          </file>'
    

    Example Response

    {
      "ref": "put-378670",
      "path": "NewFile.txt",
      "action": "put/write",
      "ask_about_overwrites": false,
      "http_method": "PUT",
      "upload_uri": "https://example-upload-proxy-url.com/path/6eee7ad0-bf75-0131-71fc-0eeabbd7a8b4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIEWLY3MN4YGZQOWA%2F20140516%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20140516T221456Z&X-Amz-Expires=180&X-Amz-SignedHeaders=host&partNumber=2&uploadId=xQDI8q.aDdWdWIvSpRGLOFqnPQqJoMGZ88r9g_q7z2gW6U4rNZx8Zb_Wh9m07TDJM1x4rCTM18UCzdXaYjJu.SBH89LAiA4ye698TfMPyam4BO7ifs7HLuiBPrEW.zIz&X-Amz-Signature=57c440731898fb55c6866af734757185dbbccba7741259ade453c30120e32c6h",
      "partsize":5242880,
      "part_number":2,
      "available_parts":10000,
      "send": {
        "partsize": "required-parameter Content-Length",
        "partdata": "body"
      },
      "headers": {},
      "parameters": {}
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <upload>
      <ref>put-378670</ref>
      <path>NewFile.txt</path>
      <action>put/write</action>
      <ask_about_overwrites type="boolean">false</ask_about_overwrites>
      <http_method>PUT</http_method>
      <upload_uri>https://example-upload-proxy-url.com/path/6eee7ad0-bf75-0131-71fc-0eeabbd7a8b4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIEWLY3MN4YGZQOWA%2F20140516%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20140516T221456Z&X-Amz-Expires=180&X-Amz-SignedHeaders=host&partNumber=2&uploadId=xQDI8q.aDdWdWIvSpRGLOFqnPQqJoMGZ88r9g_q7z2gW6U4rNZx8Zb_Wh9m07TDJM1x4rCTM18UCzdXaYjJu.SBH89LAiA4ye698TfMPyam4BO7ifs7HLuiBPrEW.zIz&X-Amz-Signature=57c440731898fb55c6866af734757185dbbccba7741259ade453c30120e32c6h</upload_uri>
      <partsize type="integer">5242880</partsize>
      <part_number type="integer">2</part_number>
      <available_parts type="integer">10000</available_parts>
      <send>
        <partsize>required-parameter Content-Length</partsize>
        <partdata>body</partdata>
      </send>
      <headers></headers>
      <parameters></parameters>
    </upload>
    

    Once an upload has been opened and before it is completed, additional upload URLs can be requested from the REST API. Send a POST request to /files/PATH_AND_FILENAME.EXT with parameter action set to put, parameter ref set to the reference ID returned at the start of the upload, and parameter part set to the part number the upload URL should refer to. The part number can be the same as one previously used if a new URL is required, either because the part is to be re-uploaded or because a prior upload attempt failed and the prior URL’s signature has expired.

    HTTP Request

    POST /files/:path_and_filename

    Completing an upload

    Example Request

    curl https://SUBDOMAIN.files.com/api/rest/v1/files/NewFile.txt \
      -u YOUR_API_KEY:x \
      -X POST \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -d '{
            "action": "end",
            "ref": "put-378670"
          }'
    
    curl https://SUBDOMAIN.files.com/api/rest/v1/files/NewFile.txt \
      -u YOUR_API_KEY:x \
      -X POST \
      -H 'Content-Type: application/xml' \
      -H 'Accept: application/xml' \
      -d '<file>
            <action>end</action>
            <ref>put-378670</ref>
          </file>'
    

    Example Response

    {
      "id": 1020304050,
      "path": "NewFile.txt",
      "display_name": "NewFile.txt",
      "type": "file",
      "size": 412,
      "mtime": "2014-05-17T05:14:35+00:00",
      "provided_mtime": null,
      "crc32": null,
      "md5": null,
      "region":"us-east-1",
      "permissions": "rwd"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file>
      <id type="integer">1020304050</id>
      <path>NewFile.txt</path>
      <display_name>NewFile.txt</display_name>
      <type>file</type>
      <size type="integer">412</size>
      <mtime type="datetime">2014-05-17T05:14:35+00:00</mtime>
      <provided_mtime nil="true"/>
      <crc32 nil="true"/>
      <md5 nil="true"/>
      <region>us-east-1</region>
      <permissions>rwd</permissions>
    </file>
    

    After uploading the file to the file storage environment, the REST API needs to be notified that the upload was completed. This is done by sending another POST request to /files/PATH_AND_FILENAME.EXT with parameter action set to end and parameter ref set to the reference ID returned at the start of the upload.

    HTTP Request

    POST /files/:path_and_filename

    File Actions

    The FileActions resource in the REST API allows you to operate on FileActions.

    The FileAction object

    Example FileAction Object

    {
      "status": "pending",
      "file_migration_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-action>
      <status>pending</status>
      <file_migration_id type="integer">1</file_migration_id>
    </file-action>
    
    
    Attribute Description
    status string Status of file operation.
    file_migration_id int64 If status is pending, this is the id of the FileMigration to check for status updates.

    Copy file/folder

    Example Request

    curl https://app.files.com/api/rest/v1/file_actions/copy/{path} \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"destination":"destination","structure":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/file_actions/copy/{path} \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<file-action>
           <destination>destination</destination>
           <structure type="boolean">true</structure>
         </file-action>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file = Files::File.new
    file.copy(
      destination: "destination",
      structure: true
    )
    
    $file = new \Files\Model\File();
    $file->copy(array(
      'destination' => "destination", 
      'structure' => true
    ));
    
    HashMap<Object, String> attributes = new HashMap<>();
    File file = new File(attributes);
    file.setDestination("destination");
    file.setStructure(true);
    file.copy();
    
    const file = new File()
    await file.copy({ 
      destination: "destination", 
      structure: true,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("destination", "destination");
    parameters.Add("structure", true);
    
    await remoteFile.Copy(parameters);
    
    files_sdk.set_api_key("my-key")
    
    file = files_sdk.file.find(path)
    file.copy({
      "destination": "destination",
      "structure": True
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    file.Copy(context.Background(), files_sdk.FileCopyParams{
      Path: "path",
      Destination: "destination",
      Structure: lib.Bool(true),
    })
    
    files-cli files copy \
      --path="path" \
      --destination="destination" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "status": "pending",
      "file_migration_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-action>
      <status>pending</status>
      <file_migration_id type="integer">1</file_migration_id>
    </file-action>
    
    

    HTTPS Request

    POST /file_actions/copy/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path to operate on.
    destination string Required Copy destination path.
    structure boolean Copy structure only?

    Move file/folder

    Example Request

    curl https://app.files.com/api/rest/v1/file_actions/move/{path} \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"destination":"destination"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/file_actions/move/{path} \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<file-action>
           <destination>destination</destination>
         </file-action>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file = Files::File.new
    file.move(
      destination: "destination"
    )
    
    $file = new \Files\Model\File();
    $file->move(array(
      'destination' => "destination"
    ));
    
    HashMap<Object, String> attributes = new HashMap<>();
    File file = new File(attributes);
    file.setDestination("destination");
    file.move();
    
    const file = new File()
    await file.move({ 
      destination: "destination",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("destination", "destination");
    
    await remoteFile.Move(parameters);
    
    files_sdk.set_api_key("my-key")
    
    file = files_sdk.file.find(path)
    file.move({
      "destination": "destination"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    file.Move(context.Background(), files_sdk.FileMoveParams{
      Path: "path",
      Destination: "destination",
    })
    
    files-cli files move \
      --path="path" \
      --destination="destination" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "status": "pending",
      "file_migration_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-action>
      <status>pending</status>
      <file_migration_id type="integer">1</file_migration_id>
    </file-action>
    
    

    HTTPS Request

    POST /file_actions/move/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path to operate on.
    destination string Required Move destination path.

    File Comments

    File Comments are comments attached to a file by a user.

    The FileComment object

    Example FileComment Object

    {
      "id": 1,
      "body": "What a great file!",
      "reactions": [
        {
          "id": 1,
          "emoji": "👍"
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-comment>
      <id type="integer">1</id>
      <body>What a great file!</body>
      <reactions type="array">
        <reaction>
          <id type="integer">1</id>
          <emoji>👍</emoji>
        </reaction>
      </reactions>
    </file-comment>
    
    
    Attribute Description
    id int64 File Comment ID
    body string Comment body.
    reactions array Reactions to this comment.
    path string File path.

    List File Comments by path

    Example Request

    curl "https://app.files.com/api/rest/v1/file_comments/files/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/file_comments/files/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::FileComment.list_for(path, 
      per_page: 1
    )
    
    \Files\Model\FileComment::listFor($path, array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    FileComment.listFor(parameters).all()
    
    await FileComment.listFor(path, {
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await FileComment.ListFor(path, parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.file_comment.list_for(path, {
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    filecomment.ListFor(context.Background(), files_sdk.FileCommentListForParams{
      Cursor: "",
      PerPage: 1,
      Path: "path",
    })
    
    
    files-cli file-comments list-for \
      --cursor="" \
      --per-page=1 \
      --path="path" \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "body": "What a great file!",
        "reactions": [
          {
            "id": 1,
            "emoji": "👍"
          }
        ]
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-comments type="array">
      <file-comment>
        <id type="integer">1</id>
        <body>What a great file!</body>
        <reactions type="array">
          <reaction>
            <id type="integer">1</id>
            <emoji>👍</emoji>
          </reaction>
        </reactions>
      </file-comment>
    </file-comments>
    
    

    HTTPS Request

    GET /file_comments/files/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path to operate on.

    Pagination Params

    Read more about Paginating List Requests.

    Create File Comment

    Example Request

    curl https://app.files.com/api/rest/v1/file_comments.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"body":"body","path":"path"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/file_comments.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<file-comment>
           <body>body</body>
           <path>path</path>
         </file-comment>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::FileComment.create(
      body: "body", 
      path: "path"
    )
    
    \Files\Model\FileComment::create(array(
      'body' => "body", 
      'path' => "path"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("body", body);
    requestParams.put("path", path);
    FileComment.create(parameters)
    
    await FileComment.create({
      body: "body", 
      path: "path",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("body", "body");
    parameters.Add("path", "path");
    
    await FileComment.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.file_comment.create({
      "body": "body",
      "path": "path"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    filecomment.Create(context.Background(), files_sdk.FileCommentCreateParams{
      Body: "body",
      Path: "path",
    })
    
    
    files-cli file-comments create \
      --body="body" \
      --path="path" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "body": "What a great file!",
      "reactions": [
        {
          "id": 1,
          "emoji": "👍"
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-comment>
      <id type="integer">1</id>
      <body>What a great file!</body>
      <reactions type="array">
        <reaction>
          <id type="integer">1</id>
          <emoji>👍</emoji>
        </reaction>
      </reactions>
    </file-comment>
    
    

    HTTPS Request

    POST /file_comments

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    body string Required Comment body.
    path string Required File path.

    Update File Comment

    Example Request

    curl https://app.files.com/api/rest/v1/file_comments/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"body":"body"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/file_comments/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<file-comment>
           <body>body</body>
         </file-comment>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file_comment = Files::FileComment.list.first
    file_comment.update(
      body: "body"
    )
    
    $file_comment = \Files\Model\FileComment::list()[0];
    $file_comment->update(array(
      'body' => "body"
    ));
    
    FileComment fileComment = FileComment.list()[0];
    fileComment.setBody("body");
    fileComment.update();
    
    const fileComment = (await FileComment.list())[0]
    await fileComment.update({ 
      body: "body",
    })
    
    var fileComment = (await FileComment.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("body", "body");
    
    await fileComment.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    file_comment = files_sdk.file_comment.list.first
    file_comment.update({
      "body": "body"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    filecomment.Update(context.Background(), files_sdk.FileCommentUpdateParams{
      Id: 1,
      Body: "body",
    })
    
    files-cli file-comments update \
      --id=1 \
      --body="body" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "body": "What a great file!",
      "reactions": [
        {
          "id": 1,
          "emoji": "👍"
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-comment>
      <id type="integer">1</id>
      <body>What a great file!</body>
      <reactions type="array">
        <reaction>
          <id type="integer">1</id>
          <emoji>👍</emoji>
        </reaction>
      </reactions>
    </file-comment>
    
    

    HTTPS Request

    PATCH /file_comments/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required File Comment ID.
    body string Required Comment body.

    Delete File Comment

    Example Request

    curl https://app.files.com/api/rest/v1/file_comments/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/file_comments/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file_comment = Files::FileComment.list.first
    file_comment.delete
    
    $file_comment = \Files\Model\FileComment::list()[0];
    $file_comment->delete();
    
    FileComment fileComment = FileComment.list()[0];
    
    fileComment.delete();
    
    const fileComment = (await FileComment.list())[0]
    await fileComment.delete()
    
    var fileComment = (await FileComment.List())[0];
    
    await fileComment.Delete();
    
    files_sdk.set_api_key("my-key")
    
    file_comment = files_sdk.file_comment.list.first
    file_comment.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    filecomment.Delete(context.Background(), files_sdk.FileCommentDeleteParams{
      Id: 1,
    })
    
    files-cli file-comments delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /file_comments/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required File Comment ID.

    File Comment Reactions

    File Comment Reactionss are reactions that are attached to a comment on a file.

    The FileCommentReaction object

    Example FileCommentReaction Object

    {
      "id": 1,
      "emoji": "👍"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-comment-reaction>
      <id type="integer">1</id>
      <emoji>👍</emoji>
    </file-comment-reaction>
    
    
    Attribute Description
    id int64 Reaction ID
    emoji string Emoji used in the reaction.
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    file_comment_id int64 ID of file comment to attach reaction to.

    Create File Comment Reaction

    Example Request

    curl https://app.files.com/api/rest/v1/file_comment_reactions.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"file_comment_id":1,"emoji":"emoji"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/file_comment_reactions.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<file-comment-reaction>
           <user_id type="integer">1</user_id>
           <file_comment_id type="integer">1</file_comment_id>
           <emoji>emoji</emoji>
         </file-comment-reaction>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::FileCommentReaction.create(
      user_id: 1, 
      file_comment_id: 1, 
      emoji: "emoji"
    )
    
    \Files\Model\FileCommentReaction::create(array(
      'user_id' => 1, 
      'file_comment_id' => 1, 
      'emoji' => "emoji"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("file_comment_id", 1);
    requestParams.put("emoji", emoji);
    FileCommentReaction.create(parameters)
    
    await FileCommentReaction.create({
      user_id: 1, 
      file_comment_id: 1, 
      emoji: "emoji",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("file_comment_id", (Int64?) 1);
    parameters.Add("emoji", "emoji");
    
    await FileCommentReaction.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.file_comment_reaction.create({
      "user_id": 1,
      "file_comment_id": 1,
      "emoji": "emoji"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    filecommentreaction.Create(context.Background(), files_sdk.FileCommentReactionCreateParams{
      UserId: 1,
      FileCommentId: 1,
      Emoji: "emoji",
    })
    
    
    files-cli file-comment-reactions create \
      --user-id=1 \
      --file-comment-id=1 \
      --emoji="emoji" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "emoji": "👍"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-comment-reaction>
      <id type="integer">1</id>
      <emoji>👍</emoji>
    </file-comment-reaction>
    
    

    HTTPS Request

    POST /file_comment_reactions

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    file_comment_id int64 Required ID of file comment to attach reaction to.
    emoji string Required Emoji to react with.

    Delete File Comment Reaction

    Example Request

    curl https://app.files.com/api/rest/v1/file_comment_reactions/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/file_comment_reactions/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file_comment_reaction = Files::FileCommentReaction.new
    file_comment_reaction.delete
    
    $file_comment_reaction = new \Files\Model\FileCommentReaction();
    $file_comment_reaction->delete();
    
    HashMap<Object, String> attributes = new HashMap<>();
    FileCommentReaction fileCommentReaction = new FileCommentReaction(attributes);
    
    fileCommentReaction.delete();
    
    const fileCommentReaction = new FileCommentReaction()
    await fileCommentReaction.delete()
    
    
    await fileCommentReaction.Delete();
    
    files_sdk.set_api_key("my-key")
    
    file_comment_reaction = files_sdk.file_comment_reaction()
    file_comment_reaction.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    filecommentreaction.Delete(context.Background(), files_sdk.FileCommentReactionDeleteParams{
      Id: 1,
    })
    
    files-cli file-comment-reactions delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /file_comment_reactions/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required File Comment Reaction ID.

    File Migrations

    FileMigrations represent background operations on one or more files, such as a copy or a region migration.

    If no operation or dest_path is present, then the record represents a region migration.

    The FileMigration object

    Example FileMigration Object

    {
      "id": 1,
      "path": "MyFolder",
      "dest_path": "MyFolder",
      "files_moved": 1,
      "files_total": 1,
      "operation": "move",
      "region": "USA",
      "status": "complete",
      "log_url": "https://www.example.com/log_file"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-migration>
      <id type="integer">1</id>
      <path>MyFolder</path>
      <dest_path>MyFolder</dest_path>
      <files_moved type="integer">1</files_moved>
      <files_total type="integer">1</files_total>
      <operation>move</operation>
      <region>USA</region>
      <status>complete</status>
      <log_url>https://www.example.com/log_file</log_url>
    </file-migration>
    
    
    Attribute Description
    id int64 File migration ID
    path string Source path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    dest_path string Destination path
    files_moved int64 Number of files processed
    files_total int64 Deprecated: used to return a count of the applicable files. Currently returns 0 always. On remote servers, it is not possible to reliably determine the number of affected files for every migration operation.
    operation string The type of operation
    Possible values: delete, move, copy, regional_migration
    region string Region
    status string Status
    Possible values: pending, counting, processing, completed, processing_subfolders, finishing, creating_dest_folder, waiting_for_other_jobs, waiting_for_all_files, waiting_for_pending_subfolders, waiting_for_all_subfolders, failed, waiting_for_enqueued_operations, processing_recursively, removing_deferred_folders
    log_url string Link to download the log file for this migration.

    Show File Migration

    Example Request

    curl https://app.files.com/api/rest/v1/file_migrations/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/file_migrations/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::FileMigration.find(id)
    
    \Files\Model\FileMigration::find($id);
    
    
    FileMigration.find(, parameters
    
    await FileMigration.find(id)
    
    
    await FileMigration.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.file_migration.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    filemigration.Find(context.Background(), files_sdk.FileMigrationFindParams{
      Id: 1,
    })
    
    
    files-cli file-migrations find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "path": "MyFolder",
      "dest_path": "MyFolder",
      "files_moved": 1,
      "files_total": 1,
      "operation": "move",
      "region": "USA",
      "status": "complete",
      "log_url": "https://www.example.com/log_file"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-migration>
      <id type="integer">1</id>
      <path>MyFolder</path>
      <dest_path>MyFolder</dest_path>
      <files_moved type="integer">1</files_moved>
      <files_total type="integer">1</files_total>
      <operation>move</operation>
      <region>USA</region>
      <status>complete</status>
      <log_url>https://www.example.com/log_file</log_url>
    </file-migration>
    
    

    HTTPS Request

    GET /file_migrations/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required File Migration ID.

    File Upload Parts

    The FileUploadParts resource in the REST API allows you to operate on FileUploadParts.

    The FileUploadPart object

    Example FileUploadPart Object

    {
      "send": {
        "key": "example value"
      },
      "action": "multipart",
      "ask_about_overwrites": true,
      "available_parts": 1,
      "expires": "example",
      "headers": {
        "key": "example value"
      },
      "http_method": "PUT",
      "next_partsize": 1,
      "parallel_parts": true,
      "retry_parts": true,
      "parameters": {
        "key": "example value"
      },
      "part_number": 1,
      "partsize": 1,
      "path": "",
      "ref": "upload-1",
      "upload_uri": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-upload-part>
      <send>
        <key>example value</key>
      </send>
      <action>multipart</action>
      <ask_about_overwrites type="boolean">true</ask_about_overwrites>
      <available_parts type="integer">1</available_parts>
      <expires>example</expires>
      <headers>
        <key>example value</key>
      </headers>
      <http_method>PUT</http_method>
      <next_partsize type="integer">1</next_partsize>
      <parallel_parts type="boolean">true</parallel_parts>
      <retry_parts type="boolean">true</retry_parts>
      <parameters>
        <key>example value</key>
      </parameters>
      <part_number type="integer">1</part_number>
      <partsize type="integer">1</partsize>
      <path></path>
      <ref>upload-1</ref>
      <upload_uri>example</upload_uri>
    </file-upload-part>
    
    
    Attribute Description
    send object Content-Type and File to send
    action string Type of upload
    ask_about_overwrites boolean If true, this file exists and you may wish to ask the user for overwrite confirmation
    available_parts int64 Number of parts in the upload
    expires string Date/time of when this Upload part expires and the URL cannot be used any more
    headers object Additional upload headers to provide as part of the upload
    http_method string HTTP Method to use for uploading the part, usually PUT
    next_partsize int64 Size in bytes for this part
    parallel_parts boolean If true, multiple parts may be uploaded in parallel. If false, be sure to only upload one part at a time, in order.
    retry_parts boolean If true, parts may be retried. If false, a part cannot be retried and the upload should be restarted.
    parameters object Additional HTTP parameters to send with the upload
    part_number int64 Number of this upload part
    partsize int64 Size in bytes for the next upload part
    path string New file path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    ref string Reference name for this upload part
    upload_uri string URI to upload this part to

    Begin file upload

    Example Request

    curl https://app.files.com/api/rest/v1/file_actions/begin_upload/{path} \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"mkdir_parents":true,"part":1,"parts":1,"ref":"upload-1","restart":1,"size":1,"with_rename":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/file_actions/begin_upload/{path} \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<file-upload-parts>
           <mkdir_parents type="boolean">true</mkdir_parents>
           <part type="integer">1</part>
           <parts type="integer">1</parts>
           <ref>upload-1</ref>
           <restart type="integer">1</restart>
           <size type="integer">1</size>
           <with_rename type="boolean">true</with_rename>
         </file-upload-parts>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file = Files::File.new
    file.begin_upload(
      mkdir_parents: true,
      part: 1,
      parts: 1,
      ref: "upload-1",
      restart: 1,
      size: 1,
      with_rename: true
    )
    
    $file = new \Files\Model\File();
    $file->beginUpload(array(
      'mkdir_parents' => true, 
      'part' => 1, 
      'parts' => 1, 
      'ref' => "upload-1", 
      'restart' => 1, 
      'size' => 1, 
      'with_rename' => true
    ));
    
    HashMap<Object, String> attributes = new HashMap<>();
    File file = new File(attributes);
    file.setMkdirParents(true);
    file.setPart(1);
    file.setParts(1);
    file.setRef("upload-1");
    file.setRestart(1);
    file.setSize(1);
    file.setWithRename(true);
    file.beginUpload();
    
    const file = new File()
    await file.beginUpload({ 
      mkdir_parents: true, 
      part: 1, 
      parts: 1, 
      ref: "upload-1", 
      restart: 1, 
      size: 1, 
      with_rename: true,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("mkdir_parents", true);
    parameters.Add("part", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("parts", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("ref", "upload-1");
    parameters.Add("restart", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("size", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("with_rename", true);
    
    await remoteFile.BeginUpload(parameters);
    
    files_sdk.set_api_key("my-key")
    
    file = files_sdk.file.find(path)
    file.begin_upload({
      "mkdir_parents": True,
      "part": 1,
      "parts": 1,
      "ref": "upload-1",
      "restart": 1,
      "size": 1,
      "with_rename": True
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    file.BeginUpload(context.Background(), files_sdk.FileBeginUploadParams{
      Path: "path",
      MkdirParents: lib.Bool(true),
      Part: 1,
      Parts: 1,
      Ref: "upload-1",
      Restart: 1,
      Size: 1,
      WithRename: lib.Bool(true),
    })
    
    files-cli files begin-upload \
      --path="path" \
      --part=1 \
      --parts=1 \
      --ref="upload-1" \
      --restart=1 \
      --size=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "send": {
          "key": "example value"
        },
        "action": "multipart",
        "ask_about_overwrites": true,
        "available_parts": 1,
        "expires": "example",
        "headers": {
          "key": "example value"
        },
        "http_method": "PUT",
        "next_partsize": 1,
        "parallel_parts": true,
        "retry_parts": true,
        "parameters": {
          "key": "example value"
        },
        "part_number": 1,
        "partsize": 1,
        "path": "",
        "ref": "upload-1",
        "upload_uri": "example"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-upload-parts type="array">
      <file-upload-part>
        <send>
          <key>example value</key>
        </send>
        <action>multipart</action>
        <ask_about_overwrites type="boolean">true</ask_about_overwrites>
        <available_parts type="integer">1</available_parts>
        <expires>example</expires>
        <headers>
          <key>example value</key>
        </headers>
        <http_method>PUT</http_method>
        <next_partsize type="integer">1</next_partsize>
        <parallel_parts type="boolean">true</parallel_parts>
        <retry_parts type="boolean">true</retry_parts>
        <parameters>
          <key>example value</key>
        </parameters>
        <part_number type="integer">1</part_number>
        <partsize type="integer">1</partsize>
        <path></path>
        <ref>upload-1</ref>
        <upload_uri>example</upload_uri>
      </file-upload-part>
    </file-upload-parts>
    
    

    HTTPS Request

    POST /file_actions/begin_upload/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path to operate on.
    mkdir_parents boolean Create parent directories if they do not exist?
    part int64 Part if uploading a part.
    parts int64 How many parts to fetch?
    ref string
    restart int64 File byte offset to restart from.
    size int64 Total bytes of file being uploaded (include bytes being retained if appending/restarting).
    with_rename boolean Allow file rename instead of overwrite?

    Form Field Sets

    Form Field Sets define a custom forms to be used for bundle and inbox registrations.

    Each Form Field Set contains one or more Form Fields. A form and all of its form fields are submitted in a single create request. The order of form fields in the array is the order they will be displayed.

    Once created, a form field set can then be associated with one or more bundle(s) and/or inbox(s). Once associated, you will be required to submit well-formatted form-data when creating a bundle-registration or inbox registration.

    The FormFieldSet object

    Example FormFieldSet Object

    {
      "id": 1,
      "title": "Sample Form Title",
      "form_layout": [
        1,
        2,
        3,
        4
      ],
      "form_fields": [
        {
          "id": 1,
          "label": "Sample Label",
          "required": true,
          "help_text": "Help Text",
          "field_type": "text",
          "options_for_select": [
            "red",
            "green",
            "blue"
          ],
          "default_option": "red",
          "form_field_set_id": 1
        }
      ],
      "skip_name": true,
      "skip_email": true,
      "skip_company": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <form-field-set>
      <id type="integer">1</id>
      <title>Sample Form Title</title>
      <form_layout type="array">
        <form_layout type="integer">1</form_layout>
        <form_layout type="integer">2</form_layout>
        <form_layout type="integer">3</form_layout>
        <form_layout type="integer">4</form_layout>
      </form_layout>
      <form_fields type="array">
        <form_field>
          <id type="integer">1</id>
          <label>Sample Label</label>
          <required type="boolean">true</required>
          <help_text>Help Text</help_text>
          <field_type>text</field_type>
          <options_for_select type="array">
            <options_for_select>red</options_for_select>
            <options_for_select>green</options_for_select>
            <options_for_select>blue</options_for_select>
          </options_for_select>
          <default_option>red</default_option>
          <form_field_set_id type="integer">1</form_field_set_id>
        </form_field>
      </form_fields>
      <skip_name type="boolean">true</skip_name>
      <skip_email type="boolean">true</skip_email>
      <skip_company type="boolean">true</skip_company>
    </form-field-set>
    
    
    Attribute Description
    id int64 Form field set id
    title string Title to be displayed
    form_layout array Layout of the form
    form_fields array Associated form fields
    skip_name boolean Any associated InboxRegistrations or BundleRegistrations can be saved without providing name
    skip_email boolean Any associated InboxRegistrations or BundleRegistrations can be saved without providing email
    skip_company boolean Any associated InboxRegistrations or BundleRegistrations can be saved without providing company
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.

    List Form Field Sets

    Example Request

    curl "https://app.files.com/api/rest/v1/form_field_sets.json?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/form_field_sets.xml?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::FormFieldSet.list(
      user_id: 1, 
      per_page: 1
    )
    
    \Files\Model\FormFieldSet::list(array(
      'user_id' => 1, 
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    FormFieldSet.list(parameters).all()
    
    await FormFieldSet.list({
      user_id: 1, 
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    
    await FormFieldSet.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.form_field_set.list({
      "user_id": 1,
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    formfieldset.List(context.Background(), files_sdk.FormFieldSetListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli form-field-sets list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "title": "Sample Form Title",
        "form_layout": [
          1,
          2,
          3,
          4
        ],
        "form_fields": [
          {
            "id": 1,
            "label": "Sample Label",
            "required": true,
            "help_text": "Help Text",
            "field_type": "text",
            "options_for_select": [
              "red",
              "green",
              "blue"
            ],
            "default_option": "red",
            "form_field_set_id": 1
          }
        ],
        "skip_name": true,
        "skip_email": true,
        "skip_company": true
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <form-field-sets type="array">
      <form-field-set>
        <id type="integer">1</id>
        <title>Sample Form Title</title>
        <form_layout type="array">
          <form_layout type="integer">1</form_layout>
          <form_layout type="integer">2</form_layout>
          <form_layout type="integer">3</form_layout>
          <form_layout type="integer">4</form_layout>
        </form_layout>
        <form_fields type="array">
          <form_field>
            <id type="integer">1</id>
            <label>Sample Label</label>
            <required type="boolean">true</required>
            <help_text>Help Text</help_text>
            <field_type>text</field_type>
            <options_for_select type="array">
              <options_for_select>red</options_for_select>
              <options_for_select>green</options_for_select>
              <options_for_select>blue</options_for_select>
            </options_for_select>
            <default_option>red</default_option>
            <form_field_set_id type="integer">1</form_field_set_id>
          </form_field>
        </form_fields>
        <skip_name type="boolean">true</skip_name>
        <skip_email type="boolean">true</skip_email>
        <skip_company type="boolean">true</skip_company>
      </form-field-set>
    </form-field-sets>
    
    

    HTTPS Request

    GET /form_field_sets

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.

    Pagination Params

    Read more about Paginating List Requests.

    Show Form Field Set

    Example Request

    curl https://app.files.com/api/rest/v1/form_field_sets/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/form_field_sets/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::FormFieldSet.find(id)
    
    \Files\Model\FormFieldSet::find($id);
    
    
    FormFieldSet.find(, parameters
    
    await FormFieldSet.find(id)
    
    
    await FormFieldSet.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.form_field_set.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    formfieldset.Find(context.Background(), files_sdk.FormFieldSetFindParams{
      Id: 1,
    })
    
    
    files-cli form-field-sets find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "title": "Sample Form Title",
      "form_layout": [
        1,
        2,
        3,
        4
      ],
      "form_fields": [
        {
          "id": 1,
          "label": "Sample Label",
          "required": true,
          "help_text": "Help Text",
          "field_type": "text",
          "options_for_select": [
            "red",
            "green",
            "blue"
          ],
          "default_option": "red",
          "form_field_set_id": 1
        }
      ],
      "skip_name": true,
      "skip_email": true,
      "skip_company": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <form-field-set>
      <id type="integer">1</id>
      <title>Sample Form Title</title>
      <form_layout type="array">
        <form_layout type="integer">1</form_layout>
        <form_layout type="integer">2</form_layout>
        <form_layout type="integer">3</form_layout>
        <form_layout type="integer">4</form_layout>
      </form_layout>
      <form_fields type="array">
        <form_field>
          <id type="integer">1</id>
          <label>Sample Label</label>
          <required type="boolean">true</required>
          <help_text>Help Text</help_text>
          <field_type>text</field_type>
          <options_for_select type="array">
            <options_for_select>red</options_for_select>
            <options_for_select>green</options_for_select>
            <options_for_select>blue</options_for_select>
          </options_for_select>
          <default_option>red</default_option>
          <form_field_set_id type="integer">1</form_field_set_id>
        </form_field>
      </form_fields>
      <skip_name type="boolean">true</skip_name>
      <skip_email type="boolean">true</skip_email>
      <skip_company type="boolean">true</skip_company>
    </form-field-set>
    
    

    HTTPS Request

    GET /form_field_sets/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Form Field Set ID.

    Create Form Field Set

    Example Request

    curl https://app.files.com/api/rest/v1/form_field_sets.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"title":"Sample Form Title","skip_email":true,"skip_name":true,"skip_company":true,"form_fields":[{"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}]}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/form_field_sets.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<form-field-set>
           <user_id type="integer">1</user_id>
           <title>Sample Form Title</title>
           <skip_email type="boolean">true</skip_email>
           <skip_name type="boolean">true</skip_name>
           <skip_company type="boolean">true</skip_company>
           <form_fields type="array">
             <form_field>
               <label>Sample Label</label>
               <required type="boolean">true</required>
               <help_text>Help Text</help_text>
               <field_type>text</field_type>
               <options_for_select type="array">
                 <options_for_select>red</options_for_select>
                 <options_for_select>green</options_for_select>
                 <options_for_select>blue</options_for_select>
               </options_for_select>
               <default_option>red</default_option>
               <form_field_set_id type="integer">1</form_field_set_id>
             </form_field>
           </form_fields>
         </form-field-set>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::FormFieldSet.create(
      user_id: 1, 
      title: "Sample Form Title", 
      skip_email: true, 
      skip_name: true, 
      skip_company: true, 
      form_fields: [{"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}]
    )
    
    \Files\Model\FormFieldSet::create(array(
      'user_id' => 1, 
      'title' => "Sample Form Title", 
      'skip_email' => true, 
      'skip_name' => true, 
      'skip_company' => true, 
      'form_fields' => [{"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}]
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("title", Sample Form Title);
    requestParams.put("skip_email", true);
    requestParams.put("skip_name", true);
    requestParams.put("skip_company", true);
    requestParams.put("form_fields", [#<Swagger::Schema default_option="red" field_type="text" form_field_set_id=1 help_text="Help Text" label="Sample Label" options_for_select=#<Hashie::Array ["red", "green", "blue"]> required=true>]);
    FormFieldSet.create(parameters)
    
    await FormFieldSet.create({
      user_id: 1, 
      title: "Sample Form Title", 
      skip_email: true, 
      skip_name: true, 
      skip_company: true, 
      form_fields: [{"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}],
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("title", "Sample Form Title");
    parameters.Add("skip_email", true);
    parameters.Add("skip_name", true);
    parameters.Add("skip_company", true);
    parameters.Add("form_fields", (object[]) [{"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}]);
    
    await FormFieldSet.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.form_field_set.create({
      "user_id": 1,
      "title": "Sample Form Title",
      "skip_email": True,
      "skip_name": True,
      "skip_company": True,
      "form_fields": [{"label":"Sample Label","required":True,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}]
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    formfieldset.Create(context.Background(), files_sdk.FormFieldSetCreateParams{
      UserId: 1,
      Title: "Sample Form Title",
      SkipEmail: lib.Bool(true),
      SkipName: lib.Bool(true),
      SkipCompany: lib.Bool(true),
      FormFields: []map[string]interface{}{`{"id":1,"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}`},
    })
    
    
    files-cli form-field-sets create \
      --user-id=1 \
      --title="Sample Form Title" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "title": "Sample Form Title",
      "form_layout": [
        1,
        2,
        3,
        4
      ],
      "form_fields": [
        {
          "id": 1,
          "label": "Sample Label",
          "required": true,
          "help_text": "Help Text",
          "field_type": "text",
          "options_for_select": [
            "red",
            "green",
            "blue"
          ],
          "default_option": "red",
          "form_field_set_id": 1
        }
      ],
      "skip_name": true,
      "skip_email": true,
      "skip_company": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <form-field-set>
      <id type="integer">1</id>
      <title>Sample Form Title</title>
      <form_layout type="array">
        <form_layout type="integer">1</form_layout>
        <form_layout type="integer">2</form_layout>
        <form_layout type="integer">3</form_layout>
        <form_layout type="integer">4</form_layout>
      </form_layout>
      <form_fields type="array">
        <form_field>
          <id type="integer">1</id>
          <label>Sample Label</label>
          <required type="boolean">true</required>
          <help_text>Help Text</help_text>
          <field_type>text</field_type>
          <options_for_select type="array">
            <options_for_select>red</options_for_select>
            <options_for_select>green</options_for_select>
            <options_for_select>blue</options_for_select>
          </options_for_select>
          <default_option>red</default_option>
          <form_field_set_id type="integer">1</form_field_set_id>
        </form_field>
      </form_fields>
      <skip_name type="boolean">true</skip_name>
      <skip_email type="boolean">true</skip_email>
      <skip_company type="boolean">true</skip_company>
    </form-field-set>
    
    

    HTTPS Request

    POST /form_field_sets

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    title string Title to be displayed
    skip_email boolean Skip validating form email
    skip_name boolean Skip validating form name
    skip_company boolean Skip validating company
    form_fields array(object)

    Update Form Field Set

    Example Request

    curl https://app.files.com/api/rest/v1/form_field_sets/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"title":"Sample Form Title","skip_email":true,"skip_name":true,"skip_company":true,"form_fields":[{"id":1,"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}]}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/form_field_sets/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<form-field-set>
           <title>Sample Form Title</title>
           <skip_email type="boolean">true</skip_email>
           <skip_name type="boolean">true</skip_name>
           <skip_company type="boolean">true</skip_company>
           <form_fields type="array">
             <form_field>
               <id type="integer">1</id>
               <label>Sample Label</label>
               <required type="boolean">true</required>
               <help_text>Help Text</help_text>
               <field_type>text</field_type>
               <options_for_select type="array">
                 <options_for_select>red</options_for_select>
                 <options_for_select>green</options_for_select>
                 <options_for_select>blue</options_for_select>
               </options_for_select>
               <default_option>red</default_option>
               <form_field_set_id type="integer">1</form_field_set_id>
             </form_field>
           </form_fields>
         </form-field-set>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    form_field_set = Files::FormFieldSet.list.first
    form_field_set.update(
      title: "Sample Form Title",
      skip_email: true,
      skip_name: true,
      skip_company: true,
      form_fields: [{"id":1,"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}]
    )
    
    $form_field_set = \Files\Model\FormFieldSet::list()[0];
    $form_field_set->update(array(
      'title' => "Sample Form Title", 
      'skip_email' => true, 
      'skip_name' => true, 
      'skip_company' => true, 
      'form_fields' => [{"id":1,"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}]
    ));
    
    FormFieldSet formFieldSet = FormFieldSet.list()[0];
    formFieldSet.setTitle("Sample Form Title");
    formFieldSet.setSkipEmail(true);
    formFieldSet.setSkipName(true);
    formFieldSet.setSkipCompany(true);
    formFieldSet.setFormFields([#<Swagger::Schema default_option="red" field_type="text" form_field_set_id=1 help_text="Help Text" id=1 label="Sample Label" options_for_select=#<Hashie::Array ["red", "green", "blue"]> required=true>]);
    formFieldSet.update();
    
    const formFieldSet = (await FormFieldSet.list())[0]
    await formFieldSet.update({ 
      title: "Sample Form Title", 
      skip_email: true, 
      skip_name: true, 
      skip_company: true, 
      form_fields: [{"id":1,"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}],
    })
    
    var formFieldSet = (await FormFieldSet.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("title", "Sample Form Title");
    parameters.Add("skip_email", true);
    parameters.Add("skip_name", true);
    parameters.Add("skip_company", true);
    parameters.Add("form_fields", (object[]), shorthand: true) [{"id":1,"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}]);
    
    await formFieldSet.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    form_field_set = files_sdk.form_field_set.find(id)
    form_field_set.update({
      "title": "Sample Form Title",
      "skip_email": True,
      "skip_name": True,
      "skip_company": True,
      "form_fields": [{"id":1,"label":"Sample Label","required":True,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}]
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    formfieldset.Update(context.Background(), files_sdk.FormFieldSetUpdateParams{
      Id: 1,
      Title: "Sample Form Title",
      SkipEmail: lib.Bool(true),
      SkipName: lib.Bool(true),
      SkipCompany: lib.Bool(true),
      FormFields: []map[string]interface{}{`{"id":1,"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}`},
    })
    
    files-cli form-field-sets update \
      --id=1 \
      --title="Sample Form Title" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "title": "Sample Form Title",
      "form_layout": [
        1,
        2,
        3,
        4
      ],
      "form_fields": [
        {
          "id": 1,
          "label": "Sample Label",
          "required": true,
          "help_text": "Help Text",
          "field_type": "text",
          "options_for_select": [
            "red",
            "green",
            "blue"
          ],
          "default_option": "red",
          "form_field_set_id": 1
        }
      ],
      "skip_name": true,
      "skip_email": true,
      "skip_company": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <form-field-set>
      <id type="integer">1</id>
      <title>Sample Form Title</title>
      <form_layout type="array">
        <form_layout type="integer">1</form_layout>
        <form_layout type="integer">2</form_layout>
        <form_layout type="integer">3</form_layout>
        <form_layout type="integer">4</form_layout>
      </form_layout>
      <form_fields type="array">
        <form_field>
          <id type="integer">1</id>
          <label>Sample Label</label>
          <required type="boolean">true</required>
          <help_text>Help Text</help_text>
          <field_type>text</field_type>
          <options_for_select type="array">
            <options_for_select>red</options_for_select>
            <options_for_select>green</options_for_select>
            <options_for_select>blue</options_for_select>
          </options_for_select>
          <default_option>red</default_option>
          <form_field_set_id type="integer">1</form_field_set_id>
        </form_field>
      </form_fields>
      <skip_name type="boolean">true</skip_name>
      <skip_email type="boolean">true</skip_email>
      <skip_company type="boolean">true</skip_company>
    </form-field-set>
    
    

    HTTPS Request

    PATCH /form_field_sets/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Form Field Set ID.
    title string Title to be displayed
    skip_email boolean Skip validating form email
    skip_name boolean Skip validating form name
    skip_company boolean Skip validating company
    form_fields array(object)

    Delete Form Field Set

    Example Request

    curl https://app.files.com/api/rest/v1/form_field_sets/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/form_field_sets/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    form_field_set = Files::FormFieldSet.list.first
    form_field_set.delete
    
    $form_field_set = \Files\Model\FormFieldSet::list()[0];
    $form_field_set->delete();
    
    FormFieldSet formFieldSet = FormFieldSet.list()[0];
    
    formFieldSet.delete();
    
    const formFieldSet = (await FormFieldSet.list())[0]
    await formFieldSet.delete()
    
    var formFieldSet = (await FormFieldSet.List())[0];
    
    await formFieldSet.Delete();
    
    files_sdk.set_api_key("my-key")
    
    form_field_set = files_sdk.form_field_set.find(id)
    form_field_set.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    formfieldset.Delete(context.Background(), files_sdk.FormFieldSetDeleteParams{
      Id: 1,
    })
    
    files-cli form-field-sets delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /form_field_sets/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Form Field Set ID.

    Gpg Keys

    GPG keys for decrypt or encrypt behaviors.

    The GpgKey object

    Example GpgKey Object

    {
      "id": 1,
      "expires_at": "2000-01-01T01:00:00Z",
      "name": "key name",
      "user_id": 1,
      "public_key": "7f8bc1210b09b9ddf469e6b6b8920e76",
      "private_key": "ab236cfe4a195f0226bc2e674afdd6b0",
      "private_key_password": "[your GPG private key password]"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <gpg-key>
      <id type="integer">1</id>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <name>key name</name>
      <user_id type="integer">1</user_id>
      <public_key>7f8bc1210b09b9ddf469e6b6b8920e76</public_key>
      <private_key>ab236cfe4a195f0226bc2e674afdd6b0</private_key>
      <private_key_password>[your GPG private key password]</private_key_password>
    </gpg-key>
    
    
    Attribute Description
    id int64 Your GPG key ID.
    expires_at date-time Your GPG key expiration date.
    name string Your GPG key name.
    user_id int64 GPG owner's user id
    public_key string Your GPG public key
    private_key string Your GPG private key.
    private_key_password string Your GPG private key password. Only required for password protected keys.

    List Gpg Keys

    Example Request

    curl "https://app.files.com/api/rest/v1/gpg_keys.json?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/gpg_keys.xml?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::GpgKey.list(
      user_id: 1, 
      per_page: 1
    )
    
    \Files\Model\GpgKey::list(array(
      'user_id' => 1, 
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    GpgKey.list(parameters).all()
    
    await GpgKey.list({
      user_id: 1, 
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    
    await GpgKey.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.gpg_key.list({
      "user_id": 1,
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    gpgkey.List(context.Background(), files_sdk.GpgKeyListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
      SortBy: "",
    })
    
    
    files-cli gpg-keys list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "expires_at": "2000-01-01T01:00:00Z",
        "name": "key name",
        "user_id": 1,
        "public_key": "7f8bc1210b09b9ddf469e6b6b8920e76",
        "private_key": "ab236cfe4a195f0226bc2e674afdd6b0",
        "private_key_password": "[your GPG private key password]"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <gpg-keys type="array">
      <gpg-key>
        <id type="integer">1</id>
        <expires_at>2000-01-01T01:00:00Z</expires_at>
        <name>key name</name>
        <user_id type="integer">1</user_id>
        <public_key>7f8bc1210b09b9ddf469e6b6b8920e76</public_key>
        <private_key>ab236cfe4a195f0226bc2e674afdd6b0</private_key>
        <private_key_password>[your GPG private key password]</private_key_password>
      </gpg-key>
    </gpg-keys>
    
    

    HTTPS Request

    GET /gpg_keys

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[name]=desc). Valid fields are name and expires_at.

    Show Gpg Key

    Example Request

    curl https://app.files.com/api/rest/v1/gpg_keys/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/gpg_keys/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::GpgKey.find(id)
    
    \Files\Model\GpgKey::find($id);
    
    
    GpgKey.find(, parameters
    
    await GpgKey.find(id)
    
    
    await GpgKey.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.gpg_key.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    gpgkey.Find(context.Background(), files_sdk.GpgKeyFindParams{
      Id: 1,
    })
    
    
    files-cli gpg-keys find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "expires_at": "2000-01-01T01:00:00Z",
      "name": "key name",
      "user_id": 1,
      "public_key": "7f8bc1210b09b9ddf469e6b6b8920e76",
      "private_key": "ab236cfe4a195f0226bc2e674afdd6b0",
      "private_key_password": "[your GPG private key password]"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <gpg-key>
      <id type="integer">1</id>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <name>key name</name>
      <user_id type="integer">1</user_id>
      <public_key>7f8bc1210b09b9ddf469e6b6b8920e76</public_key>
      <private_key>ab236cfe4a195f0226bc2e674afdd6b0</private_key>
      <private_key_password>[your GPG private key password]</private_key_password>
    </gpg-key>
    
    

    HTTPS Request

    GET /gpg_keys/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Gpg Key ID.

    Create Gpg Key

    Example Request

    curl https://app.files.com/api/rest/v1/gpg_keys.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"public_key":"7f8bc1210b09b9ddf469e6b6b8920e76","private_key":"ab236cfe4a195f0226bc2e674afdd6b0","private_key_password":"[your GPG private key password]","name":"key name"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/gpg_keys.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<gpg-key>
           <user_id type="integer">1</user_id>
           <public_key>7f8bc1210b09b9ddf469e6b6b8920e76</public_key>
           <private_key>ab236cfe4a195f0226bc2e674afdd6b0</private_key>
           <private_key_password>[your GPG private key password]</private_key_password>
           <name>key name</name>
         </gpg-key>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::GpgKey.create(
      user_id: 1, 
      public_key: "7f8bc1210b09b9ddf469e6b6b8920e76", 
      private_key: "ab236cfe4a195f0226bc2e674afdd6b0", 
      private_key_password: "[your GPG private key password]", 
      name: "key name"
    )
    
    \Files\Model\GpgKey::create(array(
      'user_id' => 1, 
      'public_key' => "7f8bc1210b09b9ddf469e6b6b8920e76", 
      'private_key' => "ab236cfe4a195f0226bc2e674afdd6b0", 
      'private_key_password' => "[your GPG private key password]", 
      'name' => "key name"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("public_key", 7f8bc1210b09b9ddf469e6b6b8920e76);
    requestParams.put("private_key", ab236cfe4a195f0226bc2e674afdd6b0);
    requestParams.put("private_key_password", [your GPG private key password]);
    requestParams.put("name", key name);
    GpgKey.create(parameters)
    
    await GpgKey.create({
      user_id: 1, 
      public_key: "7f8bc1210b09b9ddf469e6b6b8920e76", 
      private_key: "ab236cfe4a195f0226bc2e674afdd6b0", 
      private_key_password: "[your GPG private key password]", 
      name: "key name",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("public_key", "7f8bc1210b09b9ddf469e6b6b8920e76");
    parameters.Add("private_key", "ab236cfe4a195f0226bc2e674afdd6b0");
    parameters.Add("private_key_password", "[your GPG private key password]");
    parameters.Add("name", "key name");
    
    await GpgKey.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.gpg_key.create({
      "user_id": 1,
      "public_key": "7f8bc1210b09b9ddf469e6b6b8920e76",
      "private_key": "ab236cfe4a195f0226bc2e674afdd6b0",
      "private_key_password": "[your GPG private key password]",
      "name": "key name"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    gpgkey.Create(context.Background(), files_sdk.GpgKeyCreateParams{
      UserId: 1,
      PublicKey: "7f8bc1210b09b9ddf469e6b6b8920e76",
      PrivateKey: "ab236cfe4a195f0226bc2e674afdd6b0",
      PrivateKeyPassword: "[your GPG private key password]",
      Name: "key name",
    })
    
    
    files-cli gpg-keys create \
      --user-id=1 \
      --public-key="7f8bc1210b09b9ddf469e6b6b8920e76" \
      --private-key="ab236cfe4a195f0226bc2e674afdd6b0" \
      --private-key-password=""[your GPG private key password]"" \
      --name="key name" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "expires_at": "2000-01-01T01:00:00Z",
      "name": "key name",
      "user_id": 1,
      "public_key": "7f8bc1210b09b9ddf469e6b6b8920e76",
      "private_key": "ab236cfe4a195f0226bc2e674afdd6b0",
      "private_key_password": "[your GPG private key password]"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <gpg-key>
      <id type="integer">1</id>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <name>key name</name>
      <user_id type="integer">1</user_id>
      <public_key>7f8bc1210b09b9ddf469e6b6b8920e76</public_key>
      <private_key>ab236cfe4a195f0226bc2e674afdd6b0</private_key>
      <private_key_password>[your GPG private key password]</private_key_password>
    </gpg-key>
    
    

    HTTPS Request

    POST /gpg_keys

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    public_key string Your GPG public key
    private_key string Your GPG private key.
    private_key_password string Your GPG private key password. Only required for password protected keys.
    name string Required Your GPG key name.

    Update Gpg Key

    Example Request

    curl https://app.files.com/api/rest/v1/gpg_keys/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"public_key":"7f8bc1210b09b9ddf469e6b6b8920e76","private_key":"ab236cfe4a195f0226bc2e674afdd6b0","private_key_password":"[your GPG private key password]","name":"key name"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/gpg_keys/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<gpg-key>
           <public_key>7f8bc1210b09b9ddf469e6b6b8920e76</public_key>
           <private_key>ab236cfe4a195f0226bc2e674afdd6b0</private_key>
           <private_key_password>[your GPG private key password]</private_key_password>
           <name>key name</name>
         </gpg-key>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    gpg_key = Files::GpgKey.list.first
    gpg_key.update(
      public_key: "7f8bc1210b09b9ddf469e6b6b8920e76",
      private_key: "ab236cfe4a195f0226bc2e674afdd6b0",
      private_key_password: "[your GPG private key password]",
      name: "key name"
    )
    
    $gpg_key = \Files\Model\GpgKey::list()[0];
    $gpg_key->update(array(
      'public_key' => "7f8bc1210b09b9ddf469e6b6b8920e76", 
      'private_key' => "ab236cfe4a195f0226bc2e674afdd6b0", 
      'private_key_password' => "[your GPG private key password]", 
      'name' => "key name"
    ));
    
    GpgKey gpgKey = GpgKey.list()[0];
    gpgKey.setPublicKey("7f8bc1210b09b9ddf469e6b6b8920e76");
    gpgKey.setPrivateKey("ab236cfe4a195f0226bc2e674afdd6b0");
    gpgKey.setPrivateKeyPassword("[your GPG private key password]");
    gpgKey.setName("key name");
    gpgKey.update();
    
    const gpgKey = (await GpgKey.list())[0]
    await gpgKey.update({ 
      public_key: "7f8bc1210b09b9ddf469e6b6b8920e76", 
      private_key: "ab236cfe4a195f0226bc2e674afdd6b0", 
      private_key_password: "[your GPG private key password]", 
      name: "key name",
    })
    
    var gpgKey = (await GpgKey.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("public_key", "7f8bc1210b09b9ddf469e6b6b8920e76");
    parameters.Add("private_key", "ab236cfe4a195f0226bc2e674afdd6b0");
    parameters.Add("private_key_password", "[your GPG private key password]");
    parameters.Add("name", "key name");
    
    await gpgKey.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    gpg_key = files_sdk.gpg_key.find(id)
    gpg_key.update({
      "public_key": "7f8bc1210b09b9ddf469e6b6b8920e76",
      "private_key": "ab236cfe4a195f0226bc2e674afdd6b0",
      "private_key_password": "[your GPG private key password]",
      "name": "key name"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    gpgkey.Update(context.Background(), files_sdk.GpgKeyUpdateParams{
      Id: 1,
      PublicKey: "7f8bc1210b09b9ddf469e6b6b8920e76",
      PrivateKey: "ab236cfe4a195f0226bc2e674afdd6b0",
      PrivateKeyPassword: "[your GPG private key password]",
      Name: "key name",
    })
    
    files-cli gpg-keys update \
      --id=1 \
      --public-key="7f8bc1210b09b9ddf469e6b6b8920e76" \
      --private-key="ab236cfe4a195f0226bc2e674afdd6b0" \
      --private-key-password=""[your GPG private key password]"" \
      --name="key name" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "expires_at": "2000-01-01T01:00:00Z",
      "name": "key name",
      "user_id": 1,
      "public_key": "7f8bc1210b09b9ddf469e6b6b8920e76",
      "private_key": "ab236cfe4a195f0226bc2e674afdd6b0",
      "private_key_password": "[your GPG private key password]"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <gpg-key>
      <id type="integer">1</id>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <name>key name</name>
      <user_id type="integer">1</user_id>
      <public_key>7f8bc1210b09b9ddf469e6b6b8920e76</public_key>
      <private_key>ab236cfe4a195f0226bc2e674afdd6b0</private_key>
      <private_key_password>[your GPG private key password]</private_key_password>
    </gpg-key>
    
    

    HTTPS Request

    PATCH /gpg_keys/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Gpg Key ID.
    public_key string Your GPG public key
    private_key string Your GPG private key.
    private_key_password string Your GPG private key password. Only required for password protected keys.
    name string Your GPG key name.

    Delete Gpg Key

    Example Request

    curl https://app.files.com/api/rest/v1/gpg_keys/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/gpg_keys/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    gpg_key = Files::GpgKey.list.first
    gpg_key.delete
    
    $gpg_key = \Files\Model\GpgKey::list()[0];
    $gpg_key->delete();
    
    GpgKey gpgKey = GpgKey.list()[0];
    
    gpgKey.delete();
    
    const gpgKey = (await GpgKey.list())[0]
    await gpgKey.delete()
    
    var gpgKey = (await GpgKey.List())[0];
    
    await gpgKey.Delete();
    
    files_sdk.set_api_key("my-key")
    
    gpg_key = files_sdk.gpg_key.find(id)
    gpg_key.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    gpgkey.Delete(context.Background(), files_sdk.GpgKeyDeleteParams{
      Id: 1,
    })
    
    files-cli gpg-keys delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /gpg_keys/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Gpg Key ID.

    Groups

    Groups are a powerful tool for permissions and user management on Files.com. Users can belong to multiple groups.

    All permissions can be managed via Groups, and Groups can also be synced to your identity platform via LDAP or SCIM.

    Files.com's Group Admin feature allows you to define Group Admins, who then have access to add and remove users within their groups.

    The Group object

    Example Group Object

    {
      "id": 1,
      "name": "owners",
      "admin_ids": "1",
      "notes": "example",
      "user_ids": "1",
      "usernames": "example",
      "ftp_permission": true,
      "sftp_permission": true,
      "dav_permission": true,
      "restapi_permission": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group>
      <id type="integer">1</id>
      <name>owners</name>
      <admin_ids>1</admin_ids>
      <notes>example</notes>
      <user_ids>1</user_ids>
      <usernames>example</usernames>
      <ftp_permission type="boolean">true</ftp_permission>
      <sftp_permission type="boolean">true</sftp_permission>
      <dav_permission type="boolean">true</dav_permission>
      <restapi_permission type="boolean">true</restapi_permission>
    </group>
    
    
    Attribute Description
    id int64 Group ID
    name string Group name
    admin_ids string Comma-delimited list of user IDs who are group administrators (separated by commas)
    notes string Notes about this group
    user_ids string Comma-delimited list of user IDs who belong to this group (separated by commas)
    usernames string Comma-delimited list of usernames who belong to this group (separated by commas)
    ftp_permission boolean If true, users in this group can use FTP to login. This will override a false value of ftp_permission on the user level.
    sftp_permission boolean If true, users in this group can use SFTP to login. This will override a false value of sftp_permission on the user level.
    dav_permission boolean If true, users in this group can use WebDAV to login. This will override a false value of dav_permission on the user level.
    restapi_permission boolean If true, users in this group can use the REST API to login. This will override a false value of restapi_permission on the user level.

    List Groups

    Example Request

    curl "https://app.files.com/api/rest/v1/groups.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/groups.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Group.list(
      per_page: 1
    )
    
    \Files\Model\Group::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    Group.list(parameters).all()
    
    await Group.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await Group.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.group.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    group.List(context.Background(), files_sdk.GroupListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterPrefix: "",
      Ids: "",
    })
    
    
    files-cli groups list \
      --cursor="" \
      --per-page=1 \
      --ids="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "name": "owners",
        "admin_ids": "1",
        "notes": "example",
        "user_ids": "1",
        "usernames": "example",
        "ftp_permission": true,
        "sftp_permission": true,
        "dav_permission": true,
        "restapi_permission": true
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <groups type="array">
      <group>
        <id type="integer">1</id>
        <name>owners</name>
        <admin_ids>1</admin_ids>
        <notes>example</notes>
        <user_ids>1</user_ids>
        <usernames>example</usernames>
        <ftp_permission type="boolean">true</ftp_permission>
        <sftp_permission type="boolean">true</sftp_permission>
        <dav_permission type="boolean">true</dav_permission>
        <restapi_permission type="boolean">true</restapi_permission>
      </group>
    </groups>
    
    

    HTTPS Request

    GET /groups

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    ids string Comma-separated list of group ids to include in results.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[name]=desc). Valid fields are name.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are name.
    filter_prefix object If set, return records where the specified field is prefixed by the supplied value. Valid fields are name.

    Show Group

    Example Request

    curl https://app.files.com/api/rest/v1/groups/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/groups/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Group.find(id)
    
    \Files\Model\Group::find($id);
    
    
    Group.find(, parameters
    
    await Group.find(id)
    
    
    await Group.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.group.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    group.Find(context.Background(), files_sdk.GroupFindParams{
      Id: 1,
    })
    
    
    files-cli groups find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "owners",
      "admin_ids": "1",
      "notes": "example",
      "user_ids": "1",
      "usernames": "example",
      "ftp_permission": true,
      "sftp_permission": true,
      "dav_permission": true,
      "restapi_permission": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group>
      <id type="integer">1</id>
      <name>owners</name>
      <admin_ids>1</admin_ids>
      <notes>example</notes>
      <user_ids>1</user_ids>
      <usernames>example</usernames>
      <ftp_permission type="boolean">true</ftp_permission>
      <sftp_permission type="boolean">true</sftp_permission>
      <dav_permission type="boolean">true</dav_permission>
      <restapi_permission type="boolean">true</restapi_permission>
    </group>
    
    

    HTTPS Request

    GET /groups/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Group ID.

    Create Group

    Example Request

    curl https://app.files.com/api/rest/v1/groups.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"notes":"example","user_ids":"1","admin_ids":"1","ftp_permission":true,"sftp_permission":true,"dav_permission":true,"restapi_permission":true,"name":"name"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/groups.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<group>
           <notes>example</notes>
           <user_ids>1</user_ids>
           <admin_ids>1</admin_ids>
           <ftp_permission type="boolean">true</ftp_permission>
           <sftp_permission type="boolean">true</sftp_permission>
           <dav_permission type="boolean">true</dav_permission>
           <restapi_permission type="boolean">true</restapi_permission>
           <name>name</name>
         </group>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Group.create(
      notes: "example", 
      user_ids: "1", 
      admin_ids: "1", 
      ftp_permission: true, 
      sftp_permission: true, 
      dav_permission: true, 
      restapi_permission: true, 
      name: "name"
    )
    
    \Files\Model\Group::create(array(
      'notes' => "example", 
      'user_ids' => "1", 
      'admin_ids' => "1", 
      'ftp_permission' => true, 
      'sftp_permission' => true, 
      'dav_permission' => true, 
      'restapi_permission' => true, 
      'name' => "name"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("notes", example);
    requestParams.put("user_ids", 1);
    requestParams.put("admin_ids", 1);
    requestParams.put("ftp_permission", true);
    requestParams.put("sftp_permission", true);
    requestParams.put("dav_permission", true);
    requestParams.put("restapi_permission", true);
    requestParams.put("name", name);
    Group.create(parameters)
    
    await Group.create({
      notes: "example", 
      user_ids: "1", 
      admin_ids: "1", 
      ftp_permission: true, 
      sftp_permission: true, 
      dav_permission: true, 
      restapi_permission: true, 
      name: "name",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("notes", "example");
    parameters.Add("user_ids", "1");
    parameters.Add("admin_ids", "1");
    parameters.Add("ftp_permission", true);
    parameters.Add("sftp_permission", true);
    parameters.Add("dav_permission", true);
    parameters.Add("restapi_permission", true);
    parameters.Add("name", "name");
    
    await Group.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.group.create({
      "notes": "example",
      "user_ids": "1",
      "admin_ids": "1",
      "ftp_permission": True,
      "sftp_permission": True,
      "dav_permission": True,
      "restapi_permission": True,
      "name": "name"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    group.Create(context.Background(), files_sdk.GroupCreateParams{
      Notes: "example",
      UserIds: []string{"1"},
      AdminIds: []string{"1"},
      FtpPermission: lib.Bool(true),
      SftpPermission: lib.Bool(true),
      DavPermission: lib.Bool(true),
      RestapiPermission: lib.Bool(true),
      Name: "name",
    })
    
    
    files-cli groups create \
      --notes="example" \
      --user-ids="1" \
      --admin-ids="1" \
      --name="name" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "owners",
      "admin_ids": "1",
      "notes": "example",
      "user_ids": "1",
      "usernames": "example",
      "ftp_permission": true,
      "sftp_permission": true,
      "dav_permission": true,
      "restapi_permission": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group>
      <id type="integer">1</id>
      <name>owners</name>
      <admin_ids>1</admin_ids>
      <notes>example</notes>
      <user_ids>1</user_ids>
      <usernames>example</usernames>
      <ftp_permission type="boolean">true</ftp_permission>
      <sftp_permission type="boolean">true</sftp_permission>
      <dav_permission type="boolean">true</dav_permission>
      <restapi_permission type="boolean">true</restapi_permission>
    </group>
    
    

    HTTPS Request

    POST /groups

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    notes string Group notes.
    user_ids string A list of user ids. If sent as a string, should be comma-delimited.
    admin_ids string A list of group admin user ids. If sent as a string, should be comma-delimited.
    ftp_permission boolean If true, users in this group can use FTP to login. This will override a false value of ftp_permission on the user level.
    sftp_permission boolean If true, users in this group can use SFTP to login. This will override a false value of sftp_permission on the user level.
    dav_permission boolean If true, users in this group can use WebDAV to login. This will override a false value of dav_permission on the user level.
    restapi_permission boolean If true, users in this group can use the REST API to login. This will override a false value of restapi_permission on the user level.
    name string Required Group name.

    Update Group

    Example Request

    curl https://app.files.com/api/rest/v1/groups/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"notes":"example","user_ids":"1","admin_ids":"1","ftp_permission":true,"sftp_permission":true,"dav_permission":true,"restapi_permission":true,"name":"owners"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/groups/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<group>
           <notes>example</notes>
           <user_ids>1</user_ids>
           <admin_ids>1</admin_ids>
           <ftp_permission type="boolean">true</ftp_permission>
           <sftp_permission type="boolean">true</sftp_permission>
           <dav_permission type="boolean">true</dav_permission>
           <restapi_permission type="boolean">true</restapi_permission>
           <name>owners</name>
         </group>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    group = Files::Group.list.first
    group.update(
      notes: "example",
      user_ids: "1",
      admin_ids: "1",
      ftp_permission: true,
      sftp_permission: true,
      dav_permission: true,
      restapi_permission: true,
      name: "owners"
    )
    
    $group = \Files\Model\Group::list()[0];
    $group->update(array(
      'notes' => "example", 
      'user_ids' => "1", 
      'admin_ids' => "1", 
      'ftp_permission' => true, 
      'sftp_permission' => true, 
      'dav_permission' => true, 
      'restapi_permission' => true, 
      'name' => "owners"
    ));
    
    Group group = Group.list()[0];
    group.setNotes("example");
    group.setUserIds("1");
    group.setAdminIds("1");
    group.setFtpPermission(true);
    group.setSftpPermission(true);
    group.setDavPermission(true);
    group.setRestapiPermission(true);
    group.setName("owners");
    group.update();
    
    const group = (await Group.list())[0]
    await group.update({ 
      notes: "example", 
      user_ids: "1", 
      admin_ids: "1", 
      ftp_permission: true, 
      sftp_permission: true, 
      dav_permission: true, 
      restapi_permission: true, 
      name: "owners",
    })
    
    var group = (await Group.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("notes", "example");
    parameters.Add("user_ids", "1");
    parameters.Add("admin_ids", "1");
    parameters.Add("ftp_permission", true);
    parameters.Add("sftp_permission", true);
    parameters.Add("dav_permission", true);
    parameters.Add("restapi_permission", true);
    parameters.Add("name", "owners");
    
    await group.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    group = files_sdk.group.find(id)
    group.update({
      "notes": "example",
      "user_ids": "1",
      "admin_ids": "1",
      "ftp_permission": True,
      "sftp_permission": True,
      "dav_permission": True,
      "restapi_permission": True,
      "name": "owners"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    group.Update(context.Background(), files_sdk.GroupUpdateParams{
      Id: 1,
      Notes: "example",
      UserIds: []string{"1"},
      AdminIds: []string{"1"},
      FtpPermission: lib.Bool(true),
      SftpPermission: lib.Bool(true),
      DavPermission: lib.Bool(true),
      RestapiPermission: lib.Bool(true),
      Name: "owners",
    })
    
    files-cli groups update \
      --id=1 \
      --notes="example" \
      --user-ids="1" \
      --admin-ids="1" \
      --name="owners" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "owners",
      "admin_ids": "1",
      "notes": "example",
      "user_ids": "1",
      "usernames": "example",
      "ftp_permission": true,
      "sftp_permission": true,
      "dav_permission": true,
      "restapi_permission": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group>
      <id type="integer">1</id>
      <name>owners</name>
      <admin_ids>1</admin_ids>
      <notes>example</notes>
      <user_ids>1</user_ids>
      <usernames>example</usernames>
      <ftp_permission type="boolean">true</ftp_permission>
      <sftp_permission type="boolean">true</sftp_permission>
      <dav_permission type="boolean">true</dav_permission>
      <restapi_permission type="boolean">true</restapi_permission>
    </group>
    
    

    HTTPS Request

    PATCH /groups/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Group ID.
    notes string Group notes.
    user_ids string A list of user ids. If sent as a string, should be comma-delimited.
    admin_ids string A list of group admin user ids. If sent as a string, should be comma-delimited.
    ftp_permission boolean If true, users in this group can use FTP to login. This will override a false value of ftp_permission on the user level.
    sftp_permission boolean If true, users in this group can use SFTP to login. This will override a false value of sftp_permission on the user level.
    dav_permission boolean If true, users in this group can use WebDAV to login. This will override a false value of dav_permission on the user level.
    restapi_permission boolean If true, users in this group can use the REST API to login. This will override a false value of restapi_permission on the user level.
    name string Group name.

    Delete Group

    Example Request

    curl https://app.files.com/api/rest/v1/groups/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/groups/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    group = Files::Group.list.first
    group.delete
    
    $group = \Files\Model\Group::list()[0];
    $group->delete();
    
    Group group = Group.list()[0];
    
    group.delete();
    
    const group = (await Group.list())[0]
    await group.delete()
    
    var group = (await Group.List())[0];
    
    await group.Delete();
    
    files_sdk.set_api_key("my-key")
    
    group = files_sdk.group.find(id)
    group.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    group.Delete(context.Background(), files_sdk.GroupDeleteParams{
      Id: 1,
    })
    
    files-cli groups delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /groups/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Group ID.

    Group Users

    A GroupUser describes the membership of a User within a Group.

    Creating GroupUsers

    GroupUsers can be created via the normal create action. When using the update action, if the GroupUser record does not exist for the given user/group IDs it will be created.

    The GroupUser object

    Example GroupUser Object

    {
      "group_name": "example",
      "group_id": 1,
      "user_id": 1,
      "admin": true,
      "usernames": [
        "user"
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group-user>
      <group_name>example</group_name>
      <group_id type="integer">1</group_id>
      <user_id type="integer">1</user_id>
      <admin type="boolean">true</admin>
      <usernames type="array">
        <username>user</username>
      </usernames>
    </group-user>
    
    
    Attribute Description
    group_name string Group name
    group_id int64 Group ID
    user_id int64 User ID
    admin boolean Is this user an administrator of this group?
    usernames array A list of usernames for users in this group
    id int64 Group User ID.

    List Group Users

    Example Request

    curl "https://app.files.com/api/rest/v1/group_users.json?user_id=1&group_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/group_users.xml?user_id=1&group_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::GroupUser.list(
      user_id: 1, 
      per_page: 1, 
      group_id: 1
    )
    
    \Files\Model\GroupUser::list(array(
      'user_id' => 1, 
      'per_page' => 1, 
      'group_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    requestParams.put("group_id", 1);
    GroupUser.list(parameters).all()
    
    await GroupUser.list({
      user_id: 1, 
      per_page: 1, 
      group_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("group_id", (Int64?) 1);
    
    await GroupUser.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.group_user.list({
      "user_id": 1,
      "per_page": 1,
      "group_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    groupuser.List(context.Background(), files_sdk.GroupUserListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
      GroupId: 1,
    })
    
    
    files-cli group-users list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --group-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "group_name": "example",
        "group_id": 1,
        "user_id": 1,
        "admin": true,
        "usernames": [
          "user"
        ]
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group-users type="array">
      <group-user>
        <group_name>example</group_name>
        <group_id type="integer">1</group_id>
        <user_id type="integer">1</user_id>
        <admin type="boolean">true</admin>
        <usernames type="array">
          <username>user</username>
        </usernames>
      </group-user>
    </group-users>
    
    

    HTTPS Request

    GET /group_users

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. If provided, will return group_users of this user.
    group_id int64 Group ID. If provided, will return group_users of this group.

    Pagination Params

    Read more about Paginating List Requests.

    Create Group User

    Example Request

    curl https://app.files.com/api/rest/v1/group_users.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"group_id":1,"user_id":1,"admin":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/group_users.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<group-user>
           <group_id type="integer">1</group_id>
           <user_id type="integer">1</user_id>
           <admin type="boolean">true</admin>
         </group-user>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::GroupUser.create(
      group_id: 1, 
      user_id: 1, 
      admin: true
    )
    
    \Files\Model\GroupUser::create(array(
      'group_id' => 1, 
      'user_id' => 1, 
      'admin' => true
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("group_id", 1);
    requestParams.put("user_id", 1);
    requestParams.put("admin", true);
    GroupUser.create(parameters)
    
    await GroupUser.create({
      group_id: 1, 
      user_id: 1, 
      admin: true,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("group_id", (Int64?) 1);
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("admin", true);
    
    await GroupUser.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.group_user.create({
      "group_id": 1,
      "user_id": 1,
      "admin": True
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    groupuser.Create(context.Background(), files_sdk.GroupUserCreateParams{
      GroupId: 1,
      UserId: 1,
      Admin: lib.Bool(true),
    })
    
    
    files-cli group-users create \
      --group-id=1 \
      --user-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "group_name": "example",
      "group_id": 1,
      "user_id": 1,
      "admin": true,
      "usernames": [
        "user"
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group-user>
      <group_name>example</group_name>
      <group_id type="integer">1</group_id>
      <user_id type="integer">1</user_id>
      <admin type="boolean">true</admin>
      <usernames type="array">
        <username>user</username>
      </usernames>
    </group-user>
    
    

    HTTPS Request

    POST /group_users

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    group_id int64 Required Group ID to add user to.
    user_id int64 Required User ID to add to group.
    admin boolean Is the user a group administrator?

    Update Group User

    Example Request

    curl https://app.files.com/api/rest/v1/group_users/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"group_id":1,"user_id":1,"admin":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/group_users/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<group-user>
           <group_id type="integer">1</group_id>
           <user_id type="integer">1</user_id>
           <admin type="boolean">true</admin>
         </group-user>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    group_user = Files::GroupUser.list.first
    group_user.update(
      group_id: 1,
      user_id: 1,
      admin: true
    )
    
    $group_user = \Files\Model\GroupUser::list()[0];
    $group_user->update(array(
      'group_id' => 1, 
      'user_id' => 1, 
      'admin' => true
    ));
    
    GroupUser groupUser = GroupUser.list()[0];
    groupUser.setGroupId(1);
    groupUser.setUserId(1);
    groupUser.setAdmin(true);
    groupUser.update();
    
    const groupUser = (await GroupUser.list())[0]
    await groupUser.update({ 
      group_id: 1, 
      user_id: 1, 
      admin: true,
    })
    
    var groupUser = (await GroupUser.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("group_id", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("user_id", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("admin", true);
    
    await groupUser.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    group_user = files_sdk.group_user.list.first
    group_user.update({
      "group_id": 1,
      "user_id": 1,
      "admin": True
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    groupuser.Update(context.Background(), files_sdk.GroupUserUpdateParams{
      Id: 1,
      GroupId: 1,
      UserId: 1,
      Admin: lib.Bool(true),
    })
    
    files-cli group-users update \
      --id=1 \
      --group-id=1 \
      --user-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "group_name": "example",
      "group_id": 1,
      "user_id": 1,
      "admin": true,
      "usernames": [
        "user"
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group-user>
      <group_name>example</group_name>
      <group_id type="integer">1</group_id>
      <user_id type="integer">1</user_id>
      <admin type="boolean">true</admin>
      <usernames type="array">
        <username>user</username>
      </usernames>
    </group-user>
    
    

    HTTPS Request

    PATCH /group_users/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Group User ID.
    group_id int64 Required Group ID to add user to.
    user_id int64 Required User ID to add to group.
    admin boolean Is the user a group administrator?

    Delete Group User

    Example Request

    curl "https://app.files.com/api/rest/v1/group_users/{id}.json?group_id=1&user_id=1" \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/group_users/{id}.xml?group_id=1&user_id=1" \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    group_user = Files::GroupUser.list.first
    group_user.delete(
      group_id: 1,
      user_id: 1
    )
    
    $group_user = \Files\Model\GroupUser::list()[0];
    $group_user->delete(array(
      'group_id' => 1, 
      'user_id' => 1
    ));
    
    GroupUser groupUser = GroupUser.list()[0];
    
    groupUser.delete();
    
    const groupUser = (await GroupUser.list())[0]
    await groupUser.delete({ 
      group_id: 1, 
      user_id: 1,
    })
    
    var groupUser = (await GroupUser.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("group_id", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("user_id", (Nullable<Int64>), shorthand: true) 1);
    
    await groupUser.Delete(parameters);
    
    files_sdk.set_api_key("my-key")
    
    group_user = files_sdk.group_user.list.first
    group_user.delete({
      "group_id": 1,
      "user_id": 1
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    groupuser.Delete(context.Background(), files_sdk.GroupUserDeleteParams{
      Id: 1,
      GroupId: 1,
      UserId: 1,
    })
    
    files-cli group-users delete \
      --id=1 \
      --group-id=1 \
      --user-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /group_users/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Group User ID.
    group_id int64 Required Group ID from which to remove user.
    user_id int64 Required User ID to remove from group.

    History Exports

    The History Export resource on the API is used to export historical action (history) logs.

    All queries against the archive must be submitted as Exports. (Even our Web UI creates an Export behind the scenes.)

    We use Amazon Athena behind the scenes for processing these queries, and as such, have powerful search capabilities. We've done our best to expose search capabilities via this History Export API.

    In any query field in this API, you may specify multiple values separated by commas. That means that commas cannot be searched for themselves, and neither can single quotation marks.

    We do not currently partition data by date on the backend, so all queries result in a full scan of the entire data lake. This means that all queries will take about the same amount of time to complete, and we incur about the same cost per query internally. We don't typically bill our customers for these queries, assuming usage is occasional and manual.

    If you intend to use this API for high volume or automated use, please contact us with more information about your use case. We may decide to change the backend data schema to match your use case more closely, and we may also need to charge an additional cost per query.

    Example History Queries

    The HistoryExport object

    Example HistoryExport Object

    {
      "id": 1,
      "history_version": "example",
      "start_at": "2000-01-01T01:00:00Z",
      "end_at": "2000-01-01T01:00:00Z",
      "status": "ready",
      "query_action": "read",
      "query_interface": "ftp",
      "query_user_id": "1",
      "query_file_id": "1",
      "query_parent_id": "1",
      "query_path": "MyFile.txt",
      "query_folder": "Folder",
      "query_src": "SrcFolder",
      "query_destination": "DestFolder",
      "query_ip": "127.0.0.1",
      "query_username": "jerry",
      "query_failure_type": "bad_password",
      "query_target_id": "1",
      "query_target_name": "full",
      "query_target_permission": "full",
      "query_target_user_id": "1",
      "query_target_username": "jerry",
      "query_target_platform": "windows",
      "query_target_permission_set": "desktop_app",
      "results_url": "https://files.com/history_results.csv"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <history-export>
      <id type="integer">1</id>
      <history_version>example</history_version>
      <start_at>2000-01-01T01:00:00Z</start_at>
      <end_at>2000-01-01T01:00:00Z</end_at>
      <status>ready</status>
      <query_action>read</query_action>
      <query_interface>ftp</query_interface>
      <query_user_id>1</query_user_id>
      <query_file_id>1</query_file_id>
      <query_parent_id>1</query_parent_id>
      <query_path>MyFile.txt</query_path>
      <query_folder>Folder</query_folder>
      <query_src>SrcFolder</query_src>
      <query_destination>DestFolder</query_destination>
      <query_ip>127.0.0.1</query_ip>
      <query_username>jerry</query_username>
      <query_failure_type>bad_password</query_failure_type>
      <query_target_id>1</query_target_id>
      <query_target_name>full</query_target_name>
      <query_target_permission>full</query_target_permission>
      <query_target_user_id>1</query_target_user_id>
      <query_target_username>jerry</query_target_username>
      <query_target_platform>windows</query_target_platform>
      <query_target_permission_set>desktop_app</query_target_permission_set>
      <results_url>https://files.com/history_results.csv</results_url>
    </history-export>
    
    
    Attribute Description
    id int64 History Export ID
    history_version string Version of the history for the export.
    start_at date-time Start date/time of export range.
    end_at date-time End date/time of export range.
    status string Status of export. Will be: building, ready, or failed
    query_action string Filter results by this this action type. Valid values: create, read, update, destroy, move, login, failedlogin, copy, user_create, user_update, user_destroy, group_create, group_update, group_destroy, permission_create, permission_destroy, api_key_create, api_key_update, api_key_destroy
    query_interface string Filter results by this this interface type. Valid values: web, ftp, robot, jsapi, webdesktopapi, sftp, dav, desktop, restapi, scim, office, mobile, as2, inbound_email, remote
    query_user_id string Return results that are actions performed by the user indiciated by this User ID
    query_file_id string Return results that are file actions related to the file indicated by this File ID
    query_parent_id string Return results that are file actions inside the parent folder specified by this folder ID
    query_path string Return results that are file actions related to this path.
    query_folder string Return results that are file actions related to files or folders inside this folder path.
    query_src string Return results that are file moves originating from this path.
    query_destination string Return results that are file moves with this path as destination.
    query_ip string Filter results by this IP address.
    query_username string Filter results by this username.
    query_failure_type string If searching for Histories about login failures, this parameter restricts results to failures of this specific type. Valid values: expired_trial, account_overdue, locked_out, ip_mismatch, password_mismatch, site_mismatch, username_not_found, none, no_ftp_permission, no_web_permission, no_directory, errno_enoent, no_sftp_permission, no_dav_permission, no_restapi_permission, key_mismatch, region_mismatch, expired_access, desktop_ip_mismatch, desktop_api_key_not_used_quickly_enough, disabled, country_mismatch
    query_target_id string If searching for Histories about specific objects (such as Users, or API Keys), this paremeter restricts results to objects that match this ID.
    query_target_name string If searching for Histories about Users, Groups or other objects with names, this parameter restricts results to objects with this name/username.
    query_target_permission string If searching for Histories about Permisisons, this parameter restricts results to permissions of this level.
    query_target_user_id string If searching for Histories about API keys, this parameter restricts results to API keys created by/for this user ID.
    query_target_username string If searching for Histories about API keys, this parameter restricts results to API keys created by/for this username.
    query_target_platform string If searching for Histories about API keys, this parameter restricts results to API keys associated with this platform.
    query_target_permission_set string If searching for Histories about API keys, this parameter restricts results to API keys with this permission set.
    results_url string If status is ready, this will be a URL where all the results can be downloaded at once as a CSV.
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.

    Show History Export

    Example Request

    curl https://app.files.com/api/rest/v1/history_exports/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/history_exports/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::HistoryExport.find(id)
    
    \Files\Model\HistoryExport::find($id);
    
    
    HistoryExport.find(, parameters
    
    await HistoryExport.find(id)
    
    
    await HistoryExport.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.history_export.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    historyexport.Find(context.Background(), files_sdk.HistoryExportFindParams{
      Id: 1,
    })
    
    
    files-cli history-exports find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "history_version": "example",
      "start_at": "2000-01-01T01:00:00Z",
      "end_at": "2000-01-01T01:00:00Z",
      "status": "ready",
      "query_action": "read",
      "query_interface": "ftp",
      "query_user_id": "1",
      "query_file_id": "1",
      "query_parent_id": "1",
      "query_path": "MyFile.txt",
      "query_folder": "Folder",
      "query_src": "SrcFolder",
      "query_destination": "DestFolder",
      "query_ip": "127.0.0.1",
      "query_username": "jerry",
      "query_failure_type": "bad_password",
      "query_target_id": "1",
      "query_target_name": "full",
      "query_target_permission": "full",
      "query_target_user_id": "1",
      "query_target_username": "jerry",
      "query_target_platform": "windows",
      "query_target_permission_set": "desktop_app",
      "results_url": "https://files.com/history_results.csv"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <history-export>
      <id type="integer">1</id>
      <history_version>example</history_version>
      <start_at>2000-01-01T01:00:00Z</start_at>
      <end_at>2000-01-01T01:00:00Z</end_at>
      <status>ready</status>
      <query_action>read</query_action>
      <query_interface>ftp</query_interface>
      <query_user_id>1</query_user_id>
      <query_file_id>1</query_file_id>
      <query_parent_id>1</query_parent_id>
      <query_path>MyFile.txt</query_path>
      <query_folder>Folder</query_folder>
      <query_src>SrcFolder</query_src>
      <query_destination>DestFolder</query_destination>
      <query_ip>127.0.0.1</query_ip>
      <query_username>jerry</query_username>
      <query_failure_type>bad_password</query_failure_type>
      <query_target_id>1</query_target_id>
      <query_target_name>full</query_target_name>
      <query_target_permission>full</query_target_permission>
      <query_target_user_id>1</query_target_user_id>
      <query_target_username>jerry</query_target_username>
      <query_target_platform>windows</query_target_platform>
      <query_target_permission_set>desktop_app</query_target_permission_set>
      <results_url>https://files.com/history_results.csv</results_url>
    </history-export>
    
    

    HTTPS Request

    GET /history_exports/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required History Export ID.

    Create History Export

    Example Request

    curl https://app.files.com/api/rest/v1/history_exports.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"start_at":"2000-01-01T01:00:00Z","end_at":"2000-01-01T01:00:00Z","query_action":"read","query_interface":"ftp","query_user_id":"1","query_file_id":"1","query_parent_id":"1","query_path":"MyFile.txt","query_folder":"Folder","query_src":"SrcFolder","query_destination":"DestFolder","query_ip":"127.0.0.1","query_username":"jerry","query_failure_type":"bad_password","query_target_id":"1","query_target_name":"full","query_target_permission":"full","query_target_user_id":"1","query_target_username":"jerry","query_target_platform":"windows","query_target_permission_set":"desktop_app"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/history_exports.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<history-export>
           <user_id type="integer">1</user_id>
           <start_at>2000-01-01T01:00:00Z</start_at>
           <end_at>2000-01-01T01:00:00Z</end_at>
           <query_action>read</query_action>
           <query_interface>ftp</query_interface>
           <query_user_id>1</query_user_id>
           <query_file_id>1</query_file_id>
           <query_parent_id>1</query_parent_id>
           <query_path>MyFile.txt</query_path>
           <query_folder>Folder</query_folder>
           <query_src>SrcFolder</query_src>
           <query_destination>DestFolder</query_destination>
           <query_ip>127.0.0.1</query_ip>
           <query_username>jerry</query_username>
           <query_failure_type>bad_password</query_failure_type>
           <query_target_id>1</query_target_id>
           <query_target_name>full</query_target_name>
           <query_target_permission>full</query_target_permission>
           <query_target_user_id>1</query_target_user_id>
           <query_target_username>jerry</query_target_username>
           <query_target_platform>windows</query_target_platform>
           <query_target_permission_set>desktop_app</query_target_permission_set>
         </history-export>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::HistoryExport.create(
      user_id: 1, 
      start_at: "2000-01-01T01:00:00Z", 
      end_at: "2000-01-01T01:00:00Z", 
      query_action: "read", 
      query_interface: "ftp", 
      query_user_id: "1", 
      query_file_id: "1", 
      query_parent_id: "1", 
      query_path: "MyFile.txt", 
      query_folder: "Folder", 
      query_src: "SrcFolder", 
      query_destination: "DestFolder", 
      query_ip: "127.0.0.1", 
      query_username: "jerry", 
      query_failure_type: "bad_password", 
      query_target_id: "1", 
      query_target_name: "full", 
      query_target_permission: "full", 
      query_target_user_id: "1", 
      query_target_username: "jerry", 
      query_target_platform: "windows", 
      query_target_permission_set: "desktop_app"
    )
    
    \Files\Model\HistoryExport::create(array(
      'user_id' => 1, 
      'start_at' => "2000-01-01T01:00:00Z", 
      'end_at' => "2000-01-01T01:00:00Z", 
      'query_action' => "read", 
      'query_interface' => "ftp", 
      'query_user_id' => "1", 
      'query_file_id' => "1", 
      'query_parent_id' => "1", 
      'query_path' => "MyFile.txt", 
      'query_folder' => "Folder", 
      'query_src' => "SrcFolder", 
      'query_destination' => "DestFolder", 
      'query_ip' => "127.0.0.1", 
      'query_username' => "jerry", 
      'query_failure_type' => "bad_password", 
      'query_target_id' => "1", 
      'query_target_name' => "full", 
      'query_target_permission' => "full", 
      'query_target_user_id' => "1", 
      'query_target_username' => "jerry", 
      'query_target_platform' => "windows", 
      'query_target_permission_set' => "desktop_app"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("start_at", 2000-01-01T01:00:00Z);
    requestParams.put("end_at", 2000-01-01T01:00:00Z);
    requestParams.put("query_action", read);
    requestParams.put("query_interface", ftp);
    requestParams.put("query_user_id", 1);
    requestParams.put("query_file_id", 1);
    requestParams.put("query_parent_id", 1);
    requestParams.put("query_path", MyFile.txt);
    requestParams.put("query_folder", Folder);
    requestParams.put("query_src", SrcFolder);
    requestParams.put("query_destination", DestFolder);
    requestParams.put("query_ip", 127.0.0.1);
    requestParams.put("query_username", jerry);
    requestParams.put("query_failure_type", bad_password);
    requestParams.put("query_target_id", 1);
    requestParams.put("query_target_name", full);
    requestParams.put("query_target_permission", full);
    requestParams.put("query_target_user_id", 1);
    requestParams.put("query_target_username", jerry);
    requestParams.put("query_target_platform", windows);
    requestParams.put("query_target_permission_set", desktop_app);
    HistoryExport.create(parameters)
    
    await HistoryExport.create({
      user_id: 1, 
      start_at: "2000-01-01T01:00:00Z", 
      end_at: "2000-01-01T01:00:00Z", 
      query_action: "read", 
      query_interface: "ftp", 
      query_user_id: "1", 
      query_file_id: "1", 
      query_parent_id: "1", 
      query_path: "MyFile.txt", 
      query_folder: "Folder", 
      query_src: "SrcFolder", 
      query_destination: "DestFolder", 
      query_ip: "127.0.0.1", 
      query_username: "jerry", 
      query_failure_type: "bad_password", 
      query_target_id: "1", 
      query_target_name: "full", 
      query_target_permission: "full", 
      query_target_user_id: "1", 
      query_target_username: "jerry", 
      query_target_platform: "windows", 
      query_target_permission_set: "desktop_app",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("start_at", "2000-01-01T01:00:00Z");
    parameters.Add("end_at", "2000-01-01T01:00:00Z");
    parameters.Add("query_action", "read");
    parameters.Add("query_interface", "ftp");
    parameters.Add("query_user_id", "1");
    parameters.Add("query_file_id", "1");
    parameters.Add("query_parent_id", "1");
    parameters.Add("query_path", "MyFile.txt");
    parameters.Add("query_folder", "Folder");
    parameters.Add("query_src", "SrcFolder");
    parameters.Add("query_destination", "DestFolder");
    parameters.Add("query_ip", "127.0.0.1");
    parameters.Add("query_username", "jerry");
    parameters.Add("query_failure_type", "bad_password");
    parameters.Add("query_target_id", "1");
    parameters.Add("query_target_name", "full");
    parameters.Add("query_target_permission", "full");
    parameters.Add("query_target_user_id", "1");
    parameters.Add("query_target_username", "jerry");
    parameters.Add("query_target_platform", "windows");
    parameters.Add("query_target_permission_set", "desktop_app");
    
    await HistoryExport.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.history_export.create({
      "user_id": 1,
      "start_at": "2000-01-01T01:00:00Z",
      "end_at": "2000-01-01T01:00:00Z",
      "query_action": "read",
      "query_interface": "ftp",
      "query_user_id": "1",
      "query_file_id": "1",
      "query_parent_id": "1",
      "query_path": "MyFile.txt",
      "query_folder": "Folder",
      "query_src": "SrcFolder",
      "query_destination": "DestFolder",
      "query_ip": "127.0.0.1",
      "query_username": "jerry",
      "query_failure_type": "bad_password",
      "query_target_id": "1",
      "query_target_name": "full",
      "query_target_permission": "full",
      "query_target_user_id": "1",
      "query_target_username": "jerry",
      "query_target_platform": "windows",
      "query_target_permission_set": "desktop_app"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    historyexport.Create(context.Background(), files_sdk.HistoryExportCreateParams{
      UserId: 1,
      StartAt: "2000-01-01T01:00:00Z",
      EndAt: "2000-01-01T01:00:00Z",
      QueryAction: "read",
      QueryInterface: "ftp",
      QueryUserId: []string{"1"},
      QueryFileId: []string{"1"},
      QueryParentId: []string{"1"},
      QueryPath: "MyFile.txt",
      QueryFolder: "Folder",
      QuerySrc: "SrcFolder",
      QueryDestination: "DestFolder",
      QueryIp: "127.0.0.1",
      QueryUsername: "jerry",
      QueryFailureType: "bad_password",
      QueryTargetId: []string{"1"},
      QueryTargetName: "full",
      QueryTargetPermission: "full",
      QueryTargetUserId: []string{"1"},
      QueryTargetUsername: "jerry",
      QueryTargetPlatform: "windows",
      QueryTargetPermissionSet: "desktop_app",
    })
    
    
    files-cli history-exports create \
      --user-id=1 \
      --start-at="2000-01-01T01:00:00Z" \
      --end-at="2000-01-01T01:00:00Z" \
      --query-action="read" \
      --query-interface="ftp" \
      --query-user-id="1" \
      --query-file-id="1" \
      --query-parent-id="1" \
      --query-path="MyFile.txt" \
      --query-folder="Folder" \
      --query-src="SrcFolder" \
      --query-destination="DestFolder" \
      --query-ip="127.0.0.1" \
      --query-username="jerry" \
      --query-failure-type="bad_password" \
      --query-target-id="1" \
      --query-target-name="full" \
      --query-target-permission="full" \
      --query-target-user-id="1" \
      --query-target-username="jerry" \
      --query-target-platform="windows" \
      --query-target-permission-set="desktop_app" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "history_version": "example",
      "start_at": "2000-01-01T01:00:00Z",
      "end_at": "2000-01-01T01:00:00Z",
      "status": "ready",
      "query_action": "read",
      "query_interface": "ftp",
      "query_user_id": "1",
      "query_file_id": "1",
      "query_parent_id": "1",
      "query_path": "MyFile.txt",
      "query_folder": "Folder",
      "query_src": "SrcFolder",
      "query_destination": "DestFolder",
      "query_ip": "127.0.0.1",
      "query_username": "jerry",
      "query_failure_type": "bad_password",
      "query_target_id": "1",
      "query_target_name": "full",
      "query_target_permission": "full",
      "query_target_user_id": "1",
      "query_target_username": "jerry",
      "query_target_platform": "windows",
      "query_target_permission_set": "desktop_app",
      "results_url": "https://files.com/history_results.csv"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <history-export>
      <id type="integer">1</id>
      <history_version>example</history_version>
      <start_at>2000-01-01T01:00:00Z</start_at>
      <end_at>2000-01-01T01:00:00Z</end_at>
      <status>ready</status>
      <query_action>read</query_action>
      <query_interface>ftp</query_interface>
      <query_user_id>1</query_user_id>
      <query_file_id>1</query_file_id>
      <query_parent_id>1</query_parent_id>
      <query_path>MyFile.txt</query_path>
      <query_folder>Folder</query_folder>
      <query_src>SrcFolder</query_src>
      <query_destination>DestFolder</query_destination>
      <query_ip>127.0.0.1</query_ip>
      <query_username>jerry</query_username>
      <query_failure_type>bad_password</query_failure_type>
      <query_target_id>1</query_target_id>
      <query_target_name>full</query_target_name>
      <query_target_permission>full</query_target_permission>
      <query_target_user_id>1</query_target_user_id>
      <query_target_username>jerry</query_target_username>
      <query_target_platform>windows</query_target_platform>
      <query_target_permission_set>desktop_app</query_target_permission_set>
      <results_url>https://files.com/history_results.csv</results_url>
    </history-export>
    
    

    HTTPS Request

    POST /history_exports

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    start_at string Start date/time of export range.
    end_at string End date/time of export range.
    query_action string Filter results by this this action type. Valid values: create, read, update, destroy, move, login, failedlogin, copy, user_create, user_update, user_destroy, group_create, group_update, group_destroy, permission_create, permission_destroy, api_key_create, api_key_update, api_key_destroy
    query_interface string Filter results by this this interface type. Valid values: web, ftp, robot, jsapi, webdesktopapi, sftp, dav, desktop, restapi, scim, office, mobile, as2, inbound_email, remote
    query_user_id string Return results that are actions performed by the user indiciated by this User ID
    query_file_id string Return results that are file actions related to the file indicated by this File ID
    query_parent_id string Return results that are file actions inside the parent folder specified by this folder ID
    query_path string Return results that are file actions related to this path.
    query_folder string Return results that are file actions related to files or folders inside this folder path.
    query_src string Return results that are file moves originating from this path.
    query_destination string Return results that are file moves with this path as destination.
    query_ip string Filter results by this IP address.
    query_username string Filter results by this username.
    query_failure_type string If searching for Histories about login failures, this parameter restricts results to failures of this specific type. Valid values: expired_trial, account_overdue, locked_out, ip_mismatch, password_mismatch, site_mismatch, username_not_found, none, no_ftp_permission, no_web_permission, no_directory, errno_enoent, no_sftp_permission, no_dav_permission, no_restapi_permission, key_mismatch, region_mismatch, expired_access, desktop_ip_mismatch, desktop_api_key_not_used_quickly_enough, disabled, country_mismatch
    query_target_id string If searching for Histories about specific objects (such as Users, or API Keys), this paremeter restricts results to objects that match this ID.
    query_target_name string If searching for Histories about Users, Groups or other objects with names, this parameter restricts results to objects with this name/username.
    query_target_permission string If searching for Histories about Permisisons, this parameter restricts results to permissions of this level.
    query_target_user_id string If searching for Histories about API keys, this parameter restricts results to API keys created by/for this user ID.
    query_target_username string If searching for Histories about API keys, this parameter restricts results to API keys created by/for this username.
    query_target_platform string If searching for Histories about API keys, this parameter restricts results to API keys associated with this platform.
    query_target_permission_set string If searching for Histories about API keys, this parameter restricts results to API keys with this permission set.

    History Export Results

    The HistoryExportResults resource in the REST API allows you to operate on HistoryExportResults.

    The HistoryExportResult object

    Example HistoryExportResult Object

    {
      "id": 1,
      "created_at": 1,
      "created_at_iso8601": "example",
      "user_id": 1,
      "file_id": 1,
      "parent_id": 1,
      "path": "MyFile.txt",
      "folder": "Folder",
      "src": "SrcFolder",
      "destination": "DestFolder",
      "ip": "127.0.0.1",
      "username": "jerry",
      "action": "read",
      "failure_type": "bad_password",
      "interface": "ftp",
      "target_id": 1,
      "target_name": "full",
      "target_permission": "full",
      "target_recursive": true,
      "target_expires_at": 1,
      "target_expires_at_iso8601": "example",
      "target_permission_set": "desktop_app",
      "target_platform": "windows",
      "target_username": "jerry",
      "target_user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <history-export-result>
      <id type="integer">1</id>
      <created_at type="integer">1</created_at>
      <created_at_iso8601>example</created_at_iso8601>
      <user_id type="integer">1</user_id>
      <file_id type="integer">1</file_id>
      <parent_id type="integer">1</parent_id>
      <path>MyFile.txt</path>
      <folder>Folder</folder>
      <src>SrcFolder</src>
      <destination>DestFolder</destination>
      <ip>127.0.0.1</ip>
      <username>jerry</username>
      <action>read</action>
      <failure_type>bad_password</failure_type>
      <interface>ftp</interface>
      <target_id type="integer">1</target_id>
      <target_name>full</target_name>
      <target_permission>full</target_permission>
      <target_recursive type="boolean">true</target_recursive>
      <target_expires_at type="integer">1</target_expires_at>
      <target_expires_at_iso8601>example</target_expires_at_iso8601>
      <target_permission_set>desktop_app</target_permission_set>
      <target_platform>windows</target_platform>
      <target_username>jerry</target_username>
      <target_user_id type="integer">1</target_user_id>
    </history-export-result>
    
    
    Attribute Description
    id int64 Action ID
    created_at int64 When the action happened
    created_at_iso8601 string When the action happened, in ISO8601 format.
    user_id int64 User ID
    file_id int64 File ID related to the action
    parent_id int64 ID of the parent folder
    path string Path of the related action This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    folder string Folder in which the action occurred
    src string File move originated from this path
    destination string File moved to this destination folder
    ip string Client IP that performed the action
    username string Username of the user that performed the action
    action string What action was taken. Valid values: create, read, update, destroy, move, login, failedlogin, copy, user_create, user_update, user_destroy, group_create, group_update, group_destroy, permission_create, permission_destroy, api_key_create, api_key_update, api_key_destroy
    failure_type string The type of login failure, if applicable. Valid values: expired_trial, account_overdue, locked_out, ip_mismatch, password_mismatch, site_mismatch, username_not_found, none, no_ftp_permission, no_web_permission, no_directory, errno_enoent, no_sftp_permission, no_dav_permission, no_restapi_permission, key_mismatch, region_mismatch, expired_access, desktop_ip_mismatch, desktop_api_key_not_used_quickly_enough, disabled, country_mismatch
    interface string Inteface through which the action was taken. Valid values: web, ftp, robot, jsapi, webdesktopapi, sftp, dav, desktop, restapi, scim, office, mobile, as2, inbound_email, remote
    target_id int64 ID of the object (such as Users, or API Keys) on which the action was taken
    target_name string Name of the User, Group or other object with a name related to this action
    target_permission string Permission level of the action
    target_recursive boolean Whether or not the action was recursive
    target_expires_at int64 If searching for Histories about API keys, this is when the API key will expire. Represented as a Unix timestamp.
    target_expires_at_iso8601 string If searching for Histories about API keys, this is when the API key will expire. Represented in ISO8601 format.
    target_permission_set string If searching for Histories about API keys, this represents the permission set of the associated API key
    target_platform string If searching for Histories about API keys, this is the platform on which the action was taken
    target_username string If searching for Histories about API keys, this is the username on which the action was taken
    target_user_id int64 If searching for Histories about API keys, this is the User ID on which the action was taken

    List History Export Results

    Example Request

    curl "https://app.files.com/api/rest/v1/history_export_results.json?user_id=1&history_export_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/history_export_results.xml?user_id=1&history_export_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::HistoryExportResult.list(
      user_id: 1, 
      per_page: 1, 
      history_export_id: 1
    )
    
    \Files\Model\HistoryExportResult::list(array(
      'user_id' => 1, 
      'per_page' => 1, 
      'history_export_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    requestParams.put("history_export_id", 1);
    HistoryExportResult.list(parameters).all()
    
    await HistoryExportResult.list({
      user_id: 1, 
      per_page: 1, 
      history_export_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("history_export_id", (Int64?) 1);
    
    await HistoryExportResult.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.history_export_result.list({
      "user_id": 1,
      "per_page": 1,
      "history_export_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    historyexportresult.List(context.Background(), files_sdk.HistoryExportResultListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
      HistoryExportId: 1,
    })
    
    
    files-cli history-export-results list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --history-export-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "created_at": 1,
        "created_at_iso8601": "example",
        "user_id": 1,
        "file_id": 1,
        "parent_id": 1,
        "path": "MyFile.txt",
        "folder": "Folder",
        "src": "SrcFolder",
        "destination": "DestFolder",
        "ip": "127.0.0.1",
        "username": "jerry",
        "action": "read",
        "failure_type": "bad_password",
        "interface": "ftp",
        "target_id": 1,
        "target_name": "full",
        "target_permission": "full",
        "target_recursive": true,
        "target_expires_at": 1,
        "target_expires_at_iso8601": "example",
        "target_permission_set": "desktop_app",
        "target_platform": "windows",
        "target_username": "jerry",
        "target_user_id": 1
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <history-export-results type="array">
      <history-export-result>
        <id type="integer">1</id>
        <created_at type="integer">1</created_at>
        <created_at_iso8601>example</created_at_iso8601>
        <user_id type="integer">1</user_id>
        <file_id type="integer">1</file_id>
        <parent_id type="integer">1</parent_id>
        <path>MyFile.txt</path>
        <folder>Folder</folder>
        <src>SrcFolder</src>
        <destination>DestFolder</destination>
        <ip>127.0.0.1</ip>
        <username>jerry</username>
        <action>read</action>
        <failure_type>bad_password</failure_type>
        <interface>ftp</interface>
        <target_id type="integer">1</target_id>
        <target_name>full</target_name>
        <target_permission>full</target_permission>
        <target_recursive type="boolean">true</target_recursive>
        <target_expires_at type="integer">1</target_expires_at>
        <target_expires_at_iso8601>example</target_expires_at_iso8601>
        <target_permission_set>desktop_app</target_permission_set>
        <target_platform>windows</target_platform>
        <target_username>jerry</target_username>
        <target_user_id type="integer">1</target_user_id>
      </history-export-result>
    </history-export-results>
    
    

    HTTPS Request

    GET /history_export_results

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    history_export_id int64 Required ID of the associated history export.

    Pagination Params

    Read more about Paginating List Requests.

    Inbox Recipients

    Inbox recipients are people who have had an inbox shared with them.

    The InboxRecipient object

    Example InboxRecipient Object

    {
      "company": "Acme Inc.",
      "name": "John Doe",
      "note": "Some note.",
      "recipient": "john.doe@example.com",
      "sent_at": "2000-01-01T01:00:00Z"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <inbox-recipient>
      <company>Acme Inc.</company>
      <name>John Doe</name>
      <note>Some note.</note>
      <recipient>john.doe@example.com</recipient>
      <sent_at>2000-01-01T01:00:00Z</sent_at>
    </inbox-recipient>
    
    
    Attribute Description
    company string The recipient's company.
    name string The recipient's name.
    note string A note sent to the recipient with the inbox.
    recipient string The recipient's email address.
    sent_at date-time When the Inbox was shared with this recipient.
    inbox_id int64 Inbox to share.
    share_after_create boolean Set to true to share the link with the recipient upon creation.

    List Inbox Recipients

    Example Request

    curl "https://app.files.com/api/rest/v1/inbox_recipients.json?inbox_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/inbox_recipients.xml?inbox_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::InboxRecipient.list(
      per_page: 1, 
      inbox_id: 1
    )
    
    \Files\Model\InboxRecipient::list(array(
      'per_page' => 1, 
      'inbox_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("inbox_id", 1);
    InboxRecipient.list(parameters).all()
    
    await InboxRecipient.list({
      per_page: 1, 
      inbox_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("inbox_id", (Int64?) 1);
    
    await InboxRecipient.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.inbox_recipient.list({
      "per_page": 1,
      "inbox_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    inboxrecipient.List(context.Background(), files_sdk.InboxRecipientListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      InboxId: 1,
    })
    
    
    files-cli inbox-recipients list \
      --cursor="" \
      --per-page=1 \
      --inbox-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "company": "Acme Inc.",
        "name": "John Doe",
        "note": "Some note.",
        "recipient": "john.doe@example.com",
        "sent_at": "2000-01-01T01:00:00Z"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <inbox-recipients type="array">
      <inbox-recipient>
        <company>Acme Inc.</company>
        <name>John Doe</name>
        <note>Some note.</note>
        <recipient>john.doe@example.com</recipient>
        <sent_at>2000-01-01T01:00:00Z</sent_at>
      </inbox-recipient>
    </inbox-recipients>
    
    

    HTTPS Request

    GET /inbox_recipients

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    inbox_id int64 Required List recipients for the inbox with this ID.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[has_registrations]=desc). Valid fields are has_registrations.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are has_registrations.

    Create Inbox Recipient

    Example Request

    curl https://app.files.com/api/rest/v1/inbox_recipients.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"inbox_id":1,"recipient":"johndoe@gmail.com","name":"John Smith","company":"Acme Ltd","note":"Just a note.","share_after_create":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/inbox_recipients.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<inbox-recipient>
           <inbox_id type="integer">1</inbox_id>
           <recipient>johndoe@gmail.com</recipient>
           <name>John Smith</name>
           <company>Acme Ltd</company>
           <note>Just a note.</note>
           <share_after_create type="boolean">true</share_after_create>
         </inbox-recipient>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::InboxRecipient.create(
      inbox_id: 1, 
      recipient: "johndoe@gmail.com", 
      name: "John Smith", 
      company: "Acme Ltd", 
      note: "Just a note.", 
      share_after_create: true
    )
    
    \Files\Model\InboxRecipient::create(array(
      'inbox_id' => 1, 
      'recipient' => "johndoe@gmail.com", 
      'name' => "John Smith", 
      'company' => "Acme Ltd", 
      'note' => "Just a note.", 
      'share_after_create' => true
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("inbox_id", 1);
    requestParams.put("recipient", johndoe@gmail.com);
    requestParams.put("name", John Smith);
    requestParams.put("company", Acme Ltd);
    requestParams.put("note", Just a note.);
    requestParams.put("share_after_create", true);
    InboxRecipient.create(parameters)
    
    await InboxRecipient.create({
      inbox_id: 1, 
      recipient: "johndoe@gmail.com", 
      name: "John Smith", 
      company: "Acme Ltd", 
      note: "Just a note.", 
      share_after_create: true,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("inbox_id", (Int64?) 1);
    parameters.Add("recipient", "johndoe@gmail.com");
    parameters.Add("name", "John Smith");
    parameters.Add("company", "Acme Ltd");
    parameters.Add("note", "Just a note.");
    parameters.Add("share_after_create", true);
    
    await InboxRecipient.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.inbox_recipient.create({
      "inbox_id": 1,
      "recipient": "johndoe@gmail.com",
      "name": "John Smith",
      "company": "Acme Ltd",
      "note": "Just a note.",
      "share_after_create": True
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    inboxrecipient.Create(context.Background(), files_sdk.InboxRecipientCreateParams{
      InboxId: 1,
      Recipient: "johndoe@gmail.com",
      Name: "John Smith",
      Company: "Acme Ltd",
      Note: "Just a note.",
      ShareAfterCreate: lib.Bool(true),
    })
    
    
    files-cli inbox-recipients create \
      --inbox-id=1 \
      --recipient="johndoe@gmail.com" \
      --name="John Smith" \
      --company="Acme Ltd" \
      --note="Just a note." \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "company": "Acme Inc.",
      "name": "John Doe",
      "note": "Some note.",
      "recipient": "john.doe@example.com",
      "sent_at": "2000-01-01T01:00:00Z"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <inbox-recipient>
      <company>Acme Inc.</company>
      <name>John Doe</name>
      <note>Some note.</note>
      <recipient>john.doe@example.com</recipient>
      <sent_at>2000-01-01T01:00:00Z</sent_at>
    </inbox-recipient>
    
    

    HTTPS Request

    POST /inbox_recipients

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    inbox_id int64 Required Inbox to share.
    recipient string Required Email address to share this inbox with.
    name string Name of recipient.
    company string Company of recipient.
    note string Note to include in email.
    share_after_create boolean Set to true to share the link with the recipient upon creation.

    Inbox Registrations

    InboxRegistrations record when an Inbox user fills out the form to access the inbox.

    The InboxRegistration object

    Example InboxRegistration Object

    {
      "code": "abc123",
      "name": "account",
      "company": "Action Verb",
      "email": "john.doe@files.com",
      "ip": "10.1.1.1",
      "clickwrap_body": "example",
      "form_field_set_id": 1,
      "form_field_data": {
        "key": "example value"
      },
      "inbox_id": 1,
      "inbox_recipient_id": 1,
      "inbox_title": "example",
      "created_at": "2000-01-01T01:00:00Z"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <inbox-registration>
      <code>abc123</code>
      <name>account</name>
      <company>Action Verb</company>
      <email>john.doe@files.com</email>
      <ip>10.1.1.1</ip>
      <clickwrap_body>example</clickwrap_body>
      <form_field_set_id type="integer">1</form_field_set_id>
      <form_field_data>
        <key>example value</key>
      </form_field_data>
      <inbox_id type="integer">1</inbox_id>
      <inbox_recipient_id type="integer">1</inbox_recipient_id>
      <inbox_title>example</inbox_title>
      <created_at>2000-01-01T01:00:00Z</created_at>
    </inbox-registration>
    
    
    Attribute Description
    code string Registration cookie code
    name string Registrant name
    company string Registrant company name
    email string Registrant email address
    ip string Registrant IP Address
    clickwrap_body string Clickwrap text that was shown to the registrant
    form_field_set_id int64 Id of associated form field set
    form_field_data object Data for form field set with form field ids as keys and user data as values
    inbox_id int64 Id of associated inbox
    inbox_recipient_id int64 Id of associated inbox recipient
    inbox_title string Title of associated inbox
    created_at date-time Registration creation date/time

    List Inbox Registrations

    Example Request

    curl "https://app.files.com/api/rest/v1/inbox_registrations.json?folder_behavior_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/inbox_registrations.xml?folder_behavior_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::InboxRegistration.list(
      per_page: 1, 
      folder_behavior_id: 1
    )
    
    \Files\Model\InboxRegistration::list(array(
      'per_page' => 1, 
      'folder_behavior_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("folder_behavior_id", 1);
    InboxRegistration.list(parameters).all()
    
    await InboxRegistration.list({
      per_page: 1, 
      folder_behavior_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("folder_behavior_id", (Int64?) 1);
    
    await InboxRegistration.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.inbox_registration.list({
      "per_page": 1,
      "folder_behavior_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    inboxregistration.List(context.Background(), files_sdk.InboxRegistrationListParams{
      Cursor: "",
      PerPage: 1,
      FolderBehaviorId: 1,
    })
    
    
    files-cli inbox-registrations list \
      --cursor="" \
      --per-page=1 \
      --folder-behavior-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "code": "abc123",
        "name": "account",
        "company": "Action Verb",
        "email": "john.doe@files.com",
        "ip": "10.1.1.1",
        "clickwrap_body": "example",
        "form_field_set_id": 1,
        "form_field_data": {
          "key": "example value"
        },
        "inbox_id": 1,
        "inbox_recipient_id": 1,
        "inbox_title": "example",
        "created_at": "2000-01-01T01:00:00Z"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <inbox-registrations type="array">
      <inbox-registration>
        <code>abc123</code>
        <name>account</name>
        <company>Action Verb</company>
        <email>john.doe@files.com</email>
        <ip>10.1.1.1</ip>
        <clickwrap_body>example</clickwrap_body>
        <form_field_set_id type="integer">1</form_field_set_id>
        <form_field_data>
          <key>example value</key>
        </form_field_data>
        <inbox_id type="integer">1</inbox_id>
        <inbox_recipient_id type="integer">1</inbox_recipient_id>
        <inbox_title>example</inbox_title>
        <created_at>2000-01-01T01:00:00Z</created_at>
      </inbox-registration>
    </inbox-registrations>
    
    

    HTTPS Request

    GET /inbox_registrations

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    folder_behavior_id int64 ID of the associated Inbox.

    Pagination Params

    Read more about Paginating List Requests.

    Inbox Uploads

    The InboxUploads resource in the REST API allows you to operate on InboxUploads.

    The InboxUpload object

    Example InboxUpload Object

    {
      "inbox_registration": "example",
      "path": "a/b/test.txt",
      "created_at": "2000-01-01T01:00:00Z"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <inbox-upload>
      <inbox_registration>example</inbox_registration>
      <path>a/b/test.txt</path>
      <created_at>2000-01-01T01:00:00Z</created_at>
    </inbox-upload>
    
    
    Attribute Description
    inbox_registration InboxRegistration
    path string Upload path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    created_at date-time Upload date/time

    List Inbox Uploads

    Example Request

    curl "https://app.files.com/api/rest/v1/inbox_uploads.json?inbox_registration_id=1&inbox_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/inbox_uploads.xml?inbox_registration_id=1&inbox_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::InboxUpload.list(
      per_page: 1, 
      inbox_registration_id: 1, 
      inbox_id: 1
    )
    
    \Files\Model\InboxUpload::list(array(
      'per_page' => 1, 
      'inbox_registration_id' => 1, 
      'inbox_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("inbox_registration_id", 1);
    requestParams.put("inbox_id", 1);
    InboxUpload.list(parameters).all()
    
    await InboxUpload.list({
      per_page: 1, 
      inbox_registration_id: 1, 
      inbox_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("inbox_registration_id", (Int64?) 1);
    parameters.Add("inbox_id", (Int64?) 1);
    
    await InboxUpload.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.inbox_upload.list({
      "per_page": 1,
      "inbox_registration_id": 1,
      "inbox_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    inboxupload.List(context.Background(), files_sdk.InboxUploadListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterGt: "",
      FilterGteq: "",
      FilterLt: "",
      FilterLteq: "",
      InboxRegistrationId: 1,
      InboxId: 1,
    })
    
    
    files-cli inbox-uploads list \
      --cursor="" \
      --per-page=1 \
      --inbox-registration-id=1 \
      --inbox-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "inbox_registration": "example",
        "path": "a/b/test.txt",
        "created_at": "2000-01-01T01:00:00Z"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <inbox-uploads type="array">
      <inbox-upload>
        <inbox_registration>example</inbox_registration>
        <path>a/b/test.txt</path>
        <created_at>2000-01-01T01:00:00Z</created_at>
      </inbox-upload>
    </inbox-uploads>
    
    

    HTTPS Request

    GET /inbox_uploads

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    inbox_registration_id int64 InboxRegistration ID
    inbox_id int64 Inbox ID

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[created_at]=desc). Valid fields are created_at.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are created_at.
    filter_gt object If set, return records where the specified field is greater than the supplied value. Valid fields are created_at.
    filter_gteq object If set, return records where the specified field is greater than or equal the supplied value. Valid fields are created_at.
    filter_lt object If set, return records where the specified field is less than the supplied value. Valid fields are created_at.
    filter_lteq object If set, return records where the specified field is less than or equal the supplied value. Valid fields are created_at.

    Ip Addresses

    Customers who maintain custom firewall configurations may require knowing the public IP addresses of Files.com's edge servers.

    This API resource provides an updated list of IP addresses that you can use to automate keeping your firewall's configuration up to date.

    The IpAddress object

    Example IpAddress Object

    {
      "id": "Site",
      "associated_with": "Site",
      "group_id": 1,
      "ip_addresses": [
        "127.0.0.1"
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <ip-address>
      <id>Site</id>
      <associated_with>Site</associated_with>
      <group_id type="integer">1</group_id>
      <ip_addresses type="array">
        <ip_address>127.0.0.1</ip_address>
      </ip_addresses>
    </ip-address>
    
    
    Attribute Description
    id string Unique label for list; used by Zapier and other integrations.
    associated_with string The object that this public IP address list is associated with.
    group_id int64 Group ID
    ip_addresses array A list of IP addresses.

    List IP Addresses associated with the current site

    Example Request

    curl "https://app.files.com/api/rest/v1/ip_addresses.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/ip_addresses.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::IpAddress.list(
      per_page: 1
    )
    
    \Files\Model\IpAddress::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    IpAddress.list(parameters).all()
    
    await IpAddress.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await IpAddress.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.ip_address.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    ipaddress.List(context.Background(), files_sdk.IpAddressListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli ip-addresses list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": "Site",
        "associated_with": "Site",
        "group_id": 1,
        "ip_addresses": [
          "127.0.0.1"
        ]
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <ip-addresses type="array">
      <ip-address>
        <id>Site</id>
        <associated_with>Site</associated_with>
        <group_id type="integer">1</group_id>
        <ip_addresses type="array">
          <ip_address>127.0.0.1</ip_address>
        </ip_addresses>
      </ip-address>
    </ip-addresses>
    
    

    HTTPS Request

    GET /ip_addresses

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Locks

    Locks are not used by Files.com's web interface, but can be used by your applications to implement locking and concurrency features. Note that these locks are advisory in nature, and creating a lock does not prevent other API requests from being fulfilled.

    Our lock feature is designed to emulate the locking feature offered by WebDAV. You can read the WebDAV spec and understand how all of the below endpoints work.

    Files.com's WebDAV offering and desktop app does leverage this locking API.

    The Lock object

    Example Lock Object

    {
      "path": "locked_file",
      "timeout": 1,
      "depth": "infinity",
      "recursive": true,
      "owner": "user",
      "scope": "shared",
      "exclusive": true,
      "token": "17c54824e9931a4688ca032d03f6663c",
      "type": "write",
      "allow_access_by_any_user": true,
      "user_id": 1,
      "username": ""
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <lock>
      <path>locked_file</path>
      <timeout type="integer">1</timeout>
      <depth>infinity</depth>
      <recursive type="boolean">true</recursive>
      <owner>user</owner>
      <scope>shared</scope>
      <exclusive type="boolean">true</exclusive>
      <token>17c54824e9931a4688ca032d03f6663c</token>
      <type>write</type>
      <allow_access_by_any_user type="boolean">true</allow_access_by_any_user>
      <user_id type="integer">1</user_id>
      <username></username>
    </lock>
    
    
    Attribute Description
    path string Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    timeout int64 Lock timeout in seconds
    depth string DEPRECATED: Lock depth
    recursive boolean Does lock apply to subfolders?
    owner string Owner of the lock. This can be any arbitrary string.
    scope string DEPRECATED: Lock scope
    exclusive boolean Is lock exclusive?
    token string Lock token. Use to release lock.
    type string DEPRECATED: Lock type
    allow_access_by_any_user boolean Can lock be modified by users other than its creator?
    user_id int64 Lock creator user ID
    username string Lock creator username

    List Locks by path

    Example Request

    curl "https://app.files.com/api/rest/v1/locks/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/locks/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Lock.list_for(path, 
      per_page: 1, 
      include_children: true
    )
    
    \Files\Model\Lock::listFor($path, array(
      'per_page' => 1, 
      'include_children' => true
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("include_children", true);
    Lock.listFor(parameters).all()
    
    await Lock.listFor(path, {
      per_page: 1, 
      include_children: true,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("include_children", true);
    
    await Lock.ListFor(path, parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.lock.list_for(path, {
      "per_page": 1,
      "include_children": True
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    lock.ListFor(context.Background(), files_sdk.LockListForParams{
      Cursor: "",
      PerPage: 1,
      Path: "path",
      IncludeChildren: lib.Bool(true),
    })
    
    
    files-cli locks list-for \
      --cursor="" \
      --per-page=1 \
      --path="path" \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "path": "locked_file",
        "timeout": 1,
        "depth": "infinity",
        "recursive": true,
        "owner": "user",
        "scope": "shared",
        "exclusive": true,
        "token": "17c54824e9931a4688ca032d03f6663c",
        "type": "write",
        "allow_access_by_any_user": true,
        "user_id": 1,
        "username": ""
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <locks type="array">
      <lock>
        <path>locked_file</path>
        <timeout type="integer">1</timeout>
        <depth>infinity</depth>
        <recursive type="boolean">true</recursive>
        <owner>user</owner>
        <scope>shared</scope>
        <exclusive type="boolean">true</exclusive>
        <token>17c54824e9931a4688ca032d03f6663c</token>
        <type>write</type>
        <allow_access_by_any_user type="boolean">true</allow_access_by_any_user>
        <user_id type="integer">1</user_id>
        <username></username>
      </lock>
    </locks>
    
    

    HTTPS Request

    GET /locks/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path to operate on.
    include_children boolean Include locks from children objects?

    Pagination Params

    Read more about Paginating List Requests.

    Create Lock

    Example Request

    curl https://app.files.com/api/rest/v1/locks/{path} \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"allow_access_by_any_user":true,"exclusive":true,"recursive":true,"timeout":1}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/locks/{path} \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<lock>
           <allow_access_by_any_user type="boolean">true</allow_access_by_any_user>
           <exclusive type="boolean">true</exclusive>
           <recursive type="boolean">true</recursive>
           <timeout type="integer">1</timeout>
         </lock>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Lock.create(path, 
      allow_access_by_any_user: true, 
      exclusive: true, 
      recursive: true, 
      timeout: 1
    )
    
    \Files\Model\Lock::create($path, array(
      'allow_access_by_any_user' => true, 
      'exclusive' => true, 
      'recursive' => true, 
      'timeout' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("allow_access_by_any_user", true);
    requestParams.put("exclusive", true);
    requestParams.put("recursive", true);
    requestParams.put("timeout", 1);
    Lock.create(parameters)
    
    await Lock.create(path, {
      allow_access_by_any_user: true, 
      exclusive: true, 
      recursive: true, 
      timeout: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("allow_access_by_any_user", true);
    parameters.Add("exclusive", true);
    parameters.Add("recursive", true);
    parameters.Add("timeout", (Int64?) 1);
    
    await Lock.Create(path, parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.lock.create(path, {
      "allow_access_by_any_user": True,
      "exclusive": True,
      "recursive": True,
      "timeout": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    lock.Create(context.Background(), files_sdk.LockCreateParams{
      Path: "path",
      AllowAccessByAnyUser: lib.Bool(true),
      Exclusive: lib.Bool(true),
      Recursive: lib.Bool(true),
      Timeout: 1,
    })
    
    
    files-cli locks create \
      --path="path" \
      --recursive=true \
      --timeout=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "path": "locked_file",
      "timeout": 1,
      "depth": "infinity",
      "recursive": true,
      "owner": "user",
      "scope": "shared",
      "exclusive": true,
      "token": "17c54824e9931a4688ca032d03f6663c",
      "type": "write",
      "allow_access_by_any_user": true,
      "user_id": 1,
      "username": ""
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <lock>
      <path>locked_file</path>
      <timeout type="integer">1</timeout>
      <depth>infinity</depth>
      <recursive type="boolean">true</recursive>
      <owner>user</owner>
      <scope>shared</scope>
      <exclusive type="boolean">true</exclusive>
      <token>17c54824e9931a4688ca032d03f6663c</token>
      <type>write</type>
      <allow_access_by_any_user type="boolean">true</allow_access_by_any_user>
      <user_id type="integer">1</user_id>
      <username></username>
    </lock>
    
    

    HTTPS Request

    POST /locks/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path
    allow_access_by_any_user boolean Allow lock to be updated by any user?
    exclusive boolean Is lock exclusive?
    recursive string Does lock apply to subfolders?
    timeout int64 Lock timeout length

    Delete Lock

    Example Request

    curl "https://app.files.com/api/rest/v1/locks/{path}" \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/locks/{path}" \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    lock = Files::Lock.list.first
    lock.delete(
      token: "token"
    )
    
    $lock = \Files\Model\Lock::list()[0];
    $lock->delete(array(
      'token' => "token"
    ));
    
    Lock lock = Lock.list()[0];
    
    lock.delete();
    
    const lock = (await Lock.list())[0]
    await lock.delete({ 
      token: "token",
    })
    
    var lock = (await Lock.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("token", "token");
    
    await lock.Delete(parameters);
    
    files_sdk.set_api_key("my-key")
    
    lock = files_sdk.lock.list.first
    lock.delete({
      "token": "token"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    lock.Delete(context.Background(), files_sdk.LockDeleteParams{
      Path: "path",
      Token: "token",
    })
    
    files-cli locks delete \
      --path="path" \
      --token="token" \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /locks/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Path
    token string Required Lock token

    Messages

    Messages are part of Files.com's project management features and represent a message posted by a user to a project.

    The Message object

    Example Message Object

    {
      "id": 1,
      "subject": "Files.com Account Upgrade",
      "body": "We should upgrade our Files.com account!",
      "comments": [
        {
          "id": 1,
          "body": "What a great idea, thank you!",
          "reactions": [
            {
              "id": 1,
              "emoji": "👍"
            }
          ]
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message>
      <id type="integer">1</id>
      <subject>Files.com Account Upgrade</subject>
      <body>We should upgrade our Files.com account!</body>
      <comments type="array">
        <comment>
          <id type="integer">1</id>
          <body>What a great idea, thank you!</body>
          <reactions type="array">
            <reaction>
              <id type="integer">1</id>
              <emoji>👍</emoji>
            </reaction>
          </reactions>
        </comment>
      </comments>
    </message>
    
    
    Attribute Description
    id int64 Message ID
    subject string Message subject.
    body string Message body.
    comments array Comments.
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    project_id int64 Project to which the message should be attached.

    List Messages

    Example Request

    curl "https://app.files.com/api/rest/v1/messages.json?user_id=1&project_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/messages.xml?user_id=1&project_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Message.list(
      user_id: 1, 
      per_page: 1, 
      project_id: 1
    )
    
    \Files\Model\Message::list(array(
      'user_id' => 1, 
      'per_page' => 1, 
      'project_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    requestParams.put("project_id", 1);
    Message.list(parameters).all()
    
    await Message.list({
      user_id: 1, 
      per_page: 1, 
      project_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("project_id", (Int64?) 1);
    
    await Message.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.message.list({
      "user_id": 1,
      "per_page": 1,
      "project_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    message.List(context.Background(), files_sdk.MessageListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
      ProjectId: 1,
    })
    
    
    files-cli messages list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --project-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "subject": "Files.com Account Upgrade",
        "body": "We should upgrade our Files.com account!",
        "comments": [
          {
            "id": 1,
            "body": "What a great idea, thank you!",
            "reactions": [
              {
                "id": 1,
                "emoji": "👍"
              }
            ]
          }
        ]
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <messages type="array">
      <message>
        <id type="integer">1</id>
        <subject>Files.com Account Upgrade</subject>
        <body>We should upgrade our Files.com account!</body>
        <comments type="array">
          <comment>
            <id type="integer">1</id>
            <body>What a great idea, thank you!</body>
            <reactions type="array">
              <reaction>
                <id type="integer">1</id>
                <emoji>👍</emoji>
              </reaction>
            </reactions>
          </comment>
        </comments>
      </message>
    </messages>
    
    

    HTTPS Request

    GET /messages

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    project_id int64 Required Project for which to return messages.

    Pagination Params

    Read more about Paginating List Requests.

    Show Message

    Example Request

    curl https://app.files.com/api/rest/v1/messages/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/messages/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Message.find(id)
    
    \Files\Model\Message::find($id);
    
    
    Message.find(, parameters
    
    await Message.find(id)
    
    
    await Message.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.message.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    message.Find(context.Background(), files_sdk.MessageFindParams{
      Id: 1,
    })
    
    
    files-cli messages find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "subject": "Files.com Account Upgrade",
      "body": "We should upgrade our Files.com account!",
      "comments": [
        {
          "id": 1,
          "body": "What a great idea, thank you!",
          "reactions": [
            {
              "id": 1,
              "emoji": "👍"
            }
          ]
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message>
      <id type="integer">1</id>
      <subject>Files.com Account Upgrade</subject>
      <body>We should upgrade our Files.com account!</body>
      <comments type="array">
        <comment>
          <id type="integer">1</id>
          <body>What a great idea, thank you!</body>
          <reactions type="array">
            <reaction>
              <id type="integer">1</id>
              <emoji>👍</emoji>
            </reaction>
          </reactions>
        </comment>
      </comments>
    </message>
    
    

    HTTPS Request

    GET /messages/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Message ID.

    Create Message

    Example Request

    curl https://app.files.com/api/rest/v1/messages.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"project_id":1,"subject":"Files.com Account Upgrade","body":"We should upgrade our Files.com account!"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/messages.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<message>
           <user_id type="integer">1</user_id>
           <project_id type="integer">1</project_id>
           <subject>Files.com Account Upgrade</subject>
           <body>We should upgrade our Files.com account!</body>
         </message>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Message.create(
      user_id: 1, 
      project_id: 1, 
      subject: "Files.com Account Upgrade", 
      body: "We should upgrade our Files.com account!"
    )
    
    \Files\Model\Message::create(array(
      'user_id' => 1, 
      'project_id' => 1, 
      'subject' => "Files.com Account Upgrade", 
      'body' => "We should upgrade our Files.com account!"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("project_id", 1);
    requestParams.put("subject", Files.com Account Upgrade);
    requestParams.put("body", We should upgrade our Files.com account!);
    Message.create(parameters)
    
    await Message.create({
      user_id: 1, 
      project_id: 1, 
      subject: "Files.com Account Upgrade", 
      body: "We should upgrade our Files.com account!",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("project_id", (Int64?) 1);
    parameters.Add("subject", "Files.com Account Upgrade");
    parameters.Add("body", "We should upgrade our Files.com account!");
    
    await Message.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.message.create({
      "user_id": 1,
      "project_id": 1,
      "subject": "Files.com Account Upgrade",
      "body": "We should upgrade our Files.com account!"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    message.Create(context.Background(), files_sdk.MessageCreateParams{
      UserId: 1,
      ProjectId: 1,
      Subject: "Files.com Account Upgrade",
      Body: "We should upgrade our Files.com account!",
    })
    
    
    files-cli messages create \
      --user-id=1 \
      --project-id=1 \
      --subject="Files.com Account Upgrade" \
      --body="We should upgrade our Files.com account!" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "subject": "Files.com Account Upgrade",
      "body": "We should upgrade our Files.com account!",
      "comments": [
        {
          "id": 1,
          "body": "What a great idea, thank you!",
          "reactions": [
            {
              "id": 1,
              "emoji": "👍"
            }
          ]
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message>
      <id type="integer">1</id>
      <subject>Files.com Account Upgrade</subject>
      <body>We should upgrade our Files.com account!</body>
      <comments type="array">
        <comment>
          <id type="integer">1</id>
          <body>What a great idea, thank you!</body>
          <reactions type="array">
            <reaction>
              <id type="integer">1</id>
              <emoji>👍</emoji>
            </reaction>
          </reactions>
        </comment>
      </comments>
    </message>
    
    

    HTTPS Request

    POST /messages

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    project_id int64 Required Project to which the message should be attached.
    subject string Required Message subject.
    body string Required Message body.

    Update Message

    Example Request

    curl https://app.files.com/api/rest/v1/messages/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"project_id":1,"subject":"Files.com Account Upgrade","body":"We should upgrade our Files.com account!"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/messages/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<message>
           <project_id type="integer">1</project_id>
           <subject>Files.com Account Upgrade</subject>
           <body>We should upgrade our Files.com account!</body>
         </message>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    message = Files::Message.list.first
    message.update(
      project_id: 1,
      subject: "Files.com Account Upgrade",
      body: "We should upgrade our Files.com account!"
    )
    
    $message = \Files\Model\Message::list()[0];
    $message->update(array(
      'project_id' => 1, 
      'subject' => "Files.com Account Upgrade", 
      'body' => "We should upgrade our Files.com account!"
    ));
    
    Message message = Message.list()[0];
    message.setProjectId(1);
    message.setSubject("Files.com Account Upgrade");
    message.setBody("We should upgrade our Files.com account!");
    message.update();
    
    const message = (await Message.list())[0]
    await message.update({ 
      project_id: 1, 
      subject: "Files.com Account Upgrade", 
      body: "We should upgrade our Files.com account!",
    })
    
    var message = (await Message.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("project_id", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("subject", "Files.com Account Upgrade");
    parameters.Add("body", "We should upgrade our Files.com account!");
    
    await message.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    message = files_sdk.message.find(id)
    message.update({
      "project_id": 1,
      "subject": "Files.com Account Upgrade",
      "body": "We should upgrade our Files.com account!"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    message.Update(context.Background(), files_sdk.MessageUpdateParams{
      Id: 1,
      ProjectId: 1,
      Subject: "Files.com Account Upgrade",
      Body: "We should upgrade our Files.com account!",
    })
    
    files-cli messages update \
      --id=1 \
      --project-id=1 \
      --subject="Files.com Account Upgrade" \
      --body="We should upgrade our Files.com account!" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "subject": "Files.com Account Upgrade",
      "body": "We should upgrade our Files.com account!",
      "comments": [
        {
          "id": 1,
          "body": "What a great idea, thank you!",
          "reactions": [
            {
              "id": 1,
              "emoji": "👍"
            }
          ]
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message>
      <id type="integer">1</id>
      <subject>Files.com Account Upgrade</subject>
      <body>We should upgrade our Files.com account!</body>
      <comments type="array">
        <comment>
          <id type="integer">1</id>
          <body>What a great idea, thank you!</body>
          <reactions type="array">
            <reaction>
              <id type="integer">1</id>
              <emoji>👍</emoji>
            </reaction>
          </reactions>
        </comment>
      </comments>
    </message>
    
    

    HTTPS Request

    PATCH /messages/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Message ID.
    project_id int64 Required Project to which the message should be attached.
    subject string Required Message subject.
    body string Required Message body.

    Delete Message

    Example Request

    curl https://app.files.com/api/rest/v1/messages/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/messages/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    message = Files::Message.list.first
    message.delete
    
    $message = \Files\Model\Message::list()[0];
    $message->delete();
    
    Message message = Message.list()[0];
    
    message.delete();
    
    const message = (await Message.list())[0]
    await message.delete()
    
    var message = (await Message.List())[0];
    
    await message.Delete();
    
    files_sdk.set_api_key("my-key")
    
    message = files_sdk.message.find(id)
    message.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    message.Delete(context.Background(), files_sdk.MessageDeleteParams{
      Id: 1,
    })
    
    files-cli messages delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /messages/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Message ID.

    Message Comments

    A message comment represents a comment made by a user on a message.

    The MessageComment object

    Example MessageComment Object

    {
      "id": 1,
      "body": "What a great idea, thank you!",
      "reactions": [
        {
          "id": 1,
          "emoji": "👍"
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message-comment>
      <id type="integer">1</id>
      <body>What a great idea, thank you!</body>
      <reactions type="array">
        <reaction>
          <id type="integer">1</id>
          <emoji>👍</emoji>
        </reaction>
      </reactions>
    </message-comment>
    
    
    Attribute Description
    id int64 Message Comment ID
    body string Comment body.
    reactions array Reactions to this comment.
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.

    List Message Comments

    Example Request

    curl "https://app.files.com/api/rest/v1/message_comments.json?user_id=1&message_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/message_comments.xml?user_id=1&message_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::MessageComment.list(
      user_id: 1, 
      per_page: 1, 
      message_id: 1
    )
    
    \Files\Model\MessageComment::list(array(
      'user_id' => 1, 
      'per_page' => 1, 
      'message_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    requestParams.put("message_id", 1);
    MessageComment.list(parameters).all()
    
    await MessageComment.list({
      user_id: 1, 
      per_page: 1, 
      message_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("message_id", (Int64?) 1);
    
    await MessageComment.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.message_comment.list({
      "user_id": 1,
      "per_page": 1,
      "message_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    messagecomment.List(context.Background(), files_sdk.MessageCommentListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
      MessageId: 1,
    })
    
    
    files-cli message-comments list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --message-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "body": "What a great idea, thank you!",
        "reactions": [
          {
            "id": 1,
            "emoji": "👍"
          }
        ]
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message-comments type="array">
      <message-comment>
        <id type="integer">1</id>
        <body>What a great idea, thank you!</body>
        <reactions type="array">
          <reaction>
            <id type="integer">1</id>
            <emoji>👍</emoji>
          </reaction>
        </reactions>
      </message-comment>
    </message-comments>
    
    

    HTTPS Request

    GET /message_comments

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    message_id int64 Required Message comment to return comments for.

    Pagination Params

    Read more about Paginating List Requests.

    Show Message Comment

    Example Request

    curl https://app.files.com/api/rest/v1/message_comments/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/message_comments/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::MessageComment.find(id)
    
    \Files\Model\MessageComment::find($id);
    
    
    MessageComment.find(, parameters
    
    await MessageComment.find(id)
    
    
    await MessageComment.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.message_comment.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    messagecomment.Find(context.Background(), files_sdk.MessageCommentFindParams{
      Id: 1,
    })
    
    
    files-cli message-comments find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "body": "What a great idea, thank you!",
      "reactions": [
        {
          "id": 1,
          "emoji": "👍"
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message-comment>
      <id type="integer">1</id>
      <body>What a great idea, thank you!</body>
      <reactions type="array">
        <reaction>
          <id type="integer">1</id>
          <emoji>👍</emoji>
        </reaction>
      </reactions>
    </message-comment>
    
    

    HTTPS Request

    GET /message_comments/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Message Comment ID.

    Create Message Comment

    Example Request

    curl https://app.files.com/api/rest/v1/message_comments.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"body":"body"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/message_comments.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<message-comment>
           <user_id type="integer">1</user_id>
           <body>body</body>
         </message-comment>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::MessageComment.create(
      user_id: 1, 
      body: "body"
    )
    
    \Files\Model\MessageComment::create(array(
      'user_id' => 1, 
      'body' => "body"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("body", body);
    MessageComment.create(parameters)
    
    await MessageComment.create({
      user_id: 1, 
      body: "body",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("body", "body");
    
    await MessageComment.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.message_comment.create({
      "user_id": 1,
      "body": "body"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    messagecomment.Create(context.Background(), files_sdk.MessageCommentCreateParams{
      UserId: 1,
      Body: "body",
    })
    
    
    files-cli message-comments create \
      --user-id=1 \
      --body="body" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "body": "What a great idea, thank you!",
      "reactions": [
        {
          "id": 1,
          "emoji": "👍"
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message-comment>
      <id type="integer">1</id>
      <body>What a great idea, thank you!</body>
      <reactions type="array">
        <reaction>
          <id type="integer">1</id>
          <emoji>👍</emoji>
        </reaction>
      </reactions>
    </message-comment>
    
    

    HTTPS Request

    POST /message_comments

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    body string Required Comment body.

    Update Message Comment

    Example Request

    curl https://app.files.com/api/rest/v1/message_comments/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"body":"body"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/message_comments/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<message-comment>
           <body>body</body>
         </message-comment>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    message_comment = Files::MessageComment.list.first
    message_comment.update(
      body: "body"
    )
    
    $message_comment = \Files\Model\MessageComment::list()[0];
    $message_comment->update(array(
      'body' => "body"
    ));
    
    MessageComment messageComment = MessageComment.list()[0];
    messageComment.setBody("body");
    messageComment.update();
    
    const messageComment = (await MessageComment.list())[0]
    await messageComment.update({ 
      body: "body",
    })
    
    var messageComment = (await MessageComment.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("body", "body");
    
    await messageComment.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    message_comment = files_sdk.message_comment.find(id)
    message_comment.update({
      "body": "body"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    messagecomment.Update(context.Background(), files_sdk.MessageCommentUpdateParams{
      Id: 1,
      Body: "body",
    })
    
    files-cli message-comments update \
      --id=1 \
      --body="body" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "body": "What a great idea, thank you!",
      "reactions": [
        {
          "id": 1,
          "emoji": "👍"
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message-comment>
      <id type="integer">1</id>
      <body>What a great idea, thank you!</body>
      <reactions type="array">
        <reaction>
          <id type="integer">1</id>
          <emoji>👍</emoji>
        </reaction>
      </reactions>
    </message-comment>
    
    

    HTTPS Request

    PATCH /message_comments/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Message Comment ID.
    body string Required Comment body.

    Delete Message Comment

    Example Request

    curl https://app.files.com/api/rest/v1/message_comments/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/message_comments/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    message_comment = Files::MessageComment.list.first
    message_comment.delete
    
    $message_comment = \Files\Model\MessageComment::list()[0];
    $message_comment->delete();
    
    MessageComment messageComment = MessageComment.list()[0];
    
    messageComment.delete();
    
    const messageComment = (await MessageComment.list())[0]
    await messageComment.delete()
    
    var messageComment = (await MessageComment.List())[0];
    
    await messageComment.Delete();
    
    files_sdk.set_api_key("my-key")
    
    message_comment = files_sdk.message_comment.find(id)
    message_comment.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    messagecomment.Delete(context.Background(), files_sdk.MessageCommentDeleteParams{
      Id: 1,
    })
    
    files-cli message-comments delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /message_comments/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Message Comment ID.

    Message Comment Reactions

    A message comment reaction represents a reaction emoji made by a user on a message comment.

    The MessageCommentReaction object

    Example MessageCommentReaction Object

    {
      "id": 1,
      "emoji": "👍"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message-comment-reaction>
      <id type="integer">1</id>
      <emoji>👍</emoji>
    </message-comment-reaction>
    
    
    Attribute Description
    id int64 Reaction ID
    emoji string Emoji used in the reaction.
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.

    List Message Comment Reactions

    Example Request

    curl "https://app.files.com/api/rest/v1/message_comment_reactions.json?user_id=1&message_comment_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/message_comment_reactions.xml?user_id=1&message_comment_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::MessageCommentReaction.list(
      user_id: 1, 
      per_page: 1, 
      message_comment_id: 1
    )
    
    \Files\Model\MessageCommentReaction::list(array(
      'user_id' => 1, 
      'per_page' => 1, 
      'message_comment_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    requestParams.put("message_comment_id", 1);
    MessageCommentReaction.list(parameters).all()
    
    await MessageCommentReaction.list({
      user_id: 1, 
      per_page: 1, 
      message_comment_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("message_comment_id", (Int64?) 1);
    
    await MessageCommentReaction.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.message_comment_reaction.list({
      "user_id": 1,
      "per_page": 1,
      "message_comment_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    messagecommentreaction.List(context.Background(), files_sdk.MessageCommentReactionListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
      MessageCommentId: 1,
    })
    
    
    files-cli message-comment-reactions list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --message-comment-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "emoji": "👍"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message-comment-reactions type="array">
      <message-comment-reaction>
        <id type="integer">1</id>
        <emoji>👍</emoji>
      </message-comment-reaction>
    </message-comment-reactions>
    
    

    HTTPS Request

    GET /message_comment_reactions

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    message_comment_id int64 Required Message comment to return reactions for.

    Pagination Params

    Read more about Paginating List Requests.

    Show Message Comment Reaction

    Example Request

    curl https://app.files.com/api/rest/v1/message_comment_reactions/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/message_comment_reactions/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::MessageCommentReaction.find(id)
    
    \Files\Model\MessageCommentReaction::find($id);
    
    
    MessageCommentReaction.find(, parameters
    
    await MessageCommentReaction.find(id)
    
    
    await MessageCommentReaction.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.message_comment_reaction.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    messagecommentreaction.Find(context.Background(), files_sdk.MessageCommentReactionFindParams{
      Id: 1,
    })
    
    
    files-cli message-comment-reactions find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "emoji": "👍"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message-comment-reaction>
      <id type="integer">1</id>
      <emoji>👍</emoji>
    </message-comment-reaction>
    
    

    HTTPS Request

    GET /message_comment_reactions/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Message Comment Reaction ID.

    Create Message Comment Reaction

    Example Request

    curl https://app.files.com/api/rest/v1/message_comment_reactions.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"emoji":"emoji"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/message_comment_reactions.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<message-comment-reaction>
           <user_id type="integer">1</user_id>
           <emoji>emoji</emoji>
         </message-comment-reaction>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::MessageCommentReaction.create(
      user_id: 1, 
      emoji: "emoji"
    )
    
    \Files\Model\MessageCommentReaction::create(array(
      'user_id' => 1, 
      'emoji' => "emoji"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("emoji", emoji);
    MessageCommentReaction.create(parameters)
    
    await MessageCommentReaction.create({
      user_id: 1, 
      emoji: "emoji",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("emoji", "emoji");
    
    await MessageCommentReaction.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.message_comment_reaction.create({
      "user_id": 1,
      "emoji": "emoji"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    messagecommentreaction.Create(context.Background(), files_sdk.MessageCommentReactionCreateParams{
      UserId: 1,
      Emoji: "emoji",
    })
    
    
    files-cli message-comment-reactions create \
      --user-id=1 \
      --emoji="emoji" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "emoji": "👍"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message-comment-reaction>
      <id type="integer">1</id>
      <emoji>👍</emoji>
    </message-comment-reaction>
    
    

    HTTPS Request

    POST /message_comment_reactions

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    emoji string Required Emoji to react with.

    Delete Message Comment Reaction

    Example Request

    curl https://app.files.com/api/rest/v1/message_comment_reactions/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/message_comment_reactions/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    message_comment_reaction = Files::MessageCommentReaction.list.first
    message_comment_reaction.delete
    
    $message_comment_reaction = \Files\Model\MessageCommentReaction::list()[0];
    $message_comment_reaction->delete();
    
    MessageCommentReaction messageCommentReaction = MessageCommentReaction.list()[0];
    
    messageCommentReaction.delete();
    
    const messageCommentReaction = (await MessageCommentReaction.list())[0]
    await messageCommentReaction.delete()
    
    var messageCommentReaction = (await MessageCommentReaction.List())[0];
    
    await messageCommentReaction.Delete();
    
    files_sdk.set_api_key("my-key")
    
    message_comment_reaction = files_sdk.message_comment_reaction.find(id)
    message_comment_reaction.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    messagecommentreaction.Delete(context.Background(), files_sdk.MessageCommentReactionDeleteParams{
      Id: 1,
    })
    
    files-cli message-comment-reactions delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /message_comment_reactions/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Message Comment Reaction ID.

    Message Reactions

    A message reaction represents a reaction emoji made by a user on a message.

    The MessageReaction object

    Example MessageReaction Object

    {
      "id": 1,
      "emoji": "👍"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message-reaction>
      <id type="integer">1</id>
      <emoji>👍</emoji>
    </message-reaction>
    
    
    Attribute Description
    id int64 Reaction ID
    emoji string Emoji used in the reaction.
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.

    List Message Reactions

    Example Request

    curl "https://app.files.com/api/rest/v1/message_reactions.json?user_id=1&message_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/message_reactions.xml?user_id=1&message_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::MessageReaction.list(
      user_id: 1, 
      per_page: 1, 
      message_id: 1
    )
    
    \Files\Model\MessageReaction::list(array(
      'user_id' => 1, 
      'per_page' => 1, 
      'message_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    requestParams.put("message_id", 1);
    MessageReaction.list(parameters).all()
    
    await MessageReaction.list({
      user_id: 1, 
      per_page: 1, 
      message_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("message_id", (Int64?) 1);
    
    await MessageReaction.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.message_reaction.list({
      "user_id": 1,
      "per_page": 1,
      "message_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    messagereaction.List(context.Background(), files_sdk.MessageReactionListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
      MessageId: 1,
    })
    
    
    files-cli message-reactions list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --message-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "emoji": "👍"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message-reactions type="array">
      <message-reaction>
        <id type="integer">1</id>
        <emoji>👍</emoji>
      </message-reaction>
    </message-reactions>
    
    

    HTTPS Request

    GET /message_reactions

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    message_id int64 Required Message to return reactions for.

    Pagination Params

    Read more about Paginating List Requests.

    Show Message Reaction

    Example Request

    curl https://app.files.com/api/rest/v1/message_reactions/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/message_reactions/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::MessageReaction.find(id)
    
    \Files\Model\MessageReaction::find($id);
    
    
    MessageReaction.find(, parameters
    
    await MessageReaction.find(id)
    
    
    await MessageReaction.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.message_reaction.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    messagereaction.Find(context.Background(), files_sdk.MessageReactionFindParams{
      Id: 1,
    })
    
    
    files-cli message-reactions find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "emoji": "👍"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message-reaction>
      <id type="integer">1</id>
      <emoji>👍</emoji>
    </message-reaction>
    
    

    HTTPS Request

    GET /message_reactions/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Message Reaction ID.

    Create Message Reaction

    Example Request

    curl https://app.files.com/api/rest/v1/message_reactions.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"emoji":"emoji"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/message_reactions.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<message-reaction>
           <user_id type="integer">1</user_id>
           <emoji>emoji</emoji>
         </message-reaction>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::MessageReaction.create(
      user_id: 1, 
      emoji: "emoji"
    )
    
    \Files\Model\MessageReaction::create(array(
      'user_id' => 1, 
      'emoji' => "emoji"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("emoji", emoji);
    MessageReaction.create(parameters)
    
    await MessageReaction.create({
      user_id: 1, 
      emoji: "emoji",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("emoji", "emoji");
    
    await MessageReaction.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.message_reaction.create({
      "user_id": 1,
      "emoji": "emoji"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    messagereaction.Create(context.Background(), files_sdk.MessageReactionCreateParams{
      UserId: 1,
      Emoji: "emoji",
    })
    
    
    files-cli message-reactions create \
      --user-id=1 \
      --emoji="emoji" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "emoji": "👍"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <message-reaction>
      <id type="integer">1</id>
      <emoji>👍</emoji>
    </message-reaction>
    
    

    HTTPS Request

    POST /message_reactions

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    emoji string Required Emoji to react with.

    Delete Message Reaction

    Example Request

    curl https://app.files.com/api/rest/v1/message_reactions/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/message_reactions/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    message_reaction = Files::MessageReaction.list.first
    message_reaction.delete
    
    $message_reaction = \Files\Model\MessageReaction::list()[0];
    $message_reaction->delete();
    
    MessageReaction messageReaction = MessageReaction.list()[0];
    
    messageReaction.delete();
    
    const messageReaction = (await MessageReaction.list())[0]
    await messageReaction.delete()
    
    var messageReaction = (await MessageReaction.List())[0];
    
    await messageReaction.Delete();
    
    files_sdk.set_api_key("my-key")
    
    message_reaction = files_sdk.message_reaction.find(id)
    message_reaction.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    messagereaction.Delete(context.Background(), files_sdk.MessageReactionDeleteParams{
      Id: 1,
    })
    
    files-cli message-reactions delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /message_reactions/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Message Reaction ID.

    Notifications

    Notifications are our feature that send E-Mails when new files are uploaded into a folder.

    The Notification object

    Example Notification Object

    {
      "id": 1,
      "path": "",
      "group_id": 1,
      "group_name": "example",
      "triggering_group_ids": [
        1
      ],
      "triggering_user_ids": [
        1
      ],
      "trigger_by_share_recipients": true,
      "notify_user_actions": true,
      "notify_on_copy": true,
      "notify_on_delete": true,
      "notify_on_download": true,
      "notify_on_move": true,
      "notify_on_upload": true,
      "recursive": true,
      "send_interval": "fifteen_minutes",
      "message": "custom notification email message",
      "triggering_filenames": [
        "*.jpg",
        "notify_file.txt"
      ],
      "unsubscribed": true,
      "unsubscribed_reason": "example",
      "user_id": 1,
      "username": "User",
      "suppressed_email": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <notification>
      <id type="integer">1</id>
      <path></path>
      <group_id type="integer">1</group_id>
      <group_name>example</group_name>
      <triggering_group_ids type="array">
        <triggering_group_id type="integer">1</triggering_group_id>
      </triggering_group_ids>
      <triggering_user_ids type="array">
        <triggering_user_id type="integer">1</triggering_user_id>
      </triggering_user_ids>
      <trigger_by_share_recipients type="boolean">true</trigger_by_share_recipients>
      <notify_user_actions type="boolean">true</notify_user_actions>
      <notify_on_copy type="boolean">true</notify_on_copy>
      <notify_on_delete type="boolean">true</notify_on_delete>
      <notify_on_download type="boolean">true</notify_on_download>
      <notify_on_move type="boolean">true</notify_on_move>
      <notify_on_upload type="boolean">true</notify_on_upload>
      <recursive type="boolean">true</recursive>
      <send_interval>fifteen_minutes</send_interval>
      <message>custom notification email message</message>
      <triggering_filenames type="array">
        <triggering_filename>*.jpg</triggering_filename>
        <triggering_filename>notify_file.txt</triggering_filename>
      </triggering_filenames>
      <unsubscribed type="boolean">true</unsubscribed>
      <unsubscribed_reason>example</unsubscribed_reason>
      <user_id type="integer">1</user_id>
      <username>User</username>
      <suppressed_email type="boolean">true</suppressed_email>
    </notification>
    
    
    Attribute Description
    id int64 Notification ID
    path string Folder path to notify on This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    group_id int64 ID of Group to receive notifications
    group_name string Group name, if a Group ID is set
    triggering_group_ids array If set, will only notify on actions made by a member of one of the specified groups
    triggering_user_ids array If set, will onlynotify on actions made one of the specified users
    trigger_by_share_recipients boolean Notify when actions are performed by a share recipient?
    notify_user_actions boolean If true, will send notifications about a user's own activity to that user. If false, only activity performed by other users (or anonymous users) will be sent in notifications.
    notify_on_copy boolean Trigger on files copied to this path?
    notify_on_delete boolean Trigger on files deleted in this path?
    notify_on_download boolean Trigger on files downloaded in this path?
    notify_on_move boolean Trigger on files moved to this path?
    notify_on_upload boolean Trigger on files created/uploaded/updated/changed in this path?
    recursive boolean Apply notification recursively? This will enable notifications for each subfolder.
    send_interval string The time interval that notifications are aggregated to
    Possible values: five_minutes, fifteen_minutes, hourly, daily
    message string Custom message to include in notification emails
    triggering_filenames array Array of filenames (possibly with wildcards) to scope trigger
    unsubscribed boolean Is the user unsubscribed from this notification?
    unsubscribed_reason string The reason that the user unsubscribed
    Possible values: none, unsubscribe_link_clicked, mail_bounced, mail_marked_as_spam
    user_id int64 Notification user ID
    username string Notification username
    suppressed_email boolean If true, it means that the recipient at this user's email address has manually unsubscribed from all emails, or had their email "hard bounce", which means that we are unable to send mail to this user's current email address. Notifications will resume if the user changes their email address.

    List Notifications

    Example Request

    curl "https://app.files.com/api/rest/v1/notifications.json?user_id=1&group_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/notifications.xml?user_id=1&group_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Notification.list(
      user_id: 1, 
      per_page: 1, 
      include_ancestors: true, 
      group_id: 1
    )
    
    \Files\Model\Notification::list(array(
      'user_id' => 1, 
      'per_page' => 1, 
      'include_ancestors' => true, 
      'group_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    requestParams.put("include_ancestors", true);
    requestParams.put("group_id", 1);
    Notification.list(parameters).all()
    
    await Notification.list({
      user_id: 1, 
      per_page: 1, 
      include_ancestors: true, 
      group_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("include_ancestors", true);
    parameters.Add("group_id", 1);
    
    await Notification.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.notification.list({
      "user_id": 1,
      "per_page": 1,
      "include_ancestors": True,
      "group_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    notification.List(context.Background(), files_sdk.NotificationListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterPrefix: "",
      Path: "",
      IncludeAncestors: lib.Bool(true),
      GroupId: 1,
    })
    
    
    files-cli notifications list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --path="" \
      --group-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "path": "",
        "group_id": 1,
        "group_name": "example",
        "triggering_group_ids": [
          1
        ],
        "triggering_user_ids": [
          1
        ],
        "trigger_by_share_recipients": true,
        "notify_user_actions": true,
        "notify_on_copy": true,
        "notify_on_delete": true,
        "notify_on_download": true,
        "notify_on_move": true,
        "notify_on_upload": true,
        "recursive": true,
        "send_interval": "fifteen_minutes",
        "message": "custom notification email message",
        "triggering_filenames": [
          "*.jpg",
          "notify_file.txt"
        ],
        "unsubscribed": true,
        "unsubscribed_reason": "example",
        "user_id": 1,
        "username": "User",
        "suppressed_email": true
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <notifications type="array">
      <notification>
        <id type="integer">1</id>
        <path></path>
        <group_id type="integer">1</group_id>
        <group_name>example</group_name>
        <triggering_group_ids type="array">
          <triggering_group_id type="integer">1</triggering_group_id>
        </triggering_group_ids>
        <triggering_user_ids type="array">
          <triggering_user_id type="integer">1</triggering_user_id>
        </triggering_user_ids>
        <trigger_by_share_recipients type="boolean">true</trigger_by_share_recipients>
        <notify_user_actions type="boolean">true</notify_user_actions>
        <notify_on_copy type="boolean">true</notify_on_copy>
        <notify_on_delete type="boolean">true</notify_on_delete>
        <notify_on_download type="boolean">true</notify_on_download>
        <notify_on_move type="boolean">true</notify_on_move>
        <notify_on_upload type="boolean">true</notify_on_upload>
        <recursive type="boolean">true</recursive>
        <send_interval>fifteen_minutes</send_interval>
        <message>custom notification email message</message>
        <triggering_filenames type="array">
          <triggering_filename>*.jpg</triggering_filename>
          <triggering_filename>notify_file.txt</triggering_filename>
        </triggering_filenames>
        <unsubscribed type="boolean">true</unsubscribed>
        <unsubscribed_reason>example</unsubscribed_reason>
        <user_id type="integer">1</user_id>
        <username>User</username>
        <suppressed_email type="boolean">true</suppressed_email>
      </notification>
    </notifications>
    
    

    HTTPS Request

    GET /notifications

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 DEPRECATED: Show notifications for this User ID. Use filter[user_id] instead.
    path string Show notifications for this Path.
    include_ancestors boolean If include_ancestors is true and path is specified, include notifications for any parent paths. Ignored if path is not specified.
    group_id string

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[path]=desc). Valid fields are path, user_id or group_id.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are path, user_id or group_id.
    filter_prefix object If set, return records where the specified field is prefixed by the supplied value. Valid fields are path.

    Show Notification

    Example Request

    curl https://app.files.com/api/rest/v1/notifications/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/notifications/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Notification.find(id)
    
    \Files\Model\Notification::find($id);
    
    
    Notification.find(, parameters
    
    await Notification.find(id)
    
    
    await Notification.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.notification.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    notification.Find(context.Background(), files_sdk.NotificationFindParams{
      Id: 1,
    })
    
    
    files-cli notifications find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "path": "",
      "group_id": 1,
      "group_name": "example",
      "triggering_group_ids": [
        1
      ],
      "triggering_user_ids": [
        1
      ],
      "trigger_by_share_recipients": true,
      "notify_user_actions": true,
      "notify_on_copy": true,
      "notify_on_delete": true,
      "notify_on_download": true,
      "notify_on_move": true,
      "notify_on_upload": true,
      "recursive": true,
      "send_interval": "fifteen_minutes",
      "message": "custom notification email message",
      "triggering_filenames": [
        "*.jpg",
        "notify_file.txt"
      ],
      "unsubscribed": true,
      "unsubscribed_reason": "example",
      "user_id": 1,
      "username": "User",
      "suppressed_email": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <notification>
      <id type="integer">1</id>
      <path></path>
      <group_id type="integer">1</group_id>
      <group_name>example</group_name>
      <triggering_group_ids type="array">
        <triggering_group_id type="integer">1</triggering_group_id>
      </triggering_group_ids>
      <triggering_user_ids type="array">
        <triggering_user_id type="integer">1</triggering_user_id>
      </triggering_user_ids>
      <trigger_by_share_recipients type="boolean">true</trigger_by_share_recipients>
      <notify_user_actions type="boolean">true</notify_user_actions>
      <notify_on_copy type="boolean">true</notify_on_copy>
      <notify_on_delete type="boolean">true</notify_on_delete>
      <notify_on_download type="boolean">true</notify_on_download>
      <notify_on_move type="boolean">true</notify_on_move>
      <notify_on_upload type="boolean">true</notify_on_upload>
      <recursive type="boolean">true</recursive>
      <send_interval>fifteen_minutes</send_interval>
      <message>custom notification email message</message>
      <triggering_filenames type="array">
        <triggering_filename>*.jpg</triggering_filename>
        <triggering_filename>notify_file.txt</triggering_filename>
      </triggering_filenames>
      <unsubscribed type="boolean">true</unsubscribed>
      <unsubscribed_reason>example</unsubscribed_reason>
      <user_id type="integer">1</user_id>
      <username>User</username>
      <suppressed_email type="boolean">true</suppressed_email>
    </notification>
    
    

    HTTPS Request

    GET /notifications/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Notification ID.

    Create Notification

    Example Request

    curl https://app.files.com/api/rest/v1/notifications.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"notify_on_copy":true,"notify_on_delete":true,"notify_on_download":true,"notify_on_move":true,"notify_on_upload":true,"notify_user_actions":true,"recursive":true,"send_interval":"daily","message":"custom notification email message","triggering_filenames":["*.jpg","notify_file.txt"],"triggering_group_ids":[1],"triggering_user_ids":[1],"trigger_by_share_recipients":true,"group_id":1,"username":"User"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/notifications.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<notification>
           <user_id type="integer">1</user_id>
           <notify_on_copy type="boolean">true</notify_on_copy>
           <notify_on_delete type="boolean">true</notify_on_delete>
           <notify_on_download type="boolean">true</notify_on_download>
           <notify_on_move type="boolean">true</notify_on_move>
           <notify_on_upload type="boolean">true</notify_on_upload>
           <notify_user_actions type="boolean">true</notify_user_actions>
           <recursive type="boolean">true</recursive>
           <send_interval>daily</send_interval>
           <message>custom notification email message</message>
           <triggering_filenames type="array">
             <triggering_filename>*.jpg</triggering_filename>
             <triggering_filename>notify_file.txt</triggering_filename>
           </triggering_filenames>
           <triggering_group_ids type="array">
             <triggering_group_id type="integer">1</triggering_group_id>
           </triggering_group_ids>
           <triggering_user_ids type="array">
             <triggering_user_id type="integer">1</triggering_user_id>
           </triggering_user_ids>
           <trigger_by_share_recipients type="boolean">true</trigger_by_share_recipients>
           <group_id type="integer">1</group_id>
           <username>User</username>
         </notification>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Notification.create(
      user_id: 1, 
      notify_on_copy: true, 
      notify_on_delete: true, 
      notify_on_download: true, 
      notify_on_move: true, 
      notify_on_upload: true, 
      notify_user_actions: true, 
      recursive: true, 
      send_interval: "daily", 
      message: "custom notification email message", 
      triggering_filenames: ["*.jpg","notify_file.txt"], 
      triggering_group_ids: [1], 
      triggering_user_ids: [1], 
      trigger_by_share_recipients: true, 
      group_id: 1, 
      username: "User"
    )
    
    \Files\Model\Notification::create(array(
      'user_id' => 1, 
      'notify_on_copy' => true, 
      'notify_on_delete' => true, 
      'notify_on_download' => true, 
      'notify_on_move' => true, 
      'notify_on_upload' => true, 
      'notify_user_actions' => true, 
      'recursive' => true, 
      'send_interval' => "daily", 
      'message' => "custom notification email message", 
      'triggering_filenames' => ["*.jpg","notify_file.txt"], 
      'triggering_group_ids' => [1], 
      'triggering_user_ids' => [1], 
      'trigger_by_share_recipients' => true, 
      'group_id' => 1, 
      'username' => "User"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("notify_on_copy", true);
    requestParams.put("notify_on_delete", true);
    requestParams.put("notify_on_download", true);
    requestParams.put("notify_on_move", true);
    requestParams.put("notify_on_upload", true);
    requestParams.put("notify_user_actions", true);
    requestParams.put("recursive", true);
    requestParams.put("send_interval", daily);
    requestParams.put("message", custom notification email message);
    requestParams.put("triggering_filenames", ["*.jpg", "notify_file.txt"]);
    requestParams.put("triggering_group_ids", [1]);
    requestParams.put("triggering_user_ids", [1]);
    requestParams.put("trigger_by_share_recipients", true);
    requestParams.put("group_id", 1);
    requestParams.put("username", User);
    Notification.create(parameters)
    
    await Notification.create({
      user_id: 1, 
      notify_on_copy: true, 
      notify_on_delete: true, 
      notify_on_download: true, 
      notify_on_move: true, 
      notify_on_upload: true, 
      notify_user_actions: true, 
      recursive: true, 
      send_interval: "daily", 
      message: "custom notification email message", 
      triggering_filenames: ["*.jpg","notify_file.txt"], 
      triggering_group_ids: [1], 
      triggering_user_ids: [1], 
      trigger_by_share_recipients: true, 
      group_id: 1, 
      username: "User",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("notify_on_copy", true);
    parameters.Add("notify_on_delete", true);
    parameters.Add("notify_on_download", true);
    parameters.Add("notify_on_move", true);
    parameters.Add("notify_on_upload", true);
    parameters.Add("notify_user_actions", true);
    parameters.Add("recursive", true);
    parameters.Add("send_interval", "daily");
    parameters.Add("message", "custom notification email message");
    parameters.Add("triggering_filenames", (string[]) ["*.jpg","notify_file.txt"]);
    parameters.Add("triggering_group_ids", (Nullable<Int64>[]) [1]);
    parameters.Add("triggering_user_ids", (Nullable<Int64>[]) [1]);
    parameters.Add("trigger_by_share_recipients", true);
    parameters.Add("group_id", (Int64?) 1);
    parameters.Add("username", "User");
    
    await Notification.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.notification.create({
      "user_id": 1,
      "notify_on_copy": True,
      "notify_on_delete": True,
      "notify_on_download": True,
      "notify_on_move": True,
      "notify_on_upload": True,
      "notify_user_actions": True,
      "recursive": True,
      "send_interval": "daily",
      "message": "custom notification email message",
      "triggering_filenames": ["*.jpg","notify_file.txt"],
      "triggering_group_ids": [1],
      "triggering_user_ids": [1],
      "trigger_by_share_recipients": True,
      "group_id": 1,
      "username": "User"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    notification.Create(context.Background(), files_sdk.NotificationCreateParams{
      UserId: 1,
      NotifyOnCopy: lib.Bool(true),
      NotifyOnDelete: lib.Bool(true),
      NotifyOnDownload: lib.Bool(true),
      NotifyOnMove: lib.Bool(true),
      NotifyOnUpload: lib.Bool(true),
      NotifyUserActions: lib.Bool(true),
      Recursive: lib.Bool(true),
      SendInterval: "daily",
      Message: "custom notification email message",
      TriggeringFilenames: []string{"*.jpg", "notify_file.txt"},
      TriggeringGroupIds: []int64{[1]},
      TriggeringUserIds: []int64{[1]},
      TriggerByShareRecipients: lib.Bool(true),
      GroupId: 1,
      Path: "",
      Username: "User",
    })
    
    
    files-cli notifications create \
      --user-id=1 \
      --send-interval="daily" \
      --message="custom notification email message" \
      --triggering-filenames="["*.jpg","notify_file.txt"]" \
      --triggering-group-ids="[1]" \
      --triggering-user-ids="[1]" \
      --group-id=1 \
      --path="" \
      --username="User" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "path": "",
      "group_id": 1,
      "group_name": "example",
      "triggering_group_ids": [
        1
      ],
      "triggering_user_ids": [
        1
      ],
      "trigger_by_share_recipients": true,
      "notify_user_actions": true,
      "notify_on_copy": true,
      "notify_on_delete": true,
      "notify_on_download": true,
      "notify_on_move": true,
      "notify_on_upload": true,
      "recursive": true,
      "send_interval": "fifteen_minutes",
      "message": "custom notification email message",
      "triggering_filenames": [
        "*.jpg",
        "notify_file.txt"
      ],
      "unsubscribed": true,
      "unsubscribed_reason": "example",
      "user_id": 1,
      "username": "User",
      "suppressed_email": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <notification>
      <id type="integer">1</id>
      <path></path>
      <group_id type="integer">1</group_id>
      <group_name>example</group_name>
      <triggering_group_ids type="array">
        <triggering_group_id type="integer">1</triggering_group_id>
      </triggering_group_ids>
      <triggering_user_ids type="array">
        <triggering_user_id type="integer">1</triggering_user_id>
      </triggering_user_ids>
      <trigger_by_share_recipients type="boolean">true</trigger_by_share_recipients>
      <notify_user_actions type="boolean">true</notify_user_actions>
      <notify_on_copy type="boolean">true</notify_on_copy>
      <notify_on_delete type="boolean">true</notify_on_delete>
      <notify_on_download type="boolean">true</notify_on_download>
      <notify_on_move type="boolean">true</notify_on_move>
      <notify_on_upload type="boolean">true</notify_on_upload>
      <recursive type="boolean">true</recursive>
      <send_interval>fifteen_minutes</send_interval>
      <message>custom notification email message</message>
      <triggering_filenames type="array">
        <triggering_filename>*.jpg</triggering_filename>
        <triggering_filename>notify_file.txt</triggering_filename>
      </triggering_filenames>
      <unsubscribed type="boolean">true</unsubscribed>
      <unsubscribed_reason>example</unsubscribed_reason>
      <user_id type="integer">1</user_id>
      <username>User</username>
      <suppressed_email type="boolean">true</suppressed_email>
    </notification>
    
    

    HTTPS Request

    POST /notifications

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 The id of the user to notify. Provide user_id, username or group_id.
    notify_on_copy boolean If true, copying or moving resources into this path will trigger a notification, in addition to just uploads.
    notify_on_delete boolean Trigger on files deleted in this path?
    notify_on_download boolean Trigger on files downloaded in this path?
    notify_on_move boolean Trigger on files moved to this path?
    notify_on_upload boolean Trigger on files created/uploaded/updated/changed in this path?
    notify_user_actions boolean If true actions initiated by the user will still result in a notification
    recursive boolean If true, enable notifications for each subfolder in this path
    send_interval string The time interval that notifications are aggregated by. Can be five_minutes, fifteen_minutes, hourly, or daily.
    message string Custom message to include in notification emails
    triggering_filenames array(string) Array of filenames (possibly with wildcards) to scope trigger
    triggering_group_ids array(int64) If set, will only notify on actions made by a member of one of the specified groups
    triggering_user_ids array(int64) If set, will onlynotify on actions made one of the specified users
    trigger_by_share_recipients boolean Notify when actions are performed by a share recipient?
    group_id int64 The ID of the group to notify. Provide user_id, username or group_id.
    path string Path
    username string The username of the user to notify. Provide user_id, username or group_id.

    Update Notification

    Example Request

    curl https://app.files.com/api/rest/v1/notifications/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"notify_on_copy":true,"notify_on_delete":true,"notify_on_download":true,"notify_on_move":true,"notify_on_upload":true,"notify_user_actions":true,"recursive":true,"send_interval":"daily","message":"custom notification email message","triggering_filenames":["*.jpg","notify_file.txt"],"triggering_group_ids":[1],"triggering_user_ids":[1],"trigger_by_share_recipients":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/notifications/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<notification>
           <notify_on_copy type="boolean">true</notify_on_copy>
           <notify_on_delete type="boolean">true</notify_on_delete>
           <notify_on_download type="boolean">true</notify_on_download>
           <notify_on_move type="boolean">true</notify_on_move>
           <notify_on_upload type="boolean">true</notify_on_upload>
           <notify_user_actions type="boolean">true</notify_user_actions>
           <recursive type="boolean">true</recursive>
           <send_interval>daily</send_interval>
           <message>custom notification email message</message>
           <triggering_filenames type="array">
             <triggering_filename>*.jpg</triggering_filename>
             <triggering_filename>notify_file.txt</triggering_filename>
           </triggering_filenames>
           <triggering_group_ids type="array">
             <triggering_group_id type="integer">1</triggering_group_id>
           </triggering_group_ids>
           <triggering_user_ids type="array">
             <triggering_user_id type="integer">1</triggering_user_id>
           </triggering_user_ids>
           <trigger_by_share_recipients type="boolean">true</trigger_by_share_recipients>
         </notification>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    notification = Files::Notification.list.first
    notification.update(
      notify_on_copy: true,
      notify_on_delete: true,
      notify_on_download: true,
      notify_on_move: true,
      notify_on_upload: true,
      notify_user_actions: true,
      recursive: true,
      send_interval: "daily",
      message: "custom notification email message",
      triggering_filenames: ["*.jpg","notify_file.txt"],
      triggering_group_ids: [1],
      triggering_user_ids: [1],
      trigger_by_share_recipients: true
    )
    
    $notification = \Files\Model\Notification::list()[0];
    $notification->update(array(
      'notify_on_copy' => true, 
      'notify_on_delete' => true, 
      'notify_on_download' => true, 
      'notify_on_move' => true, 
      'notify_on_upload' => true, 
      'notify_user_actions' => true, 
      'recursive' => true, 
      'send_interval' => "daily", 
      'message' => "custom notification email message", 
      'triggering_filenames' => ["*.jpg","notify_file.txt"], 
      'triggering_group_ids' => [1], 
      'triggering_user_ids' => [1], 
      'trigger_by_share_recipients' => true
    ));
    
    Notification notification = Notification.list()[0];
    notification.setNotifyOnCopy(true);
    notification.setNotifyOnDelete(true);
    notification.setNotifyOnDownload(true);
    notification.setNotifyOnMove(true);
    notification.setNotifyOnUpload(true);
    notification.setNotifyUserActions(true);
    notification.setRecursive(true);
    notification.setSendInterval("daily");
    notification.setMessage("custom notification email message");
    notification.setTriggeringFilenames(["*.jpg", "notify_file.txt"]);
    notification.setTriggeringGroupIds([1]);
    notification.setTriggeringUserIds([1]);
    notification.setTriggerByShareRecipients(true);
    notification.update();
    
    const notification = (await Notification.list())[0]
    await notification.update({ 
      notify_on_copy: true, 
      notify_on_delete: true, 
      notify_on_download: true, 
      notify_on_move: true, 
      notify_on_upload: true, 
      notify_user_actions: true, 
      recursive: true, 
      send_interval: "daily", 
      message: "custom notification email message", 
      triggering_filenames: ["*.jpg","notify_file.txt"], 
      triggering_group_ids: [1], 
      triggering_user_ids: [1], 
      trigger_by_share_recipients: true,
    })
    
    var notification = (await Notification.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("notify_on_copy", true);
    parameters.Add("notify_on_delete", true);
    parameters.Add("notify_on_download", true);
    parameters.Add("notify_on_move", true);
    parameters.Add("notify_on_upload", true);
    parameters.Add("notify_user_actions", true);
    parameters.Add("recursive", true);
    parameters.Add("send_interval", "daily");
    parameters.Add("message", "custom notification email message");
    parameters.Add("triggering_filenames", (string[]), shorthand: true) ["*.jpg","notify_file.txt"]);
    parameters.Add("triggering_group_ids", (Nullable<Int64>[]), shorthand: true) [1]);
    parameters.Add("triggering_user_ids", (Nullable<Int64>[]), shorthand: true) [1]);
    parameters.Add("trigger_by_share_recipients", true);
    
    await notification.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    notification = files_sdk.notification.find(id)
    notification.update({
      "notify_on_copy": True,
      "notify_on_delete": True,
      "notify_on_download": True,
      "notify_on_move": True,
      "notify_on_upload": True,
      "notify_user_actions": True,
      "recursive": True,
      "send_interval": "daily",
      "message": "custom notification email message",
      "triggering_filenames": ["*.jpg","notify_file.txt"],
      "triggering_group_ids": [1],
      "triggering_user_ids": [1],
      "trigger_by_share_recipients": True
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    notification.Update(context.Background(), files_sdk.NotificationUpdateParams{
      Id: 1,
      NotifyOnCopy: lib.Bool(true),
      NotifyOnDelete: lib.Bool(true),
      NotifyOnDownload: lib.Bool(true),
      NotifyOnMove: lib.Bool(true),
      NotifyOnUpload: lib.Bool(true),
      NotifyUserActions: lib.Bool(true),
      Recursive: lib.Bool(true),
      SendInterval: "daily",
      Message: "custom notification email message",
      TriggeringFilenames: []string{"*.jpg", "notify_file.txt"},
      TriggeringGroupIds: []int64{[1]},
      TriggeringUserIds: []int64{[1]},
      TriggerByShareRecipients: lib.Bool(true),
    })
    
    files-cli notifications update \
      --id=1 \
      --send-interval="daily" \
      --message="custom notification email message" \
      --triggering-filenames="["*.jpg","notify_file.txt"]" \
      --triggering-group-ids="[1]" \
      --triggering-user-ids="[1]" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "path": "",
      "group_id": 1,
      "group_name": "example",
      "triggering_group_ids": [
        1
      ],
      "triggering_user_ids": [
        1
      ],
      "trigger_by_share_recipients": true,
      "notify_user_actions": true,
      "notify_on_copy": true,
      "notify_on_delete": true,
      "notify_on_download": true,
      "notify_on_move": true,
      "notify_on_upload": true,
      "recursive": true,
      "send_interval": "fifteen_minutes",
      "message": "custom notification email message",
      "triggering_filenames": [
        "*.jpg",
        "notify_file.txt"
      ],
      "unsubscribed": true,
      "unsubscribed_reason": "example",
      "user_id": 1,
      "username": "User",
      "suppressed_email": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <notification>
      <id type="integer">1</id>
      <path></path>
      <group_id type="integer">1</group_id>
      <group_name>example</group_name>
      <triggering_group_ids type="array">
        <triggering_group_id type="integer">1</triggering_group_id>
      </triggering_group_ids>
      <triggering_user_ids type="array">
        <triggering_user_id type="integer">1</triggering_user_id>
      </triggering_user_ids>
      <trigger_by_share_recipients type="boolean">true</trigger_by_share_recipients>
      <notify_user_actions type="boolean">true</notify_user_actions>
      <notify_on_copy type="boolean">true</notify_on_copy>
      <notify_on_delete type="boolean">true</notify_on_delete>
      <notify_on_download type="boolean">true</notify_on_download>
      <notify_on_move type="boolean">true</notify_on_move>
      <notify_on_upload type="boolean">true</notify_on_upload>
      <recursive type="boolean">true</recursive>
      <send_interval>fifteen_minutes</send_interval>
      <message>custom notification email message</message>
      <triggering_filenames type="array">
        <triggering_filename>*.jpg</triggering_filename>
        <triggering_filename>notify_file.txt</triggering_filename>
      </triggering_filenames>
      <unsubscribed type="boolean">true</unsubscribed>
      <unsubscribed_reason>example</unsubscribed_reason>
      <user_id type="integer">1</user_id>
      <username>User</username>
      <suppressed_email type="boolean">true</suppressed_email>
    </notification>
    
    

    HTTPS Request

    PATCH /notifications/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Notification ID.
    notify_on_copy boolean If true, copying or moving resources into this path will trigger a notification, in addition to just uploads.
    notify_on_delete boolean Trigger on files deleted in this path?
    notify_on_download boolean Trigger on files downloaded in this path?
    notify_on_move boolean Trigger on files moved to this path?
    notify_on_upload boolean Trigger on files created/uploaded/updated/changed in this path?
    notify_user_actions boolean If true actions initiated by the user will still result in a notification
    recursive boolean If true, enable notifications for each subfolder in this path
    send_interval string The time interval that notifications are aggregated by. Can be five_minutes, fifteen_minutes, hourly, or daily.
    message string Custom message to include in notification emails
    triggering_filenames array(string) Array of filenames (possibly with wildcards) to scope trigger
    triggering_group_ids array(int64) If set, will only notify on actions made by a member of one of the specified groups
    triggering_user_ids array(int64) If set, will onlynotify on actions made one of the specified users
    trigger_by_share_recipients boolean Notify when actions are performed by a share recipient?

    Delete Notification

    Example Request

    curl https://app.files.com/api/rest/v1/notifications/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/notifications/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    notification = Files::Notification.list.first
    notification.delete
    
    $notification = \Files\Model\Notification::list()[0];
    $notification->delete();
    
    Notification notification = Notification.list()[0];
    
    notification.delete();
    
    const notification = (await Notification.list())[0]
    await notification.delete()
    
    var notification = (await Notification.List())[0];
    
    await notification.Delete();
    
    files_sdk.set_api_key("my-key")
    
    notification = files_sdk.notification.find(id)
    notification.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    notification.Delete(context.Background(), files_sdk.NotificationDeleteParams{
      Id: 1,
    })
    
    files-cli notifications delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /notifications/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Notification ID.

    Permissions

    Permission objects represent the grant of permissions to a user or group.

    They are specific to a path and can be either recursive or nonrecursive into the subfolders of that path.

    The Permission object

    Example Permission Object

    {
      "id": 1,
      "path": "example",
      "user_id": 1,
      "username": "Sser",
      "group_id": 1,
      "group_name": "example",
      "permission": "full",
      "recursive": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <permission>
      <id type="integer">1</id>
      <path>example</path>
      <user_id type="integer">1</user_id>
      <username>Sser</username>
      <group_id type="integer">1</group_id>
      <group_name>example</group_name>
      <permission>full</permission>
      <recursive type="boolean">true</recursive>
    </permission>
    
    
    Attribute Description
    id int64 Permission ID
    path string Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    user_id int64 User ID
    username string User's username
    group_id int64 Group ID
    group_name string Group name if applicable
    permission string Permission type
    Possible values: full, readonly, writeonly, list, history, admin, bundle
    recursive boolean Does this permission apply to subfolders?

    List Permissions

    Example Request

    curl "https://app.files.com/api/rest/v1/permissions.json?group_id=1&user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/permissions.xml?group_id=1&user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Permission.list(
      per_page: 1, 
      path: "example", 
      include_groups: true, 
      group_id: 1, 
      user_id: 1
    )
    
    \Files\Model\Permission::list(array(
      'per_page' => 1, 
      'path' => "example", 
      'include_groups' => true, 
      'group_id' => 1, 
      'user_id' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("path", example);
    requestParams.put("include_groups", true);
    requestParams.put("group_id", 1);
    requestParams.put("user_id", 1);
    Permission.list(parameters).all()
    
    await Permission.list({
      per_page: 1, 
      path: "example", 
      include_groups: true, 
      group_id: 1, 
      user_id: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("path", "example");
    parameters.Add("include_groups", true);
    parameters.Add("group_id", 1);
    parameters.Add("user_id", 1);
    
    await Permission.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.permission.list({
      "per_page": 1,
      "path": "example",
      "include_groups": True,
      "group_id": 1,
      "user_id": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    permission.List(context.Background(), files_sdk.PermissionListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterPrefix: "",
      Path: "example",
      IncludeGroups: lib.Bool(true),
      GroupId: 1,
      UserId: 1,
    })
    
    
    files-cli permissions list \
      --cursor="" \
      --per-page=1 \
      --path="example" \
      --group-id=1 \
      --user-id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "path": "example",
        "user_id": 1,
        "username": "Sser",
        "group_id": 1,
        "group_name": "example",
        "permission": "full",
        "recursive": true
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <permissions type="array">
      <permission>
        <id type="integer">1</id>
        <path>example</path>
        <user_id type="integer">1</user_id>
        <username>Sser</username>
        <group_id type="integer">1</group_id>
        <group_name>example</group_name>
        <permission>full</permission>
        <recursive type="boolean">true</recursive>
      </permission>
    </permissions>
    
    

    HTTPS Request

    GET /permissions

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Permission path. If provided, will scope all permissions(including upward) to this path.
    include_groups boolean If searching by user or group, also include user's permissions that are inherited from its groups?
    group_id string
    user_id string

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[group_id]=desc). Valid fields are group_id, path, user_id or permission.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are path, group_id or user_id. Valid field combinations are [ group_id, path ], [ user_id, path ] or [ user_id, group_id, path ].
    filter_prefix object If set, return records where the specified field is prefixed by the supplied value. Valid fields are path.

    Create Permission

    Example Request

    curl https://app.files.com/api/rest/v1/permissions.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"group_id":1,"path":"example","permission":"full","recursive":true,"user_id":1,"username":"Sser"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/permissions.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<permission>
           <group_id type="integer">1</group_id>
           <path>example</path>
           <permission>full</permission>
           <recursive type="boolean">true</recursive>
           <user_id type="integer">1</user_id>
           <username>Sser</username>
         </permission>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Permission.create(
      group_id: 1, 
      path: "example", 
      permission: "full", 
      recursive: true, 
      user_id: 1, 
      username: "Sser"
    )
    
    \Files\Model\Permission::create(array(
      'group_id' => 1, 
      'path' => "example", 
      'permission' => "full", 
      'recursive' => true, 
      'user_id' => 1, 
      'username' => "Sser"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("group_id", 1);
    requestParams.put("path", example);
    requestParams.put("permission", full);
    requestParams.put("recursive", true);
    requestParams.put("user_id", 1);
    requestParams.put("username", Sser);
    Permission.create(parameters)
    
    await Permission.create({
      group_id: 1, 
      path: "example", 
      permission: "full", 
      recursive: true, 
      user_id: 1, 
      username: "Sser",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("group_id", (Int64?) 1);
    parameters.Add("path", "example");
    parameters.Add("permission", "full");
    parameters.Add("recursive", true);
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("username", "Sser");
    
    await Permission.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.permission.create({
      "group_id": 1,
      "path": "example",
      "permission": "full",
      "recursive": True,
      "user_id": 1,
      "username": "Sser"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    permission.Create(context.Background(), files_sdk.PermissionCreateParams{
      GroupId: 1,
      Path: "example",
      Permission: "full",
      Recursive: lib.Bool(true),
      UserId: 1,
      Username: "Sser",
    })
    
    
    files-cli permissions create \
      --group-id=1 \
      --path="example" \
      --permission="full" \
      --user-id=1 \
      --username="Sser" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "path": "example",
      "user_id": 1,
      "username": "Sser",
      "group_id": 1,
      "group_name": "example",
      "permission": "full",
      "recursive": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <permission>
      <id type="integer">1</id>
      <path>example</path>
      <user_id type="integer">1</user_id>
      <username>Sser</username>
      <group_id type="integer">1</group_id>
      <group_name>example</group_name>
      <permission>full</permission>
      <recursive type="boolean">true</recursive>
    </permission>
    
    

    HTTPS Request

    POST /permissions

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    group_id int64 Group ID
    path string Folder path
    permission string Permission type. Can be admin, full, readonly, writeonly, list, or history
    recursive boolean Apply to subfolders recursively?
    user_id int64 User ID. Provide username or user_id
    username string User username. Provide username or user_id

    Delete Permission

    Example Request

    curl https://app.files.com/api/rest/v1/permissions/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/permissions/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    permission = Files::Permission.list.first
    permission.delete
    
    $permission = \Files\Model\Permission::list()[0];
    $permission->delete();
    
    Permission permission = Permission.list()[0];
    
    permission.delete();
    
    const permission = (await Permission.list())[0]
    await permission.delete()
    
    var permission = (await Permission.List())[0];
    
    await permission.Delete();
    
    files_sdk.set_api_key("my-key")
    
    permission = files_sdk.permission.list.first
    permission.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    permission.Delete(context.Background(), files_sdk.PermissionDeleteParams{
      Id: 1,
    })
    
    files-cli permissions delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /permissions/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Permission ID.

    Priorities

    The Priorities resource in the REST API allows you to operate on Priorities.

    The Priority object

    Example Priority Object

    {
      "path": "foo/bar",
      "color": "pink"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <priority>
      <path>foo/bar</path>
      <color>pink</color>
    </priority>
    
    
    Attribute Description
    path string The path corresponding to the priority color This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    color string The priority color

    List Priorities

    Example Request

    curl "https://app.files.com/api/rest/v1/priorities.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/priorities.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Priority.list(path, 
      per_page: 1
    )
    
    \Files\Model\Priority::list($path, array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    Priority.list(parameters).all()
    
    await Priority.list(path, {
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await Priority.List(path, parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.priority.list(path, {
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    priority.List(context.Background(), files_sdk.PriorityListParams{
      Cursor: "",
      PerPage: 1,
      Path: "path",
    })
    
    
    files-cli priorities list \
      --cursor="" \
      --per-page=1 \
      --path="path" \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "path": "foo/bar",
        "color": "pink"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <priorities type="array">
      <priority>
        <path>foo/bar</path>
        <color>pink</color>
      </priority>
    </priorities>
    
    

    HTTPS Request

    GET /priorities

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required The path to query for priorities

    Pagination Params

    Read more about Paginating List Requests.

    Projects

    Projects are associated with a folder and add project management features to that folder.

    The Project object

    Example Project Object

    {
      "id": 1,
      "global_access": "none"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <project>
      <id type="integer">1</id>
      <global_access>none</global_access>
    </project>
    
    
    Attribute Description
    id int64 Project ID
    global_access string Global access settings
    Possible values: none, anyone_with_read, anyone_with_full

    List Projects

    Example Request

    curl "https://app.files.com/api/rest/v1/projects.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/projects.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Project.list(
      per_page: 1
    )
    
    \Files\Model\Project::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    Project.list(parameters).all()
    
    await Project.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await Project.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.project.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    project.List(context.Background(), files_sdk.ProjectListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli projects list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "global_access": "none"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <projects type="array">
      <project>
        <id type="integer">1</id>
        <global_access>none</global_access>
      </project>
    </projects>
    
    

    HTTPS Request

    GET /projects

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Show Project

    Example Request

    curl https://app.files.com/api/rest/v1/projects/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/projects/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Project.find(id)
    
    \Files\Model\Project::find($id);
    
    
    Project.find(, parameters
    
    await Project.find(id)
    
    
    await Project.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.project.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    project.Find(context.Background(), files_sdk.ProjectFindParams{
      Id: 1,
    })
    
    
    files-cli projects find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "global_access": "none"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <project>
      <id type="integer">1</id>
      <global_access>none</global_access>
    </project>
    
    

    HTTPS Request

    GET /projects/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Project ID.

    Create Project

    Example Request

    curl https://app.files.com/api/rest/v1/projects.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"global_access":"global_access"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/projects.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<project>
           <global_access>global_access</global_access>
         </project>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Project.create(
      global_access: "global_access"
    )
    
    \Files\Model\Project::create(array(
      'global_access' => "global_access"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("global_access", global_access);
    Project.create(parameters)
    
    await Project.create({
      global_access: "global_access",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("global_access", "global_access");
    
    await Project.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.project.create({
      "global_access": "global_access"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    project.Create(context.Background(), files_sdk.ProjectCreateParams{
      GlobalAccess: "global_access",
    })
    
    
    files-cli projects create \
      --global-access="global_access" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "global_access": "none"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <project>
      <id type="integer">1</id>
      <global_access>none</global_access>
    </project>
    
    

    HTTPS Request

    POST /projects

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    global_access string Required Global permissions. Can be: none, anyone_with_read, anyone_with_full.

    Update Project

    Example Request

    curl https://app.files.com/api/rest/v1/projects/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"global_access":"global_access"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/projects/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<project>
           <global_access>global_access</global_access>
         </project>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    project = Files::Project.list.first
    project.update(
      global_access: "global_access"
    )
    
    $project = \Files\Model\Project::list()[0];
    $project->update(array(
      'global_access' => "global_access"
    ));
    
    Project project = Project.list()[0];
    project.setGlobalAccess("global_access");
    project.update();
    
    const project = (await Project.list())[0]
    await project.update({ 
      global_access: "global_access",
    })
    
    var project = (await Project.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("global_access", "global_access");
    
    await project.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    project = files_sdk.project.find(id)
    project.update({
      "global_access": "global_access"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    project.Update(context.Background(), files_sdk.ProjectUpdateParams{
      Id: 1,
      GlobalAccess: "global_access",
    })
    
    files-cli projects update \
      --id=1 \
      --global-access="global_access" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "global_access": "none"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <project>
      <id type="integer">1</id>
      <global_access>none</global_access>
    </project>
    
    

    HTTPS Request

    PATCH /projects/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Project ID.
    global_access string Required Global permissions. Can be: none, anyone_with_read, anyone_with_full.

    Delete Project

    Example Request

    curl https://app.files.com/api/rest/v1/projects/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/projects/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    project = Files::Project.list.first
    project.delete
    
    $project = \Files\Model\Project::list()[0];
    $project->delete();
    
    Project project = Project.list()[0];
    
    project.delete();
    
    const project = (await Project.list())[0]
    await project.delete()
    
    var project = (await Project.List())[0];
    
    await project.Delete();
    
    files_sdk.set_api_key("my-key")
    
    project = files_sdk.project.find(id)
    project.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    project.Delete(context.Background(), files_sdk.ProjectDeleteParams{
      Id: 1,
    })
    
    files-cli projects delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /projects/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Project ID.

    Public Ip Addresses

    These are all IP addresses that app.files.com (or *.files.com) may potentially resolve to over the next 30 days. This list includes IP addresses that are hot standbys not in use.

    The PublicIpAddress object

    Example PublicIpAddress Object

    {
      "ip_address": "1.1.1.1",
      "server_name": "server-1",
      "ftp_enabled": true,
      "sftp_enabled": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-ip-address>
      <ip_address>1.1.1.1</ip_address>
      <server_name>server-1</server_name>
      <ftp_enabled type="boolean">true</ftp_enabled>
      <sftp_enabled type="boolean">true</sftp_enabled>
    </public-ip-address>
    
    
    Attribute Description
    ip_address string The public IP address.
    server_name string The name of the frontend server.
    ftp_enabled boolean
    sftp_enabled boolean

    List all possible public SmartFile IP addresses

    Example Request

    curl "https://app.files.com/api/rest/v1/ip_addresses/smartfile-reserved.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/ip_addresses/smartfile-reserved.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::IpAddress.get_smartfile_reserved(
      per_page: 1
    )
    
    \Files\Model\IpAddress::getSmartfileReserved(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    IpAddress.getSmartfileReserved(parameters).all()
    
    await IpAddress.getSmartfileReserved({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await IpAddress.GetSmartfileReserved(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.ip_address.get_smartfile_reserved({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    ipaddress.GetSmartfileReserved(context.Background(), files_sdk.IpAddressGetSmartfileReservedParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli ip-addresses get-smartfile-reserved \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "ip_address": "1.1.1.1",
        "server_name": "server-1",
        "ftp_enabled": true,
        "sftp_enabled": true
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-ip-addresses type="array">
      <public-ip-address>
        <ip_address>1.1.1.1</ip_address>
        <server_name>server-1</server_name>
        <ftp_enabled type="boolean">true</ftp_enabled>
        <sftp_enabled type="boolean">true</sftp_enabled>
      </public-ip-address>
    </public-ip-addresses>
    
    

    HTTPS Request

    GET /ip_addresses/smartfile-reserved

    Authentication Required

    No authentication required; you may call this endpoint without a key or session.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    List all possible public ExaVault IP addresses

    Example Request

    curl "https://app.files.com/api/rest/v1/ip_addresses/exavault-reserved.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/ip_addresses/exavault-reserved.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::IpAddress.get_exavault_reserved(
      per_page: 1
    )
    
    \Files\Model\IpAddress::getExavaultReserved(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    IpAddress.getExavaultReserved(parameters).all()
    
    await IpAddress.getExavaultReserved({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await IpAddress.GetExavaultReserved(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.ip_address.get_exavault_reserved({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    ipaddress.GetExavaultReserved(context.Background(), files_sdk.IpAddressGetExavaultReservedParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli ip-addresses get-exavault-reserved \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "ip_address": "1.1.1.1",
        "server_name": "server-1",
        "ftp_enabled": true,
        "sftp_enabled": true
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-ip-addresses type="array">
      <public-ip-address>
        <ip_address>1.1.1.1</ip_address>
        <server_name>server-1</server_name>
        <ftp_enabled type="boolean">true</ftp_enabled>
        <sftp_enabled type="boolean">true</sftp_enabled>
      </public-ip-address>
    </public-ip-addresses>
    
    

    HTTPS Request

    GET /ip_addresses/exavault-reserved

    Authentication Required

    No authentication required; you may call this endpoint without a key or session.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    List all possible public IP addresses

    Example Request

    curl "https://app.files.com/api/rest/v1/ip_addresses/reserved.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/ip_addresses/reserved.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::IpAddress.get_reserved(
      per_page: 1
    )
    
    \Files\Model\IpAddress::getReserved(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    IpAddress.getReserved(parameters).all()
    
    await IpAddress.getReserved({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await IpAddress.GetReserved(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.ip_address.get_reserved({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    ipaddress.GetReserved(context.Background(), files_sdk.IpAddressGetReservedParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli ip-addresses get-reserved \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "ip_address": "1.1.1.1",
        "server_name": "server-1",
        "ftp_enabled": true,
        "sftp_enabled": true
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-ip-addresses type="array">
      <public-ip-address>
        <ip_address>1.1.1.1</ip_address>
        <server_name>server-1</server_name>
        <ftp_enabled type="boolean">true</ftp_enabled>
        <sftp_enabled type="boolean">true</sftp_enabled>
      </public-ip-address>
    </public-ip-addresses>
    
    

    HTTPS Request

    GET /ip_addresses/reserved

    Authentication Required

    No authentication required; you may call this endpoint without a key or session.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Public Keys

    Public keys are used by Users who want to connect via SFTP/SSH. (Note that our SSH support is limited to file operations only, no shell is provided.)

    The PublicKey object

    Example PublicKey Object

    {
      "id": 1,
      "title": "My public key",
      "created_at": "2000-01-01T01:00:00Z",
      "fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
      "fingerprint_sha256": "V5Q5t/ghT3R8Tol5GX9385bzmpygWVRnLuI9EXNrjCX",
      "username": "User",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-key>
      <id type="integer">1</id>
      <title>My public key</title>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <fingerprint>43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8</fingerprint>
      <fingerprint_sha256>V5Q5t/ghT3R8Tol5GX9385bzmpygWVRnLuI9EXNrjCX</fingerprint_sha256>
      <username>User</username>
      <user_id type="integer">1</user_id>
    </public-key>
    
    
    Attribute Description
    id int64 Public key ID
    title string Public key title
    created_at date-time Public key created at date/time
    fingerprint string Public key fingerprint (MD5)
    fingerprint_sha256 string Public key fingerprint (SHA256)
    username string Username of the user this public key is associated with
    user_id int64 User ID this public key is associated with
    public_key string Actual contents of SSH key.

    List Public Keys

    Example Request

    curl "https://app.files.com/api/rest/v1/public_keys.json?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/public_keys.xml?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::PublicKey.list(
      user_id: 1, 
      per_page: 1
    )
    
    \Files\Model\PublicKey::list(array(
      'user_id' => 1, 
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    PublicKey.list(parameters).all()
    
    await PublicKey.list({
      user_id: 1, 
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    
    await PublicKey.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.public_key.list({
      "user_id": 1,
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    publickey.List(context.Background(), files_sdk.PublicKeyListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli public-keys list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "title": "My public key",
        "created_at": "2000-01-01T01:00:00Z",
        "fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
        "fingerprint_sha256": "V5Q5t/ghT3R8Tol5GX9385bzmpygWVRnLuI9EXNrjCX",
        "username": "User",
        "user_id": 1
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-keys type="array">
      <public-key>
        <id type="integer">1</id>
        <title>My public key</title>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <fingerprint>43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8</fingerprint>
        <fingerprint_sha256>V5Q5t/ghT3R8Tol5GX9385bzmpygWVRnLuI9EXNrjCX</fingerprint_sha256>
        <username>User</username>
        <user_id type="integer">1</user_id>
      </public-key>
    </public-keys>
    
    

    HTTPS Request

    GET /public_keys

    Authentication Required

    Not available to user API keys or sessions from users that are marked as Shared/Bot users.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.

    Pagination Params

    Read more about Paginating List Requests.

    Show Public Key

    Example Request

    curl https://app.files.com/api/rest/v1/public_keys/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/public_keys/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::PublicKey.find(id)
    
    \Files\Model\PublicKey::find($id);
    
    
    PublicKey.find(, parameters
    
    await PublicKey.find(id)
    
    
    await PublicKey.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.public_key.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    publickey.Find(context.Background(), files_sdk.PublicKeyFindParams{
      Id: 1,
    })
    
    
    files-cli public-keys find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "title": "My public key",
      "created_at": "2000-01-01T01:00:00Z",
      "fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
      "fingerprint_sha256": "V5Q5t/ghT3R8Tol5GX9385bzmpygWVRnLuI9EXNrjCX",
      "username": "User",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-key>
      <id type="integer">1</id>
      <title>My public key</title>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <fingerprint>43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8</fingerprint>
      <fingerprint_sha256>V5Q5t/ghT3R8Tol5GX9385bzmpygWVRnLuI9EXNrjCX</fingerprint_sha256>
      <username>User</username>
      <user_id type="integer">1</user_id>
    </public-key>
    
    

    HTTPS Request

    GET /public_keys/{id}

    Authentication Required

    Not available to user API keys or sessions from users that are marked as Shared/Bot users.

    Request Parameters

    Parameter Description
    id int64 Required Public Key ID.

    Create Public Key

    Example Request

    curl https://app.files.com/api/rest/v1/public_keys.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"title":"My Main Key","public_key":"public_key"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/public_keys.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<public-key>
           <user_id type="integer">1</user_id>
           <title>My Main Key</title>
           <public_key>public_key</public_key>
         </public-key>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::PublicKey.create(
      user_id: 1, 
      title: "My Main Key", 
      public_key: "public_key"
    )
    
    \Files\Model\PublicKey::create(array(
      'user_id' => 1, 
      'title' => "My Main Key", 
      'public_key' => "public_key"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("title", My Main Key);
    requestParams.put("public_key", public_key);
    PublicKey.create(parameters)
    
    await PublicKey.create({
      user_id: 1, 
      title: "My Main Key", 
      public_key: "public_key",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("title", "My Main Key");
    parameters.Add("public_key", "public_key");
    
    await PublicKey.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.public_key.create({
      "user_id": 1,
      "title": "My Main Key",
      "public_key": "public_key"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    publickey.Create(context.Background(), files_sdk.PublicKeyCreateParams{
      UserId: 1,
      Title: "My Main Key",
      PublicKey: "public_key",
    })
    
    
    files-cli public-keys create \
      --user-id=1 \
      --title="My Main Key" \
      --public-key="public_key" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "title": "My public key",
      "created_at": "2000-01-01T01:00:00Z",
      "fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
      "fingerprint_sha256": "V5Q5t/ghT3R8Tol5GX9385bzmpygWVRnLuI9EXNrjCX",
      "username": "User",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-key>
      <id type="integer">1</id>
      <title>My public key</title>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <fingerprint>43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8</fingerprint>
      <fingerprint_sha256>V5Q5t/ghT3R8Tol5GX9385bzmpygWVRnLuI9EXNrjCX</fingerprint_sha256>
      <username>User</username>
      <user_id type="integer">1</user_id>
    </public-key>
    
    

    HTTPS Request

    POST /public_keys

    Authentication Required

    Not available to user API keys or sessions from users that are marked as Shared/Bot users.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    title string Required Internal reference for key.
    public_key string Required Actual contents of SSH key.

    Update Public Key

    Example Request

    curl https://app.files.com/api/rest/v1/public_keys/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"title":"My Main Key"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/public_keys/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<public-key>
           <title>My Main Key</title>
         </public-key>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    public_key = Files::PublicKey.list.first
    public_key.update(
      title: "My Main Key"
    )
    
    $public_key = \Files\Model\PublicKey::list()[0];
    $public_key->update(array(
      'title' => "My Main Key"
    ));
    
    PublicKey publicKey = PublicKey.list()[0];
    publicKey.setTitle("My Main Key");
    publicKey.update();
    
    const publicKey = (await PublicKey.list())[0]
    await publicKey.update({ 
      title: "My Main Key",
    })
    
    var publicKey = (await PublicKey.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("title", "My Main Key");
    
    await publicKey.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    public_key = files_sdk.public_key.find(id)
    public_key.update({
      "title": "My Main Key"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    publickey.Update(context.Background(), files_sdk.PublicKeyUpdateParams{
      Id: 1,
      Title: "My Main Key",
    })
    
    files-cli public-keys update \
      --id=1 \
      --title="My Main Key" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "title": "My public key",
      "created_at": "2000-01-01T01:00:00Z",
      "fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
      "fingerprint_sha256": "V5Q5t/ghT3R8Tol5GX9385bzmpygWVRnLuI9EXNrjCX",
      "username": "User",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-key>
      <id type="integer">1</id>
      <title>My public key</title>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <fingerprint>43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8</fingerprint>
      <fingerprint_sha256>V5Q5t/ghT3R8Tol5GX9385bzmpygWVRnLuI9EXNrjCX</fingerprint_sha256>
      <username>User</username>
      <user_id type="integer">1</user_id>
    </public-key>
    
    

    HTTPS Request

    PATCH /public_keys/{id}

    Authentication Required

    Not available to user API keys or sessions from users that are marked as Shared/Bot users.

    Request Parameters

    Parameter Description
    id int64 Required Public Key ID.
    title string Required Internal reference for key.

    Delete Public Key

    Example Request

    curl https://app.files.com/api/rest/v1/public_keys/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/public_keys/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    public_key = Files::PublicKey.list.first
    public_key.delete
    
    $public_key = \Files\Model\PublicKey::list()[0];
    $public_key->delete();
    
    PublicKey publicKey = PublicKey.list()[0];
    
    publicKey.delete();
    
    const publicKey = (await PublicKey.list())[0]
    await publicKey.delete()
    
    var publicKey = (await PublicKey.List())[0];
    
    await publicKey.Delete();
    
    files_sdk.set_api_key("my-key")
    
    public_key = files_sdk.public_key.find(id)
    public_key.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    publickey.Delete(context.Background(), files_sdk.PublicKeyDeleteParams{
      Id: 1,
    })
    
    files-cli public-keys delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /public_keys/{id}

    Authentication Required

    Not available to user API keys or sessions from users that are marked as Shared/Bot users.

    Request Parameters

    Parameter Description
    id int64 Required Public Key ID.

    Remote Bandwidth Snapshots

    The RemoteBandwidthSnapshots resource in the REST API allows you to operate on RemoteBandwidthSnapshots.

    The RemoteBandwidthSnapshot object

    Example RemoteBandwidthSnapshot Object

    {
      "id": 1,
      "sync_bytes_received": 1.0,
      "sync_bytes_sent": 1.0,
      "logged_at": "2000-01-01T01:00:00Z",
      "remote_server_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-bandwidth-snapshot>
      <id type="integer">1</id>
      <sync_bytes_received type="float">1.0</sync_bytes_received>
      <sync_bytes_sent type="float">1.0</sync_bytes_sent>
      <logged_at>2000-01-01T01:00:00Z</logged_at>
      <remote_server_id type="integer">1</remote_server_id>
    </remote-bandwidth-snapshot>
    
    
    Attribute Description
    id int64 Site bandwidth ID
    sync_bytes_received double Site sync bandwidth report bytes received
    sync_bytes_sent double Site sync bandwidth report bytes sent
    logged_at date-time Time the site bandwidth report was logged
    remote_server_id int64 ID of related Remote Server

    List Remote Bandwidth Snapshots

    Example Request

    curl "https://app.files.com/api/rest/v1/remote_bandwidth_snapshots.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/remote_bandwidth_snapshots.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::RemoteBandwidthSnapshot.list(
      per_page: 1
    )
    
    \Files\Model\RemoteBandwidthSnapshot::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    RemoteBandwidthSnapshot.list(parameters).all()
    
    await RemoteBandwidthSnapshot.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await RemoteBandwidthSnapshot.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.remote_bandwidth_snapshot.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    remotebandwidthsnapshot.List(context.Background(), files_sdk.RemoteBandwidthSnapshotListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterGt: "",
      FilterGteq: "",
      FilterLt: "",
      FilterLteq: "",
    })
    
    
    files-cli remote-bandwidth-snapshots list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "sync_bytes_received": 1.0,
        "sync_bytes_sent": 1.0,
        "logged_at": "2000-01-01T01:00:00Z",
        "remote_server_id": 1
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-bandwidth-snapshots type="array">
      <remote-bandwidth-snapshot>
        <id type="integer">1</id>
        <sync_bytes_received type="float">1.0</sync_bytes_received>
        <sync_bytes_sent type="float">1.0</sync_bytes_sent>
        <logged_at>2000-01-01T01:00:00Z</logged_at>
        <remote_server_id type="integer">1</remote_server_id>
      </remote-bandwidth-snapshot>
    </remote-bandwidth-snapshots>
    
    

    HTTPS Request

    GET /remote_bandwidth_snapshots

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[logged_at]=desc). Valid fields are logged_at.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are logged_at.
    filter_gt object If set, return records where the specified field is greater than the supplied value. Valid fields are logged_at.
    filter_gteq object If set, return records where the specified field is greater than or equal the supplied value. Valid fields are logged_at.
    filter_lt object If set, return records where the specified field is less than the supplied value. Valid fields are logged_at.
    filter_lteq object If set, return records where the specified field is less than or equal the supplied value. Valid fields are logged_at.

    Remote Servers

    Remote servers are used with the remote_server_sync Behavior.

    Remote Servers can be either an FTP server, SFTP server, S3 bucket, Google Cloud Storage, Wasabi, Backblaze B2 Cloud Storage, Rackspace Cloud Files container, WebDAV, Box, Dropbox, OneDrive, Google Drive, or Azure Blob Storage.

    Not every attribute will apply to every remote server.

    FTP Servers require that you specify their hostname, port, username, password, and a value for ssl. Optionally, provide server_certificate.

    SFTP Servers require that you specify their hostname, port, username, password or private_key, and a value for ssl. Optionally, provide server_certificate, private_key_passphrase.

    S3 Buckets require that you specify their s3_bucket name, and s3_region. Optionally provide a aws_access_key, and aws_secret_key. If you don't provide credentials, you will need to use AWS to grant us access to your bucket.

    S3-Compatible Buckets require that you specify s3_compatible_bucket, s3_compatible_endpoint, s3_compatible_access_key, and s3_compatible_secret_key.

    Google Cloud Storage requires that you specify google_cloud_storage_bucket, google_cloud_storage_project_id, and google_cloud_storage_credentials_json.

    Wasabi requires wasabi_bucket, wasabi_region, wasabi_access_key, and wasabi_secret_key.

    Backblaze B2 Cloud Storage backblaze_b2_bucket, backblaze_b2_s3_endpoint, backblaze_b2_application_key, and backblaze_b2_key_id. (Requires S3 Compatible API) See https://help.backblaze.com/hc/en-us/articles/360047425453

    Rackspace Cloud Files requires rackspace_username, rackspace_api_key, rackspace_region, and rackspace_container.

    WebDAV Servers require that you specify their hostname, username, and password.

    OneDrive follow the auth_setup_link and login with Microsoft.

    Sharepoint follow the auth_setup_link and login with Microsoft.

    Box follow the auth_setup_link and login with Box.

    Dropbox specify if dropbox_teams then follow the auth_setup_link and login with Dropbox.

    Google Drive follow the auth_setup_link and login with Google.

    Azure Blob Storage azure_blob_storage_account, azure_blob_storage_container, azure_blob_storage_access_key, azure_blob_storage_sas_token

    Azure File Storage azure_files_storage_account, azure_files_storage_access_key, azure_files_storage_share_name

    Filebase requires filebase_bucket, filebase_access_key, and filebase_secret_key.

    Cloudflare requires cloudflare_bucket, cloudflare_access_key, cloudflare_secret_key and cloudflare_endpoint.

    Linode requires linode_bucket, linode_access_key, linode_secret_key and linode_region.

    The RemoteServer object

    Example RemoteServer Object

    {
      "id": 1,
      "disabled": true,
      "authentication_method": "password",
      "hostname": "remote-server.com",
      "remote_home_path": "/home/user1",
      "name": "My Remote server",
      "port": 1,
      "max_connections": 1,
      "pin_to_site_region": true,
      "pinned_region": "us-east-1",
      "s3_bucket": "my-bucket",
      "s3_region": "us-east-1",
      "aws_access_key": "example",
      "server_certificate": "require_match",
      "server_host_key": "[public key]",
      "server_type": "s3",
      "ssl": "if_available",
      "username": "user",
      "google_cloud_storage_bucket": "my-bucket",
      "google_cloud_storage_project_id": "my-project",
      "backblaze_b2_s3_endpoint": "s3.us-west-001.backblazeb2.com",
      "backblaze_b2_bucket": "my-bucket",
      "wasabi_bucket": "my-bucket",
      "wasabi_region": "us-west-1",
      "wasabi_access_key": "example",
      "rackspace_username": "rackspaceuser",
      "rackspace_region": "dfw",
      "rackspace_container": "my-container",
      "auth_setup_link": "auth/:provider",
      "auth_status": "in_setup",
      "auth_account_name": "me@example.com",
      "one_drive_account_type": "personal",
      "azure_blob_storage_account": "storage-account-name",
      "azure_blob_storage_sas_token": "storage-sas-token",
      "azure_blob_storage_container": "container-name",
      "azure_blob_storage_hierarchical_namespace": true,
      "azure_files_storage_account": "storage-account-name",
      "azure_files_storage_sas_token": "storage-sas-token",
      "azure_files_storage_share_name": "share-name",
      "s3_compatible_bucket": "my-bucket",
      "s3_compatible_endpoint": "mys3platform.com",
      "s3_compatible_region": "us-east-1",
      "s3_compatible_access_key": "example",
      "enable_dedicated_ips": true,
      "files_agent_permission_set": "read_write",
      "files_agent_root": "example",
      "files_agent_api_token": "example",
      "files_agent_version": "example",
      "filebase_bucket": "my-bucket",
      "filebase_access_key": "example",
      "cloudflare_bucket": "my-bucket",
      "cloudflare_access_key": "example",
      "cloudflare_endpoint": "https://<ACCOUNT_ID>.r2.cloudflarestorage.com",
      "dropbox_teams": true,
      "linode_bucket": "my-bucket",
      "linode_access_key": "example",
      "linode_region": "us-east-1"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-server>
      <id type="integer">1</id>
      <disabled type="boolean">true</disabled>
      <authentication_method>password</authentication_method>
      <hostname>remote-server.com</hostname>
      <remote_home_path>/home/user1</remote_home_path>
      <name>My Remote server</name>
      <port type="integer">1</port>
      <max_connections type="integer">1</max_connections>
      <pin_to_site_region type="boolean">true</pin_to_site_region>
      <pinned_region>us-east-1</pinned_region>
      <s3_bucket>my-bucket</s3_bucket>
      <s3_region>us-east-1</s3_region>
      <aws_access_key>example</aws_access_key>
      <server_certificate>require_match</server_certificate>
      <server_host_key>[public key]</server_host_key>
      <server_type>s3</server_type>
      <ssl>if_available</ssl>
      <username>user</username>
      <google_cloud_storage_bucket>my-bucket</google_cloud_storage_bucket>
      <google_cloud_storage_project_id>my-project</google_cloud_storage_project_id>
      <backblaze_b2_s3_endpoint>s3.us-west-001.backblazeb2.com</backblaze_b2_s3_endpoint>
      <backblaze_b2_bucket>my-bucket</backblaze_b2_bucket>
      <wasabi_bucket>my-bucket</wasabi_bucket>
      <wasabi_region>us-west-1</wasabi_region>
      <wasabi_access_key>example</wasabi_access_key>
      <rackspace_username>rackspaceuser</rackspace_username>
      <rackspace_region>dfw</rackspace_region>
      <rackspace_container>my-container</rackspace_container>
      <auth_setup_link>auth/:provider</auth_setup_link>
      <auth_status>in_setup</auth_status>
      <auth_account_name>me@example.com</auth_account_name>
      <one_drive_account_type>personal</one_drive_account_type>
      <azure_blob_storage_account>storage-account-name</azure_blob_storage_account>
      <azure_blob_storage_sas_token>storage-sas-token</azure_blob_storage_sas_token>
      <azure_blob_storage_container>container-name</azure_blob_storage_container>
      <azure_blob_storage_hierarchical_namespace type="boolean">true</azure_blob_storage_hierarchical_namespace>
      <azure_files_storage_account>storage-account-name</azure_files_storage_account>
      <azure_files_storage_sas_token>storage-sas-token</azure_files_storage_sas_token>
      <azure_files_storage_share_name>share-name</azure_files_storage_share_name>
      <s3_compatible_bucket>my-bucket</s3_compatible_bucket>
      <s3_compatible_endpoint>mys3platform.com</s3_compatible_endpoint>
      <s3_compatible_region>us-east-1</s3_compatible_region>
      <s3_compatible_access_key>example</s3_compatible_access_key>
      <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
      <files_agent_permission_set>read_write</files_agent_permission_set>
      <files_agent_root>example</files_agent_root>
      <files_agent_api_token>example</files_agent_api_token>
      <files_agent_version>example</files_agent_version>
      <filebase_bucket>my-bucket</filebase_bucket>
      <filebase_access_key>example</filebase_access_key>
      <cloudflare_bucket>my-bucket</cloudflare_bucket>
      <cloudflare_access_key>example</cloudflare_access_key>
      <cloudflare_endpoint>https://&lt;ACCOUNT_ID&gt;.r2.cloudflarestorage.com</cloudflare_endpoint>
      <dropbox_teams type="boolean">true</dropbox_teams>
      <linode_bucket>my-bucket</linode_bucket>
      <linode_access_key>example</linode_access_key>
      <linode_region>us-east-1</linode_region>
    </remote-server>
    
    
    Attribute Description
    id int64 Remote server ID
    disabled boolean If true, this server has been disabled due to failures. Make any change or set disabled to false to clear this flag.
    authentication_method string Type of authentication method
    hostname string Hostname or IP address
    remote_home_path string Initial home folder on remote server
    name string Internal name for your reference
    port int64 Port for remote server. Not needed for S3.
    max_connections int64 Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
    pin_to_site_region boolean If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a sitewide setting which will force it to true.
    pinned_region string If set, all communciations with this remote server are made through the provided region.
    s3_bucket string S3 bucket name
    s3_region string S3 region
    aws_access_key string AWS Access Key.
    server_certificate string Remote server certificate
    Possible values: require_match, allow_any
    server_host_key string Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
    server_type string Remote server type.
    Possible values: ftp, sftp, s3, google_cloud_storage, webdav, wasabi, backblaze_b2, one_drive, rackspace, box, dropbox, google_drive, azure, sharepoint, s3_compatible, azure_files, files_agent, filebase, cloudflare, linode
    ssl string Should we require SSL?
    Possible values: if_available, require, require_implicit, never
    username string Remote server username. Not needed for S3 buckets.
    google_cloud_storage_bucket string Google Cloud Storage bucket name
    google_cloud_storage_project_id string Google Cloud Project ID
    backblaze_b2_s3_endpoint string Backblaze B2 Cloud Storage S3 Endpoint
    backblaze_b2_bucket string Backblaze B2 Cloud Storage Bucket name
    wasabi_bucket string Wasabi Bucket name
    wasabi_region string Wasabi region
    wasabi_access_key string Wasabi access key.
    rackspace_username string Rackspace username used to login to the Rackspace Cloud Control Panel.
    rackspace_region string Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
    rackspace_container string The name of the container (top level directory) where files will sync.
    auth_setup_link string Returns link to login with an Oauth provider
    auth_status string Either in_setup or complete
    Possible values: not_applicable, in_setup, complete, reauthenticate
    auth_account_name string Describes the authorized account
    one_drive_account_type string Either personal or business_other account types
    Possible values: personal, business_other
    azure_blob_storage_account string Azure Blob Storage Account name
    azure_blob_storage_sas_token string Shared Access Signature (SAS) token
    azure_blob_storage_container string Azure Blob Storage Container name
    azure_blob_storage_hierarchical_namespace boolean Enable when storage account has hierarchical namespace feature enabled
    azure_files_storage_account string Azure File Storage Account name
    azure_files_storage_sas_token string Shared Access Signature (SAS) token
    azure_files_storage_share_name string Azure File Storage Share name
    s3_compatible_bucket string S3-compatible Bucket name
    s3_compatible_endpoint string S3-compatible endpoint
    s3_compatible_region string S3-compatible endpoint
    s3_compatible_access_key string S3-compatible Access Key.
    enable_dedicated_ips boolean true if remote server only accepts connections from dedicated IPs
    files_agent_permission_set string Local permissions for files agent. read_only, write_only, or read_write
    Possible values: read_write, read_only, write_only
    files_agent_root string Agent local root path
    files_agent_api_token string Files Agent API Token
    files_agent_version string Files Agent version
    filebase_bucket string Filebase Bucket name
    filebase_access_key string Filebase Access Key.
    cloudflare_bucket string Cloudflare Bucket name
    cloudflare_access_key string Cloudflare Access Key.
    cloudflare_endpoint string Cloudflare endpoint
    dropbox_teams boolean List Team folders in root
    linode_bucket string Linode Bucket name
    linode_access_key string Linode Access Key.
    linode_region string Linode region
    aws_secret_key string AWS secret key.
    password string Password if needed.
    private_key string Private key if needed.
    private_key_passphrase string Passphrase for private key if needed.
    ssl_certificate string SSL client certificate.
    google_cloud_storage_credentials_json string A JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
    wasabi_secret_key string Wasabi secret key.
    backblaze_b2_key_id string Backblaze B2 Cloud Storage keyID.
    backblaze_b2_application_key string Backblaze B2 Cloud Storage applicationKey.
    rackspace_api_key string Rackspace API key from the Rackspace Cloud Control Panel.
    reset_authentication boolean Reset authenticated account
    azure_blob_storage_access_key string Azure Blob Storage secret key.
    azure_files_storage_access_key string Azure File Storage access key.
    s3_compatible_secret_key string S3-compatible secret key
    filebase_secret_key string Filebase secret key
    cloudflare_secret_key string Cloudflare secret key
    linode_secret_key string Linode secret key

    List Remote Servers

    Example Request

    curl "https://app.files.com/api/rest/v1/remote_servers.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/remote_servers.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::RemoteServer.list(
      per_page: 1
    )
    
    \Files\Model\RemoteServer::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    RemoteServer.list(parameters).all()
    
    await RemoteServer.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await RemoteServer.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.remote_server.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    remoteserver.List(context.Background(), files_sdk.RemoteServerListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli remote-servers list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "disabled": true,
        "authentication_method": "password",
        "hostname": "remote-server.com",
        "remote_home_path": "/home/user1",
        "name": "My Remote server",
        "port": 1,
        "max_connections": 1,
        "pin_to_site_region": true,
        "pinned_region": "us-east-1",
        "s3_bucket": "my-bucket",
        "s3_region": "us-east-1",
        "aws_access_key": "example",
        "server_certificate": "require_match",
        "server_host_key": "[public key]",
        "server_type": "s3",
        "ssl": "if_available",
        "username": "user",
        "google_cloud_storage_bucket": "my-bucket",
        "google_cloud_storage_project_id": "my-project",
        "backblaze_b2_s3_endpoint": "s3.us-west-001.backblazeb2.com",
        "backblaze_b2_bucket": "my-bucket",
        "wasabi_bucket": "my-bucket",
        "wasabi_region": "us-west-1",
        "wasabi_access_key": "example",
        "rackspace_username": "rackspaceuser",
        "rackspace_region": "dfw",
        "rackspace_container": "my-container",
        "auth_setup_link": "auth/:provider",
        "auth_status": "in_setup",
        "auth_account_name": "me@example.com",
        "one_drive_account_type": "personal",
        "azure_blob_storage_account": "storage-account-name",
        "azure_blob_storage_sas_token": "storage-sas-token",
        "azure_blob_storage_container": "container-name",
        "azure_blob_storage_hierarchical_namespace": true,
        "azure_files_storage_account": "storage-account-name",
        "azure_files_storage_sas_token": "storage-sas-token",
        "azure_files_storage_share_name": "share-name",
        "s3_compatible_bucket": "my-bucket",
        "s3_compatible_endpoint": "mys3platform.com",
        "s3_compatible_region": "us-east-1",
        "s3_compatible_access_key": "example",
        "enable_dedicated_ips": true,
        "files_agent_permission_set": "read_write",
        "files_agent_root": "example",
        "files_agent_api_token": "example",
        "files_agent_version": "example",
        "filebase_bucket": "my-bucket",
        "filebase_access_key": "example",
        "cloudflare_bucket": "my-bucket",
        "cloudflare_access_key": "example",
        "cloudflare_endpoint": "https://<ACCOUNT_ID>.r2.cloudflarestorage.com",
        "dropbox_teams": true,
        "linode_bucket": "my-bucket",
        "linode_access_key": "example",
        "linode_region": "us-east-1"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-servers type="array">
      <remote-server>
        <id type="integer">1</id>
        <disabled type="boolean">true</disabled>
        <authentication_method>password</authentication_method>
        <hostname>remote-server.com</hostname>
        <remote_home_path>/home/user1</remote_home_path>
        <name>My Remote server</name>
        <port type="integer">1</port>
        <max_connections type="integer">1</max_connections>
        <pin_to_site_region type="boolean">true</pin_to_site_region>
        <pinned_region>us-east-1</pinned_region>
        <s3_bucket>my-bucket</s3_bucket>
        <s3_region>us-east-1</s3_region>
        <aws_access_key>example</aws_access_key>
        <server_certificate>require_match</server_certificate>
        <server_host_key>[public key]</server_host_key>
        <server_type>s3</server_type>
        <ssl>if_available</ssl>
        <username>user</username>
        <google_cloud_storage_bucket>my-bucket</google_cloud_storage_bucket>
        <google_cloud_storage_project_id>my-project</google_cloud_storage_project_id>
        <backblaze_b2_s3_endpoint>s3.us-west-001.backblazeb2.com</backblaze_b2_s3_endpoint>
        <backblaze_b2_bucket>my-bucket</backblaze_b2_bucket>
        <wasabi_bucket>my-bucket</wasabi_bucket>
        <wasabi_region>us-west-1</wasabi_region>
        <wasabi_access_key>example</wasabi_access_key>
        <rackspace_username>rackspaceuser</rackspace_username>
        <rackspace_region>dfw</rackspace_region>
        <rackspace_container>my-container</rackspace_container>
        <auth_setup_link>auth/:provider</auth_setup_link>
        <auth_status>in_setup</auth_status>
        <auth_account_name>me@example.com</auth_account_name>
        <one_drive_account_type>personal</one_drive_account_type>
        <azure_blob_storage_account>storage-account-name</azure_blob_storage_account>
        <azure_blob_storage_sas_token>storage-sas-token</azure_blob_storage_sas_token>
        <azure_blob_storage_container>container-name</azure_blob_storage_container>
        <azure_blob_storage_hierarchical_namespace type="boolean">true</azure_blob_storage_hierarchical_namespace>
        <azure_files_storage_account>storage-account-name</azure_files_storage_account>
        <azure_files_storage_sas_token>storage-sas-token</azure_files_storage_sas_token>
        <azure_files_storage_share_name>share-name</azure_files_storage_share_name>
        <s3_compatible_bucket>my-bucket</s3_compatible_bucket>
        <s3_compatible_endpoint>mys3platform.com</s3_compatible_endpoint>
        <s3_compatible_region>us-east-1</s3_compatible_region>
        <s3_compatible_access_key>example</s3_compatible_access_key>
        <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
        <files_agent_permission_set>read_write</files_agent_permission_set>
        <files_agent_root>example</files_agent_root>
        <files_agent_api_token>example</files_agent_api_token>
        <files_agent_version>example</files_agent_version>
        <filebase_bucket>my-bucket</filebase_bucket>
        <filebase_access_key>example</filebase_access_key>
        <cloudflare_bucket>my-bucket</cloudflare_bucket>
        <cloudflare_access_key>example</cloudflare_access_key>
        <cloudflare_endpoint>https://&lt;ACCOUNT_ID&gt;.r2.cloudflarestorage.com</cloudflare_endpoint>
        <dropbox_teams type="boolean">true</dropbox_teams>
        <linode_bucket>my-bucket</linode_bucket>
        <linode_access_key>example</linode_access_key>
        <linode_region>us-east-1</linode_region>
      </remote-server>
    </remote-servers>
    
    

    HTTPS Request

    GET /remote_servers

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Show Remote Server

    Example Request

    curl https://app.files.com/api/rest/v1/remote_servers/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/remote_servers/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::RemoteServer.find(id)
    
    \Files\Model\RemoteServer::find($id);
    
    
    RemoteServer.find(, parameters
    
    await RemoteServer.find(id)
    
    
    await RemoteServer.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.remote_server.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    remoteserver.Find(context.Background(), files_sdk.RemoteServerFindParams{
      Id: 1,
    })
    
    
    files-cli remote-servers find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "disabled": true,
      "authentication_method": "password",
      "hostname": "remote-server.com",
      "remote_home_path": "/home/user1",
      "name": "My Remote server",
      "port": 1,
      "max_connections": 1,
      "pin_to_site_region": true,
      "pinned_region": "us-east-1",
      "s3_bucket": "my-bucket",
      "s3_region": "us-east-1",
      "aws_access_key": "example",
      "server_certificate": "require_match",
      "server_host_key": "[public key]",
      "server_type": "s3",
      "ssl": "if_available",
      "username": "user",
      "google_cloud_storage_bucket": "my-bucket",
      "google_cloud_storage_project_id": "my-project",
      "backblaze_b2_s3_endpoint": "s3.us-west-001.backblazeb2.com",
      "backblaze_b2_bucket": "my-bucket",
      "wasabi_bucket": "my-bucket",
      "wasabi_region": "us-west-1",
      "wasabi_access_key": "example",
      "rackspace_username": "rackspaceuser",
      "rackspace_region": "dfw",
      "rackspace_container": "my-container",
      "auth_setup_link": "auth/:provider",
      "auth_status": "in_setup",
      "auth_account_name": "me@example.com",
      "one_drive_account_type": "personal",
      "azure_blob_storage_account": "storage-account-name",
      "azure_blob_storage_sas_token": "storage-sas-token",
      "azure_blob_storage_container": "container-name",
      "azure_blob_storage_hierarchical_namespace": true,
      "azure_files_storage_account": "storage-account-name",
      "azure_files_storage_sas_token": "storage-sas-token",
      "azure_files_storage_share_name": "share-name",
      "s3_compatible_bucket": "my-bucket",
      "s3_compatible_endpoint": "mys3platform.com",
      "s3_compatible_region": "us-east-1",
      "s3_compatible_access_key": "example",
      "enable_dedicated_ips": true,
      "files_agent_permission_set": "read_write",
      "files_agent_root": "example",
      "files_agent_api_token": "example",
      "files_agent_version": "example",
      "filebase_bucket": "my-bucket",
      "filebase_access_key": "example",
      "cloudflare_bucket": "my-bucket",
      "cloudflare_access_key": "example",
      "cloudflare_endpoint": "https://<ACCOUNT_ID>.r2.cloudflarestorage.com",
      "dropbox_teams": true,
      "linode_bucket": "my-bucket",
      "linode_access_key": "example",
      "linode_region": "us-east-1"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-server>
      <id type="integer">1</id>
      <disabled type="boolean">true</disabled>
      <authentication_method>password</authentication_method>
      <hostname>remote-server.com</hostname>
      <remote_home_path>/home/user1</remote_home_path>
      <name>My Remote server</name>
      <port type="integer">1</port>
      <max_connections type="integer">1</max_connections>
      <pin_to_site_region type="boolean">true</pin_to_site_region>
      <pinned_region>us-east-1</pinned_region>
      <s3_bucket>my-bucket</s3_bucket>
      <s3_region>us-east-1</s3_region>
      <aws_access_key>example</aws_access_key>
      <server_certificate>require_match</server_certificate>
      <server_host_key>[public key]</server_host_key>
      <server_type>s3</server_type>
      <ssl>if_available</ssl>
      <username>user</username>
      <google_cloud_storage_bucket>my-bucket</google_cloud_storage_bucket>
      <google_cloud_storage_project_id>my-project</google_cloud_storage_project_id>
      <backblaze_b2_s3_endpoint>s3.us-west-001.backblazeb2.com</backblaze_b2_s3_endpoint>
      <backblaze_b2_bucket>my-bucket</backblaze_b2_bucket>
      <wasabi_bucket>my-bucket</wasabi_bucket>
      <wasabi_region>us-west-1</wasabi_region>
      <wasabi_access_key>example</wasabi_access_key>
      <rackspace_username>rackspaceuser</rackspace_username>
      <rackspace_region>dfw</rackspace_region>
      <rackspace_container>my-container</rackspace_container>
      <auth_setup_link>auth/:provider</auth_setup_link>
      <auth_status>in_setup</auth_status>
      <auth_account_name>me@example.com</auth_account_name>
      <one_drive_account_type>personal</one_drive_account_type>
      <azure_blob_storage_account>storage-account-name</azure_blob_storage_account>
      <azure_blob_storage_sas_token>storage-sas-token</azure_blob_storage_sas_token>
      <azure_blob_storage_container>container-name</azure_blob_storage_container>
      <azure_blob_storage_hierarchical_namespace type="boolean">true</azure_blob_storage_hierarchical_namespace>
      <azure_files_storage_account>storage-account-name</azure_files_storage_account>
      <azure_files_storage_sas_token>storage-sas-token</azure_files_storage_sas_token>
      <azure_files_storage_share_name>share-name</azure_files_storage_share_name>
      <s3_compatible_bucket>my-bucket</s3_compatible_bucket>
      <s3_compatible_endpoint>mys3platform.com</s3_compatible_endpoint>
      <s3_compatible_region>us-east-1</s3_compatible_region>
      <s3_compatible_access_key>example</s3_compatible_access_key>
      <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
      <files_agent_permission_set>read_write</files_agent_permission_set>
      <files_agent_root>example</files_agent_root>
      <files_agent_api_token>example</files_agent_api_token>
      <files_agent_version>example</files_agent_version>
      <filebase_bucket>my-bucket</filebase_bucket>
      <filebase_access_key>example</filebase_access_key>
      <cloudflare_bucket>my-bucket</cloudflare_bucket>
      <cloudflare_access_key>example</cloudflare_access_key>
      <cloudflare_endpoint>https://&lt;ACCOUNT_ID&gt;.r2.cloudflarestorage.com</cloudflare_endpoint>
      <dropbox_teams type="boolean">true</dropbox_teams>
      <linode_bucket>my-bucket</linode_bucket>
      <linode_access_key>example</linode_access_key>
      <linode_region>us-east-1</linode_region>
    </remote-server>
    
    

    HTTPS Request

    GET /remote_servers/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Remote Server ID.

    Create Remote Server

    Example Request

    curl https://app.files.com/api/rest/v1/remote_servers.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"aws_access_key":"example","wasabi_access_key":"example","reset_authentication":true,"hostname":"remote-server.com","name":"My Remote server","max_connections":1,"pin_to_site_region":true,"port":1,"s3_bucket":"my-bucket","s3_region":"us-east-1","server_certificate":"require_match","server_host_key":"[public key]","server_type":"s3","ssl":"if_available","username":"user","google_cloud_storage_bucket":"my-bucket","google_cloud_storage_project_id":"my-project","backblaze_b2_bucket":"my-bucket","backblaze_b2_s3_endpoint":"s3.us-west-001.backblazeb2.com","wasabi_bucket":"my-bucket","wasabi_region":"us-west-1","rackspace_username":"rackspaceuser","rackspace_region":"dfw","rackspace_container":"my-container","one_drive_account_type":"personal","azure_blob_storage_account":"storage-account-name","azure_blob_storage_container":"container-name","azure_blob_storage_hierarchical_namespace":true,"azure_blob_storage_sas_token":"storage-sas-token","azure_files_storage_account":"storage-account-name","azure_files_storage_share_name":"share-name","azure_files_storage_sas_token":"storage-sas-token","s3_compatible_bucket":"my-bucket","s3_compatible_endpoint":"mys3platform.com","s3_compatible_region":"us-east-1","enable_dedicated_ips":true,"s3_compatible_access_key":"example","files_agent_root":"example","files_agent_permission_set":"read_write","files_agent_version":"example","filebase_access_key":"example","filebase_bucket":"my-bucket","cloudflare_access_key":"example","cloudflare_bucket":"my-bucket","cloudflare_endpoint":"https://<ACCOUNT_ID>.r2.cloudflarestorage.com","dropbox_teams":true,"linode_access_key":"example","linode_bucket":"my-bucket","linode_region":"us-east-1"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/remote_servers.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<remote-server>
           <aws_access_key>example</aws_access_key>
           <wasabi_access_key>example</wasabi_access_key>
           <reset_authentication type="boolean">true</reset_authentication>
           <hostname>remote-server.com</hostname>
           <name>My Remote server</name>
           <max_connections type="integer">1</max_connections>
           <pin_to_site_region type="boolean">true</pin_to_site_region>
           <port type="integer">1</port>
           <s3_bucket>my-bucket</s3_bucket>
           <s3_region>us-east-1</s3_region>
           <server_certificate>require_match</server_certificate>
           <server_host_key>[public key]</server_host_key>
           <server_type>s3</server_type>
           <ssl>if_available</ssl>
           <username>user</username>
           <google_cloud_storage_bucket>my-bucket</google_cloud_storage_bucket>
           <google_cloud_storage_project_id>my-project</google_cloud_storage_project_id>
           <backblaze_b2_bucket>my-bucket</backblaze_b2_bucket>
           <backblaze_b2_s3_endpoint>s3.us-west-001.backblazeb2.com</backblaze_b2_s3_endpoint>
           <wasabi_bucket>my-bucket</wasabi_bucket>
           <wasabi_region>us-west-1</wasabi_region>
           <rackspace_username>rackspaceuser</rackspace_username>
           <rackspace_region>dfw</rackspace_region>
           <rackspace_container>my-container</rackspace_container>
           <one_drive_account_type>personal</one_drive_account_type>
           <azure_blob_storage_account>storage-account-name</azure_blob_storage_account>
           <azure_blob_storage_container>container-name</azure_blob_storage_container>
           <azure_blob_storage_hierarchical_namespace type="boolean">true</azure_blob_storage_hierarchical_namespace>
           <azure_blob_storage_sas_token>storage-sas-token</azure_blob_storage_sas_token>
           <azure_files_storage_account>storage-account-name</azure_files_storage_account>
           <azure_files_storage_share_name>share-name</azure_files_storage_share_name>
           <azure_files_storage_sas_token>storage-sas-token</azure_files_storage_sas_token>
           <s3_compatible_bucket>my-bucket</s3_compatible_bucket>
           <s3_compatible_endpoint>mys3platform.com</s3_compatible_endpoint>
           <s3_compatible_region>us-east-1</s3_compatible_region>
           <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
           <s3_compatible_access_key>example</s3_compatible_access_key>
           <files_agent_root>example</files_agent_root>
           <files_agent_permission_set>read_write</files_agent_permission_set>
           <files_agent_version>example</files_agent_version>
           <filebase_access_key>example</filebase_access_key>
           <filebase_bucket>my-bucket</filebase_bucket>
           <cloudflare_access_key>example</cloudflare_access_key>
           <cloudflare_bucket>my-bucket</cloudflare_bucket>
           <cloudflare_endpoint>https://&lt;ACCOUNT_ID&gt;.r2.cloudflarestorage.com</cloudflare_endpoint>
           <dropbox_teams type="boolean">true</dropbox_teams>
           <linode_access_key>example</linode_access_key>
           <linode_bucket>my-bucket</linode_bucket>
           <linode_region>us-east-1</linode_region>
         </remote-server>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::RemoteServer.create(
      aws_access_key: "example", 
      wasabi_access_key: "example", 
      reset_authentication: true, 
      hostname: "remote-server.com", 
      name: "My Remote server", 
      max_connections: 1, 
      pin_to_site_region: true, 
      port: 1, 
      s3_bucket: "my-bucket", 
      s3_region: "us-east-1", 
      server_certificate: "require_match", 
      server_host_key: "[public key]", 
      server_type: "s3", 
      ssl: "if_available", 
      username: "user", 
      google_cloud_storage_bucket: "my-bucket", 
      google_cloud_storage_project_id: "my-project", 
      backblaze_b2_bucket: "my-bucket", 
      backblaze_b2_s3_endpoint: "s3.us-west-001.backblazeb2.com", 
      wasabi_bucket: "my-bucket", 
      wasabi_region: "us-west-1", 
      rackspace_username: "rackspaceuser", 
      rackspace_region: "dfw", 
      rackspace_container: "my-container", 
      one_drive_account_type: "personal", 
      azure_blob_storage_account: "storage-account-name", 
      azure_blob_storage_container: "container-name", 
      azure_blob_storage_hierarchical_namespace: true, 
      azure_blob_storage_sas_token: "storage-sas-token", 
      azure_files_storage_account: "storage-account-name", 
      azure_files_storage_share_name: "share-name", 
      azure_files_storage_sas_token: "storage-sas-token", 
      s3_compatible_bucket: "my-bucket", 
      s3_compatible_endpoint: "mys3platform.com", 
      s3_compatible_region: "us-east-1", 
      enable_dedicated_ips: true, 
      s3_compatible_access_key: "example", 
      files_agent_root: "example", 
      files_agent_permission_set: "read_write", 
      files_agent_version: "example", 
      filebase_access_key: "example", 
      filebase_bucket: "my-bucket", 
      cloudflare_access_key: "example", 
      cloudflare_bucket: "my-bucket", 
      cloudflare_endpoint: "https://<ACCOUNT_ID>.r2.cloudflarestorage.com", 
      dropbox_teams: true, 
      linode_access_key: "example", 
      linode_bucket: "my-bucket", 
      linode_region: "us-east-1"
    )
    
    \Files\Model\RemoteServer::create(array(
      'aws_access_key' => "example", 
      'wasabi_access_key' => "example", 
      'reset_authentication' => true, 
      'hostname' => "remote-server.com", 
      'name' => "My Remote server", 
      'max_connections' => 1, 
      'pin_to_site_region' => true, 
      'port' => 1, 
      's3_bucket' => "my-bucket", 
      's3_region' => "us-east-1", 
      'server_certificate' => "require_match", 
      'server_host_key' => "[public key]", 
      'server_type' => "s3", 
      'ssl' => "if_available", 
      'username' => "user", 
      'google_cloud_storage_bucket' => "my-bucket", 
      'google_cloud_storage_project_id' => "my-project", 
      'backblaze_b2_bucket' => "my-bucket", 
      'backblaze_b2_s3_endpoint' => "s3.us-west-001.backblazeb2.com", 
      'wasabi_bucket' => "my-bucket", 
      'wasabi_region' => "us-west-1", 
      'rackspace_username' => "rackspaceuser", 
      'rackspace_region' => "dfw", 
      'rackspace_container' => "my-container", 
      'one_drive_account_type' => "personal", 
      'azure_blob_storage_account' => "storage-account-name", 
      'azure_blob_storage_container' => "container-name", 
      'azure_blob_storage_hierarchical_namespace' => true, 
      'azure_blob_storage_sas_token' => "storage-sas-token", 
      'azure_files_storage_account' => "storage-account-name", 
      'azure_files_storage_share_name' => "share-name", 
      'azure_files_storage_sas_token' => "storage-sas-token", 
      's3_compatible_bucket' => "my-bucket", 
      's3_compatible_endpoint' => "mys3platform.com", 
      's3_compatible_region' => "us-east-1", 
      'enable_dedicated_ips' => true, 
      's3_compatible_access_key' => "example", 
      'files_agent_root' => "example", 
      'files_agent_permission_set' => "read_write", 
      'files_agent_version' => "example", 
      'filebase_access_key' => "example", 
      'filebase_bucket' => "my-bucket", 
      'cloudflare_access_key' => "example", 
      'cloudflare_bucket' => "my-bucket", 
      'cloudflare_endpoint' => "https://<ACCOUNT_ID>.r2.cloudflarestorage.com", 
      'dropbox_teams' => true, 
      'linode_access_key' => "example", 
      'linode_bucket' => "my-bucket", 
      'linode_region' => "us-east-1"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("aws_access_key", example);
    requestParams.put("wasabi_access_key", example);
    requestParams.put("reset_authentication", true);
    requestParams.put("hostname", remote-server.com);
    requestParams.put("name", My Remote server);
    requestParams.put("max_connections", 1);
    requestParams.put("pin_to_site_region", true);
    requestParams.put("port", 1);
    requestParams.put("s3_bucket", my-bucket);
    requestParams.put("s3_region", us-east-1);
    requestParams.put("server_certificate", require_match);
    requestParams.put("server_host_key", [public key]);
    requestParams.put("server_type", s3);
    requestParams.put("ssl", if_available);
    requestParams.put("username", user);
    requestParams.put("google_cloud_storage_bucket", my-bucket);
    requestParams.put("google_cloud_storage_project_id", my-project);
    requestParams.put("backblaze_b2_bucket", my-bucket);
    requestParams.put("backblaze_b2_s3_endpoint", s3.us-west-001.backblazeb2.com);
    requestParams.put("wasabi_bucket", my-bucket);
    requestParams.put("wasabi_region", us-west-1);
    requestParams.put("rackspace_username", rackspaceuser);
    requestParams.put("rackspace_region", dfw);
    requestParams.put("rackspace_container", my-container);
    requestParams.put("one_drive_account_type", personal);
    requestParams.put("azure_blob_storage_account", storage-account-name);
    requestParams.put("azure_blob_storage_container", container-name);
    requestParams.put("azure_blob_storage_hierarchical_namespace", true);
    requestParams.put("azure_blob_storage_sas_token", storage-sas-token);
    requestParams.put("azure_files_storage_account", storage-account-name);
    requestParams.put("azure_files_storage_share_name", share-name);
    requestParams.put("azure_files_storage_sas_token", storage-sas-token);
    requestParams.put("s3_compatible_bucket", my-bucket);
    requestParams.put("s3_compatible_endpoint", mys3platform.com);
    requestParams.put("s3_compatible_region", us-east-1);
    requestParams.put("enable_dedicated_ips", true);
    requestParams.put("s3_compatible_access_key", example);
    requestParams.put("files_agent_root", example);
    requestParams.put("files_agent_permission_set", read_write);
    requestParams.put("files_agent_version", example);
    requestParams.put("filebase_access_key", example);
    requestParams.put("filebase_bucket", my-bucket);
    requestParams.put("cloudflare_access_key", example);
    requestParams.put("cloudflare_bucket", my-bucket);
    requestParams.put("cloudflare_endpoint", https://<ACCOUNT_ID>.r2.cloudflarestorage.com);
    requestParams.put("dropbox_teams", true);
    requestParams.put("linode_access_key", example);
    requestParams.put("linode_bucket", my-bucket);
    requestParams.put("linode_region", us-east-1);
    RemoteServer.create(parameters)
    
    await RemoteServer.create({
      aws_access_key: "example", 
      wasabi_access_key: "example", 
      reset_authentication: true, 
      hostname: "remote-server.com", 
      name: "My Remote server", 
      max_connections: 1, 
      pin_to_site_region: true, 
      port: 1, 
      s3_bucket: "my-bucket", 
      s3_region: "us-east-1", 
      server_certificate: "require_match", 
      server_host_key: "[public key]", 
      server_type: "s3", 
      ssl: "if_available", 
      username: "user", 
      google_cloud_storage_bucket: "my-bucket", 
      google_cloud_storage_project_id: "my-project", 
      backblaze_b2_bucket: "my-bucket", 
      backblaze_b2_s3_endpoint: "s3.us-west-001.backblazeb2.com", 
      wasabi_bucket: "my-bucket", 
      wasabi_region: "us-west-1", 
      rackspace_username: "rackspaceuser", 
      rackspace_region: "dfw", 
      rackspace_container: "my-container", 
      one_drive_account_type: "personal", 
      azure_blob_storage_account: "storage-account-name", 
      azure_blob_storage_container: "container-name", 
      azure_blob_storage_hierarchical_namespace: true, 
      azure_blob_storage_sas_token: "storage-sas-token", 
      azure_files_storage_account: "storage-account-name", 
      azure_files_storage_share_name: "share-name", 
      azure_files_storage_sas_token: "storage-sas-token", 
      s3_compatible_bucket: "my-bucket", 
      s3_compatible_endpoint: "mys3platform.com", 
      s3_compatible_region: "us-east-1", 
      enable_dedicated_ips: true, 
      s3_compatible_access_key: "example", 
      files_agent_root: "example", 
      files_agent_permission_set: "read_write", 
      files_agent_version: "example", 
      filebase_access_key: "example", 
      filebase_bucket: "my-bucket", 
      cloudflare_access_key: "example", 
      cloudflare_bucket: "my-bucket", 
      cloudflare_endpoint: "https://<ACCOUNT_ID>.r2.cloudflarestorage.com", 
      dropbox_teams: true, 
      linode_access_key: "example", 
      linode_bucket: "my-bucket", 
      linode_region: "us-east-1",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("aws_access_key", "example");
    parameters.Add("wasabi_access_key", "example");
    parameters.Add("reset_authentication", true);
    parameters.Add("hostname", "remote-server.com");
    parameters.Add("name", "My Remote server");
    parameters.Add("max_connections", (Int64?) 1);
    parameters.Add("pin_to_site_region", true);
    parameters.Add("port", (Int64?) 1);
    parameters.Add("s3_bucket", "my-bucket");
    parameters.Add("s3_region", "us-east-1");
    parameters.Add("server_certificate", "require_match");
    parameters.Add("server_host_key", "[public key]");
    parameters.Add("server_type", "s3");
    parameters.Add("ssl", "if_available");
    parameters.Add("username", "user");
    parameters.Add("google_cloud_storage_bucket", "my-bucket");
    parameters.Add("google_cloud_storage_project_id", "my-project");
    parameters.Add("backblaze_b2_bucket", "my-bucket");
    parameters.Add("backblaze_b2_s3_endpoint", "s3.us-west-001.backblazeb2.com");
    parameters.Add("wasabi_bucket", "my-bucket");
    parameters.Add("wasabi_region", "us-west-1");
    parameters.Add("rackspace_username", "rackspaceuser");
    parameters.Add("rackspace_region", "dfw");
    parameters.Add("rackspace_container", "my-container");
    parameters.Add("one_drive_account_type", "personal");
    parameters.Add("azure_blob_storage_account", "storage-account-name");
    parameters.Add("azure_blob_storage_container", "container-name");
    parameters.Add("azure_blob_storage_hierarchical_namespace", true);
    parameters.Add("azure_blob_storage_sas_token", "storage-sas-token");
    parameters.Add("azure_files_storage_account", "storage-account-name");
    parameters.Add("azure_files_storage_share_name", "share-name");
    parameters.Add("azure_files_storage_sas_token", "storage-sas-token");
    parameters.Add("s3_compatible_bucket", "my-bucket");
    parameters.Add("s3_compatible_endpoint", "mys3platform.com");
    parameters.Add("s3_compatible_region", "us-east-1");
    parameters.Add("enable_dedicated_ips", true);
    parameters.Add("s3_compatible_access_key", "example");
    parameters.Add("files_agent_root", "example");
    parameters.Add("files_agent_permission_set", "read_write");
    parameters.Add("files_agent_version", "example");
    parameters.Add("filebase_access_key", "example");
    parameters.Add("filebase_bucket", "my-bucket");
    parameters.Add("cloudflare_access_key", "example");
    parameters.Add("cloudflare_bucket", "my-bucket");
    parameters.Add("cloudflare_endpoint", "https://<ACCOUNT_ID>.r2.cloudflarestorage.com");
    parameters.Add("dropbox_teams", true);
    parameters.Add("linode_access_key", "example");
    parameters.Add("linode_bucket", "my-bucket");
    parameters.Add("linode_region", "us-east-1");
    
    await RemoteServer.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.remote_server.create({
      "aws_access_key": "example",
      "wasabi_access_key": "example",
      "reset_authentication": True,
      "hostname": "remote-server.com",
      "name": "My Remote server",
      "max_connections": 1,
      "pin_to_site_region": True,
      "port": 1,
      "s3_bucket": "my-bucket",
      "s3_region": "us-east-1",
      "server_certificate": "require_match",
      "server_host_key": "[public key]",
      "server_type": "s3",
      "ssl": "if_available",
      "username": "user",
      "google_cloud_storage_bucket": "my-bucket",
      "google_cloud_storage_project_id": "my-project",
      "backblaze_b2_bucket": "my-bucket",
      "backblaze_b2_s3_endpoint": "s3.us-west-001.backblazeb2.com",
      "wasabi_bucket": "my-bucket",
      "wasabi_region": "us-west-1",
      "rackspace_username": "rackspaceuser",
      "rackspace_region": "dfw",
      "rackspace_container": "my-container",
      "one_drive_account_type": "personal",
      "azure_blob_storage_account": "storage-account-name",
      "azure_blob_storage_container": "container-name",
      "azure_blob_storage_hierarchical_namespace": True,
      "azure_blob_storage_sas_token": "storage-sas-token",
      "azure_files_storage_account": "storage-account-name",
      "azure_files_storage_share_name": "share-name",
      "azure_files_storage_sas_token": "storage-sas-token",
      "s3_compatible_bucket": "my-bucket",
      "s3_compatible_endpoint": "mys3platform.com",
      "s3_compatible_region": "us-east-1",
      "enable_dedicated_ips": True,
      "s3_compatible_access_key": "example",
      "files_agent_root": "example",
      "files_agent_permission_set": "read_write",
      "files_agent_version": "example",
      "filebase_access_key": "example",
      "filebase_bucket": "my-bucket",
      "cloudflare_access_key": "example",
      "cloudflare_bucket": "my-bucket",
      "cloudflare_endpoint": "https://<ACCOUNT_ID>.r2.cloudflarestorage.com",
      "dropbox_teams": True,
      "linode_access_key": "example",
      "linode_bucket": "my-bucket",
      "linode_region": "us-east-1"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    remoteserver.Create(context.Background(), files_sdk.RemoteServerCreateParams{
      AwsAccessKey: "example",
      AwsSecretKey: "",
      Password: "",
      PrivateKey: "",
      PrivateKeyPassphrase: "",
      SslCertificate: "",
      GoogleCloudStorageCredentialsJson: "",
      WasabiAccessKey: "example",
      WasabiSecretKey: "",
      BackblazeB2KeyId: "",
      BackblazeB2ApplicationKey: "",
      RackspaceApiKey: "",
      ResetAuthentication: lib.Bool(true),
      AzureBlobStorageAccessKey: "",
      AzureFilesStorageAccessKey: "",
      Hostname: "remote-server.com",
      Name: "My Remote server",
      MaxConnections: 1,
      PinToSiteRegion: lib.Bool(true),
      Port: 1,
      S3Bucket: "my-bucket",
      S3Region: "us-east-1",
      ServerCertificate: "require_match",
      ServerHostKey: "[public key]",
      ServerType: "s3",
      Ssl: "if_available",
      Username: "user",
      GoogleCloudStorageBucket: "my-bucket",
      GoogleCloudStorageProjectId: "my-project",
      BackblazeB2Bucket: "my-bucket",
      BackblazeB2S3Endpoint: "s3.us-west-001.backblazeb2.com",
      WasabiBucket: "my-bucket",
      WasabiRegion: "us-west-1",
      RackspaceUsername: "rackspaceuser",
      RackspaceRegion: "dfw",
      RackspaceContainer: "my-container",
      OneDriveAccountType: "personal",
      AzureBlobStorageAccount: "storage-account-name",
      AzureBlobStorageContainer: "container-name",
      AzureBlobStorageHierarchicalNamespace: lib.Bool(true),
      AzureBlobStorageSasToken: "storage-sas-token",
      AzureFilesStorageAccount: "storage-account-name",
      AzureFilesStorageShareName: "share-name",
      AzureFilesStorageSasToken: "storage-sas-token",
      S3CompatibleBucket: "my-bucket",
      S3CompatibleEndpoint: "mys3platform.com",
      S3CompatibleRegion: "us-east-1",
      EnableDedicatedIps: lib.Bool(true),
      S3CompatibleAccessKey: "example",
      S3CompatibleSecretKey: "",
      FilesAgentRoot: "example",
      FilesAgentPermissionSet: "read_write",
      FilesAgentVersion: "example",
      FilebaseAccessKey: "example",
      FilebaseSecretKey: "",
      FilebaseBucket: "my-bucket",
      CloudflareAccessKey: "example",
      CloudflareSecretKey: "",
      CloudflareBucket: "my-bucket",
      CloudflareEndpoint: "https://<ACCOUNT_ID>.r2.cloudflarestorage.com",
      DropboxTeams: lib.Bool(true),
      LinodeAccessKey: "example",
      LinodeSecretKey: "",
      LinodeBucket: "my-bucket",
      LinodeRegion: "us-east-1",
    })
    
    
    files-cli remote-servers create \
      --aws-access-key="example" \
      --aws-secret-key="" \
      --password="" \
      --private-key="" \
      --private-key-passphrase="" \
      --ssl-certificate="" \
      --google-cloud-storage-credentials-json="" \
      --wasabi-access-key="example" \
      --wasabi-secret-key="" \
      --backblaze-b2-key-id="" \
      --backblaze-b2-application-key="" \
      --rackspace-api-key="" \
      --azure-blob-storage-access-key="" \
      --azure-files-storage-access-key="" \
      --hostname="remote-server.com" \
      --name="My Remote server" \
      --max-connections=1 \
      --port=1 \
      --s3-bucket="my-bucket" \
      --s3-region="us-east-1" \
      --server-certificate="require_match" \
      --server-host-key=""[public key]"" \
      --server-type="s3" \
      --ssl="if_available" \
      --username="user" \
      --google-cloud-storage-bucket="my-bucket" \
      --google-cloud-storage-project-id="my-project" \
      --backblaze-b2-bucket="my-bucket" \
      --backblaze-b2-s3-endpoint="s3.us-west-001.backblazeb2.com" \
      --wasabi-bucket="my-bucket" \
      --wasabi-region="us-west-1" \
      --rackspace-username="rackspaceuser" \
      --rackspace-region="dfw" \
      --rackspace-container="my-container" \
      --one-drive-account-type="personal" \
      --azure-blob-storage-account="storage-account-name" \
      --azure-blob-storage-container="container-name" \
      --azure-blob-storage-sas-token="storage-sas-token" \
      --azure-files-storage-account="storage-account-name" \
      --azure-files-storage-share-name="share-name" \
      --azure-files-storage-sas-token="storage-sas-token" \
      --s3-compatible-bucket="my-bucket" \
      --s3-compatible-endpoint="mys3platform.com" \
      --s3-compatible-region="us-east-1" \
      --s3-compatible-access-key="example" \
      --s3-compatible-secret-key="" \
      --files-agent-root="example" \
      --files-agent-permission-set="read_write" \
      --files-agent-version="example" \
      --filebase-access-key="example" \
      --filebase-secret-key="" \
      --filebase-bucket="my-bucket" \
      --cloudflare-access-key="example" \
      --cloudflare-secret-key="" \
      --cloudflare-bucket="my-bucket" \
      --cloudflare-endpoint="https://<ACCOUNT_ID>.r2.cloudflarestorage.com" \
      --linode-access-key="example" \
      --linode-secret-key="" \
      --linode-bucket="my-bucket" \
      --linode-region="us-east-1" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "disabled": true,
      "authentication_method": "password",
      "hostname": "remote-server.com",
      "remote_home_path": "/home/user1",
      "name": "My Remote server",
      "port": 1,
      "max_connections": 1,
      "pin_to_site_region": true,
      "pinned_region": "us-east-1",
      "s3_bucket": "my-bucket",
      "s3_region": "us-east-1",
      "aws_access_key": "example",
      "server_certificate": "require_match",
      "server_host_key": "[public key]",
      "server_type": "s3",
      "ssl": "if_available",
      "username": "user",
      "google_cloud_storage_bucket": "my-bucket",
      "google_cloud_storage_project_id": "my-project",
      "backblaze_b2_s3_endpoint": "s3.us-west-001.backblazeb2.com",
      "backblaze_b2_bucket": "my-bucket",
      "wasabi_bucket": "my-bucket",
      "wasabi_region": "us-west-1",
      "wasabi_access_key": "example",
      "rackspace_username": "rackspaceuser",
      "rackspace_region": "dfw",
      "rackspace_container": "my-container",
      "auth_setup_link": "auth/:provider",
      "auth_status": "in_setup",
      "auth_account_name": "me@example.com",
      "one_drive_account_type": "personal",
      "azure_blob_storage_account": "storage-account-name",
      "azure_blob_storage_sas_token": "storage-sas-token",
      "azure_blob_storage_container": "container-name",
      "azure_blob_storage_hierarchical_namespace": true,
      "azure_files_storage_account": "storage-account-name",
      "azure_files_storage_sas_token": "storage-sas-token",
      "azure_files_storage_share_name": "share-name",
      "s3_compatible_bucket": "my-bucket",
      "s3_compatible_endpoint": "mys3platform.com",
      "s3_compatible_region": "us-east-1",
      "s3_compatible_access_key": "example",
      "enable_dedicated_ips": true,
      "files_agent_permission_set": "read_write",
      "files_agent_root": "example",
      "files_agent_api_token": "example",
      "files_agent_version": "example",
      "filebase_bucket": "my-bucket",
      "filebase_access_key": "example",
      "cloudflare_bucket": "my-bucket",
      "cloudflare_access_key": "example",
      "cloudflare_endpoint": "https://<ACCOUNT_ID>.r2.cloudflarestorage.com",
      "dropbox_teams": true,
      "linode_bucket": "my-bucket",
      "linode_access_key": "example",
      "linode_region": "us-east-1"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-server>
      <id type="integer">1</id>
      <disabled type="boolean">true</disabled>
      <authentication_method>password</authentication_method>
      <hostname>remote-server.com</hostname>
      <remote_home_path>/home/user1</remote_home_path>
      <name>My Remote server</name>
      <port type="integer">1</port>
      <max_connections type="integer">1</max_connections>
      <pin_to_site_region type="boolean">true</pin_to_site_region>
      <pinned_region>us-east-1</pinned_region>
      <s3_bucket>my-bucket</s3_bucket>
      <s3_region>us-east-1</s3_region>
      <aws_access_key>example</aws_access_key>
      <server_certificate>require_match</server_certificate>
      <server_host_key>[public key]</server_host_key>
      <server_type>s3</server_type>
      <ssl>if_available</ssl>
      <username>user</username>
      <google_cloud_storage_bucket>my-bucket</google_cloud_storage_bucket>
      <google_cloud_storage_project_id>my-project</google_cloud_storage_project_id>
      <backblaze_b2_s3_endpoint>s3.us-west-001.backblazeb2.com</backblaze_b2_s3_endpoint>
      <backblaze_b2_bucket>my-bucket</backblaze_b2_bucket>
      <wasabi_bucket>my-bucket</wasabi_bucket>
      <wasabi_region>us-west-1</wasabi_region>
      <wasabi_access_key>example</wasabi_access_key>
      <rackspace_username>rackspaceuser</rackspace_username>
      <rackspace_region>dfw</rackspace_region>
      <rackspace_container>my-container</rackspace_container>
      <auth_setup_link>auth/:provider</auth_setup_link>
      <auth_status>in_setup</auth_status>
      <auth_account_name>me@example.com</auth_account_name>
      <one_drive_account_type>personal</one_drive_account_type>
      <azure_blob_storage_account>storage-account-name</azure_blob_storage_account>
      <azure_blob_storage_sas_token>storage-sas-token</azure_blob_storage_sas_token>
      <azure_blob_storage_container>container-name</azure_blob_storage_container>
      <azure_blob_storage_hierarchical_namespace type="boolean">true</azure_blob_storage_hierarchical_namespace>
      <azure_files_storage_account>storage-account-name</azure_files_storage_account>
      <azure_files_storage_sas_token>storage-sas-token</azure_files_storage_sas_token>
      <azure_files_storage_share_name>share-name</azure_files_storage_share_name>
      <s3_compatible_bucket>my-bucket</s3_compatible_bucket>
      <s3_compatible_endpoint>mys3platform.com</s3_compatible_endpoint>
      <s3_compatible_region>us-east-1</s3_compatible_region>
      <s3_compatible_access_key>example</s3_compatible_access_key>
      <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
      <files_agent_permission_set>read_write</files_agent_permission_set>
      <files_agent_root>example</files_agent_root>
      <files_agent_api_token>example</files_agent_api_token>
      <files_agent_version>example</files_agent_version>
      <filebase_bucket>my-bucket</filebase_bucket>
      <filebase_access_key>example</filebase_access_key>
      <cloudflare_bucket>my-bucket</cloudflare_bucket>
      <cloudflare_access_key>example</cloudflare_access_key>
      <cloudflare_endpoint>https://&lt;ACCOUNT_ID&gt;.r2.cloudflarestorage.com</cloudflare_endpoint>
      <dropbox_teams type="boolean">true</dropbox_teams>
      <linode_bucket>my-bucket</linode_bucket>
      <linode_access_key>example</linode_access_key>
      <linode_region>us-east-1</linode_region>
    </remote-server>
    
    

    HTTPS Request

    POST /remote_servers

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    aws_access_key string AWS Access Key.
    aws_secret_key string AWS secret key.
    password string Password if needed.
    private_key string Private key if needed.
    private_key_passphrase string Passphrase for private key if needed.
    ssl_certificate string SSL client certificate.
    google_cloud_storage_credentials_json string A JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
    wasabi_access_key string Wasabi access key.
    wasabi_secret_key string Wasabi secret key.
    backblaze_b2_key_id string Backblaze B2 Cloud Storage keyID.
    backblaze_b2_application_key string Backblaze B2 Cloud Storage applicationKey.
    rackspace_api_key string Rackspace API key from the Rackspace Cloud Control Panel.
    reset_authentication boolean Reset authenticated account
    azure_blob_storage_access_key string Azure Blob Storage secret key.
    azure_files_storage_access_key string Azure File Storage access key.
    hostname string Hostname or IP address
    name string Internal name for your reference
    max_connections int64 Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
    pin_to_site_region boolean If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a sitewide setting which will force it to true.
    port int64 Port for remote server. Not needed for S3.
    s3_bucket string S3 bucket name
    s3_region string S3 region
    server_certificate string Remote server certificate
    Possible values: require_match, allow_any
    server_host_key string Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
    server_type string Remote server type.
    Possible values: ftp, sftp, s3, google_cloud_storage, webdav, wasabi, backblaze_b2, one_drive, rackspace, box, dropbox, google_drive, azure, sharepoint, s3_compatible, azure_files, files_agent, filebase, cloudflare, linode
    ssl string Should we require SSL?
    Possible values: if_available, require, require_implicit, never
    username string Remote server username. Not needed for S3 buckets.
    google_cloud_storage_bucket string Google Cloud Storage bucket name
    google_cloud_storage_project_id string Google Cloud Project ID
    backblaze_b2_bucket string Backblaze B2 Cloud Storage Bucket name
    backblaze_b2_s3_endpoint string Backblaze B2 Cloud Storage S3 Endpoint
    wasabi_bucket string Wasabi Bucket name
    wasabi_region string Wasabi region
    rackspace_username string Rackspace username used to login to the Rackspace Cloud Control Panel.
    rackspace_region string Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
    rackspace_container string The name of the container (top level directory) where files will sync.
    one_drive_account_type string Either personal or business_other account types
    Possible values: personal, business_other
    azure_blob_storage_account string Azure Blob Storage Account name
    azure_blob_storage_container string Azure Blob Storage Container name
    azure_blob_storage_hierarchical_namespace boolean Enable when storage account has hierarchical namespace feature enabled
    azure_blob_storage_sas_token string Shared Access Signature (SAS) token
    azure_files_storage_account string Azure File Storage Account name
    azure_files_storage_share_name string Azure File Storage Share name
    azure_files_storage_sas_token string Shared Access Signature (SAS) token
    s3_compatible_bucket string S3-compatible Bucket name
    s3_compatible_endpoint string S3-compatible endpoint
    s3_compatible_region string S3-compatible endpoint
    enable_dedicated_ips boolean true if remote server only accepts connections from dedicated IPs
    s3_compatible_access_key string S3-compatible Access Key.
    s3_compatible_secret_key string S3-compatible secret key
    files_agent_root string Agent local root path
    files_agent_permission_set string Local permissions for files agent. read_only, write_only, or read_write
    Possible values: read_write, read_only, write_only
    files_agent_version string Files Agent version
    filebase_access_key string Filebase Access Key.
    filebase_secret_key string Filebase secret key
    filebase_bucket string Filebase Bucket name
    cloudflare_access_key string Cloudflare Access Key.
    cloudflare_secret_key string Cloudflare secret key
    cloudflare_bucket string Cloudflare Bucket name
    cloudflare_endpoint string Cloudflare endpoint
    dropbox_teams boolean List Team folders in root
    linode_access_key string Linode Access Key.
    linode_secret_key string Linode secret key
    linode_bucket string Linode Bucket name
    linode_region string Linode region

    Update Remote Server

    Example Request

    curl https://app.files.com/api/rest/v1/remote_servers/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"aws_access_key":"example","wasabi_access_key":"example","reset_authentication":true,"hostname":"remote-server.com","name":"My Remote server","max_connections":1,"pin_to_site_region":true,"port":1,"s3_bucket":"my-bucket","s3_region":"us-east-1","server_certificate":"require_match","server_host_key":"[public key]","server_type":"s3","ssl":"if_available","username":"user","google_cloud_storage_bucket":"my-bucket","google_cloud_storage_project_id":"my-project","backblaze_b2_bucket":"my-bucket","backblaze_b2_s3_endpoint":"s3.us-west-001.backblazeb2.com","wasabi_bucket":"my-bucket","wasabi_region":"us-west-1","rackspace_username":"rackspaceuser","rackspace_region":"dfw","rackspace_container":"my-container","one_drive_account_type":"personal","azure_blob_storage_account":"storage-account-name","azure_blob_storage_container":"container-name","azure_blob_storage_hierarchical_namespace":true,"azure_blob_storage_sas_token":"storage-sas-token","azure_files_storage_account":"storage-account-name","azure_files_storage_share_name":"share-name","azure_files_storage_sas_token":"storage-sas-token","s3_compatible_bucket":"my-bucket","s3_compatible_endpoint":"mys3platform.com","s3_compatible_region":"us-east-1","enable_dedicated_ips":true,"s3_compatible_access_key":"example","files_agent_root":"example","files_agent_permission_set":"read_write","files_agent_version":"example","filebase_access_key":"example","filebase_bucket":"my-bucket","cloudflare_access_key":"example","cloudflare_bucket":"my-bucket","cloudflare_endpoint":"https://<ACCOUNT_ID>.r2.cloudflarestorage.com","dropbox_teams":true,"linode_access_key":"example","linode_bucket":"my-bucket","linode_region":"us-east-1"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/remote_servers/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<remote-server>
           <aws_access_key>example</aws_access_key>
           <wasabi_access_key>example</wasabi_access_key>
           <reset_authentication type="boolean">true</reset_authentication>
           <hostname>remote-server.com</hostname>
           <name>My Remote server</name>
           <max_connections type="integer">1</max_connections>
           <pin_to_site_region type="boolean">true</pin_to_site_region>
           <port type="integer">1</port>
           <s3_bucket>my-bucket</s3_bucket>
           <s3_region>us-east-1</s3_region>
           <server_certificate>require_match</server_certificate>
           <server_host_key>[public key]</server_host_key>
           <server_type>s3</server_type>
           <ssl>if_available</ssl>
           <username>user</username>
           <google_cloud_storage_bucket>my-bucket</google_cloud_storage_bucket>
           <google_cloud_storage_project_id>my-project</google_cloud_storage_project_id>
           <backblaze_b2_bucket>my-bucket</backblaze_b2_bucket>
           <backblaze_b2_s3_endpoint>s3.us-west-001.backblazeb2.com</backblaze_b2_s3_endpoint>
           <wasabi_bucket>my-bucket</wasabi_bucket>
           <wasabi_region>us-west-1</wasabi_region>
           <rackspace_username>rackspaceuser</rackspace_username>
           <rackspace_region>dfw</rackspace_region>
           <rackspace_container>my-container</rackspace_container>
           <one_drive_account_type>personal</one_drive_account_type>
           <azure_blob_storage_account>storage-account-name</azure_blob_storage_account>
           <azure_blob_storage_container>container-name</azure_blob_storage_container>
           <azure_blob_storage_hierarchical_namespace type="boolean">true</azure_blob_storage_hierarchical_namespace>
           <azure_blob_storage_sas_token>storage-sas-token</azure_blob_storage_sas_token>
           <azure_files_storage_account>storage-account-name</azure_files_storage_account>
           <azure_files_storage_share_name>share-name</azure_files_storage_share_name>
           <azure_files_storage_sas_token>storage-sas-token</azure_files_storage_sas_token>
           <s3_compatible_bucket>my-bucket</s3_compatible_bucket>
           <s3_compatible_endpoint>mys3platform.com</s3_compatible_endpoint>
           <s3_compatible_region>us-east-1</s3_compatible_region>
           <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
           <s3_compatible_access_key>example</s3_compatible_access_key>
           <files_agent_root>example</files_agent_root>
           <files_agent_permission_set>read_write</files_agent_permission_set>
           <files_agent_version>example</files_agent_version>
           <filebase_access_key>example</filebase_access_key>
           <filebase_bucket>my-bucket</filebase_bucket>
           <cloudflare_access_key>example</cloudflare_access_key>
           <cloudflare_bucket>my-bucket</cloudflare_bucket>
           <cloudflare_endpoint>https://&lt;ACCOUNT_ID&gt;.r2.cloudflarestorage.com</cloudflare_endpoint>
           <dropbox_teams type="boolean">true</dropbox_teams>
           <linode_access_key>example</linode_access_key>
           <linode_bucket>my-bucket</linode_bucket>
           <linode_region>us-east-1</linode_region>
         </remote-server>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    remote_server = Files::RemoteServer.list.first
    remote_server.update(
      aws_access_key: "example",
      wasabi_access_key: "example",
      reset_authentication: true,
      hostname: "remote-server.com",
      name: "My Remote server",
      max_connections: 1,
      pin_to_site_region: true,
      port: 1,
      s3_bucket: "my-bucket",
      s3_region: "us-east-1",
      server_certificate: "require_match",
      server_host_key: "[public key]",
      server_type: "s3",
      ssl: "if_available",
      username: "user",
      google_cloud_storage_bucket: "my-bucket",
      google_cloud_storage_project_id: "my-project",
      backblaze_b2_bucket: "my-bucket",
      backblaze_b2_s3_endpoint: "s3.us-west-001.backblazeb2.com",
      wasabi_bucket: "my-bucket",
      wasabi_region: "us-west-1",
      rackspace_username: "rackspaceuser",
      rackspace_region: "dfw",
      rackspace_container: "my-container",
      one_drive_account_type: "personal",
      azure_blob_storage_account: "storage-account-name",
      azure_blob_storage_container: "container-name",
      azure_blob_storage_hierarchical_namespace: true,
      azure_blob_storage_sas_token: "storage-sas-token",
      azure_files_storage_account: "storage-account-name",
      azure_files_storage_share_name: "share-name",
      azure_files_storage_sas_token: "storage-sas-token",
      s3_compatible_bucket: "my-bucket",
      s3_compatible_endpoint: "mys3platform.com",
      s3_compatible_region: "us-east-1",
      enable_dedicated_ips: true,
      s3_compatible_access_key: "example",
      files_agent_root: "example",
      files_agent_permission_set: "read_write",
      files_agent_version: "example",
      filebase_access_key: "example",
      filebase_bucket: "my-bucket",
      cloudflare_access_key: "example",
      cloudflare_bucket: "my-bucket",
      cloudflare_endpoint: "https://<ACCOUNT_ID>.r2.cloudflarestorage.com",
      dropbox_teams: true,
      linode_access_key: "example",
      linode_bucket: "my-bucket",
      linode_region: "us-east-1"
    )
    
    $remote_server = \Files\Model\RemoteServer::list()[0];
    $remote_server->update(array(
      'aws_access_key' => "example", 
      'wasabi_access_key' => "example", 
      'reset_authentication' => true, 
      'hostname' => "remote-server.com", 
      'name' => "My Remote server", 
      'max_connections' => 1, 
      'pin_to_site_region' => true, 
      'port' => 1, 
      's3_bucket' => "my-bucket", 
      's3_region' => "us-east-1", 
      'server_certificate' => "require_match", 
      'server_host_key' => "[public key]", 
      'server_type' => "s3", 
      'ssl' => "if_available", 
      'username' => "user", 
      'google_cloud_storage_bucket' => "my-bucket", 
      'google_cloud_storage_project_id' => "my-project", 
      'backblaze_b2_bucket' => "my-bucket", 
      'backblaze_b2_s3_endpoint' => "s3.us-west-001.backblazeb2.com", 
      'wasabi_bucket' => "my-bucket", 
      'wasabi_region' => "us-west-1", 
      'rackspace_username' => "rackspaceuser", 
      'rackspace_region' => "dfw", 
      'rackspace_container' => "my-container", 
      'one_drive_account_type' => "personal", 
      'azure_blob_storage_account' => "storage-account-name", 
      'azure_blob_storage_container' => "container-name", 
      'azure_blob_storage_hierarchical_namespace' => true, 
      'azure_blob_storage_sas_token' => "storage-sas-token", 
      'azure_files_storage_account' => "storage-account-name", 
      'azure_files_storage_share_name' => "share-name", 
      'azure_files_storage_sas_token' => "storage-sas-token", 
      's3_compatible_bucket' => "my-bucket", 
      's3_compatible_endpoint' => "mys3platform.com", 
      's3_compatible_region' => "us-east-1", 
      'enable_dedicated_ips' => true, 
      's3_compatible_access_key' => "example", 
      'files_agent_root' => "example", 
      'files_agent_permission_set' => "read_write", 
      'files_agent_version' => "example", 
      'filebase_access_key' => "example", 
      'filebase_bucket' => "my-bucket", 
      'cloudflare_access_key' => "example", 
      'cloudflare_bucket' => "my-bucket", 
      'cloudflare_endpoint' => "https://<ACCOUNT_ID>.r2.cloudflarestorage.com", 
      'dropbox_teams' => true, 
      'linode_access_key' => "example", 
      'linode_bucket' => "my-bucket", 
      'linode_region' => "us-east-1"
    ));
    
    RemoteServer remoteServer = RemoteServer.list()[0];
    remoteServer.setAwsAccessKey("example");
    remoteServer.setWasabiAccessKey("example");
    remoteServer.setResetAuthentication(true);
    remoteServer.setHostname("remote-server.com");
    remoteServer.setName("My Remote server");
    remoteServer.setMaxConnections(1);
    remoteServer.setPinToSiteRegion(true);
    remoteServer.setPort(1);
    remoteServer.setS3Bucket("my-bucket");
    remoteServer.setS3Region("us-east-1");
    remoteServer.setServerCertificate("require_match");
    remoteServer.setServerHostKey("[public key]");
    remoteServer.setServerType("s3");
    remoteServer.setSsl("if_available");
    remoteServer.setUsername("user");
    remoteServer.setGoogleCloudStorageBucket("my-bucket");
    remoteServer.setGoogleCloudStorageProjectId("my-project");
    remoteServer.setBackblazeB2Bucket("my-bucket");
    remoteServer.setBackblazeB2S3Endpoint("s3.us-west-001.backblazeb2.com");
    remoteServer.setWasabiBucket("my-bucket");
    remoteServer.setWasabiRegion("us-west-1");
    remoteServer.setRackspaceUsername("rackspaceuser");
    remoteServer.setRackspaceRegion("dfw");
    remoteServer.setRackspaceContainer("my-container");
    remoteServer.setOneDriveAccountType("personal");
    remoteServer.setAzureBlobStorageAccount("storage-account-name");
    remoteServer.setAzureBlobStorageContainer("container-name");
    remoteServer.setAzureBlobStorageHierarchicalNamespace(true);
    remoteServer.setAzureBlobStorageSasToken("storage-sas-token");
    remoteServer.setAzureFilesStorageAccount("storage-account-name");
    remoteServer.setAzureFilesStorageShareName("share-name");
    remoteServer.setAzureFilesStorageSasToken("storage-sas-token");
    remoteServer.setS3CompatibleBucket("my-bucket");
    remoteServer.setS3CompatibleEndpoint("mys3platform.com");
    remoteServer.setS3CompatibleRegion("us-east-1");
    remoteServer.setEnableDedicatedIps(true);
    remoteServer.setS3CompatibleAccessKey("example");
    remoteServer.setFilesAgentRoot("example");
    remoteServer.setFilesAgentPermissionSet("read_write");
    remoteServer.setFilesAgentVersion("example");
    remoteServer.setFilebaseAccessKey("example");
    remoteServer.setFilebaseBucket("my-bucket");
    remoteServer.setCloudflareAccessKey("example");
    remoteServer.setCloudflareBucket("my-bucket");
    remoteServer.setCloudflareEndpoint("https://<ACCOUNT_ID>.r2.cloudflarestorage.com");
    remoteServer.setDropboxTeams(true);
    remoteServer.setLinodeAccessKey("example");
    remoteServer.setLinodeBucket("my-bucket");
    remoteServer.setLinodeRegion("us-east-1");
    remoteServer.update();
    
    const remoteServer = (await RemoteServer.list())[0]
    await remoteServer.update({ 
      aws_access_key: "example", 
      wasabi_access_key: "example", 
      reset_authentication: true, 
      hostname: "remote-server.com", 
      name: "My Remote server", 
      max_connections: 1, 
      pin_to_site_region: true, 
      port: 1, 
      s3_bucket: "my-bucket", 
      s3_region: "us-east-1", 
      server_certificate: "require_match", 
      server_host_key: "[public key]", 
      server_type: "s3", 
      ssl: "if_available", 
      username: "user", 
      google_cloud_storage_bucket: "my-bucket", 
      google_cloud_storage_project_id: "my-project", 
      backblaze_b2_bucket: "my-bucket", 
      backblaze_b2_s3_endpoint: "s3.us-west-001.backblazeb2.com", 
      wasabi_bucket: "my-bucket", 
      wasabi_region: "us-west-1", 
      rackspace_username: "rackspaceuser", 
      rackspace_region: "dfw", 
      rackspace_container: "my-container", 
      one_drive_account_type: "personal", 
      azure_blob_storage_account: "storage-account-name", 
      azure_blob_storage_container: "container-name", 
      azure_blob_storage_hierarchical_namespace: true, 
      azure_blob_storage_sas_token: "storage-sas-token", 
      azure_files_storage_account: "storage-account-name", 
      azure_files_storage_share_name: "share-name", 
      azure_files_storage_sas_token: "storage-sas-token", 
      s3_compatible_bucket: "my-bucket", 
      s3_compatible_endpoint: "mys3platform.com", 
      s3_compatible_region: "us-east-1", 
      enable_dedicated_ips: true, 
      s3_compatible_access_key: "example", 
      files_agent_root: "example", 
      files_agent_permission_set: "read_write", 
      files_agent_version: "example", 
      filebase_access_key: "example", 
      filebase_bucket: "my-bucket", 
      cloudflare_access_key: "example", 
      cloudflare_bucket: "my-bucket", 
      cloudflare_endpoint: "https://<ACCOUNT_ID>.r2.cloudflarestorage.com", 
      dropbox_teams: true, 
      linode_access_key: "example", 
      linode_bucket: "my-bucket", 
      linode_region: "us-east-1",
    })
    
    var remoteServer = (await RemoteServer.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("aws_access_key", "example");
    parameters.Add("wasabi_access_key", "example");
    parameters.Add("reset_authentication", true);
    parameters.Add("hostname", "remote-server.com");
    parameters.Add("name", "My Remote server");
    parameters.Add("max_connections", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("pin_to_site_region", true);
    parameters.Add("port", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("s3_bucket", "my-bucket");
    parameters.Add("s3_region", "us-east-1");
    parameters.Add("server_certificate", "require_match");
    parameters.Add("server_host_key", "[public key]");
    parameters.Add("server_type", "s3");
    parameters.Add("ssl", "if_available");
    parameters.Add("username", "user");
    parameters.Add("google_cloud_storage_bucket", "my-bucket");
    parameters.Add("google_cloud_storage_project_id", "my-project");
    parameters.Add("backblaze_b2_bucket", "my-bucket");
    parameters.Add("backblaze_b2_s3_endpoint", "s3.us-west-001.backblazeb2.com");
    parameters.Add("wasabi_bucket", "my-bucket");
    parameters.Add("wasabi_region", "us-west-1");
    parameters.Add("rackspace_username", "rackspaceuser");
    parameters.Add("rackspace_region", "dfw");
    parameters.Add("rackspace_container", "my-container");
    parameters.Add("one_drive_account_type", "personal");
    parameters.Add("azure_blob_storage_account", "storage-account-name");
    parameters.Add("azure_blob_storage_container", "container-name");
    parameters.Add("azure_blob_storage_hierarchical_namespace", true);
    parameters.Add("azure_blob_storage_sas_token", "storage-sas-token");
    parameters.Add("azure_files_storage_account", "storage-account-name");
    parameters.Add("azure_files_storage_share_name", "share-name");
    parameters.Add("azure_files_storage_sas_token", "storage-sas-token");
    parameters.Add("s3_compatible_bucket", "my-bucket");
    parameters.Add("s3_compatible_endpoint", "mys3platform.com");
    parameters.Add("s3_compatible_region", "us-east-1");
    parameters.Add("enable_dedicated_ips", true);
    parameters.Add("s3_compatible_access_key", "example");
    parameters.Add("files_agent_root", "example");
    parameters.Add("files_agent_permission_set", "read_write");
    parameters.Add("files_agent_version", "example");
    parameters.Add("filebase_access_key", "example");
    parameters.Add("filebase_bucket", "my-bucket");
    parameters.Add("cloudflare_access_key", "example");
    parameters.Add("cloudflare_bucket", "my-bucket");
    parameters.Add("cloudflare_endpoint", "https://<ACCOUNT_ID>.r2.cloudflarestorage.com");
    parameters.Add("dropbox_teams", true);
    parameters.Add("linode_access_key", "example");
    parameters.Add("linode_bucket", "my-bucket");
    parameters.Add("linode_region", "us-east-1");
    
    await remoteServer.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    remote_server = files_sdk.remote_server.find(id)
    remote_server.update({
      "aws_access_key": "example",
      "wasabi_access_key": "example",
      "reset_authentication": True,
      "hostname": "remote-server.com",
      "name": "My Remote server",
      "max_connections": 1,
      "pin_to_site_region": True,
      "port": 1,
      "s3_bucket": "my-bucket",
      "s3_region": "us-east-1",
      "server_certificate": "require_match",
      "server_host_key": "[public key]",
      "server_type": "s3",
      "ssl": "if_available",
      "username": "user",
      "google_cloud_storage_bucket": "my-bucket",
      "google_cloud_storage_project_id": "my-project",
      "backblaze_b2_bucket": "my-bucket",
      "backblaze_b2_s3_endpoint": "s3.us-west-001.backblazeb2.com",
      "wasabi_bucket": "my-bucket",
      "wasabi_region": "us-west-1",
      "rackspace_username": "rackspaceuser",
      "rackspace_region": "dfw",
      "rackspace_container": "my-container",
      "one_drive_account_type": "personal",
      "azure_blob_storage_account": "storage-account-name",
      "azure_blob_storage_container": "container-name",
      "azure_blob_storage_hierarchical_namespace": True,
      "azure_blob_storage_sas_token": "storage-sas-token",
      "azure_files_storage_account": "storage-account-name",
      "azure_files_storage_share_name": "share-name",
      "azure_files_storage_sas_token": "storage-sas-token",
      "s3_compatible_bucket": "my-bucket",
      "s3_compatible_endpoint": "mys3platform.com",
      "s3_compatible_region": "us-east-1",
      "enable_dedicated_ips": True,
      "s3_compatible_access_key": "example",
      "files_agent_root": "example",
      "files_agent_permission_set": "read_write",
      "files_agent_version": "example",
      "filebase_access_key": "example",
      "filebase_bucket": "my-bucket",
      "cloudflare_access_key": "example",
      "cloudflare_bucket": "my-bucket",
      "cloudflare_endpoint": "https://<ACCOUNT_ID>.r2.cloudflarestorage.com",
      "dropbox_teams": True,
      "linode_access_key": "example",
      "linode_bucket": "my-bucket",
      "linode_region": "us-east-1"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    remoteserver.Update(context.Background(), files_sdk.RemoteServerUpdateParams{
      Id: 1,
      AwsAccessKey: "example",
      AwsSecretKey: "",
      Password: "",
      PrivateKey: "",
      PrivateKeyPassphrase: "",
      SslCertificate: "",
      GoogleCloudStorageCredentialsJson: "",
      WasabiAccessKey: "example",
      WasabiSecretKey: "",
      BackblazeB2KeyId: "",
      BackblazeB2ApplicationKey: "",
      RackspaceApiKey: "",
      ResetAuthentication: lib.Bool(true),
      AzureBlobStorageAccessKey: "",
      AzureFilesStorageAccessKey: "",
      Hostname: "remote-server.com",
      Name: "My Remote server",
      MaxConnections: 1,
      PinToSiteRegion: lib.Bool(true),
      Port: 1,
      S3Bucket: "my-bucket",
      S3Region: "us-east-1",
      ServerCertificate: "require_match",
      ServerHostKey: "[public key]",
      ServerType: "s3",
      Ssl: "if_available",
      Username: "user",
      GoogleCloudStorageBucket: "my-bucket",
      GoogleCloudStorageProjectId: "my-project",
      BackblazeB2Bucket: "my-bucket",
      BackblazeB2S3Endpoint: "s3.us-west-001.backblazeb2.com",
      WasabiBucket: "my-bucket",
      WasabiRegion: "us-west-1",
      RackspaceUsername: "rackspaceuser",
      RackspaceRegion: "dfw",
      RackspaceContainer: "my-container",
      OneDriveAccountType: "personal",
      AzureBlobStorageAccount: "storage-account-name",
      AzureBlobStorageContainer: "container-name",
      AzureBlobStorageHierarchicalNamespace: lib.Bool(true),
      AzureBlobStorageSasToken: "storage-sas-token",
      AzureFilesStorageAccount: "storage-account-name",
      AzureFilesStorageShareName: "share-name",
      AzureFilesStorageSasToken: "storage-sas-token",
      S3CompatibleBucket: "my-bucket",
      S3CompatibleEndpoint: "mys3platform.com",
      S3CompatibleRegion: "us-east-1",
      EnableDedicatedIps: lib.Bool(true),
      S3CompatibleAccessKey: "example",
      S3CompatibleSecretKey: "",
      FilesAgentRoot: "example",
      FilesAgentPermissionSet: "read_write",
      FilesAgentVersion: "example",
      FilebaseAccessKey: "example",
      FilebaseSecretKey: "",
      FilebaseBucket: "my-bucket",
      CloudflareAccessKey: "example",
      CloudflareSecretKey: "",
      CloudflareBucket: "my-bucket",
      CloudflareEndpoint: "https://<ACCOUNT_ID>.r2.cloudflarestorage.com",
      DropboxTeams: lib.Bool(true),
      LinodeAccessKey: "example",
      LinodeSecretKey: "",
      LinodeBucket: "my-bucket",
      LinodeRegion: "us-east-1",
    })
    
    files-cli remote-servers update \
      --id=1 \
      --aws-access-key="example" \
      --aws-secret-key="" \
      --password="" \
      --private-key="" \
      --private-key-passphrase="" \
      --ssl-certificate="" \
      --google-cloud-storage-credentials-json="" \
      --wasabi-access-key="example" \
      --wasabi-secret-key="" \
      --backblaze-b2-key-id="" \
      --backblaze-b2-application-key="" \
      --rackspace-api-key="" \
      --azure-blob-storage-access-key="" \
      --azure-files-storage-access-key="" \
      --hostname="remote-server.com" \
      --name="My Remote server" \
      --max-connections=1 \
      --port=1 \
      --s3-bucket="my-bucket" \
      --s3-region="us-east-1" \
      --server-certificate="require_match" \
      --server-host-key=""[public key]"" \
      --server-type="s3" \
      --ssl="if_available" \
      --username="user" \
      --google-cloud-storage-bucket="my-bucket" \
      --google-cloud-storage-project-id="my-project" \
      --backblaze-b2-bucket="my-bucket" \
      --backblaze-b2-s3-endpoint="s3.us-west-001.backblazeb2.com" \
      --wasabi-bucket="my-bucket" \
      --wasabi-region="us-west-1" \
      --rackspace-username="rackspaceuser" \
      --rackspace-region="dfw" \
      --rackspace-container="my-container" \
      --one-drive-account-type="personal" \
      --azure-blob-storage-account="storage-account-name" \
      --azure-blob-storage-container="container-name" \
      --azure-blob-storage-sas-token="storage-sas-token" \
      --azure-files-storage-account="storage-account-name" \
      --azure-files-storage-share-name="share-name" \
      --azure-files-storage-sas-token="storage-sas-token" \
      --s3-compatible-bucket="my-bucket" \
      --s3-compatible-endpoint="mys3platform.com" \
      --s3-compatible-region="us-east-1" \
      --s3-compatible-access-key="example" \
      --s3-compatible-secret-key="" \
      --files-agent-root="example" \
      --files-agent-permission-set="read_write" \
      --files-agent-version="example" \
      --filebase-access-key="example" \
      --filebase-secret-key="" \
      --filebase-bucket="my-bucket" \
      --cloudflare-access-key="example" \
      --cloudflare-secret-key="" \
      --cloudflare-bucket="my-bucket" \
      --cloudflare-endpoint="https://<ACCOUNT_ID>.r2.cloudflarestorage.com" \
      --linode-access-key="example" \
      --linode-secret-key="" \
      --linode-bucket="my-bucket" \
      --linode-region="us-east-1" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "disabled": true,
      "authentication_method": "password",
      "hostname": "remote-server.com",
      "remote_home_path": "/home/user1",
      "name": "My Remote server",
      "port": 1,
      "max_connections": 1,
      "pin_to_site_region": true,
      "pinned_region": "us-east-1",
      "s3_bucket": "my-bucket",
      "s3_region": "us-east-1",
      "aws_access_key": "example",
      "server_certificate": "require_match",
      "server_host_key": "[public key]",
      "server_type": "s3",
      "ssl": "if_available",
      "username": "user",
      "google_cloud_storage_bucket": "my-bucket",
      "google_cloud_storage_project_id": "my-project",
      "backblaze_b2_s3_endpoint": "s3.us-west-001.backblazeb2.com",
      "backblaze_b2_bucket": "my-bucket",
      "wasabi_bucket": "my-bucket",
      "wasabi_region": "us-west-1",
      "wasabi_access_key": "example",
      "rackspace_username": "rackspaceuser",
      "rackspace_region": "dfw",
      "rackspace_container": "my-container",
      "auth_setup_link": "auth/:provider",
      "auth_status": "in_setup",
      "auth_account_name": "me@example.com",
      "one_drive_account_type": "personal",
      "azure_blob_storage_account": "storage-account-name",
      "azure_blob_storage_sas_token": "storage-sas-token",
      "azure_blob_storage_container": "container-name",
      "azure_blob_storage_hierarchical_namespace": true,
      "azure_files_storage_account": "storage-account-name",
      "azure_files_storage_sas_token": "storage-sas-token",
      "azure_files_storage_share_name": "share-name",
      "s3_compatible_bucket": "my-bucket",
      "s3_compatible_endpoint": "mys3platform.com",
      "s3_compatible_region": "us-east-1",
      "s3_compatible_access_key": "example",
      "enable_dedicated_ips": true,
      "files_agent_permission_set": "read_write",
      "files_agent_root": "example",
      "files_agent_api_token": "example",
      "files_agent_version": "example",
      "filebase_bucket": "my-bucket",
      "filebase_access_key": "example",
      "cloudflare_bucket": "my-bucket",
      "cloudflare_access_key": "example",
      "cloudflare_endpoint": "https://<ACCOUNT_ID>.r2.cloudflarestorage.com",
      "dropbox_teams": true,
      "linode_bucket": "my-bucket",
      "linode_access_key": "example",
      "linode_region": "us-east-1"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-server>
      <id type="integer">1</id>
      <disabled type="boolean">true</disabled>
      <authentication_method>password</authentication_method>
      <hostname>remote-server.com</hostname>
      <remote_home_path>/home/user1</remote_home_path>
      <name>My Remote server</name>
      <port type="integer">1</port>
      <max_connections type="integer">1</max_connections>
      <pin_to_site_region type="boolean">true</pin_to_site_region>
      <pinned_region>us-east-1</pinned_region>
      <s3_bucket>my-bucket</s3_bucket>
      <s3_region>us-east-1</s3_region>
      <aws_access_key>example</aws_access_key>
      <server_certificate>require_match</server_certificate>
      <server_host_key>[public key]</server_host_key>
      <server_type>s3</server_type>
      <ssl>if_available</ssl>
      <username>user</username>
      <google_cloud_storage_bucket>my-bucket</google_cloud_storage_bucket>
      <google_cloud_storage_project_id>my-project</google_cloud_storage_project_id>
      <backblaze_b2_s3_endpoint>s3.us-west-001.backblazeb2.com</backblaze_b2_s3_endpoint>
      <backblaze_b2_bucket>my-bucket</backblaze_b2_bucket>
      <wasabi_bucket>my-bucket</wasabi_bucket>
      <wasabi_region>us-west-1</wasabi_region>
      <wasabi_access_key>example</wasabi_access_key>
      <rackspace_username>rackspaceuser</rackspace_username>
      <rackspace_region>dfw</rackspace_region>
      <rackspace_container>my-container</rackspace_container>
      <auth_setup_link>auth/:provider</auth_setup_link>
      <auth_status>in_setup</auth_status>
      <auth_account_name>me@example.com</auth_account_name>
      <one_drive_account_type>personal</one_drive_account_type>
      <azure_blob_storage_account>storage-account-name</azure_blob_storage_account>
      <azure_blob_storage_sas_token>storage-sas-token</azure_blob_storage_sas_token>
      <azure_blob_storage_container>container-name</azure_blob_storage_container>
      <azure_blob_storage_hierarchical_namespace type="boolean">true</azure_blob_storage_hierarchical_namespace>
      <azure_files_storage_account>storage-account-name</azure_files_storage_account>
      <azure_files_storage_sas_token>storage-sas-token</azure_files_storage_sas_token>
      <azure_files_storage_share_name>share-name</azure_files_storage_share_name>
      <s3_compatible_bucket>my-bucket</s3_compatible_bucket>
      <s3_compatible_endpoint>mys3platform.com</s3_compatible_endpoint>
      <s3_compatible_region>us-east-1</s3_compatible_region>
      <s3_compatible_access_key>example</s3_compatible_access_key>
      <enable_dedicated_ips type="boolean">true</enable_dedicated_ips>
      <files_agent_permission_set>read_write</files_agent_permission_set>
      <files_agent_root>example</files_agent_root>
      <files_agent_api_token>example</files_agent_api_token>
      <files_agent_version>example</files_agent_version>
      <filebase_bucket>my-bucket</filebase_bucket>
      <filebase_access_key>example</filebase_access_key>
      <cloudflare_bucket>my-bucket</cloudflare_bucket>
      <cloudflare_access_key>example</cloudflare_access_key>
      <cloudflare_endpoint>https://&lt;ACCOUNT_ID&gt;.r2.cloudflarestorage.com</cloudflare_endpoint>
      <dropbox_teams type="boolean">true</dropbox_teams>
      <linode_bucket>my-bucket</linode_bucket>
      <linode_access_key>example</linode_access_key>
      <linode_region>us-east-1</linode_region>
    </remote-server>
    
    

    HTTPS Request

    PATCH /remote_servers/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Remote Server ID.
    aws_access_key string AWS Access Key.
    aws_secret_key string AWS secret key.
    password string Password if needed.
    private_key string Private key if needed.
    private_key_passphrase string Passphrase for private key if needed.
    ssl_certificate string SSL client certificate.
    google_cloud_storage_credentials_json string A JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
    wasabi_access_key string Wasabi access key.
    wasabi_secret_key string Wasabi secret key.
    backblaze_b2_key_id string Backblaze B2 Cloud Storage keyID.
    backblaze_b2_application_key string Backblaze B2 Cloud Storage applicationKey.
    rackspace_api_key string Rackspace API key from the Rackspace Cloud Control Panel.
    reset_authentication boolean Reset authenticated account
    azure_blob_storage_access_key string Azure Blob Storage secret key.
    azure_files_storage_access_key string Azure File Storage access key.
    hostname string Hostname or IP address
    name string Internal name for your reference
    max_connections int64 Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
    pin_to_site_region boolean If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a sitewide setting which will force it to true.
    port int64 Port for remote server. Not needed for S3.
    s3_bucket string S3 bucket name
    s3_region string S3 region
    server_certificate string Remote server certificate
    Possible values: require_match, allow_any
    server_host_key string Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
    server_type string Remote server type.
    Possible values: ftp, sftp, s3, google_cloud_storage, webdav, wasabi, backblaze_b2, one_drive, rackspace, box, dropbox, google_drive, azure, sharepoint, s3_compatible, azure_files, files_agent, filebase, cloudflare, linode
    ssl string Should we require SSL?
    Possible values: if_available, require, require_implicit, never
    username string Remote server username. Not needed for S3 buckets.
    google_cloud_storage_bucket string Google Cloud Storage bucket name
    google_cloud_storage_project_id string Google Cloud Project ID
    backblaze_b2_bucket string Backblaze B2 Cloud Storage Bucket name
    backblaze_b2_s3_endpoint string Backblaze B2 Cloud Storage S3 Endpoint
    wasabi_bucket string Wasabi Bucket name
    wasabi_region string Wasabi region
    rackspace_username string Rackspace username used to login to the Rackspace Cloud Control Panel.
    rackspace_region string Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
    rackspace_container string The name of the container (top level directory) where files will sync.
    one_drive_account_type string Either personal or business_other account types
    Possible values: personal, business_other
    azure_blob_storage_account string Azure Blob Storage Account name
    azure_blob_storage_container string Azure Blob Storage Container name
    azure_blob_storage_hierarchical_namespace boolean Enable when storage account has hierarchical namespace feature enabled
    azure_blob_storage_sas_token string Shared Access Signature (SAS) token
    azure_files_storage_account string Azure File Storage Account name
    azure_files_storage_share_name string Azure File Storage Share name
    azure_files_storage_sas_token string Shared Access Signature (SAS) token
    s3_compatible_bucket string S3-compatible Bucket name
    s3_compatible_endpoint string S3-compatible endpoint
    s3_compatible_region string S3-compatible endpoint
    enable_dedicated_ips boolean true if remote server only accepts connections from dedicated IPs
    s3_compatible_access_key string S3-compatible Access Key.
    s3_compatible_secret_key string S3-compatible secret key
    files_agent_root string Agent local root path
    files_agent_permission_set string Local permissions for files agent. read_only, write_only, or read_write
    Possible values: read_write, read_only, write_only
    files_agent_version string Files Agent version
    filebase_access_key string Filebase Access Key.
    filebase_secret_key string Filebase secret key
    filebase_bucket string Filebase Bucket name
    cloudflare_access_key string Cloudflare Access Key.
    cloudflare_secret_key string Cloudflare secret key
    cloudflare_bucket string Cloudflare Bucket name
    cloudflare_endpoint string Cloudflare endpoint
    dropbox_teams boolean List Team folders in root
    linode_access_key string Linode Access Key.
    linode_secret_key string Linode secret key
    linode_bucket string Linode Bucket name
    linode_region string Linode region

    Delete Remote Server

    Example Request

    curl https://app.files.com/api/rest/v1/remote_servers/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/remote_servers/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    remote_server = Files::RemoteServer.list.first
    remote_server.delete
    
    $remote_server = \Files\Model\RemoteServer::list()[0];
    $remote_server->delete();
    
    RemoteServer remoteServer = RemoteServer.list()[0];
    
    remoteServer.delete();
    
    const remoteServer = (await RemoteServer.list())[0]
    await remoteServer.delete()
    
    var remoteServer = (await RemoteServer.List())[0];
    
    await remoteServer.Delete();
    
    files_sdk.set_api_key("my-key")
    
    remote_server = files_sdk.remote_server.find(id)
    remote_server.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    remoteserver.Delete(context.Background(), files_sdk.RemoteServerDeleteParams{
      Id: 1,
    })
    
    files-cli remote-servers delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /remote_servers/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Remote Server ID.

    Remote Server Configuration Files

    The RemoteServerConfigurationFiles resource in the REST API allows you to operate on RemoteServerConfigurationFiles.

    The RemoteServerConfigurationFile object

    Example RemoteServerConfigurationFile Object

    {
      "id": 1,
      "permission_set": "full",
      "private_key": "example",
      "subdomain": "example",
      "root": "example",
      "api_token": "example",
      "port": 1,
      "hostname": "example",
      "public_key": "example",
      "status": "example",
      "server_host_key": "example",
      "config_version": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-server-configuration-file>
      <id type="integer">1</id>
      <permission_set>full</permission_set>
      <private_key>example</private_key>
      <subdomain>example</subdomain>
      <root>example</root>
      <api_token>example</api_token>
      <port type="integer">1</port>
      <hostname>example</hostname>
      <public_key>example</public_key>
      <status>example</status>
      <server_host_key>example</server_host_key>
      <config_version>example</config_version>
    </remote-server-configuration-file>
    
    
    Attribute Description
    id int64 Agent ID
    permission_set string
    private_key string private key
    subdomain string
    root string Agent local root path
    api_token string Files Agent API Token
    port int64 Incoming port for files agent connections
    hostname string
    public_key string public key
    status string either running or shutdown
    server_host_key string
    config_version string agent config version

    Download configuration file (required for some Remote Server integrations, such as the Files.com Agent)

    Example Request

    curl https://app.files.com/api/rest/v1/remote_servers/{id}/configuration_file.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/remote_servers/{id}/configuration_file.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::RemoteServer.find_configuration_file(id)
    
    \Files\Model\RemoteServer::findConfigurationFile($id);
    
    
    RemoteServer.findConfigurationFile(, parameters
    
    await RemoteServer.findConfigurationFile(id)
    
    
    await RemoteServer.FindConfigurationFile(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.remote_server.find_configuration_file(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    remoteserver.FindConfigurationFile(context.Background(), files_sdk.RemoteServerFindConfigurationFileParams{
      Id: 1,
    })
    
    
    files-cli remote-servers find-configuration-file \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "permission_set": "full",
      "private_key": "example",
      "subdomain": "example",
      "root": "example",
      "api_token": "example",
      "port": 1,
      "hostname": "example",
      "public_key": "example",
      "status": "example",
      "server_host_key": "example",
      "config_version": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-server-configuration-file>
      <id type="integer">1</id>
      <permission_set>full</permission_set>
      <private_key>example</private_key>
      <subdomain>example</subdomain>
      <root>example</root>
      <api_token>example</api_token>
      <port type="integer">1</port>
      <hostname>example</hostname>
      <public_key>example</public_key>
      <status>example</status>
      <server_host_key>example</server_host_key>
      <config_version>example</config_version>
    </remote-server-configuration-file>
    
    

    HTTPS Request

    GET /remote_servers/{id}/configuration_file

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Remote Server ID.

    Post local changes, check in, and download configuration file (used by some Remote Server integrations, such as the Files.com Agent)

    Example Request

    curl https://app.files.com/api/rest/v1/remote_servers/{id}/configuration_file.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"api_token":"example","permission_set":"full","root":"example","hostname":"example","port":1,"status":"example","config_version":"example","private_key":"example","public_key":"example","server_host_key":"example","subdomain":"example"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/remote_servers/{id}/configuration_file.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<remote-server-configuration-file>
           <api_token>example</api_token>
           <permission_set>full</permission_set>
           <root>example</root>
           <hostname>example</hostname>
           <port type="integer">1</port>
           <status>example</status>
           <config_version>example</config_version>
           <private_key>example</private_key>
           <public_key>example</public_key>
           <server_host_key>example</server_host_key>
           <subdomain>example</subdomain>
         </remote-server-configuration-file>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    remote_server = Files::RemoteServer.new
    remote_server.configuration_file(
      api_token: "example",
      permission_set: "full",
      root: "example",
      hostname: "example",
      port: 1,
      status: "example",
      config_version: "example",
      private_key: "example",
      public_key: "example",
      server_host_key: "example",
      subdomain: "example"
    )
    
    $remote_server = new \Files\Model\RemoteServer();
    $remote_server->configurationFile(array(
      'api_token' => "example", 
      'permission_set' => "full", 
      'root' => "example", 
      'hostname' => "example", 
      'port' => 1, 
      'status' => "example", 
      'config_version' => "example", 
      'private_key' => "example", 
      'public_key' => "example", 
      'server_host_key' => "example", 
      'subdomain' => "example"
    ));
    
    HashMap<Object, String> attributes = new HashMap<>();
    RemoteServer remoteServer = new RemoteServer(attributes);
    remoteServer.setApiToken("example");
    remoteServer.setPermissionSet("full");
    remoteServer.setRoot("example");
    remoteServer.setHostname("example");
    remoteServer.setPort(1);
    remoteServer.setStatus("example");
    remoteServer.setConfigVersion("example");
    remoteServer.setPrivateKey("example");
    remoteServer.setPublicKey("example");
    remoteServer.setServerHostKey("example");
    remoteServer.setSubdomain("example");
    remoteServer.configurationFile();
    
    const remoteServer = new RemoteServer()
    await remoteServer.configurationFile({ 
      api_token: "example", 
      permission_set: "full", 
      root: "example", 
      hostname: "example", 
      port: 1, 
      status: "example", 
      config_version: "example", 
      private_key: "example", 
      public_key: "example", 
      server_host_key: "example", 
      subdomain: "example",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("api_token", "example");
    parameters.Add("permission_set", "full");
    parameters.Add("root", "example");
    parameters.Add("hostname", "example");
    parameters.Add("port", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("status", "example");
    parameters.Add("config_version", "example");
    parameters.Add("private_key", "example");
    parameters.Add("public_key", "example");
    parameters.Add("server_host_key", "example");
    parameters.Add("subdomain", "example");
    
    await remoteServer.ConfigurationFile(parameters);
    
    files_sdk.set_api_key("my-key")
    
    remote_server = files_sdk.remote_server.find(id)
    remote_server.configuration_file({
      "api_token": "example",
      "permission_set": "full",
      "root": "example",
      "hostname": "example",
      "port": 1,
      "status": "example",
      "config_version": "example",
      "private_key": "example",
      "public_key": "example",
      "server_host_key": "example",
      "subdomain": "example"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    remoteserver.ConfigurationFile(context.Background(), files_sdk.RemoteServerConfigurationFileParams{
      Id: 1,
      ApiToken: "example",
      PermissionSet: "full",
      Root: "example",
      Hostname: "example",
      Port: 1,
      Status: "example",
      ConfigVersion: "example",
      PrivateKey: "example",
      PublicKey: "example",
      ServerHostKey: "example",
      Subdomain: "example",
    })
    
    files-cli remote-servers configuration-file \
      --id=1 \
      --api-token="example" \
      --permission-set="full" \
      --root="example" \
      --hostname="example" \
      --port=1 \
      --status="example" \
      --config-version="example" \
      --private-key="example" \
      --public-key="example" \
      --server-host-key="example" \
      --subdomain="example" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "permission_set": "full",
      "private_key": "example",
      "subdomain": "example",
      "root": "example",
      "api_token": "example",
      "port": 1,
      "hostname": "example",
      "public_key": "example",
      "status": "example",
      "server_host_key": "example",
      "config_version": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-server-configuration-file>
      <id type="integer">1</id>
      <permission_set>full</permission_set>
      <private_key>example</private_key>
      <subdomain>example</subdomain>
      <root>example</root>
      <api_token>example</api_token>
      <port type="integer">1</port>
      <hostname>example</hostname>
      <public_key>example</public_key>
      <status>example</status>
      <server_host_key>example</server_host_key>
      <config_version>example</config_version>
    </remote-server-configuration-file>
    
    

    HTTPS Request

    POST /remote_servers/{id}/configuration_file

    Authentication Required

    No authentication required; you may call this endpoint without a key or session.

    Request Parameters

    Parameter Description
    id int64 Required Remote Server ID.
    api_token string Files Agent API Token
    permission_set string
    root string Agent local root path
    hostname string
    port int64 Incoming port for files agent connections
    status string either running or shutdown
    config_version string agent config version
    private_key string private key
    public_key string public key
    server_host_key string
    subdomain string

    Requests

    A Request represents a file that should be uploaded by a specific user or group.

    Requests can either be manually created and managed, or managed automatically by an Automation.

    The Request object

    Example Request Object

    {
      "id": 1,
      "path": "example",
      "source": "example",
      "destination": "example",
      "automation_id": "example",
      "user_display_name": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <request>
      <id type="integer">1</id>
      <path>example</path>
      <source>example</source>
      <destination>example</destination>
      <automation_id>example</automation_id>
      <user_display_name>example</user_display_name>
    </request>
    
    
    Attribute Description
    id int64 Request ID
    path string Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    source string Source filename, if applicable
    destination string Destination filename
    automation_id string ID of automation that created request
    user_display_name string User making the request (if applicable)
    user_ids string A list of user IDs to request the file from. If sent as a string, it should be comma-delimited.
    group_ids string A list of group IDs to request the file from. If sent as a string, it should be comma-delimited.

    List Requests

    Example Request

    curl "https://app.files.com/api/rest/v1/requests.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/requests.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Request.list(
      per_page: 1, 
      mine: true, 
      path: "example"
    )
    
    \Files\Model\Request::list(array(
      'per_page' => 1, 
      'mine' => true, 
      'path' => "example"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("mine", true);
    requestParams.put("path", example);
    Request.list(parameters).all()
    
    await Request.list({
      per_page: 1, 
      mine: true, 
      path: "example",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("mine", true);
    parameters.Add("path", "example");
    
    await Request.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.request.list({
      "per_page": 1,
      "mine": True,
      "path": "example"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    request.List(context.Background(), files_sdk.RequestListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Mine: lib.Bool(true),
      Path: "example",
    })
    
    
    files-cli requests list \
      --cursor="" \
      --per-page=1 \
      --path="example" \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "path": "example",
        "source": "example",
        "destination": "example",
        "automation_id": "example",
        "user_display_name": "example"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <requests type="array">
      <request>
        <id type="integer">1</id>
        <path>example</path>
        <source>example</source>
        <destination>example</destination>
        <automation_id>example</automation_id>
        <user_display_name>example</user_display_name>
      </request>
    </requests>
    
    

    HTTPS Request

    GET /requests

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    mine boolean Only show requests of the current user? (Defaults to true if current user is not a site admin.)
    path string Path to show requests for. If omitted, shows all paths. Send / to represent the root directory.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[destination]=desc). Valid fields are destination.

    List Requests

    Example Request

    curl "https://app.files.com/api/rest/v1/requests/folders/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/requests/folders/{path}" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Request.get_folder(path, 
      per_page: 1, 
      mine: true
    )
    
    \Files\Model\Request::getFolder($path, array(
      'per_page' => 1, 
      'mine' => true
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    requestParams.put("mine", true);
    Request.getFolder(parameters).all()
    
    await Request.getFolder(path, {
      per_page: 1, 
      mine: true,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    parameters.Add("mine", true);
    
    await Request.GetFolder(path, parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.request.get_folder(path, {
      "per_page": 1,
      "mine": True
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    request.GetFolder(context.Background(), files_sdk.RequestGetFolderParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Mine: lib.Bool(true),
      Path: "path",
    })
    
    
    files-cli requests get-folder \
      --cursor="" \
      --per-page=1 \
      --path="path" \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "path": "example",
        "source": "example",
        "destination": "example",
        "automation_id": "example",
        "user_display_name": "example"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <requests type="array">
      <request>
        <id type="integer">1</id>
        <path>example</path>
        <source>example</source>
        <destination>example</destination>
        <automation_id>example</automation_id>
        <user_display_name>example</user_display_name>
      </request>
    </requests>
    
    

    HTTPS Request

    GET /requests/folders/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    mine boolean Only show requests of the current user? (Defaults to true if current user is not a site admin.)
    path string Required Path to show requests for. If omitted, shows all paths. Send / to represent the root directory.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[destination]=desc). Valid fields are destination.

    Create Request

    Example Request

    curl https://app.files.com/api/rest/v1/requests.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"path":"path","destination":"destination"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/requests.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<request>
           <path>path</path>
           <destination>destination</destination>
         </request>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Request.create(
      path: "path", 
      destination: "destination"
    )
    
    \Files\Model\Request::create(array(
      'path' => "path", 
      'destination' => "destination"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("path", path);
    requestParams.put("destination", destination);
    Request.create(parameters)
    
    await Request.create({
      path: "path", 
      destination: "destination",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("path", "path");
    parameters.Add("destination", "destination");
    
    await Request.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.request.create({
      "path": "path",
      "destination": "destination"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    request.Create(context.Background(), files_sdk.RequestCreateParams{
      Path: "path",
      Destination: "destination",
      UserIds: "",
      GroupIds: "",
    })
    
    
    files-cli requests create \
      --path="path" \
      --destination="destination" \
      --user-ids="" \
      --group-ids="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "path": "example",
      "source": "example",
      "destination": "example",
      "automation_id": "example",
      "user_display_name": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <request>
      <id type="integer">1</id>
      <path>example</path>
      <source>example</source>
      <destination>example</destination>
      <automation_id>example</automation_id>
      <user_display_name>example</user_display_name>
    </request>
    
    

    HTTPS Request

    POST /requests

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Folder path on which to request the file.
    destination string Required Destination filename (without extension) to request.
    user_ids string A list of user IDs to request the file from. If sent as a string, it should be comma-delimited.
    group_ids string A list of group IDs to request the file from. If sent as a string, it should be comma-delimited.

    Delete Request

    Example Request

    curl https://app.files.com/api/rest/v1/requests/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/requests/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    request = Files::Request.list.first
    request.delete
    
    $request = \Files\Model\Request::list()[0];
    $request->delete();
    
    Request request = Request.list()[0];
    
    request.delete();
    
    const request = (await Request.list())[0]
    await request.delete()
    
    var request = (await Request.List())[0];
    
    await request.Delete();
    
    files_sdk.set_api_key("my-key")
    
    request = files_sdk.request.list.first
    request.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    request.Delete(context.Background(), files_sdk.RequestDeleteParams{
      Id: 1,
    })
    
    files-cli requests delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /requests/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Request ID.

    Sessions

    You may use a Session to make further API calls using our REST API or SDKs as a specific user. This is the only way to use the API if you know a username/password but not an API key.

    The Session object

    Example Session Object

    {
      "id": "60525f92e859c4c3d74cb02fd176b1525901b525",
      "language": "en",
      "read_only": true,
      "sftp_insecure_ciphers": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <session>
      <id>60525f92e859c4c3d74cb02fd176b1525901b525</id>
      <language>en</language>
      <read_only type="boolean">true</read_only>
      <sftp_insecure_ciphers type="boolean">true</sftp_insecure_ciphers>
    </session>
    
    
    Attribute Description
    id string Session ID
    language string Session language
    read_only boolean Is this session read only?
    sftp_insecure_ciphers boolean Are insecure SFTP ciphers allowed for this user? (If this is set to true, the site administrator has signaled that it is ok to use less secure SSH ciphers for this user.)
    username string Username to sign in as
    password string Password for sign in
    otp string If this user has a 2FA device, provide its OTP or code here.
    partial_session_id string Identifier for a partially-completed login

    Create user session (log in)

    Example Request

    curl https://app.files.com/api/rest/v1/sessions.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"username":"username","password":"password","otp":"123456"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/sessions.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<session>
           <username>username</username>
           <password>password</password>
           <otp>123456</otp>
         </session>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Session.create(
      username: "username", 
      password: "password", 
      otp: "123456"
    )
    
    \Files\Model\Session::create(array(
      'username' => "username", 
      'password' => "password", 
      'otp' => "123456"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("username", username);
    requestParams.put("password", password);
    requestParams.put("otp", 123456);
    Session.create(parameters)
    
    await Session.create({
      username: "username", 
      password: "password", 
      otp: "123456",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("username", "username");
    parameters.Add("password", "password");
    parameters.Add("otp", "123456");
    
    await Session.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.session.create({
      "username": "username",
      "password": "password",
      "otp": "123456"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    session.Create(context.Background(), files_sdk.SessionCreateParams{
      Username: "username",
      Password: "password",
      Otp: []string{"123456"},
      PartialSessionId: "",
    })
    
    
    files-cli sessions create \
      --username="username" \
      --password="password" \
      --otp="123456" \
      --partial-session-id="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": "60525f92e859c4c3d74cb02fd176b1525901b525",
      "language": "en",
      "read_only": true,
      "sftp_insecure_ciphers": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <session>
      <id>60525f92e859c4c3d74cb02fd176b1525901b525</id>
      <language>en</language>
      <read_only type="boolean">true</read_only>
      <sftp_insecure_ciphers type="boolean">true</sftp_insecure_ciphers>
    </session>
    
    

    HTTPS Request

    POST /sessions

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    username string Username to sign in as
    password string Password for sign in
    otp string If this user has a 2FA device, provide its OTP or code here.
    partial_session_id string Identifier for a partially-completed login

    Delete user session (log out)

    Example Request

    curl https://app.files.com/api/rest/v1/sessions.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/sessions.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Session.delete
    
    \Files\Model\Session::delete();
    
    
    Session.delete(, parameters
    
    await Session.delete()
    
    
    await Session.Delete();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.session.delete()
    
    files_sdk.APIKey = "YOUR_API_KEY"
    session.Delete
    
    
    files-cli sessions delete \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /sessions

    Authentication Required

    Available to all authenticated keys or sessions.

    Settings Changes

    Settings changes caused by any user.

    The SettingsChange object

    Example SettingsChange Object

    {
      "changes": [
        "example"
      ],
      "created_at": "2000-01-01T01:00:00Z",
      "user_id": 1,
      "api_key_id": 1,
      "user_is_files_support": true,
      "username": "some_user"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <settings-change>
      <changes type="array">
        <change>example</change>
      </changes>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <user_id type="integer">1</user_id>
      <api_key_id type="integer">1</api_key_id>
      <user_is_files_support type="boolean">true</user_is_files_support>
      <username>some_user</username>
    </settings-change>
    
    
    Attribute Description
    changes array Markdown-formatted change messages.
    created_at date-time The time this change was made
    user_id int64 The user id responsible for this change
    api_key_id int64 The api key id responsible for this change
    user_is_files_support boolean true if this change was performed by Files.com support.
    username string The username of the user responsible for this change

    List Settings Changes

    Example Request

    curl "https://app.files.com/api/rest/v1/settings_changes.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/settings_changes.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::SettingsChange.list(
      per_page: 1
    )
    
    \Files\Model\SettingsChange::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    SettingsChange.list(parameters).all()
    
    await SettingsChange.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await SettingsChange.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.settings_change.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    settingschange.List(context.Background(), files_sdk.SettingsChangeListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
    })
    
    
    files-cli settings-changes list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "changes": [
          "example"
        ],
        "created_at": "2000-01-01T01:00:00Z",
        "user_id": 1,
        "api_key_id": 1,
        "user_is_files_support": true,
        "username": "some_user"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <settings-changes type="array">
      <settings-change>
        <changes type="array">
          <change>example</change>
        </changes>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <user_id type="integer">1</user_id>
        <api_key_id type="integer">1</api_key_id>
        <user_is_files_support type="boolean">true</user_is_files_support>
        <username>some_user</username>
      </settings-change>
    </settings-changes>
    
    

    HTTPS Request

    GET /settings_changes

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[api_key_id]=desc). Valid fields are api_key_id, created_at or user_id.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are api_key_id and user_id.

    Sftp Host Keys

    The SftpHostKeys resource in the REST API allows you to operate on SftpHostKeys.

    The SftpHostKey object

    Example SftpHostKey Object

    {
      "id": 1,
      "name": "example",
      "fingerprint_md5": "example",
      "fingerprint_sha256": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <sftp-host-key>
      <id type="integer">1</id>
      <name>example</name>
      <fingerprint_md5>example</fingerprint_md5>
      <fingerprint_sha256>example</fingerprint_sha256>
    </sftp-host-key>
    
    
    Attribute Description
    id int64 Sftp Host Key ID
    name string The friendly name of this SFTP Host Key.
    fingerprint_md5 string MD5 Fingerpint of the public key
    fingerprint_sha256 string SHA256 Fingerpint of the public key
    private_key string The private key data.

    List Sftp Host Keys

    Example Request

    curl "https://app.files.com/api/rest/v1/sftp_host_keys.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/sftp_host_keys.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::SftpHostKey.list(
      per_page: 1
    )
    
    \Files\Model\SftpHostKey::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    SftpHostKey.list(parameters).all()
    
    await SftpHostKey.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await SftpHostKey.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.sftp_host_key.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    sftphostkey.List(context.Background(), files_sdk.SftpHostKeyListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli sftp-host-keys list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "name": "example",
        "fingerprint_md5": "example",
        "fingerprint_sha256": "example"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <sftp-host-keys type="array">
      <sftp-host-key>
        <id type="integer">1</id>
        <name>example</name>
        <fingerprint_md5>example</fingerprint_md5>
        <fingerprint_sha256>example</fingerprint_sha256>
      </sftp-host-key>
    </sftp-host-keys>
    
    

    HTTPS Request

    GET /sftp_host_keys

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Show Sftp Host Key

    Example Request

    curl https://app.files.com/api/rest/v1/sftp_host_keys/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/sftp_host_keys/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::SftpHostKey.find(id)
    
    \Files\Model\SftpHostKey::find($id);
    
    
    SftpHostKey.find(, parameters
    
    await SftpHostKey.find(id)
    
    
    await SftpHostKey.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.sftp_host_key.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    sftphostkey.Find(context.Background(), files_sdk.SftpHostKeyFindParams{
      Id: 1,
    })
    
    
    files-cli sftp-host-keys find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "example",
      "fingerprint_md5": "example",
      "fingerprint_sha256": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <sftp-host-key>
      <id type="integer">1</id>
      <name>example</name>
      <fingerprint_md5>example</fingerprint_md5>
      <fingerprint_sha256>example</fingerprint_sha256>
    </sftp-host-key>
    
    

    HTTPS Request

    GET /sftp_host_keys/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Sftp Host Key ID.

    Create Sftp Host Key

    Example Request

    curl https://app.files.com/api/rest/v1/sftp_host_keys.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"name":"example"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/sftp_host_keys.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<sftp-host-key>
           <name>example</name>
         </sftp-host-key>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::SftpHostKey.create(
      name: "example"
    )
    
    \Files\Model\SftpHostKey::create(array(
      'name' => "example"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("name", example);
    SftpHostKey.create(parameters)
    
    await SftpHostKey.create({
      name: "example",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("name", "example");
    
    await SftpHostKey.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.sftp_host_key.create({
      "name": "example"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    sftphostkey.Create(context.Background(), files_sdk.SftpHostKeyCreateParams{
      Name: "example",
      PrivateKey: "",
    })
    
    
    files-cli sftp-host-keys create \
      --name="example" \
      --private-key="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "example",
      "fingerprint_md5": "example",
      "fingerprint_sha256": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <sftp-host-key>
      <id type="integer">1</id>
      <name>example</name>
      <fingerprint_md5>example</fingerprint_md5>
      <fingerprint_sha256>example</fingerprint_sha256>
    </sftp-host-key>
    
    

    HTTPS Request

    POST /sftp_host_keys

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    name string The friendly name of this SFTP Host Key.
    private_key string The private key data.

    Update Sftp Host Key

    Example Request

    curl https://app.files.com/api/rest/v1/sftp_host_keys/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"name":"example"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/sftp_host_keys/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<sftp-host-key>
           <name>example</name>
         </sftp-host-key>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    sftp_host_key = Files::SftpHostKey.list.first
    sftp_host_key.update(
      name: "example"
    )
    
    $sftp_host_key = \Files\Model\SftpHostKey::list()[0];
    $sftp_host_key->update(array(
      'name' => "example"
    ));
    
    SftpHostKey sftpHostKey = SftpHostKey.list()[0];
    sftpHostKey.setName("example");
    sftpHostKey.update();
    
    const sftpHostKey = (await SftpHostKey.list())[0]
    await sftpHostKey.update({ 
      name: "example",
    })
    
    var sftpHostKey = (await SftpHostKey.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("name", "example");
    
    await sftpHostKey.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    sftp_host_key = files_sdk.sftp_host_key.find(id)
    sftp_host_key.update({
      "name": "example"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    sftphostkey.Update(context.Background(), files_sdk.SftpHostKeyUpdateParams{
      Id: 1,
      Name: "example",
      PrivateKey: "",
    })
    
    files-cli sftp-host-keys update \
      --id=1 \
      --name="example" \
      --private-key="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "example",
      "fingerprint_md5": "example",
      "fingerprint_sha256": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <sftp-host-key>
      <id type="integer">1</id>
      <name>example</name>
      <fingerprint_md5>example</fingerprint_md5>
      <fingerprint_sha256>example</fingerprint_sha256>
    </sftp-host-key>
    
    

    HTTPS Request

    PATCH /sftp_host_keys/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Sftp Host Key ID.
    name string The friendly name of this SFTP Host Key.
    private_key string The private key data.

    Delete Sftp Host Key

    Example Request

    curl https://app.files.com/api/rest/v1/sftp_host_keys/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/sftp_host_keys/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    sftp_host_key = Files::SftpHostKey.list.first
    sftp_host_key.delete
    
    $sftp_host_key = \Files\Model\SftpHostKey::list()[0];
    $sftp_host_key->delete();
    
    SftpHostKey sftpHostKey = SftpHostKey.list()[0];
    
    sftpHostKey.delete();
    
    const sftpHostKey = (await SftpHostKey.list())[0]
    await sftpHostKey.delete()
    
    var sftpHostKey = (await SftpHostKey.List())[0];
    
    await sftpHostKey.Delete();
    
    files_sdk.set_api_key("my-key")
    
    sftp_host_key = files_sdk.sftp_host_key.find(id)
    sftp_host_key.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    sftphostkey.Delete(context.Background(), files_sdk.SftpHostKeyDeleteParams{
      Id: 1,
    })
    
    files-cli sftp-host-keys delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /sftp_host_keys/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Sftp Host Key ID.

    Share Groups

    Share groups allow you to store and name groups of email contacts to be used for sending share and inbox invitations.

    The ShareGroup object

    Example ShareGroup Object

    {
      "id": 1,
      "name": "Test group 1",
      "notes": "This group is defined for testing purposes",
      "user_id": 1,
      "members": [
        {
          "name": "John Doe",
          "company": "Acme Ltd",
          "email": "johndoe@gmail.com"
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <share-group>
      <id type="integer">1</id>
      <name>Test group 1</name>
      <notes>This group is defined for testing purposes</notes>
      <user_id type="integer">1</user_id>
      <members type="array">
        <member>
          <name>John Doe</name>
          <company>Acme Ltd</company>
          <email>johndoe@gmail.com</email>
        </member>
      </members>
    </share-group>
    
    
    Attribute Description
    id int64 Share Group ID
    name string Name of the share group
    notes string Additional notes of the share group
    user_id int64 Owner User ID
    members array A list of share group members

    List Share Groups

    Example Request

    curl "https://app.files.com/api/rest/v1/share_groups.json?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/share_groups.xml?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ShareGroup.list(
      user_id: 1, 
      per_page: 1
    )
    
    \Files\Model\ShareGroup::list(array(
      'user_id' => 1, 
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    ShareGroup.list(parameters).all()
    
    await ShareGroup.list({
      user_id: 1, 
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    
    await ShareGroup.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.share_group.list({
      "user_id": 1,
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    sharegroup.List(context.Background(), files_sdk.ShareGroupListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli share-groups list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "name": "Test group 1",
        "notes": "This group is defined for testing purposes",
        "user_id": 1,
        "members": [
          {
            "name": "John Doe",
            "company": "Acme Ltd",
            "email": "johndoe@gmail.com"
          }
        ]
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <share-groups type="array">
      <share-group>
        <id type="integer">1</id>
        <name>Test group 1</name>
        <notes>This group is defined for testing purposes</notes>
        <user_id type="integer">1</user_id>
        <members type="array">
          <member>
            <name>John Doe</name>
            <company>Acme Ltd</company>
            <email>johndoe@gmail.com</email>
          </member>
        </members>
      </share-group>
    </share-groups>
    
    

    HTTPS Request

    GET /share_groups

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.

    Pagination Params

    Read more about Paginating List Requests.

    Show Share Group

    Example Request

    curl https://app.files.com/api/rest/v1/share_groups/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/share_groups/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ShareGroup.find(id)
    
    \Files\Model\ShareGroup::find($id);
    
    
    ShareGroup.find(, parameters
    
    await ShareGroup.find(id)
    
    
    await ShareGroup.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.share_group.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    sharegroup.Find(context.Background(), files_sdk.ShareGroupFindParams{
      Id: 1,
    })
    
    
    files-cli share-groups find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "Test group 1",
      "notes": "This group is defined for testing purposes",
      "user_id": 1,
      "members": [
        {
          "name": "John Doe",
          "company": "Acme Ltd",
          "email": "johndoe@gmail.com"
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <share-group>
      <id type="integer">1</id>
      <name>Test group 1</name>
      <notes>This group is defined for testing purposes</notes>
      <user_id type="integer">1</user_id>
      <members type="array">
        <member>
          <name>John Doe</name>
          <company>Acme Ltd</company>
          <email>johndoe@gmail.com</email>
        </member>
      </members>
    </share-group>
    
    

    HTTPS Request

    GET /share_groups/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Share Group ID.

    Create Share Group

    Example Request

    curl https://app.files.com/api/rest/v1/share_groups.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"user_id":1,"notes":"This group is defined for testing purposes","name":"Test group 1","members":[{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}]}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/share_groups.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<share-group>
           <user_id type="integer">1</user_id>
           <notes>This group is defined for testing purposes</notes>
           <name>Test group 1</name>
           <members type="array">
             <member>
               <name>John Doe</name>
               <company>Acme Ltd</company>
               <email>johndoe@gmail.com</email>
             </member>
           </members>
         </share-group>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ShareGroup.create(
      user_id: 1, 
      notes: "This group is defined for testing purposes", 
      name: "Test group 1", 
      members: [{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}]
    )
    
    \Files\Model\ShareGroup::create(array(
      'user_id' => 1, 
      'notes' => "This group is defined for testing purposes", 
      'name' => "Test group 1", 
      'members' => [{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}]
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("notes", This group is defined for testing purposes);
    requestParams.put("name", Test group 1);
    requestParams.put("members", [{"name"=>"John Doe", "company"=>"Acme Ltd", "email"=>"johndoe@gmail.com"}]);
    ShareGroup.create(parameters)
    
    await ShareGroup.create({
      user_id: 1, 
      notes: "This group is defined for testing purposes", 
      name: "Test group 1", 
      members: [{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}],
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("notes", "This group is defined for testing purposes");
    parameters.Add("name", "Test group 1");
    parameters.Add("members", (object[]) [{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}]);
    
    await ShareGroup.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.share_group.create({
      "user_id": 1,
      "notes": "This group is defined for testing purposes",
      "name": "Test group 1",
      "members": [{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}]
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    sharegroup.Create(context.Background(), files_sdk.ShareGroupCreateParams{
      UserId: 1,
      Notes: "This group is defined for testing purposes",
      Name: "Test group 1",
      Members: []map[string]interface{}{`{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}`},
    })
    
    
    files-cli share-groups create \
      --user-id=1 \
      --notes="This group is defined for testing purposes" \
      --name="Test group 1" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "Test group 1",
      "notes": "This group is defined for testing purposes",
      "user_id": 1,
      "members": [
        {
          "name": "John Doe",
          "company": "Acme Ltd",
          "email": "johndoe@gmail.com"
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <share-group>
      <id type="integer">1</id>
      <name>Test group 1</name>
      <notes>This group is defined for testing purposes</notes>
      <user_id type="integer">1</user_id>
      <members type="array">
        <member>
          <name>John Doe</name>
          <company>Acme Ltd</company>
          <email>johndoe@gmail.com</email>
        </member>
      </members>
    </share-group>
    
    

    HTTPS Request

    POST /share_groups

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    notes string Additional notes of the share group
    name string Required Name of the share group
    members array(object) Required A list of share group members.

    Update Share Group

    Example Request

    curl https://app.files.com/api/rest/v1/share_groups/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"notes":"This group is defined for testing purposes","name":"Test group 1","members":[{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}]}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/share_groups/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<share-group>
           <notes>This group is defined for testing purposes</notes>
           <name>Test group 1</name>
           <members type="array">
             <member>
               <name>John Doe</name>
               <company>Acme Ltd</company>
               <email>johndoe@gmail.com</email>
             </member>
           </members>
         </share-group>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    share_group = Files::ShareGroup.list.first
    share_group.update(
      notes: "This group is defined for testing purposes",
      name: "Test group 1",
      members: [{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}]
    )
    
    $share_group = \Files\Model\ShareGroup::list()[0];
    $share_group->update(array(
      'notes' => "This group is defined for testing purposes", 
      'name' => "Test group 1", 
      'members' => [{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}]
    ));
    
    ShareGroup shareGroup = ShareGroup.list()[0];
    shareGroup.setNotes("This group is defined for testing purposes");
    shareGroup.setName("Test group 1");
    shareGroup.setMembers([{"name"=>"John Doe", "company"=>"Acme Ltd", "email"=>"johndoe@gmail.com"}]);
    shareGroup.update();
    
    const shareGroup = (await ShareGroup.list())[0]
    await shareGroup.update({ 
      notes: "This group is defined for testing purposes", 
      name: "Test group 1", 
      members: [{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}],
    })
    
    var shareGroup = (await ShareGroup.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("notes", "This group is defined for testing purposes");
    parameters.Add("name", "Test group 1");
    parameters.Add("members", (object[]), shorthand: true) [{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}]);
    
    await shareGroup.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    share_group = files_sdk.share_group.find(id)
    share_group.update({
      "notes": "This group is defined for testing purposes",
      "name": "Test group 1",
      "members": [{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}]
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    sharegroup.Update(context.Background(), files_sdk.ShareGroupUpdateParams{
      Id: 1,
      Notes: "This group is defined for testing purposes",
      Name: "Test group 1",
      Members: []map[string]interface{}{`{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}`},
    })
    
    files-cli share-groups update \
      --id=1 \
      --notes="This group is defined for testing purposes" \
      --name="Test group 1" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "Test group 1",
      "notes": "This group is defined for testing purposes",
      "user_id": 1,
      "members": [
        {
          "name": "John Doe",
          "company": "Acme Ltd",
          "email": "johndoe@gmail.com"
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <share-group>
      <id type="integer">1</id>
      <name>Test group 1</name>
      <notes>This group is defined for testing purposes</notes>
      <user_id type="integer">1</user_id>
      <members type="array">
        <member>
          <name>John Doe</name>
          <company>Acme Ltd</company>
          <email>johndoe@gmail.com</email>
        </member>
      </members>
    </share-group>
    
    

    HTTPS Request

    PATCH /share_groups/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Share Group ID.
    notes string Additional notes of the share group
    name string Name of the share group
    members array(object) A list of share group members.

    Delete Share Group

    Example Request

    curl https://app.files.com/api/rest/v1/share_groups/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/share_groups/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    share_group = Files::ShareGroup.list.first
    share_group.delete
    
    $share_group = \Files\Model\ShareGroup::list()[0];
    $share_group->delete();
    
    ShareGroup shareGroup = ShareGroup.list()[0];
    
    shareGroup.delete();
    
    const shareGroup = (await ShareGroup.list())[0]
    await shareGroup.delete()
    
    var shareGroup = (await ShareGroup.List())[0];
    
    await shareGroup.Delete();
    
    files_sdk.set_api_key("my-key")
    
    share_group = files_sdk.share_group.find(id)
    share_group.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    sharegroup.Delete(context.Background(), files_sdk.ShareGroupDeleteParams{
      Id: 1,
    })
    
    files-cli share-groups delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /share_groups/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Share Group ID.

    Sites

    Site

    The Site resource in the REST API allows you to operate on your Site. This is the place you'll come to update site settings, as well as manage sitewide API keys.

    Most site settings can be set via the API.

    The Site object

    Example Site Object

    {
      "name": "My Site",
      "allowed_2fa_method_sms": true,
      "allowed_2fa_method_totp": true,
      "allowed_2fa_method_u2f": true,
      "allowed_2fa_method_webauthn": true,
      "allowed_2fa_method_yubi": true,
      "allowed_2fa_method_email": true,
      "allowed_2fa_method_bypass_for_ftp_sftp_dav": true,
      "admin_user_id": 1,
      "admins_bypass_locked_subfolders": true,
      "allow_bundle_names": true,
      "allowed_countries": "US,DE",
      "allowed_ips": "example",
      "ask_about_overwrites": true,
      "bundle_activity_notifications": "never",
      "bundle_expiration": 1,
      "bundle_not_found_message": "example",
      "bundle_password_required": true,
      "bundle_recipient_blacklist_domains": [
        "example"
      ],
      "bundle_recipient_blacklist_free_email_domains": true,
      "bundle_registration_notifications": "never",
      "bundle_require_registration": true,
      "bundle_require_share_recipient": true,
      "bundle_upload_receipt_notifications": "never",
      "bundle_watermark_attachment": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "bundle_watermark_value": {
        "key": "example value"
      },
      "uploads_via_email_authentication": true,
      "color2_left": "#0066a7",
      "color2_link": "#d34f5d",
      "color2_text": "#0066a7",
      "color2_top": "#000000",
      "color2_top_text": "#ffffff",
      "contact_name": "John Doe",
      "created_at": "2000-01-01T01:00:00Z",
      "currency": "USD",
      "custom_namespace": true,
      "dav_enabled": true,
      "dav_user_root_enabled": true,
      "days_to_retain_backups": 30,
      "default_time_zone": "Pacific Time (US & Canada)",
      "desktop_app": true,
      "desktop_app_session_ip_pinning": true,
      "desktop_app_session_lifetime": 1,
      "mobile_app": true,
      "mobile_app_session_ip_pinning": true,
      "mobile_app_session_lifetime": 1,
      "disallowed_countries": "US,DE",
      "disable_files_certificate_generation": true,
      "disable_notifications": true,
      "disable_password_reset": true,
      "domain": "my-custom-domain.com",
      "domain_hsts_header": true,
      "domain_letsencrypt_chain": "example",
      "email": "example",
      "ftp_enabled": true,
      "reply_to_email": "example",
      "non_sso_groups_allowed": true,
      "non_sso_users_allowed": true,
      "folder_permissions_groups_only": true,
      "hipaa": true,
      "icon128": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "icon16": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "icon32": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "icon48": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "immutable_files_set_at": "2000-01-01T01:00:00Z",
      "include_password_in_welcome_email": true,
      "language": "en",
      "ldap_base_dn": "example",
      "ldap_domain": "mysite.com",
      "ldap_enabled": true,
      "ldap_group_action": "disabled",
      "ldap_group_exclusion": "example",
      "ldap_group_inclusion": "example",
      "ldap_host": "ldap.site.com",
      "ldap_host_2": "ldap2.site.com",
      "ldap_host_3": "ldap3.site.com",
      "ldap_port": 1,
      "ldap_secure": true,
      "ldap_type": "open_ldap",
      "ldap_user_action": "disabled",
      "ldap_user_include_groups": "example",
      "ldap_username": "[ldap username]",
      "ldap_username_field": "sAMAccountName",
      "login_help_text": "Login page help text.",
      "logo": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "login_page_background_image": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "max_prior_passwords": 1,
      "motd_text": "example",
      "motd_use_for_ftp": true,
      "motd_use_for_sftp": true,
      "next_billing_amount": 1.0,
      "next_billing_date": "Apr 20",
      "office_integration_available": true,
      "office_integration_type": "example",
      "oncehub_link": "https://go.oncehub.com/files",
      "opt_out_global": true,
      "overdue": true,
      "password_min_length": 1,
      "password_require_letter": true,
      "password_require_mixed": true,
      "password_require_number": true,
      "password_require_special": true,
      "password_require_unbreached": true,
      "password_requirements_apply_to_bundles": true,
      "password_validity_days": 1,
      "phone": "555-555-5555",
      "pin_all_remote_servers_to_site_region": true,
      "prevent_root_permissions_for_non_site_admins": true,
      "protocol_access_groups_only": true,
      "require_2fa": true,
      "require_2fa_stop_time": "2000-01-01T01:00:00Z",
      "require_2fa_user_type": "`site_admins`",
      "require_logout_from_bundles_and_inboxes": true,
      "session": {
        "id": "60525f92e859c4c3d74cb02fd176b1525901b525",
        "language": "en",
        "login_token": "@tok-randomcode",
        "login_token_domain": "https://mysite.files.com",
        "max_dir_listing_size": 1,
        "multiple_regions": true,
        "read_only": true,
        "root_path": "example",
        "sftp_insecure_ciphers": false,
        "site_id": 1,
        "ssl_required": true,
        "tls_disabled": false,
        "two_factor_setup_needed": false,
        "allowed_2fa_method_sms": true,
        "allowed_2fa_method_totp": true,
        "allowed_2fa_method_u2f": true,
        "allowed_2fa_method_webauthn": true,
        "allowed_2fa_method_yubi": true,
        "use_provided_modified_at": true,
        "windows_mode_ftp": false
      },
      "session_pinned_by_ip": true,
      "sftp_enabled": true,
      "sftp_host_key_type": "default",
      "active_sftp_host_key_id": 1,
      "sftp_insecure_ciphers": true,
      "sftp_user_root_enabled": true,
      "sharing_enabled": true,
      "show_request_access_link": true,
      "site_footer": "example",
      "site_header": "example",
      "smtp_address": "smtp.my-mail-server.com",
      "smtp_authentication": "plain",
      "smtp_from": "me@my-mail-server.com",
      "smtp_port": 25,
      "smtp_username": "mail",
      "session_expiry": 6.0,
      "session_expiry_minutes": 360,
      "ssl_required": true,
      "subdomain": "mysite",
      "switch_to_plan_date": "2000-01-01T01:00:00Z",
      "tls_disabled": true,
      "trial_days_left": 1,
      "trial_until": "2000-01-01T01:00:00Z",
      "use_provided_modified_at": true,
      "user": {
        "id": 1,
        "username": "user",
        "admin_group_ids": [
          1
        ],
        "allowed_ips": "127.0.0.1",
        "attachments_permission": true,
        "api_keys_count": 1,
        "authenticate_until": "2000-01-01T01:00:00Z",
        "authentication_method": "password",
        "avatar_url": "example",
        "billing_permission": false,
        "bypass_site_allowed_ips": false,
        "bypass_inactive_disable": false,
        "created_at": "2000-01-01T01:00:00Z",
        "dav_permission": true,
        "disabled": true,
        "email": "example",
        "first_login_at": "2000-01-01T01:00:00Z",
        "ftp_permission": true,
        "group_ids": "example",
        "header_text": "User-specific message.",
        "language": "en",
        "last_login_at": "2000-01-01T01:00:00Z",
        "last_web_login_at": "2000-01-01T01:00:00Z",
        "last_ftp_login_at": "2000-01-01T01:00:00Z",
        "last_sftp_login_at": "2000-01-01T01:00:00Z",
        "last_dav_login_at": "2000-01-01T01:00:00Z",
        "last_desktop_login_at": "2000-01-01T01:00:00Z",
        "last_restapi_login_at": "2000-01-01T01:00:00Z",
        "last_api_use_at": "2000-01-01T01:00:00Z",
        "last_active_at": "2000-01-01T01:00:00Z",
        "last_protocol_cipher": "example",
        "lockout_expires": "2000-01-01T01:00:00Z",
        "name": "John Doe",
        "company": "ACME Corp.",
        "notes": "Internal notes on this user.",
        "notification_daily_send_time": 18,
        "office_integration_enabled": true,
        "password_set_at": "2000-01-01T01:00:00Z",
        "password_validity_days": 1,
        "public_keys_count": 1,
        "receive_admin_alerts": true,
        "require_2fa": "always_require",
        "require_login_by": "2000-01-01T01:00:00Z",
        "active_2fa": true,
        "require_password_change": true,
        "password_expired": true,
        "restapi_permission": true,
        "self_managed": true,
        "sftp_permission": true,
        "site_admin": true,
        "skip_welcome_screen": true,
        "ssl_required": "always_require",
        "sso_strategy_id": 1,
        "subscribe_to_newsletter": true,
        "externally_managed": true,
        "time_zone": "Pacific Time (US & Canada)",
        "type_of_2fa": "yubi",
        "updated_at": "2000-01-01T01:00:00Z",
        "user_root": "example",
        "days_remaining_until_password_expire": 1,
        "password_expire_at": "2000-01-01T01:00:00Z"
      },
      "user_lockout": true,
      "user_lockout_lock_period": 1,
      "user_lockout_tries": 1,
      "user_lockout_within": 6,
      "user_requests_enabled": true,
      "user_requests_notify_admins": true,
      "welcome_custom_text": "Welcome to my site!",
      "welcome_email_cc": "example",
      "welcome_email_subject": "example",
      "welcome_email_enabled": true,
      "welcome_screen": "user_controlled",
      "windows_mode_ftp": true,
      "disable_users_from_inactivity_period_days": 1,
      "group_admins_can_set_user_password": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <site>
      <name>My Site</name>
      <allowed_2fa_method_sms type="boolean">true</allowed_2fa_method_sms>
      <allowed_2fa_method_totp type="boolean">true</allowed_2fa_method_totp>
      <allowed_2fa_method_u2f type="boolean">true</allowed_2fa_method_u2f>
      <allowed_2fa_method_webauthn type="boolean">true</allowed_2fa_method_webauthn>
      <allowed_2fa_method_yubi type="boolean">true</allowed_2fa_method_yubi>
      <allowed_2fa_method_email type="boolean">true</allowed_2fa_method_email>
      <allowed_2fa_method_bypass_for_ftp_sftp_dav type="boolean">true</allowed_2fa_method_bypass_for_ftp_sftp_dav>
      <admin_user_id type="integer">1</admin_user_id>
      <admins_bypass_locked_subfolders type="boolean">true</admins_bypass_locked_subfolders>
      <allow_bundle_names type="boolean">true</allow_bundle_names>
      <allowed_countries>US,DE</allowed_countries>
      <allowed_ips>example</allowed_ips>
      <ask_about_overwrites type="boolean">true</ask_about_overwrites>
      <bundle_activity_notifications>never</bundle_activity_notifications>
      <bundle_expiration type="integer">1</bundle_expiration>
      <bundle_not_found_message>example</bundle_not_found_message>
      <bundle_password_required type="boolean">true</bundle_password_required>
      <bundle_recipient_blacklist_domains type="array">
        <bundle_recipient_blacklist_domain>example</bundle_recipient_blacklist_domain>
      </bundle_recipient_blacklist_domains>
      <bundle_recipient_blacklist_free_email_domains type="boolean">true</bundle_recipient_blacklist_free_email_domains>
      <bundle_registration_notifications>never</bundle_registration_notifications>
      <bundle_require_registration type="boolean">true</bundle_require_registration>
      <bundle_require_share_recipient type="boolean">true</bundle_require_share_recipient>
      <bundle_upload_receipt_notifications>never</bundle_upload_receipt_notifications>
      <bundle_watermark_attachment>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </bundle_watermark_attachment>
      <bundle_watermark_value>
        <key>example value</key>
      </bundle_watermark_value>
      <uploads_via_email_authentication type="boolean">true</uploads_via_email_authentication>
      <color2_left>#0066a7</color2_left>
      <color2_link>#d34f5d</color2_link>
      <color2_text>#0066a7</color2_text>
      <color2_top>#000000</color2_top>
      <color2_top_text>#ffffff</color2_top_text>
      <contact_name>John Doe</contact_name>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <currency>USD</currency>
      <custom_namespace type="boolean">true</custom_namespace>
      <dav_enabled type="boolean">true</dav_enabled>
      <dav_user_root_enabled type="boolean">true</dav_user_root_enabled>
      <days_to_retain_backups type="integer">30</days_to_retain_backups>
      <default_time_zone>Pacific Time (US &amp; Canada)</default_time_zone>
      <desktop_app type="boolean">true</desktop_app>
      <desktop_app_session_ip_pinning type="boolean">true</desktop_app_session_ip_pinning>
      <desktop_app_session_lifetime type="integer">1</desktop_app_session_lifetime>
      <mobile_app type="boolean">true</mobile_app>
      <mobile_app_session_ip_pinning type="boolean">true</mobile_app_session_ip_pinning>
      <mobile_app_session_lifetime type="integer">1</mobile_app_session_lifetime>
      <disallowed_countries>US,DE</disallowed_countries>
      <disable_files_certificate_generation type="boolean">true</disable_files_certificate_generation>
      <disable_notifications type="boolean">true</disable_notifications>
      <disable_password_reset type="boolean">true</disable_password_reset>
      <domain>my-custom-domain.com</domain>
      <domain_hsts_header type="boolean">true</domain_hsts_header>
      <domain_letsencrypt_chain>example</domain_letsencrypt_chain>
      <email>example</email>
      <ftp_enabled type="boolean">true</ftp_enabled>
      <reply_to_email>example</reply_to_email>
      <non_sso_groups_allowed type="boolean">true</non_sso_groups_allowed>
      <non_sso_users_allowed type="boolean">true</non_sso_users_allowed>
      <folder_permissions_groups_only type="boolean">true</folder_permissions_groups_only>
      <hipaa type="boolean">true</hipaa>
      <icon128>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </icon128>
      <icon16>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </icon16>
      <icon32>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </icon32>
      <icon48>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </icon48>
      <immutable_files_set_at>2000-01-01T01:00:00Z</immutable_files_set_at>
      <include_password_in_welcome_email type="boolean">true</include_password_in_welcome_email>
      <language>en</language>
      <ldap_base_dn>example</ldap_base_dn>
      <ldap_domain>mysite.com</ldap_domain>
      <ldap_enabled type="boolean">true</ldap_enabled>
      <ldap_group_action>disabled</ldap_group_action>
      <ldap_group_exclusion>example</ldap_group_exclusion>
      <ldap_group_inclusion>example</ldap_group_inclusion>
      <ldap_host>ldap.site.com</ldap_host>
      <ldap_host_2>ldap2.site.com</ldap_host_2>
      <ldap_host_3>ldap3.site.com</ldap_host_3>
      <ldap_port type="integer">1</ldap_port>
      <ldap_secure type="boolean">true</ldap_secure>
      <ldap_type>open_ldap</ldap_type>
      <ldap_user_action>disabled</ldap_user_action>
      <ldap_user_include_groups>example</ldap_user_include_groups>
      <ldap_username>[ldap username]</ldap_username>
      <ldap_username_field>sAMAccountName</ldap_username_field>
      <login_help_text>Login page help text.</login_help_text>
      <logo>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </logo>
      <login_page_background_image>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </login_page_background_image>
      <max_prior_passwords type="integer">1</max_prior_passwords>
      <motd_text>example</motd_text>
      <motd_use_for_ftp type="boolean">true</motd_use_for_ftp>
      <motd_use_for_sftp type="boolean">true</motd_use_for_sftp>
      <next_billing_amount type="float">1.0</next_billing_amount>
      <next_billing_date>Apr 20</next_billing_date>
      <office_integration_available type="boolean">true</office_integration_available>
      <office_integration_type>example</office_integration_type>
      <oncehub_link>https://go.oncehub.com/files</oncehub_link>
      <opt_out_global type="boolean">true</opt_out_global>
      <overdue type="boolean">true</overdue>
      <password_min_length type="integer">1</password_min_length>
      <password_require_letter type="boolean">true</password_require_letter>
      <password_require_mixed type="boolean">true</password_require_mixed>
      <password_require_number type="boolean">true</password_require_number>
      <password_require_special type="boolean">true</password_require_special>
      <password_require_unbreached type="boolean">true</password_require_unbreached>
      <password_requirements_apply_to_bundles type="boolean">true</password_requirements_apply_to_bundles>
      <password_validity_days type="integer">1</password_validity_days>
      <phone>555-555-5555</phone>
      <pin_all_remote_servers_to_site_region type="boolean">true</pin_all_remote_servers_to_site_region>
      <prevent_root_permissions_for_non_site_admins type="boolean">true</prevent_root_permissions_for_non_site_admins>
      <protocol_access_groups_only type="boolean">true</protocol_access_groups_only>
      <require_2fa type="boolean">true</require_2fa>
      <require_2fa_stop_time>2000-01-01T01:00:00Z</require_2fa_stop_time>
      <require_2fa_user_type>`site_admins`</require_2fa_user_type>
      <require_logout_from_bundles_and_inboxes type="boolean">true</require_logout_from_bundles_and_inboxes>
      <session>
        <id>60525f92e859c4c3d74cb02fd176b1525901b525</id>
        <language>en</language>
        <login_token>@tok-randomcode</login_token>
        <login_token_domain>https://mysite.files.com</login_token_domain>
        <max_dir_listing_size type="integer">1</max_dir_listing_size>
        <multiple_regions type="boolean">true</multiple_regions>
        <read_only type="boolean">true</read_only>
        <root_path>example</root_path>
        <sftp_insecure_ciphers type="boolean">false</sftp_insecure_ciphers>
        <site_id type="integer">1</site_id>
        <ssl_required type="boolean">true</ssl_required>
        <tls_disabled type="boolean">false</tls_disabled>
        <two_factor_setup_needed type="boolean">false</two_factor_setup_needed>
        <allowed_2fa_method_sms type="boolean">true</allowed_2fa_method_sms>
        <allowed_2fa_method_totp type="boolean">true</allowed_2fa_method_totp>
        <allowed_2fa_method_u2f type="boolean">true</allowed_2fa_method_u2f>
        <allowed_2fa_method_webauthn type="boolean">true</allowed_2fa_method_webauthn>
        <allowed_2fa_method_yubi type="boolean">true</allowed_2fa_method_yubi>
        <use_provided_modified_at type="boolean">true</use_provided_modified_at>
        <windows_mode_ftp type="boolean">false</windows_mode_ftp>
      </session>
      <session_pinned_by_ip type="boolean">true</session_pinned_by_ip>
      <sftp_enabled type="boolean">true</sftp_enabled>
      <sftp_host_key_type>default</sftp_host_key_type>
      <active_sftp_host_key_id type="integer">1</active_sftp_host_key_id>
      <sftp_insecure_ciphers type="boolean">true</sftp_insecure_ciphers>
      <sftp_user_root_enabled type="boolean">true</sftp_user_root_enabled>
      <sharing_enabled type="boolean">true</sharing_enabled>
      <show_request_access_link type="boolean">true</show_request_access_link>
      <site_footer>example</site_footer>
      <site_header>example</site_header>
      <smtp_address>smtp.my-mail-server.com</smtp_address>
      <smtp_authentication>plain</smtp_authentication>
      <smtp_from>me@my-mail-server.com</smtp_from>
      <smtp_port type="integer">25</smtp_port>
      <smtp_username>mail</smtp_username>
      <session_expiry type="float">6.0</session_expiry>
      <session_expiry_minutes type="integer">360</session_expiry_minutes>
      <ssl_required type="boolean">true</ssl_required>
      <subdomain>mysite</subdomain>
      <switch_to_plan_date>2000-01-01T01:00:00Z</switch_to_plan_date>
      <tls_disabled type="boolean">true</tls_disabled>
      <trial_days_left type="integer">1</trial_days_left>
      <trial_until>2000-01-01T01:00:00Z</trial_until>
      <use_provided_modified_at type="boolean">true</use_provided_modified_at>
      <user>
        <id type="integer">1</id>
        <username>user</username>
        <admin_group_ids type="array">
          <admin_group_id type="integer">1</admin_group_id>
        </admin_group_ids>
        <allowed_ips>127.0.0.1</allowed_ips>
        <attachments_permission type="boolean">true</attachments_permission>
        <api_keys_count type="integer">1</api_keys_count>
        <authenticate_until>2000-01-01T01:00:00Z</authenticate_until>
        <authentication_method>password</authentication_method>
        <avatar_url>example</avatar_url>
        <billing_permission type="boolean">false</billing_permission>
        <bypass_site_allowed_ips type="boolean">false</bypass_site_allowed_ips>
        <bypass_inactive_disable type="boolean">false</bypass_inactive_disable>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <dav_permission type="boolean">true</dav_permission>
        <disabled type="boolean">true</disabled>
        <email>example</email>
        <first_login_at>2000-01-01T01:00:00Z</first_login_at>
        <ftp_permission type="boolean">true</ftp_permission>
        <group_ids>example</group_ids>
        <header_text>User-specific message.</header_text>
        <language>en</language>
        <last_login_at>2000-01-01T01:00:00Z</last_login_at>
        <last_web_login_at>2000-01-01T01:00:00Z</last_web_login_at>
        <last_ftp_login_at>2000-01-01T01:00:00Z</last_ftp_login_at>
        <last_sftp_login_at>2000-01-01T01:00:00Z</last_sftp_login_at>
        <last_dav_login_at>2000-01-01T01:00:00Z</last_dav_login_at>
        <last_desktop_login_at>2000-01-01T01:00:00Z</last_desktop_login_at>
        <last_restapi_login_at>2000-01-01T01:00:00Z</last_restapi_login_at>
        <last_api_use_at>2000-01-01T01:00:00Z</last_api_use_at>
        <last_active_at>2000-01-01T01:00:00Z</last_active_at>
        <last_protocol_cipher>example</last_protocol_cipher>
        <lockout_expires>2000-01-01T01:00:00Z</lockout_expires>
        <name>John Doe</name>
        <company>ACME Corp.</company>
        <notes>Internal notes on this user.</notes>
        <notification_daily_send_time type="integer">18</notification_daily_send_time>
        <office_integration_enabled type="boolean">true</office_integration_enabled>
        <password_set_at>2000-01-01T01:00:00Z</password_set_at>
        <password_validity_days type="integer">1</password_validity_days>
        <public_keys_count type="integer">1</public_keys_count>
        <receive_admin_alerts type="boolean">true</receive_admin_alerts>
        <require_2fa>always_require</require_2fa>
        <require_login_by>2000-01-01T01:00:00Z</require_login_by>
        <active_2fa type="boolean">true</active_2fa>
        <require_password_change type="boolean">true</require_password_change>
        <password_expired type="boolean">true</password_expired>
        <restapi_permission type="boolean">true</restapi_permission>
        <self_managed type="boolean">true</self_managed>
        <sftp_permission type="boolean">true</sftp_permission>
        <site_admin type="boolean">true</site_admin>
        <skip_welcome_screen type="boolean">true</skip_welcome_screen>
        <ssl_required>always_require</ssl_required>
        <sso_strategy_id type="integer">1</sso_strategy_id>
        <subscribe_to_newsletter type="boolean">true</subscribe_to_newsletter>
        <externally_managed type="boolean">true</externally_managed>
        <time_zone>Pacific Time (US &amp; Canada)</time_zone>
        <type_of_2fa>yubi</type_of_2fa>
        <updated_at>2000-01-01T01:00:00Z</updated_at>
        <user_root>example</user_root>
        <days_remaining_until_password_expire type="integer">1</days_remaining_until_password_expire>
        <password_expire_at>2000-01-01T01:00:00Z</password_expire_at>
      </user>
      <user_lockout type="boolean">true</user_lockout>
      <user_lockout_lock_period type="integer">1</user_lockout_lock_period>
      <user_lockout_tries type="integer">1</user_lockout_tries>
      <user_lockout_within type="integer">6</user_lockout_within>
      <user_requests_enabled type="boolean">true</user_requests_enabled>
      <user_requests_notify_admins type="boolean">true</user_requests_notify_admins>
      <welcome_custom_text>Welcome to my site!</welcome_custom_text>
      <welcome_email_cc>example</welcome_email_cc>
      <welcome_email_subject>example</welcome_email_subject>
      <welcome_email_enabled type="boolean">true</welcome_email_enabled>
      <welcome_screen>user_controlled</welcome_screen>
      <windows_mode_ftp type="boolean">true</windows_mode_ftp>
      <disable_users_from_inactivity_period_days type="integer">1</disable_users_from_inactivity_period_days>
      <group_admins_can_set_user_password type="boolean">true</group_admins_can_set_user_password>
    </site>
    
    
    Attribute Description
    name string Site name
    allowed_2fa_method_sms boolean Is SMS two factor authentication allowed?
    allowed_2fa_method_totp boolean Is TOTP two factor authentication allowed?
    allowed_2fa_method_u2f boolean Is U2F two factor authentication allowed?
    allowed_2fa_method_webauthn boolean Is WebAuthn two factor authentication allowed?
    allowed_2fa_method_yubi boolean Is yubikey two factor authentication allowed?
    allowed_2fa_method_email boolean Is OTP via email two factor authentication allowed?
    allowed_2fa_method_bypass_for_ftp_sftp_dav boolean Are users allowed to configure their two factor authentication to be bypassed for FTP/SFTP/WebDAV?
    admin_user_id int64 User ID for the main site administrator
    admins_bypass_locked_subfolders boolean Allow admins to bypass the locked subfolders setting.
    allow_bundle_names boolean Are manual Bundle names allowed?
    allowed_countries string Comma seperated list of allowed Country codes
    allowed_ips string List of allowed IP addresses
    ask_about_overwrites boolean If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
    bundle_activity_notifications string Do Bundle owners receive activity notifications?
    Possible values: never, always, per_bundle_setting
    bundle_expiration int64 Site-wide Bundle expiration in days
    bundle_not_found_message string Custom error message to show when bundle is not found.
    bundle_password_required boolean Do Bundles require password protection?
    bundle_recipient_blacklist_domains array List of email domains to disallow when entering a Bundle/Inbox recipients
    bundle_recipient_blacklist_free_email_domains boolean Disallow free email domains for Bundle/Inbox recipients?
    bundle_registration_notifications string Do Bundle owners receive registration notification?
    Possible values: never, always, per_bundle_setting
    bundle_require_registration boolean Do Bundles require registration?
    bundle_require_share_recipient boolean Do Bundles require recipients for sharing?
    bundle_upload_receipt_notifications string Do Bundle uploaders receive upload confirmation notifications?
    Possible values: never, always, per_bundle_setting
    bundle_watermark_attachment Image Preview watermark image applied to all bundle items.
    bundle_watermark_value object Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
    uploads_via_email_authentication boolean Do incoming emails in the Inboxes require checking for SPF/DKIM/DMARC?
    color2_left string Page link and button color
    color2_link string Top bar link color
    color2_text string Page link and button color
    color2_top string Top bar background color
    color2_top_text string Top bar text color
    contact_name string Site main contact name
    created_at date-time Time this site was created
    currency string Preferred currency
    custom_namespace boolean Is this site using a custom namespace for users?
    dav_enabled boolean Is WebDAV enabled?
    dav_user_root_enabled boolean Use user FTP roots also for WebDAV?
    days_to_retain_backups int64 Number of days to keep deleted files
    default_time_zone string Site default time zone
    desktop_app boolean Is the desktop app enabled?
    desktop_app_session_ip_pinning boolean Is desktop app session IP pinning enabled?
    desktop_app_session_lifetime int64 Desktop app session lifetime (in hours)
    mobile_app boolean Is the mobile app enabled?
    mobile_app_session_ip_pinning boolean Is mobile app session IP pinning enabled?
    mobile_app_session_lifetime int64 Mobile app session lifetime (in hours)
    disallowed_countries string Comma seperated list of disallowed Country codes
    disable_files_certificate_generation boolean If set, Files.com will not set the CAA records required to generate future SSL certificates for this domain.
    disable_notifications boolean Are notifications disabled?
    disable_password_reset boolean Is password reset disabled?
    domain string Custom domain
    domain_hsts_header boolean Send HSTS (HTTP Strict Transport Security) header when visitors access the site via a custom domain?
    domain_letsencrypt_chain string Letsencrypt chain to use when registering SSL Certificate for domain.
    Possible values: default, isrg_root_x1, dst_root_ca_x3
    email email Main email for this site
    ftp_enabled boolean Is FTP enabled?
    reply_to_email email Reply-to email for this site
    non_sso_groups_allowed boolean If true, groups can be manually created / modified / deleted by Site Admins. Otherwise, groups can only be managed via your SSO provider.
    non_sso_users_allowed boolean If true, users can be manually created / modified / deleted by Site Admins. Otherwise, users can only be managed via your SSO provider.
    folder_permissions_groups_only boolean If true, permissions for this site must be bound to a group (not a user). Otherwise, permissions must be bound to a user.
    hipaa boolean Is there a signed HIPAA BAA between Files.com and this site?
    icon128 Image Branded icon 128x128
    icon16 Image Branded icon 16x16
    icon32 Image Branded icon 32x32
    icon48 Image Branded icon 48x48
    immutable_files_set_at date-time Can files be modified?
    include_password_in_welcome_email boolean Include password in emails to new users?
    language string Site default language
    ldap_base_dn string Base DN for looking up users in LDAP server
    ldap_domain string Domain name that will be appended to usernames
    ldap_enabled boolean Main LDAP setting: is LDAP enabled?
    ldap_group_action string Should we sync groups from LDAP server?
    ldap_group_exclusion string Comma or newline separated list of group names (with optional wildcards) to exclude when syncing.
    ldap_group_inclusion string Comma or newline separated list of group names (with optional wildcards) to include when syncing.
    ldap_host string LDAP host
    ldap_host_2 string LDAP backup host
    ldap_host_3 string LDAP backup host
    ldap_port int64 LDAP port
    ldap_secure boolean Use secure LDAP?
    ldap_type string LDAP type
    ldap_user_action string Should we sync users from LDAP server?
    ldap_user_include_groups string Comma or newline separated list of group names (with optional wildcards) - if provided, only users in these groups will be added or synced.
    ldap_username string Username for signing in to LDAP server.
    ldap_username_field string LDAP username field
    login_help_text string Login help text
    logo Image Branded logo
    login_page_background_image Image Branded login page background
    max_prior_passwords int64 Number of prior passwords to disallow
    motd_text string A message to show users when they connect via FTP or SFTP.
    motd_use_for_ftp boolean Show message to users connecting via FTP
    motd_use_for_sftp boolean Show message to users connecting via SFTP
    next_billing_amount double Next billing amount
    next_billing_date string Next billing date
    office_integration_available boolean Allow users to use Office for the web?
    office_integration_type string Office integration application used to edit and view the MS Office documents
    Possible values: only_office, office_365, disabled
    oncehub_link string Link to scheduling a meeting with our Sales team
    opt_out_global boolean Use servers in the USA only?
    overdue boolean Is this site's billing overdue?
    password_min_length int64 Shortest password length for users
    password_require_letter boolean Require a letter in passwords?
    password_require_mixed boolean Require lower and upper case letters in passwords?
    password_require_number boolean Require a number in passwords?
    password_require_special boolean Require special characters in password?
    password_require_unbreached boolean Require passwords that have not been previously breached? (see https://haveibeenpwned.com/)
    password_requirements_apply_to_bundles boolean Require bundles' passwords, and passwords for other items (inboxes, public shares, etc.) to conform to the same requirements as users' passwords?
    password_validity_days int64 Number of days password is valid
    phone string Site phone number
    pin_all_remote_servers_to_site_region boolean If true, we will ensure that all internal communications with any remote server are made through the primary region of the site. This setting overrides individual remote server settings.
    prevent_root_permissions_for_non_site_admins boolean If true, we will prevent non-administrators from receiving any permissions directly on the root folder. This is commonly used to prevent the accidental application of permissions.
    protocol_access_groups_only boolean If true, protocol access permissions on users will be ignored, and only protocol access permissions set on Groups will be honored. Make sure that your current user is a member of a group with API permission when changing this value to avoid locking yourself out of your site.
    require_2fa boolean Require two-factor authentication for all users?
    require_2fa_stop_time date-time If set, requirement for two-factor authentication has been scheduled to end on this date-time.
    require_2fa_user_type string What type of user is required to use two-factor authentication (when require_2fa is set to true for this site)?
    Possible values: all, folder_and_site_admins, site_admins
    require_logout_from_bundles_and_inboxes boolean If true, we will hide the 'Remember Me' box on Inbox and Bundle registration pages, requiring that the user logout and log back in every time they visit the page.
    session Session Current session
    session_pinned_by_ip boolean Are sessions locked to the same IP? (i.e. do users need to log in again if they change IPs?)
    sftp_enabled boolean Is SFTP enabled?
    sftp_host_key_type string Sftp Host Key Type
    Possible values: default, exavault, custom, smartfile
    active_sftp_host_key_id int64 Id of the currently selected custom SFTP Host Key
    sftp_insecure_ciphers boolean Are Insecure Ciphers allowed for SFTP? Note: Settting TLS Disabled -> True will always allow insecure ciphers for SFTP as well. Enabling this is insecure.
    sftp_user_root_enabled boolean Use user FTP roots also for SFTP?
    sharing_enabled boolean Allow bundle creation
    show_request_access_link boolean Show request access link for users without access? Currently unused.
    site_footer string Custom site footer text
    site_header string Custom site header text
    smtp_address string SMTP server hostname or IP
    smtp_authentication string SMTP server authentication type
    smtp_from string From address to use when mailing through custom SMTP
    smtp_port int64 SMTP server port
    smtp_username string SMTP server username
    session_expiry double Session expiry in hours
    session_expiry_minutes int64 Session expiry in minutes
    ssl_required boolean Is SSL required? Disabling this is insecure.
    subdomain string Site subdomain
    switch_to_plan_date date-time If switching plans, when does the new plan take effect?
    tls_disabled boolean Are Insecure TLS and SFTP Ciphers allowed? Enabling this is insecure.
    trial_days_left int64 Number of days left in trial
    trial_until date-time When does this Site trial expire?
    use_provided_modified_at boolean Allow uploaders to set provided_modified_at for uploaded files?
    user User User of current session
    user_lockout boolean Will users be locked out after incorrect login attempts?
    user_lockout_lock_period int64 How many hours to lock user out for failed password?
    user_lockout_tries int64 Number of login tries within user_lockout_within hours before users are locked out
    user_lockout_within int64 Number of hours for user lockout window
    user_requests_enabled boolean Enable User Requests feature
    user_requests_notify_admins boolean Send email to site admins when a user request is received?
    welcome_custom_text string Custom text send in user welcome email
    welcome_email_cc email Include this email in welcome emails if enabled
    welcome_email_subject string Include this email subject in welcome emails if enabled
    welcome_email_enabled boolean Will the welcome email be sent to new users?
    welcome_screen string Does the welcome screen appear?
    Possible values: enabled, hidden, disabled
    windows_mode_ftp boolean Does FTP user Windows emulation mode?
    disable_users_from_inactivity_period_days int64 If greater than zero, users will unable to login if they do not show activity within this number of days.
    group_admins_can_set_user_password boolean Allow group admins set password authentication method

    Site Attribute Requirements

    Site Attribute Required Feature Bundle
    allowed_countries Power
    bundle_password_required Power
    bundle_require_registration Power
    bundle_require_share_recipient Power
    disallowed_countries Power
    domain Power
    folder_permissions_groups_only Power
    custom_namespace Power
    require_2fa Power
    sftp_insecure_ciphers Power
    smtp_address Power
    smtp_authentication Power
    smtp_from Power
    smtp_username Power
    smtp_password Power
    smtp_port Power
    tls_disabled Power
    user_requests_enabled Power

    Show site settings

    Example Request

    curl https://app.files.com/api/rest/v1/site.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/site.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Site.get
    
    \Files\Model\Site::get();
    
    
    Site.get(, parameters
    
    await Site.get()
    
    
    await Site.Get();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.site.get()
    
    files_sdk.APIKey = "YOUR_API_KEY"
    site.Get
    
    
    files-cli sites get \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "name": "My Site",
      "allowed_2fa_method_sms": true,
      "allowed_2fa_method_totp": true,
      "allowed_2fa_method_u2f": true,
      "allowed_2fa_method_webauthn": true,
      "allowed_2fa_method_yubi": true,
      "allowed_2fa_method_email": true,
      "allowed_2fa_method_bypass_for_ftp_sftp_dav": true,
      "admin_user_id": 1,
      "admins_bypass_locked_subfolders": true,
      "allow_bundle_names": true,
      "allowed_countries": "US,DE",
      "allowed_ips": "example",
      "ask_about_overwrites": true,
      "bundle_activity_notifications": "never",
      "bundle_expiration": 1,
      "bundle_not_found_message": "example",
      "bundle_password_required": true,
      "bundle_recipient_blacklist_domains": [
        "example"
      ],
      "bundle_recipient_blacklist_free_email_domains": true,
      "bundle_registration_notifications": "never",
      "bundle_require_registration": true,
      "bundle_require_share_recipient": true,
      "bundle_upload_receipt_notifications": "never",
      "bundle_watermark_attachment": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "bundle_watermark_value": {
        "key": "example value"
      },
      "uploads_via_email_authentication": true,
      "color2_left": "#0066a7",
      "color2_link": "#d34f5d",
      "color2_text": "#0066a7",
      "color2_top": "#000000",
      "color2_top_text": "#ffffff",
      "contact_name": "John Doe",
      "created_at": "2000-01-01T01:00:00Z",
      "currency": "USD",
      "custom_namespace": true,
      "dav_enabled": true,
      "dav_user_root_enabled": true,
      "days_to_retain_backups": 30,
      "default_time_zone": "Pacific Time (US & Canada)",
      "desktop_app": true,
      "desktop_app_session_ip_pinning": true,
      "desktop_app_session_lifetime": 1,
      "mobile_app": true,
      "mobile_app_session_ip_pinning": true,
      "mobile_app_session_lifetime": 1,
      "disallowed_countries": "US,DE",
      "disable_files_certificate_generation": true,
      "disable_notifications": true,
      "disable_password_reset": true,
      "domain": "my-custom-domain.com",
      "domain_hsts_header": true,
      "domain_letsencrypt_chain": "example",
      "email": "example",
      "ftp_enabled": true,
      "reply_to_email": "example",
      "non_sso_groups_allowed": true,
      "non_sso_users_allowed": true,
      "folder_permissions_groups_only": true,
      "hipaa": true,
      "icon128": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "icon16": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "icon32": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "icon48": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "immutable_files_set_at": "2000-01-01T01:00:00Z",
      "include_password_in_welcome_email": true,
      "language": "en",
      "ldap_base_dn": "example",
      "ldap_domain": "mysite.com",
      "ldap_enabled": true,
      "ldap_group_action": "disabled",
      "ldap_group_exclusion": "example",
      "ldap_group_inclusion": "example",
      "ldap_host": "ldap.site.com",
      "ldap_host_2": "ldap2.site.com",
      "ldap_host_3": "ldap3.site.com",
      "ldap_port": 1,
      "ldap_secure": true,
      "ldap_type": "open_ldap",
      "ldap_user_action": "disabled",
      "ldap_user_include_groups": "example",
      "ldap_username": "[ldap username]",
      "ldap_username_field": "sAMAccountName",
      "login_help_text": "Login page help text.",
      "logo": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "login_page_background_image": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "max_prior_passwords": 1,
      "motd_text": "example",
      "motd_use_for_ftp": true,
      "motd_use_for_sftp": true,
      "next_billing_amount": 1.0,
      "next_billing_date": "Apr 20",
      "office_integration_available": true,
      "office_integration_type": "example",
      "oncehub_link": "https://go.oncehub.com/files",
      "opt_out_global": true,
      "overdue": true,
      "password_min_length": 1,
      "password_require_letter": true,
      "password_require_mixed": true,
      "password_require_number": true,
      "password_require_special": true,
      "password_require_unbreached": true,
      "password_requirements_apply_to_bundles": true,
      "password_validity_days": 1,
      "phone": "555-555-5555",
      "pin_all_remote_servers_to_site_region": true,
      "prevent_root_permissions_for_non_site_admins": true,
      "protocol_access_groups_only": true,
      "require_2fa": true,
      "require_2fa_stop_time": "2000-01-01T01:00:00Z",
      "require_2fa_user_type": "`site_admins`",
      "require_logout_from_bundles_and_inboxes": true,
      "session": {
        "id": "60525f92e859c4c3d74cb02fd176b1525901b525",
        "language": "en",
        "login_token": "@tok-randomcode",
        "login_token_domain": "https://mysite.files.com",
        "max_dir_listing_size": 1,
        "multiple_regions": true,
        "read_only": true,
        "root_path": "example",
        "sftp_insecure_ciphers": false,
        "site_id": 1,
        "ssl_required": true,
        "tls_disabled": false,
        "two_factor_setup_needed": false,
        "allowed_2fa_method_sms": true,
        "allowed_2fa_method_totp": true,
        "allowed_2fa_method_u2f": true,
        "allowed_2fa_method_webauthn": true,
        "allowed_2fa_method_yubi": true,
        "use_provided_modified_at": true,
        "windows_mode_ftp": false
      },
      "session_pinned_by_ip": true,
      "sftp_enabled": true,
      "sftp_host_key_type": "default",
      "active_sftp_host_key_id": 1,
      "sftp_insecure_ciphers": true,
      "sftp_user_root_enabled": true,
      "sharing_enabled": true,
      "show_request_access_link": true,
      "site_footer": "example",
      "site_header": "example",
      "smtp_address": "smtp.my-mail-server.com",
      "smtp_authentication": "plain",
      "smtp_from": "me@my-mail-server.com",
      "smtp_port": 25,
      "smtp_username": "mail",
      "session_expiry": 6.0,
      "session_expiry_minutes": 360,
      "ssl_required": true,
      "subdomain": "mysite",
      "switch_to_plan_date": "2000-01-01T01:00:00Z",
      "tls_disabled": true,
      "trial_days_left": 1,
      "trial_until": "2000-01-01T01:00:00Z",
      "use_provided_modified_at": true,
      "user": {
        "id": 1,
        "username": "user",
        "admin_group_ids": [
          1
        ],
        "allowed_ips": "127.0.0.1",
        "attachments_permission": true,
        "api_keys_count": 1,
        "authenticate_until": "2000-01-01T01:00:00Z",
        "authentication_method": "password",
        "avatar_url": "example",
        "billing_permission": false,
        "bypass_site_allowed_ips": false,
        "bypass_inactive_disable": false,
        "created_at": "2000-01-01T01:00:00Z",
        "dav_permission": true,
        "disabled": true,
        "email": "example",
        "first_login_at": "2000-01-01T01:00:00Z",
        "ftp_permission": true,
        "group_ids": "example",
        "header_text": "User-specific message.",
        "language": "en",
        "last_login_at": "2000-01-01T01:00:00Z",
        "last_web_login_at": "2000-01-01T01:00:00Z",
        "last_ftp_login_at": "2000-01-01T01:00:00Z",
        "last_sftp_login_at": "2000-01-01T01:00:00Z",
        "last_dav_login_at": "2000-01-01T01:00:00Z",
        "last_desktop_login_at": "2000-01-01T01:00:00Z",
        "last_restapi_login_at": "2000-01-01T01:00:00Z",
        "last_api_use_at": "2000-01-01T01:00:00Z",
        "last_active_at": "2000-01-01T01:00:00Z",
        "last_protocol_cipher": "example",
        "lockout_expires": "2000-01-01T01:00:00Z",
        "name": "John Doe",
        "company": "ACME Corp.",
        "notes": "Internal notes on this user.",
        "notification_daily_send_time": 18,
        "office_integration_enabled": true,
        "password_set_at": "2000-01-01T01:00:00Z",
        "password_validity_days": 1,
        "public_keys_count": 1,
        "receive_admin_alerts": true,
        "require_2fa": "always_require",
        "require_login_by": "2000-01-01T01:00:00Z",
        "active_2fa": true,
        "require_password_change": true,
        "password_expired": true,
        "restapi_permission": true,
        "self_managed": true,
        "sftp_permission": true,
        "site_admin": true,
        "skip_welcome_screen": true,
        "ssl_required": "always_require",
        "sso_strategy_id": 1,
        "subscribe_to_newsletter": true,
        "externally_managed": true,
        "time_zone": "Pacific Time (US & Canada)",
        "type_of_2fa": "yubi",
        "updated_at": "2000-01-01T01:00:00Z",
        "user_root": "example",
        "days_remaining_until_password_expire": 1,
        "password_expire_at": "2000-01-01T01:00:00Z"
      },
      "user_lockout": true,
      "user_lockout_lock_period": 1,
      "user_lockout_tries": 1,
      "user_lockout_within": 6,
      "user_requests_enabled": true,
      "user_requests_notify_admins": true,
      "welcome_custom_text": "Welcome to my site!",
      "welcome_email_cc": "example",
      "welcome_email_subject": "example",
      "welcome_email_enabled": true,
      "welcome_screen": "user_controlled",
      "windows_mode_ftp": true,
      "disable_users_from_inactivity_period_days": 1,
      "group_admins_can_set_user_password": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <site>
      <name>My Site</name>
      <allowed_2fa_method_sms type="boolean">true</allowed_2fa_method_sms>
      <allowed_2fa_method_totp type="boolean">true</allowed_2fa_method_totp>
      <allowed_2fa_method_u2f type="boolean">true</allowed_2fa_method_u2f>
      <allowed_2fa_method_webauthn type="boolean">true</allowed_2fa_method_webauthn>
      <allowed_2fa_method_yubi type="boolean">true</allowed_2fa_method_yubi>
      <allowed_2fa_method_email type="boolean">true</allowed_2fa_method_email>
      <allowed_2fa_method_bypass_for_ftp_sftp_dav type="boolean">true</allowed_2fa_method_bypass_for_ftp_sftp_dav>
      <admin_user_id type="integer">1</admin_user_id>
      <admins_bypass_locked_subfolders type="boolean">true</admins_bypass_locked_subfolders>
      <allow_bundle_names type="boolean">true</allow_bundle_names>
      <allowed_countries>US,DE</allowed_countries>
      <allowed_ips>example</allowed_ips>
      <ask_about_overwrites type="boolean">true</ask_about_overwrites>
      <bundle_activity_notifications>never</bundle_activity_notifications>
      <bundle_expiration type="integer">1</bundle_expiration>
      <bundle_not_found_message>example</bundle_not_found_message>
      <bundle_password_required type="boolean">true</bundle_password_required>
      <bundle_recipient_blacklist_domains type="array">
        <bundle_recipient_blacklist_domain>example</bundle_recipient_blacklist_domain>
      </bundle_recipient_blacklist_domains>
      <bundle_recipient_blacklist_free_email_domains type="boolean">true</bundle_recipient_blacklist_free_email_domains>
      <bundle_registration_notifications>never</bundle_registration_notifications>
      <bundle_require_registration type="boolean">true</bundle_require_registration>
      <bundle_require_share_recipient type="boolean">true</bundle_require_share_recipient>
      <bundle_upload_receipt_notifications>never</bundle_upload_receipt_notifications>
      <bundle_watermark_attachment>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </bundle_watermark_attachment>
      <bundle_watermark_value>
        <key>example value</key>
      </bundle_watermark_value>
      <uploads_via_email_authentication type="boolean">true</uploads_via_email_authentication>
      <color2_left>#0066a7</color2_left>
      <color2_link>#d34f5d</color2_link>
      <color2_text>#0066a7</color2_text>
      <color2_top>#000000</color2_top>
      <color2_top_text>#ffffff</color2_top_text>
      <contact_name>John Doe</contact_name>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <currency>USD</currency>
      <custom_namespace type="boolean">true</custom_namespace>
      <dav_enabled type="boolean">true</dav_enabled>
      <dav_user_root_enabled type="boolean">true</dav_user_root_enabled>
      <days_to_retain_backups type="integer">30</days_to_retain_backups>
      <default_time_zone>Pacific Time (US &amp; Canada)</default_time_zone>
      <desktop_app type="boolean">true</desktop_app>
      <desktop_app_session_ip_pinning type="boolean">true</desktop_app_session_ip_pinning>
      <desktop_app_session_lifetime type="integer">1</desktop_app_session_lifetime>
      <mobile_app type="boolean">true</mobile_app>
      <mobile_app_session_ip_pinning type="boolean">true</mobile_app_session_ip_pinning>
      <mobile_app_session_lifetime type="integer">1</mobile_app_session_lifetime>
      <disallowed_countries>US,DE</disallowed_countries>
      <disable_files_certificate_generation type="boolean">true</disable_files_certificate_generation>
      <disable_notifications type="boolean">true</disable_notifications>
      <disable_password_reset type="boolean">true</disable_password_reset>
      <domain>my-custom-domain.com</domain>
      <domain_hsts_header type="boolean">true</domain_hsts_header>
      <domain_letsencrypt_chain>example</domain_letsencrypt_chain>
      <email>example</email>
      <ftp_enabled type="boolean">true</ftp_enabled>
      <reply_to_email>example</reply_to_email>
      <non_sso_groups_allowed type="boolean">true</non_sso_groups_allowed>
      <non_sso_users_allowed type="boolean">true</non_sso_users_allowed>
      <folder_permissions_groups_only type="boolean">true</folder_permissions_groups_only>
      <hipaa type="boolean">true</hipaa>
      <icon128>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </icon128>
      <icon16>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </icon16>
      <icon32>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </icon32>
      <icon48>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </icon48>
      <immutable_files_set_at>2000-01-01T01:00:00Z</immutable_files_set_at>
      <include_password_in_welcome_email type="boolean">true</include_password_in_welcome_email>
      <language>en</language>
      <ldap_base_dn>example</ldap_base_dn>
      <ldap_domain>mysite.com</ldap_domain>
      <ldap_enabled type="boolean">true</ldap_enabled>
      <ldap_group_action>disabled</ldap_group_action>
      <ldap_group_exclusion>example</ldap_group_exclusion>
      <ldap_group_inclusion>example</ldap_group_inclusion>
      <ldap_host>ldap.site.com</ldap_host>
      <ldap_host_2>ldap2.site.com</ldap_host_2>
      <ldap_host_3>ldap3.site.com</ldap_host_3>
      <ldap_port type="integer">1</ldap_port>
      <ldap_secure type="boolean">true</ldap_secure>
      <ldap_type>open_ldap</ldap_type>
      <ldap_user_action>disabled</ldap_user_action>
      <ldap_user_include_groups>example</ldap_user_include_groups>
      <ldap_username>[ldap username]</ldap_username>
      <ldap_username_field>sAMAccountName</ldap_username_field>
      <login_help_text>Login page help text.</login_help_text>
      <logo>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </logo>
      <login_page_background_image>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </login_page_background_image>
      <max_prior_passwords type="integer">1</max_prior_passwords>
      <motd_text>example</motd_text>
      <motd_use_for_ftp type="boolean">true</motd_use_for_ftp>
      <motd_use_for_sftp type="boolean">true</motd_use_for_sftp>
      <next_billing_amount type="float">1.0</next_billing_amount>
      <next_billing_date>Apr 20</next_billing_date>
      <office_integration_available type="boolean">true</office_integration_available>
      <office_integration_type>example</office_integration_type>
      <oncehub_link>https://go.oncehub.com/files</oncehub_link>
      <opt_out_global type="boolean">true</opt_out_global>
      <overdue type="boolean">true</overdue>
      <password_min_length type="integer">1</password_min_length>
      <password_require_letter type="boolean">true</password_require_letter>
      <password_require_mixed type="boolean">true</password_require_mixed>
      <password_require_number type="boolean">true</password_require_number>
      <password_require_special type="boolean">true</password_require_special>
      <password_require_unbreached type="boolean">true</password_require_unbreached>
      <password_requirements_apply_to_bundles type="boolean">true</password_requirements_apply_to_bundles>
      <password_validity_days type="integer">1</password_validity_days>
      <phone>555-555-5555</phone>
      <pin_all_remote_servers_to_site_region type="boolean">true</pin_all_remote_servers_to_site_region>
      <prevent_root_permissions_for_non_site_admins type="boolean">true</prevent_root_permissions_for_non_site_admins>
      <protocol_access_groups_only type="boolean">true</protocol_access_groups_only>
      <require_2fa type="boolean">true</require_2fa>
      <require_2fa_stop_time>2000-01-01T01:00:00Z</require_2fa_stop_time>
      <require_2fa_user_type>`site_admins`</require_2fa_user_type>
      <require_logout_from_bundles_and_inboxes type="boolean">true</require_logout_from_bundles_and_inboxes>
      <session>
        <id>60525f92e859c4c3d74cb02fd176b1525901b525</id>
        <language>en</language>
        <login_token>@tok-randomcode</login_token>
        <login_token_domain>https://mysite.files.com</login_token_domain>
        <max_dir_listing_size type="integer">1</max_dir_listing_size>
        <multiple_regions type="boolean">true</multiple_regions>
        <read_only type="boolean">true</read_only>
        <root_path>example</root_path>
        <sftp_insecure_ciphers type="boolean">false</sftp_insecure_ciphers>
        <site_id type="integer">1</site_id>
        <ssl_required type="boolean">true</ssl_required>
        <tls_disabled type="boolean">false</tls_disabled>
        <two_factor_setup_needed type="boolean">false</two_factor_setup_needed>
        <allowed_2fa_method_sms type="boolean">true</allowed_2fa_method_sms>
        <allowed_2fa_method_totp type="boolean">true</allowed_2fa_method_totp>
        <allowed_2fa_method_u2f type="boolean">true</allowed_2fa_method_u2f>
        <allowed_2fa_method_webauthn type="boolean">true</allowed_2fa_method_webauthn>
        <allowed_2fa_method_yubi type="boolean">true</allowed_2fa_method_yubi>
        <use_provided_modified_at type="boolean">true</use_provided_modified_at>
        <windows_mode_ftp type="boolean">false</windows_mode_ftp>
      </session>
      <session_pinned_by_ip type="boolean">true</session_pinned_by_ip>
      <sftp_enabled type="boolean">true</sftp_enabled>
      <sftp_host_key_type>default</sftp_host_key_type>
      <active_sftp_host_key_id type="integer">1</active_sftp_host_key_id>
      <sftp_insecure_ciphers type="boolean">true</sftp_insecure_ciphers>
      <sftp_user_root_enabled type="boolean">true</sftp_user_root_enabled>
      <sharing_enabled type="boolean">true</sharing_enabled>
      <show_request_access_link type="boolean">true</show_request_access_link>
      <site_footer>example</site_footer>
      <site_header>example</site_header>
      <smtp_address>smtp.my-mail-server.com</smtp_address>
      <smtp_authentication>plain</smtp_authentication>
      <smtp_from>me@my-mail-server.com</smtp_from>
      <smtp_port type="integer">25</smtp_port>
      <smtp_username>mail</smtp_username>
      <session_expiry type="float">6.0</session_expiry>
      <session_expiry_minutes type="integer">360</session_expiry_minutes>
      <ssl_required type="boolean">true</ssl_required>
      <subdomain>mysite</subdomain>
      <switch_to_plan_date>2000-01-01T01:00:00Z</switch_to_plan_date>
      <tls_disabled type="boolean">true</tls_disabled>
      <trial_days_left type="integer">1</trial_days_left>
      <trial_until>2000-01-01T01:00:00Z</trial_until>
      <use_provided_modified_at type="boolean">true</use_provided_modified_at>
      <user>
        <id type="integer">1</id>
        <username>user</username>
        <admin_group_ids type="array">
          <admin_group_id type="integer">1</admin_group_id>
        </admin_group_ids>
        <allowed_ips>127.0.0.1</allowed_ips>
        <attachments_permission type="boolean">true</attachments_permission>
        <api_keys_count type="integer">1</api_keys_count>
        <authenticate_until>2000-01-01T01:00:00Z</authenticate_until>
        <authentication_method>password</authentication_method>
        <avatar_url>example</avatar_url>
        <billing_permission type="boolean">false</billing_permission>
        <bypass_site_allowed_ips type="boolean">false</bypass_site_allowed_ips>
        <bypass_inactive_disable type="boolean">false</bypass_inactive_disable>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <dav_permission type="boolean">true</dav_permission>
        <disabled type="boolean">true</disabled>
        <email>example</email>
        <first_login_at>2000-01-01T01:00:00Z</first_login_at>
        <ftp_permission type="boolean">true</ftp_permission>
        <group_ids>example</group_ids>
        <header_text>User-specific message.</header_text>
        <language>en</language>
        <last_login_at>2000-01-01T01:00:00Z</last_login_at>
        <last_web_login_at>2000-01-01T01:00:00Z</last_web_login_at>
        <last_ftp_login_at>2000-01-01T01:00:00Z</last_ftp_login_at>
        <last_sftp_login_at>2000-01-01T01:00:00Z</last_sftp_login_at>
        <last_dav_login_at>2000-01-01T01:00:00Z</last_dav_login_at>
        <last_desktop_login_at>2000-01-01T01:00:00Z</last_desktop_login_at>
        <last_restapi_login_at>2000-01-01T01:00:00Z</last_restapi_login_at>
        <last_api_use_at>2000-01-01T01:00:00Z</last_api_use_at>
        <last_active_at>2000-01-01T01:00:00Z</last_active_at>
        <last_protocol_cipher>example</last_protocol_cipher>
        <lockout_expires>2000-01-01T01:00:00Z</lockout_expires>
        <name>John Doe</name>
        <company>ACME Corp.</company>
        <notes>Internal notes on this user.</notes>
        <notification_daily_send_time type="integer">18</notification_daily_send_time>
        <office_integration_enabled type="boolean">true</office_integration_enabled>
        <password_set_at>2000-01-01T01:00:00Z</password_set_at>
        <password_validity_days type="integer">1</password_validity_days>
        <public_keys_count type="integer">1</public_keys_count>
        <receive_admin_alerts type="boolean">true</receive_admin_alerts>
        <require_2fa>always_require</require_2fa>
        <require_login_by>2000-01-01T01:00:00Z</require_login_by>
        <active_2fa type="boolean">true</active_2fa>
        <require_password_change type="boolean">true</require_password_change>
        <password_expired type="boolean">true</password_expired>
        <restapi_permission type="boolean">true</restapi_permission>
        <self_managed type="boolean">true</self_managed>
        <sftp_permission type="boolean">true</sftp_permission>
        <site_admin type="boolean">true</site_admin>
        <skip_welcome_screen type="boolean">true</skip_welcome_screen>
        <ssl_required>always_require</ssl_required>
        <sso_strategy_id type="integer">1</sso_strategy_id>
        <subscribe_to_newsletter type="boolean">true</subscribe_to_newsletter>
        <externally_managed type="boolean">true</externally_managed>
        <time_zone>Pacific Time (US &amp; Canada)</time_zone>
        <type_of_2fa>yubi</type_of_2fa>
        <updated_at>2000-01-01T01:00:00Z</updated_at>
        <user_root>example</user_root>
        <days_remaining_until_password_expire type="integer">1</days_remaining_until_password_expire>
        <password_expire_at>2000-01-01T01:00:00Z</password_expire_at>
      </user>
      <user_lockout type="boolean">true</user_lockout>
      <user_lockout_lock_period type="integer">1</user_lockout_lock_period>
      <user_lockout_tries type="integer">1</user_lockout_tries>
      <user_lockout_within type="integer">6</user_lockout_within>
      <user_requests_enabled type="boolean">true</user_requests_enabled>
      <user_requests_notify_admins type="boolean">true</user_requests_notify_admins>
      <welcome_custom_text>Welcome to my site!</welcome_custom_text>
      <welcome_email_cc>example</welcome_email_cc>
      <welcome_email_subject>example</welcome_email_subject>
      <welcome_email_enabled type="boolean">true</welcome_email_enabled>
      <welcome_screen>user_controlled</welcome_screen>
      <windows_mode_ftp type="boolean">true</windows_mode_ftp>
      <disable_users_from_inactivity_period_days type="integer">1</disable_users_from_inactivity_period_days>
      <group_admins_can_set_user_password type="boolean">true</group_admins_can_set_user_password>
    </site>
    
    

    HTTPS Request

    GET /site

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Update site settings

    Example Request

    curl https://app.files.com/api/rest/v1/site.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"name":"My Site","subdomain":"mysite","domain":"my-custom-domain.com","domain_hsts_header":true,"domain_letsencrypt_chain":"example","email":"example","reply_to_email":"example","allow_bundle_names":true,"bundle_expiration":1,"welcome_email_enabled":true,"ask_about_overwrites":true,"show_request_access_link":true,"welcome_email_cc":"example","welcome_email_subject":"example","welcome_custom_text":"Welcome to my site!","language":"en","windows_mode_ftp":true,"default_time_zone":"Pacific Time (US & Canada)","desktop_app":true,"desktop_app_session_ip_pinning":true,"desktop_app_session_lifetime":1,"mobile_app":true,"mobile_app_session_ip_pinning":true,"mobile_app_session_lifetime":1,"folder_permissions_groups_only":true,"welcome_screen":"user_controlled","office_integration_available":true,"office_integration_type":"example","pin_all_remote_servers_to_site_region":true,"motd_text":"example","motd_use_for_ftp":true,"motd_use_for_sftp":true,"session_expiry":1.0,"ssl_required":true,"tls_disabled":true,"sftp_insecure_ciphers":true,"disable_files_certificate_generation":true,"user_lockout":true,"user_lockout_tries":1,"user_lockout_within":1,"user_lockout_lock_period":1,"include_password_in_welcome_email":true,"allowed_countries":"US,DE","allowed_ips":"example","disallowed_countries":"US,DE","days_to_retain_backups":1,"max_prior_passwords":1,"password_validity_days":1,"password_min_length":1,"password_require_letter":true,"password_require_mixed":true,"password_require_special":true,"password_require_number":true,"password_require_unbreached":true,"require_logout_from_bundles_and_inboxes":true,"dav_user_root_enabled":true,"sftp_user_root_enabled":true,"disable_password_reset":true,"immutable_files":true,"session_pinned_by_ip":true,"bundle_not_found_message":"example","bundle_password_required":true,"bundle_require_registration":true,"bundle_require_share_recipient":true,"bundle_registration_notifications":"never","bundle_activity_notifications":"never","bundle_upload_receipt_notifications":"never","password_requirements_apply_to_bundles":true,"prevent_root_permissions_for_non_site_admins":true,"opt_out_global":true,"use_provided_modified_at":true,"custom_namespace":true,"disable_users_from_inactivity_period_days":1,"non_sso_groups_allowed":true,"non_sso_users_allowed":true,"sharing_enabled":true,"user_requests_enabled":true,"user_requests_notify_admins":true,"dav_enabled":true,"ftp_enabled":true,"sftp_enabled":true,"sftp_host_key_type":"default","active_sftp_host_key_id":1,"protocol_access_groups_only":true,"bundle_watermark_value":{"key":"example value"},"group_admins_can_set_user_password":true,"bundle_recipient_blacklist_free_email_domains":true,"bundle_recipient_blacklist_domains":["example"],"admins_bypass_locked_subfolders":true,"allowed_2fa_method_sms":true,"allowed_2fa_method_u2f":true,"allowed_2fa_method_totp":true,"allowed_2fa_method_webauthn":true,"allowed_2fa_method_yubi":true,"allowed_2fa_method_email":true,"allowed_2fa_method_bypass_for_ftp_sftp_dav":true,"require_2fa":true,"require_2fa_user_type":"`site_admins`","color2_top":"#000000","color2_left":"#0066a7","color2_link":"#d34f5d","color2_text":"#0066a7","color2_top_text":"#ffffff","site_header":"example","site_footer":"example","login_help_text":"Login page help text.","smtp_address":"smtp.my-mail-server.com","smtp_authentication":"plain","smtp_from":"me@my-mail-server.com","smtp_username":"mail","smtp_port":1,"ldap_enabled":true,"ldap_type":"open_ldap","ldap_host":"ldap.site.com","ldap_host_2":"ldap2.site.com","ldap_host_3":"ldap3.site.com","ldap_port":1,"ldap_secure":true,"ldap_username":"[ldap username]","ldap_username_field":"sAMAccountName","ldap_domain":"mysite.com","ldap_user_action":"disabled","ldap_group_action":"disabled","ldap_user_include_groups":"example","ldap_group_exclusion":"example","ldap_group_inclusion":"example","ldap_base_dn":"example","uploads_via_email_authentication":true,"icon16_delete":true,"icon32_delete":true,"icon48_delete":true,"icon128_delete":true,"logo_delete":true,"bundle_watermark_attachment_delete":true,"login_page_background_image_delete":true,"disable_2fa_with_delay":true,"session_expiry_minutes":1}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/site.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<site>
           <name>My Site</name>
           <subdomain>mysite</subdomain>
           <domain>my-custom-domain.com</domain>
           <domain_hsts_header type="boolean">true</domain_hsts_header>
           <domain_letsencrypt_chain>example</domain_letsencrypt_chain>
           <email>example</email>
           <reply_to_email>example</reply_to_email>
           <allow_bundle_names type="boolean">true</allow_bundle_names>
           <bundle_expiration type="integer">1</bundle_expiration>
           <welcome_email_enabled type="boolean">true</welcome_email_enabled>
           <ask_about_overwrites type="boolean">true</ask_about_overwrites>
           <show_request_access_link type="boolean">true</show_request_access_link>
           <welcome_email_cc>example</welcome_email_cc>
           <welcome_email_subject>example</welcome_email_subject>
           <welcome_custom_text>Welcome to my site!</welcome_custom_text>
           <language>en</language>
           <windows_mode_ftp type="boolean">true</windows_mode_ftp>
           <default_time_zone>Pacific Time (US &amp; Canada)</default_time_zone>
           <desktop_app type="boolean">true</desktop_app>
           <desktop_app_session_ip_pinning type="boolean">true</desktop_app_session_ip_pinning>
           <desktop_app_session_lifetime type="integer">1</desktop_app_session_lifetime>
           <mobile_app type="boolean">true</mobile_app>
           <mobile_app_session_ip_pinning type="boolean">true</mobile_app_session_ip_pinning>
           <mobile_app_session_lifetime type="integer">1</mobile_app_session_lifetime>
           <folder_permissions_groups_only type="boolean">true</folder_permissions_groups_only>
           <welcome_screen>user_controlled</welcome_screen>
           <office_integration_available type="boolean">true</office_integration_available>
           <office_integration_type>example</office_integration_type>
           <pin_all_remote_servers_to_site_region type="boolean">true</pin_all_remote_servers_to_site_region>
           <motd_text>example</motd_text>
           <motd_use_for_ftp type="boolean">true</motd_use_for_ftp>
           <motd_use_for_sftp type="boolean">true</motd_use_for_sftp>
           <session_expiry type="float">1.0</session_expiry>
           <ssl_required type="boolean">true</ssl_required>
           <tls_disabled type="boolean">true</tls_disabled>
           <sftp_insecure_ciphers type="boolean">true</sftp_insecure_ciphers>
           <disable_files_certificate_generation type="boolean">true</disable_files_certificate_generation>
           <user_lockout type="boolean">true</user_lockout>
           <user_lockout_tries type="integer">1</user_lockout_tries>
           <user_lockout_within type="integer">1</user_lockout_within>
           <user_lockout_lock_period type="integer">1</user_lockout_lock_period>
           <include_password_in_welcome_email type="boolean">true</include_password_in_welcome_email>
           <allowed_countries>US,DE</allowed_countries>
           <allowed_ips>example</allowed_ips>
           <disallowed_countries>US,DE</disallowed_countries>
           <days_to_retain_backups type="integer">1</days_to_retain_backups>
           <max_prior_passwords type="integer">1</max_prior_passwords>
           <password_validity_days type="integer">1</password_validity_days>
           <password_min_length type="integer">1</password_min_length>
           <password_require_letter type="boolean">true</password_require_letter>
           <password_require_mixed type="boolean">true</password_require_mixed>
           <password_require_special type="boolean">true</password_require_special>
           <password_require_number type="boolean">true</password_require_number>
           <password_require_unbreached type="boolean">true</password_require_unbreached>
           <require_logout_from_bundles_and_inboxes type="boolean">true</require_logout_from_bundles_and_inboxes>
           <dav_user_root_enabled type="boolean">true</dav_user_root_enabled>
           <sftp_user_root_enabled type="boolean">true</sftp_user_root_enabled>
           <disable_password_reset type="boolean">true</disable_password_reset>
           <immutable_files type="boolean">true</immutable_files>
           <session_pinned_by_ip type="boolean">true</session_pinned_by_ip>
           <bundle_not_found_message>example</bundle_not_found_message>
           <bundle_password_required type="boolean">true</bundle_password_required>
           <bundle_require_registration type="boolean">true</bundle_require_registration>
           <bundle_require_share_recipient type="boolean">true</bundle_require_share_recipient>
           <bundle_registration_notifications>never</bundle_registration_notifications>
           <bundle_activity_notifications>never</bundle_activity_notifications>
           <bundle_upload_receipt_notifications>never</bundle_upload_receipt_notifications>
           <password_requirements_apply_to_bundles type="boolean">true</password_requirements_apply_to_bundles>
           <prevent_root_permissions_for_non_site_admins type="boolean">true</prevent_root_permissions_for_non_site_admins>
           <opt_out_global type="boolean">true</opt_out_global>
           <use_provided_modified_at type="boolean">true</use_provided_modified_at>
           <custom_namespace type="boolean">true</custom_namespace>
           <disable_users_from_inactivity_period_days type="integer">1</disable_users_from_inactivity_period_days>
           <non_sso_groups_allowed type="boolean">true</non_sso_groups_allowed>
           <non_sso_users_allowed type="boolean">true</non_sso_users_allowed>
           <sharing_enabled type="boolean">true</sharing_enabled>
           <user_requests_enabled type="boolean">true</user_requests_enabled>
           <user_requests_notify_admins type="boolean">true</user_requests_notify_admins>
           <dav_enabled type="boolean">true</dav_enabled>
           <ftp_enabled type="boolean">true</ftp_enabled>
           <sftp_enabled type="boolean">true</sftp_enabled>
           <sftp_host_key_type>default</sftp_host_key_type>
           <active_sftp_host_key_id type="integer">1</active_sftp_host_key_id>
           <protocol_access_groups_only type="boolean">true</protocol_access_groups_only>
           <bundle_watermark_value>
             <key>example value</key>
           </bundle_watermark_value>
           <group_admins_can_set_user_password type="boolean">true</group_admins_can_set_user_password>
           <bundle_recipient_blacklist_free_email_domains type="boolean">true</bundle_recipient_blacklist_free_email_domains>
           <bundle_recipient_blacklist_domains type="array">
             <bundle_recipient_blacklist_domain>example</bundle_recipient_blacklist_domain>
           </bundle_recipient_blacklist_domains>
           <admins_bypass_locked_subfolders type="boolean">true</admins_bypass_locked_subfolders>
           <allowed_2fa_method_sms type="boolean">true</allowed_2fa_method_sms>
           <allowed_2fa_method_u2f type="boolean">true</allowed_2fa_method_u2f>
           <allowed_2fa_method_totp type="boolean">true</allowed_2fa_method_totp>
           <allowed_2fa_method_webauthn type="boolean">true</allowed_2fa_method_webauthn>
           <allowed_2fa_method_yubi type="boolean">true</allowed_2fa_method_yubi>
           <allowed_2fa_method_email type="boolean">true</allowed_2fa_method_email>
           <allowed_2fa_method_bypass_for_ftp_sftp_dav type="boolean">true</allowed_2fa_method_bypass_for_ftp_sftp_dav>
           <require_2fa type="boolean">true</require_2fa>
           <require_2fa_user_type>`site_admins`</require_2fa_user_type>
           <color2_top>#000000</color2_top>
           <color2_left>#0066a7</color2_left>
           <color2_link>#d34f5d</color2_link>
           <color2_text>#0066a7</color2_text>
           <color2_top_text>#ffffff</color2_top_text>
           <site_header>example</site_header>
           <site_footer>example</site_footer>
           <login_help_text>Login page help text.</login_help_text>
           <smtp_address>smtp.my-mail-server.com</smtp_address>
           <smtp_authentication>plain</smtp_authentication>
           <smtp_from>me@my-mail-server.com</smtp_from>
           <smtp_username>mail</smtp_username>
           <smtp_port type="integer">1</smtp_port>
           <ldap_enabled type="boolean">true</ldap_enabled>
           <ldap_type>open_ldap</ldap_type>
           <ldap_host>ldap.site.com</ldap_host>
           <ldap_host_2>ldap2.site.com</ldap_host_2>
           <ldap_host_3>ldap3.site.com</ldap_host_3>
           <ldap_port type="integer">1</ldap_port>
           <ldap_secure type="boolean">true</ldap_secure>
           <ldap_username>[ldap username]</ldap_username>
           <ldap_username_field>sAMAccountName</ldap_username_field>
           <ldap_domain>mysite.com</ldap_domain>
           <ldap_user_action>disabled</ldap_user_action>
           <ldap_group_action>disabled</ldap_group_action>
           <ldap_user_include_groups>example</ldap_user_include_groups>
           <ldap_group_exclusion>example</ldap_group_exclusion>
           <ldap_group_inclusion>example</ldap_group_inclusion>
           <ldap_base_dn>example</ldap_base_dn>
           <uploads_via_email_authentication type="boolean">true</uploads_via_email_authentication>
           <icon16_delete type="boolean">true</icon16_delete>
           <icon32_delete type="boolean">true</icon32_delete>
           <icon48_delete type="boolean">true</icon48_delete>
           <icon128_delete type="boolean">true</icon128_delete>
           <logo_delete type="boolean">true</logo_delete>
           <bundle_watermark_attachment_delete type="boolean">true</bundle_watermark_attachment_delete>
           <login_page_background_image_delete type="boolean">true</login_page_background_image_delete>
           <disable_2fa_with_delay type="boolean">true</disable_2fa_with_delay>
           <session_expiry_minutes type="integer">1</session_expiry_minutes>
         </site>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Site.update(
      name: "My Site", 
      subdomain: "mysite", 
      domain: "my-custom-domain.com", 
      domain_hsts_header: true, 
      domain_letsencrypt_chain: "example", 
      email: "example", 
      reply_to_email: "example", 
      allow_bundle_names: true, 
      bundle_expiration: 1, 
      welcome_email_enabled: true, 
      ask_about_overwrites: true, 
      show_request_access_link: true, 
      welcome_email_cc: "example", 
      welcome_email_subject: "example", 
      welcome_custom_text: "Welcome to my site!", 
      language: "en", 
      windows_mode_ftp: true, 
      default_time_zone: "Pacific Time (US & Canada)", 
      desktop_app: true, 
      desktop_app_session_ip_pinning: true, 
      desktop_app_session_lifetime: 1, 
      mobile_app: true, 
      mobile_app_session_ip_pinning: true, 
      mobile_app_session_lifetime: 1, 
      folder_permissions_groups_only: true, 
      welcome_screen: "user_controlled", 
      office_integration_available: true, 
      office_integration_type: "example", 
      pin_all_remote_servers_to_site_region: true, 
      motd_text: "example", 
      motd_use_for_ftp: true, 
      motd_use_for_sftp: true, 
      session_expiry: 1.0, 
      ssl_required: true, 
      tls_disabled: true, 
      sftp_insecure_ciphers: true, 
      disable_files_certificate_generation: true, 
      user_lockout: true, 
      user_lockout_tries: 1, 
      user_lockout_within: 1, 
      user_lockout_lock_period: 1, 
      include_password_in_welcome_email: true, 
      allowed_countries: "US,DE", 
      allowed_ips: "example", 
      disallowed_countries: "US,DE", 
      days_to_retain_backups: 1, 
      max_prior_passwords: 1, 
      password_validity_days: 1, 
      password_min_length: 1, 
      password_require_letter: true, 
      password_require_mixed: true, 
      password_require_special: true, 
      password_require_number: true, 
      password_require_unbreached: true, 
      require_logout_from_bundles_and_inboxes: true, 
      dav_user_root_enabled: true, 
      sftp_user_root_enabled: true, 
      disable_password_reset: true, 
      immutable_files: true, 
      session_pinned_by_ip: true, 
      bundle_not_found_message: "example", 
      bundle_password_required: true, 
      bundle_require_registration: true, 
      bundle_require_share_recipient: true, 
      bundle_registration_notifications: "never", 
      bundle_activity_notifications: "never", 
      bundle_upload_receipt_notifications: "never", 
      password_requirements_apply_to_bundles: true, 
      prevent_root_permissions_for_non_site_admins: true, 
      opt_out_global: true, 
      use_provided_modified_at: true, 
      custom_namespace: true, 
      disable_users_from_inactivity_period_days: 1, 
      non_sso_groups_allowed: true, 
      non_sso_users_allowed: true, 
      sharing_enabled: true, 
      user_requests_enabled: true, 
      user_requests_notify_admins: true, 
      dav_enabled: true, 
      ftp_enabled: true, 
      sftp_enabled: true, 
      sftp_host_key_type: "default", 
      active_sftp_host_key_id: 1, 
      protocol_access_groups_only: true, 
      bundle_watermark_value: {"key":"example value"}, 
      group_admins_can_set_user_password: true, 
      bundle_recipient_blacklist_free_email_domains: true, 
      bundle_recipient_blacklist_domains: ["example"], 
      admins_bypass_locked_subfolders: true, 
      allowed_2fa_method_sms: true, 
      allowed_2fa_method_u2f: true, 
      allowed_2fa_method_totp: true, 
      allowed_2fa_method_webauthn: true, 
      allowed_2fa_method_yubi: true, 
      allowed_2fa_method_email: true, 
      allowed_2fa_method_bypass_for_ftp_sftp_dav: true, 
      require_2fa: true, 
      require_2fa_user_type: "`site_admins`", 
      color2_top: "#000000", 
      color2_left: "#0066a7", 
      color2_link: "#d34f5d", 
      color2_text: "#0066a7", 
      color2_top_text: "#ffffff", 
      site_header: "example", 
      site_footer: "example", 
      login_help_text: "Login page help text.", 
      smtp_address: "smtp.my-mail-server.com", 
      smtp_authentication: "plain", 
      smtp_from: "me@my-mail-server.com", 
      smtp_username: "mail", 
      smtp_port: 1, 
      ldap_enabled: true, 
      ldap_type: "open_ldap", 
      ldap_host: "ldap.site.com", 
      ldap_host_2: "ldap2.site.com", 
      ldap_host_3: "ldap3.site.com", 
      ldap_port: 1, 
      ldap_secure: true, 
      ldap_username: "[ldap username]", 
      ldap_username_field: "sAMAccountName", 
      ldap_domain: "mysite.com", 
      ldap_user_action: "disabled", 
      ldap_group_action: "disabled", 
      ldap_user_include_groups: "example", 
      ldap_group_exclusion: "example", 
      ldap_group_inclusion: "example", 
      ldap_base_dn: "example", 
      uploads_via_email_authentication: true, 
      icon16_delete: true, 
      icon32_delete: true, 
      icon48_delete: true, 
      icon128_delete: true, 
      logo_delete: true, 
      bundle_watermark_attachment_delete: true, 
      login_page_background_image_delete: true, 
      disable_2fa_with_delay: true, 
      session_expiry_minutes: 1
    )
    
    \Files\Model\Site::update(array(
      'name' => "My Site", 
      'subdomain' => "mysite", 
      'domain' => "my-custom-domain.com", 
      'domain_hsts_header' => true, 
      'domain_letsencrypt_chain' => "example", 
      'email' => "example", 
      'reply_to_email' => "example", 
      'allow_bundle_names' => true, 
      'bundle_expiration' => 1, 
      'welcome_email_enabled' => true, 
      'ask_about_overwrites' => true, 
      'show_request_access_link' => true, 
      'welcome_email_cc' => "example", 
      'welcome_email_subject' => "example", 
      'welcome_custom_text' => "Welcome to my site!", 
      'language' => "en", 
      'windows_mode_ftp' => true, 
      'default_time_zone' => "Pacific Time (US & Canada)", 
      'desktop_app' => true, 
      'desktop_app_session_ip_pinning' => true, 
      'desktop_app_session_lifetime' => 1, 
      'mobile_app' => true, 
      'mobile_app_session_ip_pinning' => true, 
      'mobile_app_session_lifetime' => 1, 
      'folder_permissions_groups_only' => true, 
      'welcome_screen' => "user_controlled", 
      'office_integration_available' => true, 
      'office_integration_type' => "example", 
      'pin_all_remote_servers_to_site_region' => true, 
      'motd_text' => "example", 
      'motd_use_for_ftp' => true, 
      'motd_use_for_sftp' => true, 
      'session_expiry' => 1.0, 
      'ssl_required' => true, 
      'tls_disabled' => true, 
      'sftp_insecure_ciphers' => true, 
      'disable_files_certificate_generation' => true, 
      'user_lockout' => true, 
      'user_lockout_tries' => 1, 
      'user_lockout_within' => 1, 
      'user_lockout_lock_period' => 1, 
      'include_password_in_welcome_email' => true, 
      'allowed_countries' => "US,DE", 
      'allowed_ips' => "example", 
      'disallowed_countries' => "US,DE", 
      'days_to_retain_backups' => 1, 
      'max_prior_passwords' => 1, 
      'password_validity_days' => 1, 
      'password_min_length' => 1, 
      'password_require_letter' => true, 
      'password_require_mixed' => true, 
      'password_require_special' => true, 
      'password_require_number' => true, 
      'password_require_unbreached' => true, 
      'require_logout_from_bundles_and_inboxes' => true, 
      'dav_user_root_enabled' => true, 
      'sftp_user_root_enabled' => true, 
      'disable_password_reset' => true, 
      'immutable_files' => true, 
      'session_pinned_by_ip' => true, 
      'bundle_not_found_message' => "example", 
      'bundle_password_required' => true, 
      'bundle_require_registration' => true, 
      'bundle_require_share_recipient' => true, 
      'bundle_registration_notifications' => "never", 
      'bundle_activity_notifications' => "never", 
      'bundle_upload_receipt_notifications' => "never", 
      'password_requirements_apply_to_bundles' => true, 
      'prevent_root_permissions_for_non_site_admins' => true, 
      'opt_out_global' => true, 
      'use_provided_modified_at' => true, 
      'custom_namespace' => true, 
      'disable_users_from_inactivity_period_days' => 1, 
      'non_sso_groups_allowed' => true, 
      'non_sso_users_allowed' => true, 
      'sharing_enabled' => true, 
      'user_requests_enabled' => true, 
      'user_requests_notify_admins' => true, 
      'dav_enabled' => true, 
      'ftp_enabled' => true, 
      'sftp_enabled' => true, 
      'sftp_host_key_type' => "default", 
      'active_sftp_host_key_id' => 1, 
      'protocol_access_groups_only' => true, 
      'bundle_watermark_value' => {"key":"example value"}, 
      'group_admins_can_set_user_password' => true, 
      'bundle_recipient_blacklist_free_email_domains' => true, 
      'bundle_recipient_blacklist_domains' => ["example"], 
      'admins_bypass_locked_subfolders' => true, 
      'allowed_2fa_method_sms' => true, 
      'allowed_2fa_method_u2f' => true, 
      'allowed_2fa_method_totp' => true, 
      'allowed_2fa_method_webauthn' => true, 
      'allowed_2fa_method_yubi' => true, 
      'allowed_2fa_method_email' => true, 
      'allowed_2fa_method_bypass_for_ftp_sftp_dav' => true, 
      'require_2fa' => true, 
      'require_2fa_user_type' => "`site_admins`", 
      'color2_top' => "#000000", 
      'color2_left' => "#0066a7", 
      'color2_link' => "#d34f5d", 
      'color2_text' => "#0066a7", 
      'color2_top_text' => "#ffffff", 
      'site_header' => "example", 
      'site_footer' => "example", 
      'login_help_text' => "Login page help text.", 
      'smtp_address' => "smtp.my-mail-server.com", 
      'smtp_authentication' => "plain", 
      'smtp_from' => "me@my-mail-server.com", 
      'smtp_username' => "mail", 
      'smtp_port' => 1, 
      'ldap_enabled' => true, 
      'ldap_type' => "open_ldap", 
      'ldap_host' => "ldap.site.com", 
      'ldap_host_2' => "ldap2.site.com", 
      'ldap_host_3' => "ldap3.site.com", 
      'ldap_port' => 1, 
      'ldap_secure' => true, 
      'ldap_username' => "[ldap username]", 
      'ldap_username_field' => "sAMAccountName", 
      'ldap_domain' => "mysite.com", 
      'ldap_user_action' => "disabled", 
      'ldap_group_action' => "disabled", 
      'ldap_user_include_groups' => "example", 
      'ldap_group_exclusion' => "example", 
      'ldap_group_inclusion' => "example", 
      'ldap_base_dn' => "example", 
      'uploads_via_email_authentication' => true, 
      'icon16_delete' => true, 
      'icon32_delete' => true, 
      'icon48_delete' => true, 
      'icon128_delete' => true, 
      'logo_delete' => true, 
      'bundle_watermark_attachment_delete' => true, 
      'login_page_background_image_delete' => true, 
      'disable_2fa_with_delay' => true, 
      'session_expiry_minutes' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("name", My Site);
    requestParams.put("subdomain", mysite);
    requestParams.put("domain", my-custom-domain.com);
    requestParams.put("domain_hsts_header", true);
    requestParams.put("domain_letsencrypt_chain", example);
    requestParams.put("email", example);
    requestParams.put("reply_to_email", example);
    requestParams.put("allow_bundle_names", true);
    requestParams.put("bundle_expiration", 1);
    requestParams.put("welcome_email_enabled", true);
    requestParams.put("ask_about_overwrites", true);
    requestParams.put("show_request_access_link", true);
    requestParams.put("welcome_email_cc", example);
    requestParams.put("welcome_email_subject", example);
    requestParams.put("welcome_custom_text", Welcome to my site!);
    requestParams.put("language", en);
    requestParams.put("windows_mode_ftp", true);
    requestParams.put("default_time_zone", Pacific Time (US & Canada));
    requestParams.put("desktop_app", true);
    requestParams.put("desktop_app_session_ip_pinning", true);
    requestParams.put("desktop_app_session_lifetime", 1);
    requestParams.put("mobile_app", true);
    requestParams.put("mobile_app_session_ip_pinning", true);
    requestParams.put("mobile_app_session_lifetime", 1);
    requestParams.put("folder_permissions_groups_only", true);
    requestParams.put("welcome_screen", user_controlled);
    requestParams.put("office_integration_available", true);
    requestParams.put("office_integration_type", example);
    requestParams.put("pin_all_remote_servers_to_site_region", true);
    requestParams.put("motd_text", example);
    requestParams.put("motd_use_for_ftp", true);
    requestParams.put("motd_use_for_sftp", true);
    requestParams.put("session_expiry", 1.0);
    requestParams.put("ssl_required", true);
    requestParams.put("tls_disabled", true);
    requestParams.put("sftp_insecure_ciphers", true);
    requestParams.put("disable_files_certificate_generation", true);
    requestParams.put("user_lockout", true);
    requestParams.put("user_lockout_tries", 1);
    requestParams.put("user_lockout_within", 1);
    requestParams.put("user_lockout_lock_period", 1);
    requestParams.put("include_password_in_welcome_email", true);
    requestParams.put("allowed_countries", US,DE);
    requestParams.put("allowed_ips", example);
    requestParams.put("disallowed_countries", US,DE);
    requestParams.put("days_to_retain_backups", 1);
    requestParams.put("max_prior_passwords", 1);
    requestParams.put("password_validity_days", 1);
    requestParams.put("password_min_length", 1);
    requestParams.put("password_require_letter", true);
    requestParams.put("password_require_mixed", true);
    requestParams.put("password_require_special", true);
    requestParams.put("password_require_number", true);
    requestParams.put("password_require_unbreached", true);
    requestParams.put("require_logout_from_bundles_and_inboxes", true);
    requestParams.put("dav_user_root_enabled", true);
    requestParams.put("sftp_user_root_enabled", true);
    requestParams.put("disable_password_reset", true);
    requestParams.put("immutable_files", true);
    requestParams.put("session_pinned_by_ip", true);
    requestParams.put("bundle_not_found_message", example);
    requestParams.put("bundle_password_required", true);
    requestParams.put("bundle_require_registration", true);
    requestParams.put("bundle_require_share_recipient", true);
    requestParams.put("bundle_registration_notifications", never);
    requestParams.put("bundle_activity_notifications", never);
    requestParams.put("bundle_upload_receipt_notifications", never);
    requestParams.put("password_requirements_apply_to_bundles", true);
    requestParams.put("prevent_root_permissions_for_non_site_admins", true);
    requestParams.put("opt_out_global", true);
    requestParams.put("use_provided_modified_at", true);
    requestParams.put("custom_namespace", true);
    requestParams.put("disable_users_from_inactivity_period_days", 1);
    requestParams.put("non_sso_groups_allowed", true);
    requestParams.put("non_sso_users_allowed", true);
    requestParams.put("sharing_enabled", true);
    requestParams.put("user_requests_enabled", true);
    requestParams.put("user_requests_notify_admins", true);
    requestParams.put("dav_enabled", true);
    requestParams.put("ftp_enabled", true);
    requestParams.put("sftp_enabled", true);
    requestParams.put("sftp_host_key_type", default);
    requestParams.put("active_sftp_host_key_id", 1);
    requestParams.put("protocol_access_groups_only", true);
    requestParams.put("bundle_watermark_value", #<Swagger::Schema key="example value">);
    requestParams.put("group_admins_can_set_user_password", true);
    requestParams.put("bundle_recipient_blacklist_free_email_domains", true);
    requestParams.put("bundle_recipient_blacklist_domains", ["example"]);
    requestParams.put("admins_bypass_locked_subfolders", true);
    requestParams.put("allowed_2fa_method_sms", true);
    requestParams.put("allowed_2fa_method_u2f", true);
    requestParams.put("allowed_2fa_method_totp", true);
    requestParams.put("allowed_2fa_method_webauthn", true);
    requestParams.put("allowed_2fa_method_yubi", true);
    requestParams.put("allowed_2fa_method_email", true);
    requestParams.put("allowed_2fa_method_bypass_for_ftp_sftp_dav", true);
    requestParams.put("require_2fa", true);
    requestParams.put("require_2fa_user_type", `site_admins`);
    requestParams.put("color2_top", #000000);
    requestParams.put("color2_left", #0066a7);
    requestParams.put("color2_link", #d34f5d);
    requestParams.put("color2_text", #0066a7);
    requestParams.put("color2_top_text", #ffffff);
    requestParams.put("site_header", example);
    requestParams.put("site_footer", example);
    requestParams.put("login_help_text", Login page help text.);
    requestParams.put("smtp_address", smtp.my-mail-server.com);
    requestParams.put("smtp_authentication", plain);
    requestParams.put("smtp_from", me@my-mail-server.com);
    requestParams.put("smtp_username", mail);
    requestParams.put("smtp_port", 1);
    requestParams.put("ldap_enabled", true);
    requestParams.put("ldap_type", open_ldap);
    requestParams.put("ldap_host", ldap.site.com);
    requestParams.put("ldap_host_2", ldap2.site.com);
    requestParams.put("ldap_host_3", ldap3.site.com);
    requestParams.put("ldap_port", 1);
    requestParams.put("ldap_secure", true);
    requestParams.put("ldap_username", [ldap username]);
    requestParams.put("ldap_username_field", sAMAccountName);
    requestParams.put("ldap_domain", mysite.com);
    requestParams.put("ldap_user_action", disabled);
    requestParams.put("ldap_group_action", disabled);
    requestParams.put("ldap_user_include_groups", example);
    requestParams.put("ldap_group_exclusion", example);
    requestParams.put("ldap_group_inclusion", example);
    requestParams.put("ldap_base_dn", example);
    requestParams.put("uploads_via_email_authentication", true);
    requestParams.put("icon16_delete", true);
    requestParams.put("icon32_delete", true);
    requestParams.put("icon48_delete", true);
    requestParams.put("icon128_delete", true);
    requestParams.put("logo_delete", true);
    requestParams.put("bundle_watermark_attachment_delete", true);
    requestParams.put("login_page_background_image_delete", true);
    requestParams.put("disable_2fa_with_delay", true);
    requestParams.put("session_expiry_minutes", 1);
    Site.update(parameters)
    
    await Site.update({
      name: "My Site", 
      subdomain: "mysite", 
      domain: "my-custom-domain.com", 
      domain_hsts_header: true, 
      domain_letsencrypt_chain: "example", 
      email: "example", 
      reply_to_email: "example", 
      allow_bundle_names: true, 
      bundle_expiration: 1, 
      welcome_email_enabled: true, 
      ask_about_overwrites: true, 
      show_request_access_link: true, 
      welcome_email_cc: "example", 
      welcome_email_subject: "example", 
      welcome_custom_text: "Welcome to my site!", 
      language: "en", 
      windows_mode_ftp: true, 
      default_time_zone: "Pacific Time (US & Canada)", 
      desktop_app: true, 
      desktop_app_session_ip_pinning: true, 
      desktop_app_session_lifetime: 1, 
      mobile_app: true, 
      mobile_app_session_ip_pinning: true, 
      mobile_app_session_lifetime: 1, 
      folder_permissions_groups_only: true, 
      welcome_screen: "user_controlled", 
      office_integration_available: true, 
      office_integration_type: "example", 
      pin_all_remote_servers_to_site_region: true, 
      motd_text: "example", 
      motd_use_for_ftp: true, 
      motd_use_for_sftp: true, 
      session_expiry: 1.0, 
      ssl_required: true, 
      tls_disabled: true, 
      sftp_insecure_ciphers: true, 
      disable_files_certificate_generation: true, 
      user_lockout: true, 
      user_lockout_tries: 1, 
      user_lockout_within: 1, 
      user_lockout_lock_period: 1, 
      include_password_in_welcome_email: true, 
      allowed_countries: "US,DE", 
      allowed_ips: "example", 
      disallowed_countries: "US,DE", 
      days_to_retain_backups: 1, 
      max_prior_passwords: 1, 
      password_validity_days: 1, 
      password_min_length: 1, 
      password_require_letter: true, 
      password_require_mixed: true, 
      password_require_special: true, 
      password_require_number: true, 
      password_require_unbreached: true, 
      require_logout_from_bundles_and_inboxes: true, 
      dav_user_root_enabled: true, 
      sftp_user_root_enabled: true, 
      disable_password_reset: true, 
      immutable_files: true, 
      session_pinned_by_ip: true, 
      bundle_not_found_message: "example", 
      bundle_password_required: true, 
      bundle_require_registration: true, 
      bundle_require_share_recipient: true, 
      bundle_registration_notifications: "never", 
      bundle_activity_notifications: "never", 
      bundle_upload_receipt_notifications: "never", 
      password_requirements_apply_to_bundles: true, 
      prevent_root_permissions_for_non_site_admins: true, 
      opt_out_global: true, 
      use_provided_modified_at: true, 
      custom_namespace: true, 
      disable_users_from_inactivity_period_days: 1, 
      non_sso_groups_allowed: true, 
      non_sso_users_allowed: true, 
      sharing_enabled: true, 
      user_requests_enabled: true, 
      user_requests_notify_admins: true, 
      dav_enabled: true, 
      ftp_enabled: true, 
      sftp_enabled: true, 
      sftp_host_key_type: "default", 
      active_sftp_host_key_id: 1, 
      protocol_access_groups_only: true, 
      bundle_watermark_value: {"key":"example value"}, 
      group_admins_can_set_user_password: true, 
      bundle_recipient_blacklist_free_email_domains: true, 
      bundle_recipient_blacklist_domains: ["example"], 
      admins_bypass_locked_subfolders: true, 
      allowed_2fa_method_sms: true, 
      allowed_2fa_method_u2f: true, 
      allowed_2fa_method_totp: true, 
      allowed_2fa_method_webauthn: true, 
      allowed_2fa_method_yubi: true, 
      allowed_2fa_method_email: true, 
      allowed_2fa_method_bypass_for_ftp_sftp_dav: true, 
      require_2fa: true, 
      require_2fa_user_type: "`site_admins`", 
      color2_top: "#000000", 
      color2_left: "#0066a7", 
      color2_link: "#d34f5d", 
      color2_text: "#0066a7", 
      color2_top_text: "#ffffff", 
      site_header: "example", 
      site_footer: "example", 
      login_help_text: "Login page help text.", 
      smtp_address: "smtp.my-mail-server.com", 
      smtp_authentication: "plain", 
      smtp_from: "me@my-mail-server.com", 
      smtp_username: "mail", 
      smtp_port: 1, 
      ldap_enabled: true, 
      ldap_type: "open_ldap", 
      ldap_host: "ldap.site.com", 
      ldap_host_2: "ldap2.site.com", 
      ldap_host_3: "ldap3.site.com", 
      ldap_port: 1, 
      ldap_secure: true, 
      ldap_username: "[ldap username]", 
      ldap_username_field: "sAMAccountName", 
      ldap_domain: "mysite.com", 
      ldap_user_action: "disabled", 
      ldap_group_action: "disabled", 
      ldap_user_include_groups: "example", 
      ldap_group_exclusion: "example", 
      ldap_group_inclusion: "example", 
      ldap_base_dn: "example", 
      uploads_via_email_authentication: true, 
      icon16_delete: true, 
      icon32_delete: true, 
      icon48_delete: true, 
      icon128_delete: true, 
      logo_delete: true, 
      bundle_watermark_attachment_delete: true, 
      login_page_background_image_delete: true, 
      disable_2fa_with_delay: true, 
      session_expiry_minutes: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("name", "My Site");
    parameters.Add("subdomain", "mysite");
    parameters.Add("domain", "my-custom-domain.com");
    parameters.Add("domain_hsts_header", true);
    parameters.Add("domain_letsencrypt_chain", "example");
    parameters.Add("email", "example");
    parameters.Add("reply_to_email", "example");
    parameters.Add("allow_bundle_names", true);
    parameters.Add("bundle_expiration", (Int64?) 1);
    parameters.Add("welcome_email_enabled", true);
    parameters.Add("ask_about_overwrites", true);
    parameters.Add("show_request_access_link", true);
    parameters.Add("welcome_email_cc", "example");
    parameters.Add("welcome_email_subject", "example");
    parameters.Add("welcome_custom_text", "Welcome to my site!");
    parameters.Add("language", "en");
    parameters.Add("windows_mode_ftp", true);
    parameters.Add("default_time_zone", "Pacific Time (US & Canada)");
    parameters.Add("desktop_app", true);
    parameters.Add("desktop_app_session_ip_pinning", true);
    parameters.Add("desktop_app_session_lifetime", (Int64?) 1);
    parameters.Add("mobile_app", true);
    parameters.Add("mobile_app_session_ip_pinning", true);
    parameters.Add("mobile_app_session_lifetime", (Int64?) 1);
    parameters.Add("folder_permissions_groups_only", true);
    parameters.Add("welcome_screen", "user_controlled");
    parameters.Add("office_integration_available", true);
    parameters.Add("office_integration_type", "example");
    parameters.Add("pin_all_remote_servers_to_site_region", true);
    parameters.Add("motd_text", "example");
    parameters.Add("motd_use_for_ftp", true);
    parameters.Add("motd_use_for_sftp", true);
    parameters.Add("session_expiry", (double) 1.0);
    parameters.Add("ssl_required", true);
    parameters.Add("tls_disabled", true);
    parameters.Add("sftp_insecure_ciphers", true);
    parameters.Add("disable_files_certificate_generation", true);
    parameters.Add("user_lockout", true);
    parameters.Add("user_lockout_tries", (Int64?) 1);
    parameters.Add("user_lockout_within", (Int64?) 1);
    parameters.Add("user_lockout_lock_period", (Int64?) 1);
    parameters.Add("include_password_in_welcome_email", true);
    parameters.Add("allowed_countries", "US,DE");
    parameters.Add("allowed_ips", "example");
    parameters.Add("disallowed_countries", "US,DE");
    parameters.Add("days_to_retain_backups", (Int64?) 1);
    parameters.Add("max_prior_passwords", (Int64?) 1);
    parameters.Add("password_validity_days", (Int64?) 1);
    parameters.Add("password_min_length", (Int64?) 1);
    parameters.Add("password_require_letter", true);
    parameters.Add("password_require_mixed", true);
    parameters.Add("password_require_special", true);
    parameters.Add("password_require_number", true);
    parameters.Add("password_require_unbreached", true);
    parameters.Add("require_logout_from_bundles_and_inboxes", true);
    parameters.Add("dav_user_root_enabled", true);
    parameters.Add("sftp_user_root_enabled", true);
    parameters.Add("disable_password_reset", true);
    parameters.Add("immutable_files", true);
    parameters.Add("session_pinned_by_ip", true);
    parameters.Add("bundle_not_found_message", "example");
    parameters.Add("bundle_password_required", true);
    parameters.Add("bundle_require_registration", true);
    parameters.Add("bundle_require_share_recipient", true);
    parameters.Add("bundle_registration_notifications", "never");
    parameters.Add("bundle_activity_notifications", "never");
    parameters.Add("bundle_upload_receipt_notifications", "never");
    parameters.Add("password_requirements_apply_to_bundles", true);
    parameters.Add("prevent_root_permissions_for_non_site_admins", true);
    parameters.Add("opt_out_global", true);
    parameters.Add("use_provided_modified_at", true);
    parameters.Add("custom_namespace", true);
    parameters.Add("disable_users_from_inactivity_period_days", (Int64?) 1);
    parameters.Add("non_sso_groups_allowed", true);
    parameters.Add("non_sso_users_allowed", true);
    parameters.Add("sharing_enabled", true);
    parameters.Add("user_requests_enabled", true);
    parameters.Add("user_requests_notify_admins", true);
    parameters.Add("dav_enabled", true);
    parameters.Add("ftp_enabled", true);
    parameters.Add("sftp_enabled", true);
    parameters.Add("sftp_host_key_type", "default");
    parameters.Add("active_sftp_host_key_id", (Int64?) 1);
    parameters.Add("protocol_access_groups_only", true);
    parameters.Add("bundle_watermark_value", (object) {"key":"example value"});
    parameters.Add("group_admins_can_set_user_password", true);
    parameters.Add("bundle_recipient_blacklist_free_email_domains", true);
    parameters.Add("bundle_recipient_blacklist_domains", (string[]) ["example"]);
    parameters.Add("admins_bypass_locked_subfolders", true);
    parameters.Add("allowed_2fa_method_sms", true);
    parameters.Add("allowed_2fa_method_u2f", true);
    parameters.Add("allowed_2fa_method_totp", true);
    parameters.Add("allowed_2fa_method_webauthn", true);
    parameters.Add("allowed_2fa_method_yubi", true);
    parameters.Add("allowed_2fa_method_email", true);
    parameters.Add("allowed_2fa_method_bypass_for_ftp_sftp_dav", true);
    parameters.Add("require_2fa", true);
    parameters.Add("require_2fa_user_type", "`site_admins`");
    parameters.Add("color2_top", "#000000");
    parameters.Add("color2_left", "#0066a7");
    parameters.Add("color2_link", "#d34f5d");
    parameters.Add("color2_text", "#0066a7");
    parameters.Add("color2_top_text", "#ffffff");
    parameters.Add("site_header", "example");
    parameters.Add("site_footer", "example");
    parameters.Add("login_help_text", "Login page help text.");
    parameters.Add("smtp_address", "smtp.my-mail-server.com");
    parameters.Add("smtp_authentication", "plain");
    parameters.Add("smtp_from", "me@my-mail-server.com");
    parameters.Add("smtp_username", "mail");
    parameters.Add("smtp_port", (Int64?) 1);
    parameters.Add("ldap_enabled", true);
    parameters.Add("ldap_type", "open_ldap");
    parameters.Add("ldap_host", "ldap.site.com");
    parameters.Add("ldap_host_2", "ldap2.site.com");
    parameters.Add("ldap_host_3", "ldap3.site.com");
    parameters.Add("ldap_port", (Int64?) 1);
    parameters.Add("ldap_secure", true);
    parameters.Add("ldap_username", "[ldap username]");
    parameters.Add("ldap_username_field", "sAMAccountName");
    parameters.Add("ldap_domain", "mysite.com");
    parameters.Add("ldap_user_action", "disabled");
    parameters.Add("ldap_group_action", "disabled");
    parameters.Add("ldap_user_include_groups", "example");
    parameters.Add("ldap_group_exclusion", "example");
    parameters.Add("ldap_group_inclusion", "example");
    parameters.Add("ldap_base_dn", "example");
    parameters.Add("uploads_via_email_authentication", true);
    parameters.Add("icon16_delete", true);
    parameters.Add("icon32_delete", true);
    parameters.Add("icon48_delete", true);
    parameters.Add("icon128_delete", true);
    parameters.Add("logo_delete", true);
    parameters.Add("bundle_watermark_attachment_delete", true);
    parameters.Add("login_page_background_image_delete", true);
    parameters.Add("disable_2fa_with_delay", true);
    parameters.Add("session_expiry_minutes", (Int64?) 1);
    
    await Site.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.site.update({
      "name": "My Site",
      "subdomain": "mysite",
      "domain": "my-custom-domain.com",
      "domain_hsts_header": True,
      "domain_letsencrypt_chain": "example",
      "email": "example",
      "reply_to_email": "example",
      "allow_bundle_names": True,
      "bundle_expiration": 1,
      "welcome_email_enabled": True,
      "ask_about_overwrites": True,
      "show_request_access_link": True,
      "welcome_email_cc": "example",
      "welcome_email_subject": "example",
      "welcome_custom_text": "Welcome to my site!",
      "language": "en",
      "windows_mode_ftp": True,
      "default_time_zone": "Pacific Time (US & Canada)",
      "desktop_app": True,
      "desktop_app_session_ip_pinning": True,
      "desktop_app_session_lifetime": 1,
      "mobile_app": True,
      "mobile_app_session_ip_pinning": True,
      "mobile_app_session_lifetime": 1,
      "folder_permissions_groups_only": True,
      "welcome_screen": "user_controlled",
      "office_integration_available": True,
      "office_integration_type": "example",
      "pin_all_remote_servers_to_site_region": True,
      "motd_text": "example",
      "motd_use_for_ftp": True,
      "motd_use_for_sftp": True,
      "session_expiry": 1.0,
      "ssl_required": True,
      "tls_disabled": True,
      "sftp_insecure_ciphers": True,
      "disable_files_certificate_generation": True,
      "user_lockout": True,
      "user_lockout_tries": 1,
      "user_lockout_within": 1,
      "user_lockout_lock_period": 1,
      "include_password_in_welcome_email": True,
      "allowed_countries": "US,DE",
      "allowed_ips": "example",
      "disallowed_countries": "US,DE",
      "days_to_retain_backups": 1,
      "max_prior_passwords": 1,
      "password_validity_days": 1,
      "password_min_length": 1,
      "password_require_letter": True,
      "password_require_mixed": True,
      "password_require_special": True,
      "password_require_number": True,
      "password_require_unbreached": True,
      "require_logout_from_bundles_and_inboxes": True,
      "dav_user_root_enabled": True,
      "sftp_user_root_enabled": True,
      "disable_password_reset": True,
      "immutable_files": True,
      "session_pinned_by_ip": True,
      "bundle_not_found_message": "example",
      "bundle_password_required": True,
      "bundle_require_registration": True,
      "bundle_require_share_recipient": True,
      "bundle_registration_notifications": "never",
      "bundle_activity_notifications": "never",
      "bundle_upload_receipt_notifications": "never",
      "password_requirements_apply_to_bundles": True,
      "prevent_root_permissions_for_non_site_admins": True,
      "opt_out_global": True,
      "use_provided_modified_at": True,
      "custom_namespace": True,
      "disable_users_from_inactivity_period_days": 1,
      "non_sso_groups_allowed": True,
      "non_sso_users_allowed": True,
      "sharing_enabled": True,
      "user_requests_enabled": True,
      "user_requests_notify_admins": True,
      "dav_enabled": True,
      "ftp_enabled": True,
      "sftp_enabled": True,
      "sftp_host_key_type": "default",
      "active_sftp_host_key_id": 1,
      "protocol_access_groups_only": True,
      "bundle_watermark_value": {"key":"example value"},
      "group_admins_can_set_user_password": True,
      "bundle_recipient_blacklist_free_email_domains": True,
      "bundle_recipient_blacklist_domains": ["example"],
      "admins_bypass_locked_subfolders": True,
      "allowed_2fa_method_sms": True,
      "allowed_2fa_method_u2f": True,
      "allowed_2fa_method_totp": True,
      "allowed_2fa_method_webauthn": True,
      "allowed_2fa_method_yubi": True,
      "allowed_2fa_method_email": True,
      "allowed_2fa_method_bypass_for_ftp_sftp_dav": True,
      "require_2fa": True,
      "require_2fa_user_type": "`site_admins`",
      "color2_top": "#000000",
      "color2_left": "#0066a7",
      "color2_link": "#d34f5d",
      "color2_text": "#0066a7",
      "color2_top_text": "#ffffff",
      "site_header": "example",
      "site_footer": "example",
      "login_help_text": "Login page help text.",
      "smtp_address": "smtp.my-mail-server.com",
      "smtp_authentication": "plain",
      "smtp_from": "me@my-mail-server.com",
      "smtp_username": "mail",
      "smtp_port": 1,
      "ldap_enabled": True,
      "ldap_type": "open_ldap",
      "ldap_host": "ldap.site.com",
      "ldap_host_2": "ldap2.site.com",
      "ldap_host_3": "ldap3.site.com",
      "ldap_port": 1,
      "ldap_secure": True,
      "ldap_username": "[ldap username]",
      "ldap_username_field": "sAMAccountName",
      "ldap_domain": "mysite.com",
      "ldap_user_action": "disabled",
      "ldap_group_action": "disabled",
      "ldap_user_include_groups": "example",
      "ldap_group_exclusion": "example",
      "ldap_group_inclusion": "example",
      "ldap_base_dn": "example",
      "uploads_via_email_authentication": True,
      "icon16_delete": True,
      "icon32_delete": True,
      "icon48_delete": True,
      "icon128_delete": True,
      "logo_delete": True,
      "bundle_watermark_attachment_delete": True,
      "login_page_background_image_delete": True,
      "disable_2fa_with_delay": True,
      "session_expiry_minutes": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    site.Update(context.Background(), files_sdk.SiteUpdateParams{
      Name: "My Site",
      Subdomain: "mysite",
      Domain: "my-custom-domain.com",
      DomainHstsHeader: lib.Bool(true),
      DomainLetsencryptChain: "example",
      Email: "example",
      ReplyToEmail: "example",
      AllowBundleNames: lib.Bool(true),
      BundleExpiration: 1,
      WelcomeEmailEnabled: lib.Bool(true),
      AskAboutOverwrites: lib.Bool(true),
      ShowRequestAccessLink: lib.Bool(true),
      WelcomeEmailCc: "example",
      WelcomeEmailSubject: "example",
      WelcomeCustomText: "Welcome to my site!",
      Language: "en",
      WindowsModeFtp: lib.Bool(true),
      DefaultTimeZone: "Pacific Time (US & Canada)",
      DesktopApp: lib.Bool(true),
      DesktopAppSessionIpPinning: lib.Bool(true),
      DesktopAppSessionLifetime: 1,
      MobileApp: lib.Bool(true),
      MobileAppSessionIpPinning: lib.Bool(true),
      MobileAppSessionLifetime: 1,
      FolderPermissionsGroupsOnly: lib.Bool(true),
      WelcomeScreen: "user_controlled",
      OfficeIntegrationAvailable: lib.Bool(true),
      OfficeIntegrationType: "example",
      PinAllRemoteServersToSiteRegion: lib.Bool(true),
      MotdText: "example",
      MotdUseForFtp: lib.Bool(true),
      MotdUseForSftp: lib.Bool(true),
      LeftNavigationVisibility: "",
      SessionExpiry: 1.0,
      SslRequired: lib.Bool(true),
      TlsDisabled: lib.Bool(true),
      SftpInsecureCiphers: lib.Bool(true),
      DisableFilesCertificateGeneration: lib.Bool(true),
      UserLockout: lib.Bool(true),
      UserLockoutTries: 1,
      UserLockoutWithin: 1,
      UserLockoutLockPeriod: 1,
      IncludePasswordInWelcomeEmail: lib.Bool(true),
      AllowedCountries: "US,DE",
      AllowedIps: "example",
      DisallowedCountries: "US,DE",
      DaysToRetainBackups: 1,
      MaxPriorPasswords: 1,
      PasswordValidityDays: 1,
      PasswordMinLength: 1,
      PasswordRequireLetter: lib.Bool(true),
      PasswordRequireMixed: lib.Bool(true),
      PasswordRequireSpecial: lib.Bool(true),
      PasswordRequireNumber: lib.Bool(true),
      PasswordRequireUnbreached: lib.Bool(true),
      RequireLogoutFromBundlesAndInboxes: lib.Bool(true),
      DavUserRootEnabled: lib.Bool(true),
      SftpUserRootEnabled: lib.Bool(true),
      DisablePasswordReset: lib.Bool(true),
      ImmutableFiles: lib.Bool(true),
      SessionPinnedByIp: lib.Bool(true),
      BundleNotFoundMessage: "example",
      BundlePasswordRequired: lib.Bool(true),
      BundleRequireRegistration: lib.Bool(true),
      BundleRequireShareRecipient: lib.Bool(true),
      BundleRegistrationNotifications: "never",
      BundleActivityNotifications: "never",
      BundleUploadReceiptNotifications: "never",
      PasswordRequirementsApplyToBundles: lib.Bool(true),
      PreventRootPermissionsForNonSiteAdmins: lib.Bool(true),
      OptOutGlobal: lib.Bool(true),
      UseProvidedModifiedAt: lib.Bool(true),
      CustomNamespace: lib.Bool(true),
      DisableUsersFromInactivityPeriodDays: 1,
      NonSsoGroupsAllowed: lib.Bool(true),
      NonSsoUsersAllowed: lib.Bool(true),
      SharingEnabled: lib.Bool(true),
      UserRequestsEnabled: lib.Bool(true),
      UserRequestsNotifyAdmins: lib.Bool(true),
      DavEnabled: lib.Bool(true),
      FtpEnabled: lib.Bool(true),
      SftpEnabled: lib.Bool(true),
      SftpHostKeyType: "default",
      ActiveSftpHostKeyId: 1,
      ProtocolAccessGroupsOnly: lib.Bool(true),
      BundleWatermarkValue: `{"key":"example value"}`,
      GroupAdminsCanSetUserPassword: lib.Bool(true),
      BundleRecipientBlacklistFreeEmailDomains: lib.Bool(true),
      BundleRecipientBlacklistDomains: []string{"example"},
      AdminsBypassLockedSubfolders: lib.Bool(true),
      Allowed2faMethodSms: lib.Bool(true),
      Allowed2faMethodU2f: lib.Bool(true),
      Allowed2faMethodTotp: lib.Bool(true),
      Allowed2faMethodWebauthn: lib.Bool(true),
      Allowed2faMethodYubi: lib.Bool(true),
      Allowed2faMethodEmail: lib.Bool(true),
      Allowed2faMethodBypassForFtpSftpDav: lib.Bool(true),
      Require2fa: lib.Bool(true),
      Require2faUserType: "`site_admins`",
      Color2Top: "#000000",
      Color2Left: "#0066a7",
      Color2Link: "#d34f5d",
      Color2Text: "#0066a7",
      Color2TopText: "#ffffff",
      SiteHeader: "example",
      SiteFooter: "example",
      LoginHelpText: "Login page help text.",
      SmtpAddress: "smtp.my-mail-server.com",
      SmtpAuthentication: "plain",
      SmtpFrom: "me@my-mail-server.com",
      SmtpUsername: "mail",
      SmtpPort: 1,
      LdapEnabled: lib.Bool(true),
      LdapType: "open_ldap",
      LdapHost: "ldap.site.com",
      LdapHost2: "ldap2.site.com",
      LdapHost3: "ldap3.site.com",
      LdapPort: 1,
      LdapSecure: lib.Bool(true),
      LdapUsername: "[ldap username]",
      LdapUsernameField: "sAMAccountName",
      LdapDomain: "mysite.com",
      LdapUserAction: "disabled",
      LdapGroupAction: "disabled",
      LdapUserIncludeGroups: "example",
      LdapGroupExclusion: "example",
      LdapGroupInclusion: "example",
      LdapBaseDn: "example",
      UploadsViaEmailAuthentication: lib.Bool(true),
      Icon16File: "",
      Icon16Delete: lib.Bool(true),
      Icon32File: "",
      Icon32Delete: lib.Bool(true),
      Icon48File: "",
      Icon48Delete: lib.Bool(true),
      Icon128File: "",
      Icon128Delete: lib.Bool(true),
      LogoFile: "",
      LogoDelete: lib.Bool(true),
      BundleWatermarkAttachmentFile: "",
      BundleWatermarkAttachmentDelete: lib.Bool(true),
      LoginPageBackgroundImageFile: "",
      LoginPageBackgroundImageDelete: lib.Bool(true),
      Disable2faWithDelay: lib.Bool(true),
      LdapPasswordChange: "",
      LdapPasswordChangeConfirmation: "",
      SmtpPassword: "",
      SessionExpiryMinutes: 1,
    })
    
    
    files-cli sites update \
      --name="My Site" \
      --subdomain="mysite" \
      --domain="my-custom-domain.com" \
      --domain-letsencrypt-chain="example" \
      --email="example" \
      --reply-to-email="example" \
      --bundle-expiration=1 \
      --welcome-email-cc="example" \
      --welcome-email-subject="example" \
      --welcome-custom-text="Welcome to my site!" \
      --language="en" \
      --default-time-zone="Pacific Time (US & Canada)" \
      --desktop-app-session-lifetime=1 \
      --mobile-app-session-lifetime=1 \
      --welcome-screen="user_controlled" \
      --office-integration-type="example" \
      --motd-text="example" \
      --session-expiry=1.0 \
      --user-lockout-tries=1 \
      --user-lockout-within=1 \
      --user-lockout-lock-period=1 \
      --allowed-countries="US,DE" \
      --allowed-ips="example" \
      --disallowed-countries="US,DE" \
      --days-to-retain-backups=1 \
      --max-prior-passwords=1 \
      --password-validity-days=1 \
      --password-min-length=1 \
      --bundle-not-found-message="example" \
      --bundle-registration-notifications="never" \
      --bundle-activity-notifications="never" \
      --bundle-upload-receipt-notifications="never" \
      --disable-users-from-inactivity-period-days=1 \
      --sftp-host-key-type="default" \
      --active-sftp-host-key-id=1 \
      --bundle-recipient-blacklist-domains="["example"]" \
      --require-2fa-user-type="`site_admins`" \
      --color2-top="#000000" \
      --color2-left="#0066a7" \
      --color2-link="#d34f5d" \
      --color2-text="#0066a7" \
      --color2-top-text="#ffffff" \
      --site-header="example" \
      --site-footer="example" \
      --login-help-text="Login page help text." \
      --smtp-address="smtp.my-mail-server.com" \
      --smtp-authentication="plain" \
      --smtp-from="me@my-mail-server.com" \
      --smtp-username="mail" \
      --smtp-port=1 \
      --ldap-type="open_ldap" \
      --ldap-host="ldap.site.com" \
      --ldap-host-2="ldap2.site.com" \
      --ldap-host-3="ldap3.site.com" \
      --ldap-port=1 \
      --ldap-username=""[ldap username]"" \
      --ldap-username-field="sAMAccountName" \
      --ldap-domain="mysite.com" \
      --ldap-user-action="disabled" \
      --ldap-group-action="disabled" \
      --ldap-user-include-groups="example" \
      --ldap-group-exclusion="example" \
      --ldap-group-inclusion="example" \
      --ldap-base-dn="example" \
      --ldap-password-change="" \
      --ldap-password-change-confirmation="" \
      --smtp-password="" \
      --session-expiry-minutes=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "name": "My Site",
      "allowed_2fa_method_sms": true,
      "allowed_2fa_method_totp": true,
      "allowed_2fa_method_u2f": true,
      "allowed_2fa_method_webauthn": true,
      "allowed_2fa_method_yubi": true,
      "allowed_2fa_method_email": true,
      "allowed_2fa_method_bypass_for_ftp_sftp_dav": true,
      "admin_user_id": 1,
      "admins_bypass_locked_subfolders": true,
      "allow_bundle_names": true,
      "allowed_countries": "US,DE",
      "allowed_ips": "example",
      "ask_about_overwrites": true,
      "bundle_activity_notifications": "never",
      "bundle_expiration": 1,
      "bundle_not_found_message": "example",
      "bundle_password_required": true,
      "bundle_recipient_blacklist_domains": [
        "example"
      ],
      "bundle_recipient_blacklist_free_email_domains": true,
      "bundle_registration_notifications": "never",
      "bundle_require_registration": true,
      "bundle_require_share_recipient": true,
      "bundle_upload_receipt_notifications": "never",
      "bundle_watermark_attachment": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "bundle_watermark_value": {
        "key": "example value"
      },
      "uploads_via_email_authentication": true,
      "color2_left": "#0066a7",
      "color2_link": "#d34f5d",
      "color2_text": "#0066a7",
      "color2_top": "#000000",
      "color2_top_text": "#ffffff",
      "contact_name": "John Doe",
      "created_at": "2000-01-01T01:00:00Z",
      "currency": "USD",
      "custom_namespace": true,
      "dav_enabled": true,
      "dav_user_root_enabled": true,
      "days_to_retain_backups": 30,
      "default_time_zone": "Pacific Time (US & Canada)",
      "desktop_app": true,
      "desktop_app_session_ip_pinning": true,
      "desktop_app_session_lifetime": 1,
      "mobile_app": true,
      "mobile_app_session_ip_pinning": true,
      "mobile_app_session_lifetime": 1,
      "disallowed_countries": "US,DE",
      "disable_files_certificate_generation": true,
      "disable_notifications": true,
      "disable_password_reset": true,
      "domain": "my-custom-domain.com",
      "domain_hsts_header": true,
      "domain_letsencrypt_chain": "example",
      "email": "example",
      "ftp_enabled": true,
      "reply_to_email": "example",
      "non_sso_groups_allowed": true,
      "non_sso_users_allowed": true,
      "folder_permissions_groups_only": true,
      "hipaa": true,
      "icon128": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "icon16": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "icon32": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "icon48": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "immutable_files_set_at": "2000-01-01T01:00:00Z",
      "include_password_in_welcome_email": true,
      "language": "en",
      "ldap_base_dn": "example",
      "ldap_domain": "mysite.com",
      "ldap_enabled": true,
      "ldap_group_action": "disabled",
      "ldap_group_exclusion": "example",
      "ldap_group_inclusion": "example",
      "ldap_host": "ldap.site.com",
      "ldap_host_2": "ldap2.site.com",
      "ldap_host_3": "ldap3.site.com",
      "ldap_port": 1,
      "ldap_secure": true,
      "ldap_type": "open_ldap",
      "ldap_user_action": "disabled",
      "ldap_user_include_groups": "example",
      "ldap_username": "[ldap username]",
      "ldap_username_field": "sAMAccountName",
      "login_help_text": "Login page help text.",
      "logo": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "login_page_background_image": {
        "name": "My logo",
        "uri": "https://mysite.files.com/.../my_image.png"
      },
      "max_prior_passwords": 1,
      "motd_text": "example",
      "motd_use_for_ftp": true,
      "motd_use_for_sftp": true,
      "next_billing_amount": 1.0,
      "next_billing_date": "Apr 20",
      "office_integration_available": true,
      "office_integration_type": "example",
      "oncehub_link": "https://go.oncehub.com/files",
      "opt_out_global": true,
      "overdue": true,
      "password_min_length": 1,
      "password_require_letter": true,
      "password_require_mixed": true,
      "password_require_number": true,
      "password_require_special": true,
      "password_require_unbreached": true,
      "password_requirements_apply_to_bundles": true,
      "password_validity_days": 1,
      "phone": "555-555-5555",
      "pin_all_remote_servers_to_site_region": true,
      "prevent_root_permissions_for_non_site_admins": true,
      "protocol_access_groups_only": true,
      "require_2fa": true,
      "require_2fa_stop_time": "2000-01-01T01:00:00Z",
      "require_2fa_user_type": "`site_admins`",
      "require_logout_from_bundles_and_inboxes": true,
      "session": {
        "id": "60525f92e859c4c3d74cb02fd176b1525901b525",
        "language": "en",
        "login_token": "@tok-randomcode",
        "login_token_domain": "https://mysite.files.com",
        "max_dir_listing_size": 1,
        "multiple_regions": true,
        "read_only": true,
        "root_path": "example",
        "sftp_insecure_ciphers": false,
        "site_id": 1,
        "ssl_required": true,
        "tls_disabled": false,
        "two_factor_setup_needed": false,
        "allowed_2fa_method_sms": true,
        "allowed_2fa_method_totp": true,
        "allowed_2fa_method_u2f": true,
        "allowed_2fa_method_webauthn": true,
        "allowed_2fa_method_yubi": true,
        "use_provided_modified_at": true,
        "windows_mode_ftp": false
      },
      "session_pinned_by_ip": true,
      "sftp_enabled": true,
      "sftp_host_key_type": "default",
      "active_sftp_host_key_id": 1,
      "sftp_insecure_ciphers": true,
      "sftp_user_root_enabled": true,
      "sharing_enabled": true,
      "show_request_access_link": true,
      "site_footer": "example",
      "site_header": "example",
      "smtp_address": "smtp.my-mail-server.com",
      "smtp_authentication": "plain",
      "smtp_from": "me@my-mail-server.com",
      "smtp_port": 25,
      "smtp_username": "mail",
      "session_expiry": 6.0,
      "session_expiry_minutes": 360,
      "ssl_required": true,
      "subdomain": "mysite",
      "switch_to_plan_date": "2000-01-01T01:00:00Z",
      "tls_disabled": true,
      "trial_days_left": 1,
      "trial_until": "2000-01-01T01:00:00Z",
      "use_provided_modified_at": true,
      "user": {
        "id": 1,
        "username": "user",
        "admin_group_ids": [
          1
        ],
        "allowed_ips": "127.0.0.1",
        "attachments_permission": true,
        "api_keys_count": 1,
        "authenticate_until": "2000-01-01T01:00:00Z",
        "authentication_method": "password",
        "avatar_url": "example",
        "billing_permission": false,
        "bypass_site_allowed_ips": false,
        "bypass_inactive_disable": false,
        "created_at": "2000-01-01T01:00:00Z",
        "dav_permission": true,
        "disabled": true,
        "email": "example",
        "first_login_at": "2000-01-01T01:00:00Z",
        "ftp_permission": true,
        "group_ids": "example",
        "header_text": "User-specific message.",
        "language": "en",
        "last_login_at": "2000-01-01T01:00:00Z",
        "last_web_login_at": "2000-01-01T01:00:00Z",
        "last_ftp_login_at": "2000-01-01T01:00:00Z",
        "last_sftp_login_at": "2000-01-01T01:00:00Z",
        "last_dav_login_at": "2000-01-01T01:00:00Z",
        "last_desktop_login_at": "2000-01-01T01:00:00Z",
        "last_restapi_login_at": "2000-01-01T01:00:00Z",
        "last_api_use_at": "2000-01-01T01:00:00Z",
        "last_active_at": "2000-01-01T01:00:00Z",
        "last_protocol_cipher": "example",
        "lockout_expires": "2000-01-01T01:00:00Z",
        "name": "John Doe",
        "company": "ACME Corp.",
        "notes": "Internal notes on this user.",
        "notification_daily_send_time": 18,
        "office_integration_enabled": true,
        "password_set_at": "2000-01-01T01:00:00Z",
        "password_validity_days": 1,
        "public_keys_count": 1,
        "receive_admin_alerts": true,
        "require_2fa": "always_require",
        "require_login_by": "2000-01-01T01:00:00Z",
        "active_2fa": true,
        "require_password_change": true,
        "password_expired": true,
        "restapi_permission": true,
        "self_managed": true,
        "sftp_permission": true,
        "site_admin": true,
        "skip_welcome_screen": true,
        "ssl_required": "always_require",
        "sso_strategy_id": 1,
        "subscribe_to_newsletter": true,
        "externally_managed": true,
        "time_zone": "Pacific Time (US & Canada)",
        "type_of_2fa": "yubi",
        "updated_at": "2000-01-01T01:00:00Z",
        "user_root": "example",
        "days_remaining_until_password_expire": 1,
        "password_expire_at": "2000-01-01T01:00:00Z"
      },
      "user_lockout": true,
      "user_lockout_lock_period": 1,
      "user_lockout_tries": 1,
      "user_lockout_within": 6,
      "user_requests_enabled": true,
      "user_requests_notify_admins": true,
      "welcome_custom_text": "Welcome to my site!",
      "welcome_email_cc": "example",
      "welcome_email_subject": "example",
      "welcome_email_enabled": true,
      "welcome_screen": "user_controlled",
      "windows_mode_ftp": true,
      "disable_users_from_inactivity_period_days": 1,
      "group_admins_can_set_user_password": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <site>
      <name>My Site</name>
      <allowed_2fa_method_sms type="boolean">true</allowed_2fa_method_sms>
      <allowed_2fa_method_totp type="boolean">true</allowed_2fa_method_totp>
      <allowed_2fa_method_u2f type="boolean">true</allowed_2fa_method_u2f>
      <allowed_2fa_method_webauthn type="boolean">true</allowed_2fa_method_webauthn>
      <allowed_2fa_method_yubi type="boolean">true</allowed_2fa_method_yubi>
      <allowed_2fa_method_email type="boolean">true</allowed_2fa_method_email>
      <allowed_2fa_method_bypass_for_ftp_sftp_dav type="boolean">true</allowed_2fa_method_bypass_for_ftp_sftp_dav>
      <admin_user_id type="integer">1</admin_user_id>
      <admins_bypass_locked_subfolders type="boolean">true</admins_bypass_locked_subfolders>
      <allow_bundle_names type="boolean">true</allow_bundle_names>
      <allowed_countries>US,DE</allowed_countries>
      <allowed_ips>example</allowed_ips>
      <ask_about_overwrites type="boolean">true</ask_about_overwrites>
      <bundle_activity_notifications>never</bundle_activity_notifications>
      <bundle_expiration type="integer">1</bundle_expiration>
      <bundle_not_found_message>example</bundle_not_found_message>
      <bundle_password_required type="boolean">true</bundle_password_required>
      <bundle_recipient_blacklist_domains type="array">
        <bundle_recipient_blacklist_domain>example</bundle_recipient_blacklist_domain>
      </bundle_recipient_blacklist_domains>
      <bundle_recipient_blacklist_free_email_domains type="boolean">true</bundle_recipient_blacklist_free_email_domains>
      <bundle_registration_notifications>never</bundle_registration_notifications>
      <bundle_require_registration type="boolean">true</bundle_require_registration>
      <bundle_require_share_recipient type="boolean">true</bundle_require_share_recipient>
      <bundle_upload_receipt_notifications>never</bundle_upload_receipt_notifications>
      <bundle_watermark_attachment>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </bundle_watermark_attachment>
      <bundle_watermark_value>
        <key>example value</key>
      </bundle_watermark_value>
      <uploads_via_email_authentication type="boolean">true</uploads_via_email_authentication>
      <color2_left>#0066a7</color2_left>
      <color2_link>#d34f5d</color2_link>
      <color2_text>#0066a7</color2_text>
      <color2_top>#000000</color2_top>
      <color2_top_text>#ffffff</color2_top_text>
      <contact_name>John Doe</contact_name>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <currency>USD</currency>
      <custom_namespace type="boolean">true</custom_namespace>
      <dav_enabled type="boolean">true</dav_enabled>
      <dav_user_root_enabled type="boolean">true</dav_user_root_enabled>
      <days_to_retain_backups type="integer">30</days_to_retain_backups>
      <default_time_zone>Pacific Time (US &amp; Canada)</default_time_zone>
      <desktop_app type="boolean">true</desktop_app>
      <desktop_app_session_ip_pinning type="boolean">true</desktop_app_session_ip_pinning>
      <desktop_app_session_lifetime type="integer">1</desktop_app_session_lifetime>
      <mobile_app type="boolean">true</mobile_app>
      <mobile_app_session_ip_pinning type="boolean">true</mobile_app_session_ip_pinning>
      <mobile_app_session_lifetime type="integer">1</mobile_app_session_lifetime>
      <disallowed_countries>US,DE</disallowed_countries>
      <disable_files_certificate_generation type="boolean">true</disable_files_certificate_generation>
      <disable_notifications type="boolean">true</disable_notifications>
      <disable_password_reset type="boolean">true</disable_password_reset>
      <domain>my-custom-domain.com</domain>
      <domain_hsts_header type="boolean">true</domain_hsts_header>
      <domain_letsencrypt_chain>example</domain_letsencrypt_chain>
      <email>example</email>
      <ftp_enabled type="boolean">true</ftp_enabled>
      <reply_to_email>example</reply_to_email>
      <non_sso_groups_allowed type="boolean">true</non_sso_groups_allowed>
      <non_sso_users_allowed type="boolean">true</non_sso_users_allowed>
      <folder_permissions_groups_only type="boolean">true</folder_permissions_groups_only>
      <hipaa type="boolean">true</hipaa>
      <icon128>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </icon128>
      <icon16>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </icon16>
      <icon32>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </icon32>
      <icon48>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </icon48>
      <immutable_files_set_at>2000-01-01T01:00:00Z</immutable_files_set_at>
      <include_password_in_welcome_email type="boolean">true</include_password_in_welcome_email>
      <language>en</language>
      <ldap_base_dn>example</ldap_base_dn>
      <ldap_domain>mysite.com</ldap_domain>
      <ldap_enabled type="boolean">true</ldap_enabled>
      <ldap_group_action>disabled</ldap_group_action>
      <ldap_group_exclusion>example</ldap_group_exclusion>
      <ldap_group_inclusion>example</ldap_group_inclusion>
      <ldap_host>ldap.site.com</ldap_host>
      <ldap_host_2>ldap2.site.com</ldap_host_2>
      <ldap_host_3>ldap3.site.com</ldap_host_3>
      <ldap_port type="integer">1</ldap_port>
      <ldap_secure type="boolean">true</ldap_secure>
      <ldap_type>open_ldap</ldap_type>
      <ldap_user_action>disabled</ldap_user_action>
      <ldap_user_include_groups>example</ldap_user_include_groups>
      <ldap_username>[ldap username]</ldap_username>
      <ldap_username_field>sAMAccountName</ldap_username_field>
      <login_help_text>Login page help text.</login_help_text>
      <logo>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </logo>
      <login_page_background_image>
        <name>My logo</name>
        <uri>https://mysite.files.com/.../my_image.png</uri>
      </login_page_background_image>
      <max_prior_passwords type="integer">1</max_prior_passwords>
      <motd_text>example</motd_text>
      <motd_use_for_ftp type="boolean">true</motd_use_for_ftp>
      <motd_use_for_sftp type="boolean">true</motd_use_for_sftp>
      <next_billing_amount type="float">1.0</next_billing_amount>
      <next_billing_date>Apr 20</next_billing_date>
      <office_integration_available type="boolean">true</office_integration_available>
      <office_integration_type>example</office_integration_type>
      <oncehub_link>https://go.oncehub.com/files</oncehub_link>
      <opt_out_global type="boolean">true</opt_out_global>
      <overdue type="boolean">true</overdue>
      <password_min_length type="integer">1</password_min_length>
      <password_require_letter type="boolean">true</password_require_letter>
      <password_require_mixed type="boolean">true</password_require_mixed>
      <password_require_number type="boolean">true</password_require_number>
      <password_require_special type="boolean">true</password_require_special>
      <password_require_unbreached type="boolean">true</password_require_unbreached>
      <password_requirements_apply_to_bundles type="boolean">true</password_requirements_apply_to_bundles>
      <password_validity_days type="integer">1</password_validity_days>
      <phone>555-555-5555</phone>
      <pin_all_remote_servers_to_site_region type="boolean">true</pin_all_remote_servers_to_site_region>
      <prevent_root_permissions_for_non_site_admins type="boolean">true</prevent_root_permissions_for_non_site_admins>
      <protocol_access_groups_only type="boolean">true</protocol_access_groups_only>
      <require_2fa type="boolean">true</require_2fa>
      <require_2fa_stop_time>2000-01-01T01:00:00Z</require_2fa_stop_time>
      <require_2fa_user_type>`site_admins`</require_2fa_user_type>
      <require_logout_from_bundles_and_inboxes type="boolean">true</require_logout_from_bundles_and_inboxes>
      <session>
        <id>60525f92e859c4c3d74cb02fd176b1525901b525</id>
        <language>en</language>
        <login_token>@tok-randomcode</login_token>
        <login_token_domain>https://mysite.files.com</login_token_domain>
        <max_dir_listing_size type="integer">1</max_dir_listing_size>
        <multiple_regions type="boolean">true</multiple_regions>
        <read_only type="boolean">true</read_only>
        <root_path>example</root_path>
        <sftp_insecure_ciphers type="boolean">false</sftp_insecure_ciphers>
        <site_id type="integer">1</site_id>
        <ssl_required type="boolean">true</ssl_required>
        <tls_disabled type="boolean">false</tls_disabled>
        <two_factor_setup_needed type="boolean">false</two_factor_setup_needed>
        <allowed_2fa_method_sms type="boolean">true</allowed_2fa_method_sms>
        <allowed_2fa_method_totp type="boolean">true</allowed_2fa_method_totp>
        <allowed_2fa_method_u2f type="boolean">true</allowed_2fa_method_u2f>
        <allowed_2fa_method_webauthn type="boolean">true</allowed_2fa_method_webauthn>
        <allowed_2fa_method_yubi type="boolean">true</allowed_2fa_method_yubi>
        <use_provided_modified_at type="boolean">true</use_provided_modified_at>
        <windows_mode_ftp type="boolean">false</windows_mode_ftp>
      </session>
      <session_pinned_by_ip type="boolean">true</session_pinned_by_ip>
      <sftp_enabled type="boolean">true</sftp_enabled>
      <sftp_host_key_type>default</sftp_host_key_type>
      <active_sftp_host_key_id type="integer">1</active_sftp_host_key_id>
      <sftp_insecure_ciphers type="boolean">true</sftp_insecure_ciphers>
      <sftp_user_root_enabled type="boolean">true</sftp_user_root_enabled>
      <sharing_enabled type="boolean">true</sharing_enabled>
      <show_request_access_link type="boolean">true</show_request_access_link>
      <site_footer>example</site_footer>
      <site_header>example</site_header>
      <smtp_address>smtp.my-mail-server.com</smtp_address>
      <smtp_authentication>plain</smtp_authentication>
      <smtp_from>me@my-mail-server.com</smtp_from>
      <smtp_port type="integer">25</smtp_port>
      <smtp_username>mail</smtp_username>
      <session_expiry type="float">6.0</session_expiry>
      <session_expiry_minutes type="integer">360</session_expiry_minutes>
      <ssl_required type="boolean">true</ssl_required>
      <subdomain>mysite</subdomain>
      <switch_to_plan_date>2000-01-01T01:00:00Z</switch_to_plan_date>
      <tls_disabled type="boolean">true</tls_disabled>
      <trial_days_left type="integer">1</trial_days_left>
      <trial_until>2000-01-01T01:00:00Z</trial_until>
      <use_provided_modified_at type="boolean">true</use_provided_modified_at>
      <user>
        <id type="integer">1</id>
        <username>user</username>
        <admin_group_ids type="array">
          <admin_group_id type="integer">1</admin_group_id>
        </admin_group_ids>
        <allowed_ips>127.0.0.1</allowed_ips>
        <attachments_permission type="boolean">true</attachments_permission>
        <api_keys_count type="integer">1</api_keys_count>
        <authenticate_until>2000-01-01T01:00:00Z</authenticate_until>
        <authentication_method>password</authentication_method>
        <avatar_url>example</avatar_url>
        <billing_permission type="boolean">false</billing_permission>
        <bypass_site_allowed_ips type="boolean">false</bypass_site_allowed_ips>
        <bypass_inactive_disable type="boolean">false</bypass_inactive_disable>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <dav_permission type="boolean">true</dav_permission>
        <disabled type="boolean">true</disabled>
        <email>example</email>
        <first_login_at>2000-01-01T01:00:00Z</first_login_at>
        <ftp_permission type="boolean">true</ftp_permission>
        <group_ids>example</group_ids>
        <header_text>User-specific message.</header_text>
        <language>en</language>
        <last_login_at>2000-01-01T01:00:00Z</last_login_at>
        <last_web_login_at>2000-01-01T01:00:00Z</last_web_login_at>
        <last_ftp_login_at>2000-01-01T01:00:00Z</last_ftp_login_at>
        <last_sftp_login_at>2000-01-01T01:00:00Z</last_sftp_login_at>
        <last_dav_login_at>2000-01-01T01:00:00Z</last_dav_login_at>
        <last_desktop_login_at>2000-01-01T01:00:00Z</last_desktop_login_at>
        <last_restapi_login_at>2000-01-01T01:00:00Z</last_restapi_login_at>
        <last_api_use_at>2000-01-01T01:00:00Z</last_api_use_at>
        <last_active_at>2000-01-01T01:00:00Z</last_active_at>
        <last_protocol_cipher>example</last_protocol_cipher>
        <lockout_expires>2000-01-01T01:00:00Z</lockout_expires>
        <name>John Doe</name>
        <company>ACME Corp.</company>
        <notes>Internal notes on this user.</notes>
        <notification_daily_send_time type="integer">18</notification_daily_send_time>
        <office_integration_enabled type="boolean">true</office_integration_enabled>
        <password_set_at>2000-01-01T01:00:00Z</password_set_at>
        <password_validity_days type="integer">1</password_validity_days>
        <public_keys_count type="integer">1</public_keys_count>
        <receive_admin_alerts type="boolean">true</receive_admin_alerts>
        <require_2fa>always_require</require_2fa>
        <require_login_by>2000-01-01T01:00:00Z</require_login_by>
        <active_2fa type="boolean">true</active_2fa>
        <require_password_change type="boolean">true</require_password_change>
        <password_expired type="boolean">true</password_expired>
        <restapi_permission type="boolean">true</restapi_permission>
        <self_managed type="boolean">true</self_managed>
        <sftp_permission type="boolean">true</sftp_permission>
        <site_admin type="boolean">true</site_admin>
        <skip_welcome_screen type="boolean">true</skip_welcome_screen>
        <ssl_required>always_require</ssl_required>
        <sso_strategy_id type="integer">1</sso_strategy_id>
        <subscribe_to_newsletter type="boolean">true</subscribe_to_newsletter>
        <externally_managed type="boolean">true</externally_managed>
        <time_zone>Pacific Time (US &amp; Canada)</time_zone>
        <type_of_2fa>yubi</type_of_2fa>
        <updated_at>2000-01-01T01:00:00Z</updated_at>
        <user_root>example</user_root>
        <days_remaining_until_password_expire type="integer">1</days_remaining_until_password_expire>
        <password_expire_at>2000-01-01T01:00:00Z</password_expire_at>
      </user>
      <user_lockout type="boolean">true</user_lockout>
      <user_lockout_lock_period type="integer">1</user_lockout_lock_period>
      <user_lockout_tries type="integer">1</user_lockout_tries>
      <user_lockout_within type="integer">6</user_lockout_within>
      <user_requests_enabled type="boolean">true</user_requests_enabled>
      <user_requests_notify_admins type="boolean">true</user_requests_notify_admins>
      <welcome_custom_text>Welcome to my site!</welcome_custom_text>
      <welcome_email_cc>example</welcome_email_cc>
      <welcome_email_subject>example</welcome_email_subject>
      <welcome_email_enabled type="boolean">true</welcome_email_enabled>
      <welcome_screen>user_controlled</welcome_screen>
      <windows_mode_ftp type="boolean">true</windows_mode_ftp>
      <disable_users_from_inactivity_period_days type="integer">1</disable_users_from_inactivity_period_days>
      <group_admins_can_set_user_password type="boolean">true</group_admins_can_set_user_password>
    </site>
    
    

    HTTPS Request

    PATCH /site

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    The X-Files-Reauthentication header is required for any requests including the following parameters: email, require_2fa, require_2fa_user_type, disable_2fa_with_delay.

    Request Parameters

    Parameter Description
    name string Site name
    subdomain string Site subdomain
    domain string Custom domain
    domain_hsts_header boolean Send HSTS (HTTP Strict Transport Security) header when visitors access the site via a custom domain?
    domain_letsencrypt_chain string Letsencrypt chain to use when registering SSL Certificate for domain.
    email string Main email for this site
    reply_to_email string Reply-to email for this site
    allow_bundle_names boolean Are manual Bundle names allowed?
    bundle_expiration int64 Site-wide Bundle expiration in days
    welcome_email_enabled boolean Will the welcome email be sent to new users?
    ask_about_overwrites boolean If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
    show_request_access_link boolean Show request access link for users without access? Currently unused.
    welcome_email_cc string Include this email in welcome emails if enabled
    welcome_email_subject string Include this email subject in welcome emails if enabled
    welcome_custom_text string Custom text send in user welcome email
    language string Site default language
    windows_mode_ftp boolean Does FTP user Windows emulation mode?
    default_time_zone string Site default time zone
    desktop_app boolean Is the desktop app enabled?
    desktop_app_session_ip_pinning boolean Is desktop app session IP pinning enabled?
    desktop_app_session_lifetime int64 Desktop app session lifetime (in hours)
    mobile_app boolean Is the mobile app enabled?
    mobile_app_session_ip_pinning boolean Is mobile app session IP pinning enabled?
    mobile_app_session_lifetime int64 Mobile app session lifetime (in hours)
    folder_permissions_groups_only boolean If true, permissions for this site must be bound to a group (not a user). Otherwise, permissions must be bound to a user.
    welcome_screen string Does the welcome screen appear?
    office_integration_available boolean Allow users to use Office for the web?
    office_integration_type string Office integration application used to edit and view the MS Office documents
    pin_all_remote_servers_to_site_region boolean If true, we will ensure that all internal communications with any remote server are made through the primary region of the site. This setting overrides individual remote server settings.
    motd_text string A message to show users when they connect via FTP or SFTP.
    motd_use_for_ftp boolean Show message to users connecting via FTP
    motd_use_for_sftp boolean Show message to users connecting via SFTP
    left_navigation_visibility object Visibility settings for account navigation
    session_expiry double Session expiry in hours
    ssl_required boolean Is SSL required? Disabling this is insecure.
    tls_disabled boolean Are Insecure TLS and SFTP Ciphers allowed? Enabling this is insecure.
    sftp_insecure_ciphers boolean Are Insecure Ciphers allowed for SFTP? Note: Settting TLS Disabled -> True will always allow insecure ciphers for SFTP as well. Enabling this is insecure.
    disable_files_certificate_generation boolean If set, Files.com will not set the CAA records required to generate future SSL certificates for this domain.
    user_lockout boolean Will users be locked out after incorrect login attempts?
    user_lockout_tries int64 Number of login tries within user_lockout_within hours before users are locked out
    user_lockout_within int64 Number of hours for user lockout window
    user_lockout_lock_period int64 How many hours to lock user out for failed password?
    include_password_in_welcome_email boolean Include password in emails to new users?
    allowed_countries string Comma seperated list of allowed Country codes
    allowed_ips string List of allowed IP addresses
    disallowed_countries string Comma seperated list of disallowed Country codes
    days_to_retain_backups int64 Number of days to keep deleted files
    max_prior_passwords int64 Number of prior passwords to disallow
    password_validity_days int64 Number of days password is valid
    password_min_length int64 Shortest password length for users
    password_require_letter boolean Require a letter in passwords?
    password_require_mixed boolean Require lower and upper case letters in passwords?
    password_require_special boolean Require special characters in password?
    password_require_number boolean Require a number in passwords?
    password_require_unbreached boolean Require passwords that have not been previously breached? (see https://haveibeenpwned.com/)
    require_logout_from_bundles_and_inboxes boolean If true, we will hide the 'Remember Me' box on Inbox and Bundle registration pages, requiring that the user logout and log back in every time they visit the page.
    dav_user_root_enabled boolean Use user FTP roots also for WebDAV?
    sftp_user_root_enabled boolean Use user FTP roots also for SFTP?
    disable_password_reset boolean Is password reset disabled?
    immutable_files boolean Are files protected from modification?
    session_pinned_by_ip boolean Are sessions locked to the same IP? (i.e. do users need to log in again if they change IPs?)
    bundle_not_found_message string Custom error message to show when bundle is not found.
    bundle_password_required boolean Do Bundles require password protection?
    bundle_require_registration boolean Do Bundles require registration?
    bundle_require_share_recipient boolean Do Bundles require recipients for sharing?
    bundle_registration_notifications string Do Bundle owners receive registration notification?
    bundle_activity_notifications string Do Bundle owners receive activity notifications?
    bundle_upload_receipt_notifications string Do Bundle uploaders receive upload confirmation notifications?
    password_requirements_apply_to_bundles boolean Require bundles' passwords, and passwords for other items (inboxes, public shares, etc.) to conform to the same requirements as users' passwords?
    prevent_root_permissions_for_non_site_admins boolean If true, we will prevent non-administrators from receiving any permissions directly on the root folder. This is commonly used to prevent the accidental application of permissions.
    opt_out_global boolean Use servers in the USA only?
    use_provided_modified_at boolean Allow uploaders to set provided_modified_at for uploaded files?
    custom_namespace boolean Is this site using a custom namespace for users?
    disable_users_from_inactivity_period_days int64 If greater than zero, users will unable to login if they do not show activity within this number of days.
    non_sso_groups_allowed boolean If true, groups can be manually created / modified / deleted by Site Admins. Otherwise, groups can only be managed via your SSO provider.
    non_sso_users_allowed boolean If true, users can be manually created / modified / deleted by Site Admins. Otherwise, users can only be managed via your SSO provider.
    sharing_enabled boolean Allow bundle creation
    user_requests_enabled boolean Enable User Requests feature
    user_requests_notify_admins boolean Send email to site admins when a user request is received?
    dav_enabled boolean Is WebDAV enabled?
    ftp_enabled boolean Is FTP enabled?
    sftp_enabled boolean Is SFTP enabled?
    sftp_host_key_type string Sftp Host Key Type
    active_sftp_host_key_id int64 Id of the currently selected custom SFTP Host Key
    protocol_access_groups_only boolean If true, protocol access permissions on users will be ignored, and only protocol access permissions set on Groups will be honored. Make sure that your current user is a member of a group with API permission when changing this value to avoid locking yourself out of your site.
    bundle_watermark_value object Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
    group_admins_can_set_user_password boolean Allow group admins set password authentication method
    bundle_recipient_blacklist_free_email_domains boolean Disallow free email domains for Bundle/Inbox recipients?
    bundle_recipient_blacklist_domains array(string) List of email domains to disallow when entering a Bundle/Inbox recipients
    admins_bypass_locked_subfolders boolean Allow admins to bypass the locked subfolders setting.
    allowed_2fa_method_sms boolean Is SMS two factor authentication allowed?
    allowed_2fa_method_u2f boolean Is U2F two factor authentication allowed?
    allowed_2fa_method_totp boolean Is TOTP two factor authentication allowed?
    allowed_2fa_method_webauthn boolean Is WebAuthn two factor authentication allowed?
    allowed_2fa_method_yubi boolean Is yubikey two factor authentication allowed?
    allowed_2fa_method_email boolean Is OTP via email two factor authentication allowed?
    allowed_2fa_method_bypass_for_ftp_sftp_dav boolean Are users allowed to configure their two factor authentication to be bypassed for FTP/SFTP/WebDAV?
    require_2fa boolean Require two-factor authentication for all users?
    require_2fa_user_type string What type of user is required to use two-factor authentication (when require_2fa is set to true for this site)?
    color2_top string Top bar background color
    color2_left string Page link and button color
    color2_link string Top bar link color
    color2_text string Page link and button color
    color2_top_text string Top bar text color
    site_header string Custom site header text
    site_footer string Custom site footer text
    login_help_text string Login help text
    smtp_address string SMTP server hostname or IP
    smtp_authentication string SMTP server authentication type
    smtp_from string From address to use when mailing through custom SMTP
    smtp_username string SMTP server username
    smtp_port int64 SMTP server port
    ldap_enabled boolean Main LDAP setting: is LDAP enabled?
    ldap_type string LDAP type
    ldap_host string LDAP host
    ldap_host_2 string LDAP backup host
    ldap_host_3 string LDAP backup host
    ldap_port int64 LDAP port
    ldap_secure boolean Use secure LDAP?
    ldap_username string Username for signing in to LDAP server.
    ldap_username_field string LDAP username field
    ldap_domain string Domain name that will be appended to usernames
    ldap_user_action string Should we sync users from LDAP server?
    ldap_group_action string Should we sync groups from LDAP server?
    ldap_user_include_groups string Comma or newline separated list of group names (with optional wildcards) - if provided, only users in these groups will be added or synced.
    ldap_group_exclusion string Comma or newline separated list of group names (with optional wildcards) to exclude when syncing.
    ldap_group_inclusion string Comma or newline separated list of group names (with optional wildcards) to include when syncing.
    ldap_base_dn string Base DN for looking up users in LDAP server
    uploads_via_email_authentication boolean Do incoming emails in the Inboxes require checking for SPF/DKIM/DMARC?
    icon16_file file See Attaching Files to API Requests.
    icon16_delete boolean If true, will delete the file stored in icon16
    icon32_file file See Attaching Files to API Requests.
    icon32_delete boolean If true, will delete the file stored in icon32
    icon48_file file See Attaching Files to API Requests.
    icon48_delete boolean If true, will delete the file stored in icon48
    icon128_file file See Attaching Files to API Requests.
    icon128_delete boolean If true, will delete the file stored in icon128
    logo_file file See Attaching Files to API Requests.
    logo_delete boolean If true, will delete the file stored in logo
    bundle_watermark_attachment_file file See Attaching Files to API Requests.
    bundle_watermark_attachment_delete boolean If true, will delete the file stored in bundle_watermark_attachment
    login_page_background_image_file file See Attaching Files to API Requests.
    login_page_background_image_delete boolean If true, will delete the file stored in login_page_background_image
    disable_2fa_with_delay boolean If set to true, we will begin the process of disabling 2FA on this site.
    ldap_password_change string New LDAP password.
    ldap_password_change_confirmation string Confirm new LDAP password.
    smtp_password string Password for SMTP server.
    session_expiry_minutes int64 Session expiry in minutes

    Snapshots

    Snapshots are frozen groups of files in your site's hidden folder.

    The Snapshot object

    Example Snapshot Object

    {
      "id": 1,
      "expires_at": "2000-01-01T01:00:00Z",
      "finalized_at": "2000-01-01T01:00:00Z",
      "name": "My Snapshot",
      "user_id": 1,
      "bundle_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <snapshot>
      <id type="integer">1</id>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <finalized_at>2000-01-01T01:00:00Z</finalized_at>
      <name>My Snapshot</name>
      <user_id type="integer">1</user_id>
      <bundle_id type="integer">1</bundle_id>
    </snapshot>
    
    
    Attribute Description
    id int64 The snapshot's unique ID.
    expires_at date-time When the snapshot expires.
    finalized_at date-time When the snapshot was finalized.
    name string A name for the snapshot.
    user_id int64 The user that created this snapshot, if applicable.
    bundle_id int64 The bundle using this snapshot, if applicable.
    paths array(string) An array of paths to add to the snapshot.

    List Snapshots

    Example Request

    curl "https://app.files.com/api/rest/v1/snapshots.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/snapshots.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Snapshot.list(
      per_page: 1
    )
    
    \Files\Model\Snapshot::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    Snapshot.list(parameters).all()
    
    await Snapshot.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await Snapshot.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.snapshot.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    snapshot.List(context.Background(), files_sdk.SnapshotListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli snapshots list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "expires_at": "2000-01-01T01:00:00Z",
        "finalized_at": "2000-01-01T01:00:00Z",
        "name": "My Snapshot",
        "user_id": 1,
        "bundle_id": 1
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <snapshots type="array">
      <snapshot>
        <id type="integer">1</id>
        <expires_at>2000-01-01T01:00:00Z</expires_at>
        <finalized_at>2000-01-01T01:00:00Z</finalized_at>
        <name>My Snapshot</name>
        <user_id type="integer">1</user_id>
        <bundle_id type="integer">1</bundle_id>
      </snapshot>
    </snapshots>
    
    

    HTTPS Request

    GET /snapshots

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Show Snapshot

    Example Request

    curl https://app.files.com/api/rest/v1/snapshots/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/snapshots/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Snapshot.find(id)
    
    \Files\Model\Snapshot::find($id);
    
    
    Snapshot.find(, parameters
    
    await Snapshot.find(id)
    
    
    await Snapshot.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.snapshot.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    snapshot.Find(context.Background(), files_sdk.SnapshotFindParams{
      Id: 1,
    })
    
    
    files-cli snapshots find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "expires_at": "2000-01-01T01:00:00Z",
      "finalized_at": "2000-01-01T01:00:00Z",
      "name": "My Snapshot",
      "user_id": 1,
      "bundle_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <snapshot>
      <id type="integer">1</id>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <finalized_at>2000-01-01T01:00:00Z</finalized_at>
      <name>My Snapshot</name>
      <user_id type="integer">1</user_id>
      <bundle_id type="integer">1</bundle_id>
    </snapshot>
    
    

    HTTPS Request

    GET /snapshots/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Snapshot ID.

    Create Snapshot

    Example Request

    curl https://app.files.com/api/rest/v1/snapshots.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"expires_at":"2000-01-01T01:00:00Z","name":"My Snapshot"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/snapshots.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<snapshot>
           <expires_at>2000-01-01T01:00:00Z</expires_at>
           <name>My Snapshot</name>
         </snapshot>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Snapshot.create(
      expires_at: "2000-01-01T01:00:00Z", 
      name: "My Snapshot"
    )
    
    \Files\Model\Snapshot::create(array(
      'expires_at' => "2000-01-01T01:00:00Z", 
      'name' => "My Snapshot"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("expires_at", 2000-01-01T01:00:00Z);
    requestParams.put("name", My Snapshot);
    Snapshot.create(parameters)
    
    await Snapshot.create({
      expires_at: "2000-01-01T01:00:00Z", 
      name: "My Snapshot",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("expires_at", "2000-01-01T01:00:00Z");
    parameters.Add("name", "My Snapshot");
    
    await Snapshot.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.snapshot.create({
      "expires_at": "2000-01-01T01:00:00Z",
      "name": "My Snapshot"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    snapshot.Create(context.Background(), files_sdk.SnapshotCreateParams{
      ExpiresAt: "2000-01-01T01:00:00Z",
      Name: "My Snapshot",
      Paths: "",
    })
    
    
    files-cli snapshots create \
      --expires-at="2000-01-01T01:00:00Z" \
      --name="My Snapshot" \
      --paths="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "expires_at": "2000-01-01T01:00:00Z",
      "finalized_at": "2000-01-01T01:00:00Z",
      "name": "My Snapshot",
      "user_id": 1,
      "bundle_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <snapshot>
      <id type="integer">1</id>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <finalized_at>2000-01-01T01:00:00Z</finalized_at>
      <name>My Snapshot</name>
      <user_id type="integer">1</user_id>
      <bundle_id type="integer">1</bundle_id>
    </snapshot>
    
    

    HTTPS Request

    POST /snapshots

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    expires_at string When the snapshot expires.
    name string A name for the snapshot.
    paths array(string) An array of paths to add to the snapshot.

    Update Snapshot

    Example Request

    curl https://app.files.com/api/rest/v1/snapshots/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"expires_at":"2000-01-01T01:00:00Z","name":"My Snapshot"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/snapshots/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<snapshot>
           <expires_at>2000-01-01T01:00:00Z</expires_at>
           <name>My Snapshot</name>
         </snapshot>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    snapshot = Files::Snapshot.list.first
    snapshot.update(
      expires_at: "2000-01-01T01:00:00Z",
      name: "My Snapshot"
    )
    
    $snapshot = \Files\Model\Snapshot::list()[0];
    $snapshot->update(array(
      'expires_at' => "2000-01-01T01:00:00Z", 
      'name' => "My Snapshot"
    ));
    
    Snapshot snapshot = Snapshot.list()[0];
    snapshot.setExpiresAt("2000-01-01T01:00:00Z");
    snapshot.setName("My Snapshot");
    snapshot.update();
    
    const snapshot = (await Snapshot.list())[0]
    await snapshot.update({ 
      expires_at: "2000-01-01T01:00:00Z", 
      name: "My Snapshot",
    })
    
    var snapshot = (await Snapshot.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("expires_at", "2000-01-01T01:00:00Z");
    parameters.Add("name", "My Snapshot");
    
    await snapshot.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    snapshot = files_sdk.snapshot.find(id)
    snapshot.update({
      "expires_at": "2000-01-01T01:00:00Z",
      "name": "My Snapshot"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    snapshot.Update(context.Background(), files_sdk.SnapshotUpdateParams{
      Id: 1,
      ExpiresAt: "2000-01-01T01:00:00Z",
      Name: "My Snapshot",
      Paths: "",
    })
    
    files-cli snapshots update \
      --id=1 \
      --expires-at="2000-01-01T01:00:00Z" \
      --name="My Snapshot" \
      --paths="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "expires_at": "2000-01-01T01:00:00Z",
      "finalized_at": "2000-01-01T01:00:00Z",
      "name": "My Snapshot",
      "user_id": 1,
      "bundle_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <snapshot>
      <id type="integer">1</id>
      <expires_at>2000-01-01T01:00:00Z</expires_at>
      <finalized_at>2000-01-01T01:00:00Z</finalized_at>
      <name>My Snapshot</name>
      <user_id type="integer">1</user_id>
      <bundle_id type="integer">1</bundle_id>
    </snapshot>
    
    

    HTTPS Request

    PATCH /snapshots/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Snapshot ID.
    expires_at string When the snapshot expires.
    name string A name for the snapshot.
    paths array(string) An array of paths to add to the snapshot.

    Delete Snapshot

    Example Request

    curl https://app.files.com/api/rest/v1/snapshots/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/snapshots/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    snapshot = Files::Snapshot.list.first
    snapshot.delete
    
    $snapshot = \Files\Model\Snapshot::list()[0];
    $snapshot->delete();
    
    Snapshot snapshot = Snapshot.list()[0];
    
    snapshot.delete();
    
    const snapshot = (await Snapshot.list())[0]
    await snapshot.delete()
    
    var snapshot = (await Snapshot.List())[0];
    
    await snapshot.Delete();
    
    files_sdk.set_api_key("my-key")
    
    snapshot = files_sdk.snapshot.find(id)
    snapshot.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    snapshot.Delete(context.Background(), files_sdk.SnapshotDeleteParams{
      Id: 1,
    })
    
    files-cli snapshots delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /snapshots/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Snapshot ID.

    Sso Strategies

    An SSO Strategy is a method for allowing users to sign in via another identity provider, such as Okta or Auth0.

    It is rare that you will need to use API endpoints for managing these, and we recommend instead managing these via the web interface. Nevertheless, we share the API documentation here.

    The SsoStrategy object

    Example SsoStrategy Object

    {
      "protocol": "oauth2",
      "provider": "okta",
      "label": "My Corporate SSO Provider",
      "logo_url": "https://mysite.files.com/.../logo.png",
      "id": 1,
      "user_count": 1,
      "saml_provider_cert_fingerprint": "example",
      "saml_provider_issuer_url": "example",
      "saml_provider_metadata_content": "example",
      "saml_provider_metadata_url": "example",
      "saml_provider_slo_target_url": "example",
      "saml_provider_sso_target_url": "example",
      "scim_authentication_method": "example",
      "scim_username": "example",
      "scim_oauth_access_token": "example",
      "scim_oauth_access_token_expires_at": "example",
      "subdomain": "my-site",
      "provision_users": true,
      "provision_groups": true,
      "deprovision_users": true,
      "deprovision_groups": true,
      "deprovision_behavior": "disable",
      "provision_group_default": "Employees",
      "provision_group_exclusion": "Employees",
      "provision_group_inclusion": "Employees",
      "provision_group_required": "example",
      "provision_email_signup_groups": "Employees",
      "provision_site_admin_groups": "Employees",
      "provision_group_admin_groups": "Employees",
      "provision_attachments_permission": true,
      "provision_dav_permission": true,
      "provision_ftp_permission": true,
      "provision_sftp_permission": true,
      "provision_time_zone": "Eastern Time (US & Canada)",
      "provision_company": "ACME Corp.",
      "ldap_base_dn": "example",
      "ldap_domain": "mysite.com",
      "enabled": true,
      "ldap_host": "ldap.site.com",
      "ldap_host_2": "ldap2.site.com",
      "ldap_host_3": "ldap3.site.com",
      "ldap_port": 1,
      "ldap_secure": true,
      "ldap_username": "[ldap username]",
      "ldap_username_field": "sAMAccountName"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <sso-strategy>
      <protocol>oauth2</protocol>
      <provider>okta</provider>
      <label>My Corporate SSO Provider</label>
      <logo_url>https://mysite.files.com/.../logo.png</logo_url>
      <id type="integer">1</id>
      <user_count type="integer">1</user_count>
      <saml_provider_cert_fingerprint>example</saml_provider_cert_fingerprint>
      <saml_provider_issuer_url>example</saml_provider_issuer_url>
      <saml_provider_metadata_content>example</saml_provider_metadata_content>
      <saml_provider_metadata_url>example</saml_provider_metadata_url>
      <saml_provider_slo_target_url>example</saml_provider_slo_target_url>
      <saml_provider_sso_target_url>example</saml_provider_sso_target_url>
      <scim_authentication_method>example</scim_authentication_method>
      <scim_username>example</scim_username>
      <scim_oauth_access_token>example</scim_oauth_access_token>
      <scim_oauth_access_token_expires_at>example</scim_oauth_access_token_expires_at>
      <subdomain>my-site</subdomain>
      <provision_users type="boolean">true</provision_users>
      <provision_groups type="boolean">true</provision_groups>
      <deprovision_users type="boolean">true</deprovision_users>
      <deprovision_groups type="boolean">true</deprovision_groups>
      <deprovision_behavior>disable</deprovision_behavior>
      <provision_group_default>Employees</provision_group_default>
      <provision_group_exclusion>Employees</provision_group_exclusion>
      <provision_group_inclusion>Employees</provision_group_inclusion>
      <provision_group_required>example</provision_group_required>
      <provision_email_signup_groups>Employees</provision_email_signup_groups>
      <provision_site_admin_groups>Employees</provision_site_admin_groups>
      <provision_group_admin_groups>Employees</provision_group_admin_groups>
      <provision_attachments_permission type="boolean">true</provision_attachments_permission>
      <provision_dav_permission type="boolean">true</provision_dav_permission>
      <provision_ftp_permission type="boolean">true</provision_ftp_permission>
      <provision_sftp_permission type="boolean">true</provision_sftp_permission>
      <provision_time_zone>Eastern Time (US &amp; Canada)</provision_time_zone>
      <provision_company>ACME Corp.</provision_company>
      <ldap_base_dn>example</ldap_base_dn>
      <ldap_domain>mysite.com</ldap_domain>
      <enabled type="boolean">true</enabled>
      <ldap_host>ldap.site.com</ldap_host>
      <ldap_host_2>ldap2.site.com</ldap_host_2>
      <ldap_host_3>ldap3.site.com</ldap_host_3>
      <ldap_port type="integer">1</ldap_port>
      <ldap_secure type="boolean">true</ldap_secure>
      <ldap_username>[ldap username]</ldap_username>
      <ldap_username_field>sAMAccountName</ldap_username_field>
    </sso-strategy>
    
    
    Attribute Description
    protocol string SSO Protocol
    Possible values: oauth2, saml, active_directory, open_ldap, scim
    provider string Provider name
    Possible values: google, auth0, okta, atlassian, azure, box, dropbox, slack, onelogin, saml, idaptive, ldap, scim
    label string Custom label for the SSO provider on the login page.
    logo_url string URL holding a custom logo for the SSO provider on the login page.
    id int64 ID
    user_count int64 Count of users with this SSO Strategy
    saml_provider_cert_fingerprint string Identity provider sha256 cert fingerprint if saml_provider_metadata_url is not available.
    saml_provider_issuer_url string Identity provider issuer url
    saml_provider_metadata_content string Custom identity provider metadata
    saml_provider_metadata_url string Metadata URL for the SAML identity provider
    saml_provider_slo_target_url string Identity provider SLO endpoint
    saml_provider_sso_target_url string Identity provider SSO endpoint if saml_provider_metadata_url is not available.
    scim_authentication_method string SCIM authentication type.
    Possible values: none, basic, token
    scim_username string SCIM username.
    scim_oauth_access_token string SCIM OAuth Access Token.
    scim_oauth_access_token_expires_at string SCIM OAuth Access Token Expiration Time.
    subdomain string Subdomain
    provision_users boolean Auto-provision users?
    provision_groups boolean Auto-provision group membership based on group memberships on the SSO side?
    deprovision_users boolean Auto-deprovision users?
    deprovision_groups boolean Auto-deprovision group membership based on group memberships on the SSO side?
    deprovision_behavior string Method used for deprovisioning users.
    Possible values: disable, delete
    provision_group_default string Comma-separated list of group names for groups to automatically add all auto-provisioned users to.
    provision_group_exclusion string Comma-separated list of group names for groups (with optional wildcards) that will be excluded from auto-provisioning.
    provision_group_inclusion string Comma-separated list of group names for groups (with optional wildcards) that will be auto-provisioned.
    provision_group_required string Comma or newline separated list of group names (with optional wildcards) to require membership for user provisioning.
    provision_email_signup_groups string Comma-separated list of group names whose members will be created with email_signup authentication.
    provision_site_admin_groups string Comma-separated list of group names whose members will be created as Site Admins.
    provision_group_admin_groups string Comma-separated list of group names whose members will be provisioned as Group Admins.
    provision_attachments_permission boolean DEPRECATED: Auto-provisioned users get Sharing permission. Use a Group with the Bundle permission instead.
    provision_dav_permission boolean Auto-provisioned users get WebDAV permission?
    provision_ftp_permission boolean Auto-provisioned users get FTP permission?
    provision_sftp_permission boolean Auto-provisioned users get SFTP permission?
    provision_time_zone string Default time zone for auto provisioned users.
    provision_company string Default company for auto provisioned users.
    ldap_base_dn string Base DN for looking up users in LDAP server
    ldap_domain string Domain name that will be appended to LDAP usernames
    enabled boolean Is strategy enabled? This may become automatically set to false after a high number and duration of failures.
    ldap_host string LDAP host
    ldap_host_2 string LDAP backup host
    ldap_host_3 string LDAP backup host
    ldap_port int64 LDAP port
    ldap_secure boolean Use secure LDAP?
    ldap_username string Username for signing in to LDAP server.
    ldap_username_field string LDAP username field
    Possible values: sAMAccountName, userPrincipalName

    List Sso Strategies

    Example Request

    curl "https://app.files.com/api/rest/v1/sso_strategies.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/sso_strategies.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::SsoStrategy.list(
      per_page: 1
    )
    
    \Files\Model\SsoStrategy::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    SsoStrategy.list(parameters).all()
    
    await SsoStrategy.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await SsoStrategy.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.sso_strategy.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    ssostrategy.List(context.Background(), files_sdk.SsoStrategyListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli sso-strategies list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "protocol": "oauth2",
        "provider": "okta",
        "label": "My Corporate SSO Provider",
        "logo_url": "https://mysite.files.com/.../logo.png",
        "id": 1,
        "user_count": 1,
        "saml_provider_cert_fingerprint": "example",
        "saml_provider_issuer_url": "example",
        "saml_provider_metadata_content": "example",
        "saml_provider_metadata_url": "example",
        "saml_provider_slo_target_url": "example",
        "saml_provider_sso_target_url": "example",
        "scim_authentication_method": "example",
        "scim_username": "example",
        "scim_oauth_access_token": "example",
        "scim_oauth_access_token_expires_at": "example",
        "subdomain": "my-site",
        "provision_users": true,
        "provision_groups": true,
        "deprovision_users": true,
        "deprovision_groups": true,
        "deprovision_behavior": "disable",
        "provision_group_default": "Employees",
        "provision_group_exclusion": "Employees",
        "provision_group_inclusion": "Employees",
        "provision_group_required": "example",
        "provision_email_signup_groups": "Employees",
        "provision_site_admin_groups": "Employees",
        "provision_group_admin_groups": "Employees",
        "provision_attachments_permission": true,
        "provision_dav_permission": true,
        "provision_ftp_permission": true,
        "provision_sftp_permission": true,
        "provision_time_zone": "Eastern Time (US & Canada)",
        "provision_company": "ACME Corp.",
        "ldap_base_dn": "example",
        "ldap_domain": "mysite.com",
        "enabled": true,
        "ldap_host": "ldap.site.com",
        "ldap_host_2": "ldap2.site.com",
        "ldap_host_3": "ldap3.site.com",
        "ldap_port": 1,
        "ldap_secure": true,
        "ldap_username": "[ldap username]",
        "ldap_username_field": "sAMAccountName"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <sso-strategies type="array">
      <sso-strategy>
        <protocol>oauth2</protocol>
        <provider>okta</provider>
        <label>My Corporate SSO Provider</label>
        <logo_url>https://mysite.files.com/.../logo.png</logo_url>
        <id type="integer">1</id>
        <user_count type="integer">1</user_count>
        <saml_provider_cert_fingerprint>example</saml_provider_cert_fingerprint>
        <saml_provider_issuer_url>example</saml_provider_issuer_url>
        <saml_provider_metadata_content>example</saml_provider_metadata_content>
        <saml_provider_metadata_url>example</saml_provider_metadata_url>
        <saml_provider_slo_target_url>example</saml_provider_slo_target_url>
        <saml_provider_sso_target_url>example</saml_provider_sso_target_url>
        <scim_authentication_method>example</scim_authentication_method>
        <scim_username>example</scim_username>
        <scim_oauth_access_token>example</scim_oauth_access_token>
        <scim_oauth_access_token_expires_at>example</scim_oauth_access_token_expires_at>
        <subdomain>my-site</subdomain>
        <provision_users type="boolean">true</provision_users>
        <provision_groups type="boolean">true</provision_groups>
        <deprovision_users type="boolean">true</deprovision_users>
        <deprovision_groups type="boolean">true</deprovision_groups>
        <deprovision_behavior>disable</deprovision_behavior>
        <provision_group_default>Employees</provision_group_default>
        <provision_group_exclusion>Employees</provision_group_exclusion>
        <provision_group_inclusion>Employees</provision_group_inclusion>
        <provision_group_required>example</provision_group_required>
        <provision_email_signup_groups>Employees</provision_email_signup_groups>
        <provision_site_admin_groups>Employees</provision_site_admin_groups>
        <provision_group_admin_groups>Employees</provision_group_admin_groups>
        <provision_attachments_permission type="boolean">true</provision_attachments_permission>
        <provision_dav_permission type="boolean">true</provision_dav_permission>
        <provision_ftp_permission type="boolean">true</provision_ftp_permission>
        <provision_sftp_permission type="boolean">true</provision_sftp_permission>
        <provision_time_zone>Eastern Time (US &amp; Canada)</provision_time_zone>
        <provision_company>ACME Corp.</provision_company>
        <ldap_base_dn>example</ldap_base_dn>
        <ldap_domain>mysite.com</ldap_domain>
        <enabled type="boolean">true</enabled>
        <ldap_host>ldap.site.com</ldap_host>
        <ldap_host_2>ldap2.site.com</ldap_host_2>
        <ldap_host_3>ldap3.site.com</ldap_host_3>
        <ldap_port type="integer">1</ldap_port>
        <ldap_secure type="boolean">true</ldap_secure>
        <ldap_username>[ldap username]</ldap_username>
        <ldap_username_field>sAMAccountName</ldap_username_field>
      </sso-strategy>
    </sso-strategies>
    
    

    HTTPS Request

    GET /sso_strategies

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Show Sso Strategy

    Example Request

    curl https://app.files.com/api/rest/v1/sso_strategies/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/sso_strategies/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::SsoStrategy.find(id)
    
    \Files\Model\SsoStrategy::find($id);
    
    
    SsoStrategy.find(, parameters
    
    await SsoStrategy.find(id)
    
    
    await SsoStrategy.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.sso_strategy.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    ssostrategy.Find(context.Background(), files_sdk.SsoStrategyFindParams{
      Id: 1,
    })
    
    
    files-cli sso-strategies find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "protocol": "oauth2",
      "provider": "okta",
      "label": "My Corporate SSO Provider",
      "logo_url": "https://mysite.files.com/.../logo.png",
      "id": 1,
      "user_count": 1,
      "saml_provider_cert_fingerprint": "example",
      "saml_provider_issuer_url": "example",
      "saml_provider_metadata_content": "example",
      "saml_provider_metadata_url": "example",
      "saml_provider_slo_target_url": "example",
      "saml_provider_sso_target_url": "example",
      "scim_authentication_method": "example",
      "scim_username": "example",
      "scim_oauth_access_token": "example",
      "scim_oauth_access_token_expires_at": "example",
      "subdomain": "my-site",
      "provision_users": true,
      "provision_groups": true,
      "deprovision_users": true,
      "deprovision_groups": true,
      "deprovision_behavior": "disable",
      "provision_group_default": "Employees",
      "provision_group_exclusion": "Employees",
      "provision_group_inclusion": "Employees",
      "provision_group_required": "example",
      "provision_email_signup_groups": "Employees",
      "provision_site_admin_groups": "Employees",
      "provision_group_admin_groups": "Employees",
      "provision_attachments_permission": true,
      "provision_dav_permission": true,
      "provision_ftp_permission": true,
      "provision_sftp_permission": true,
      "provision_time_zone": "Eastern Time (US & Canada)",
      "provision_company": "ACME Corp.",
      "ldap_base_dn": "example",
      "ldap_domain": "mysite.com",
      "enabled": true,
      "ldap_host": "ldap.site.com",
      "ldap_host_2": "ldap2.site.com",
      "ldap_host_3": "ldap3.site.com",
      "ldap_port": 1,
      "ldap_secure": true,
      "ldap_username": "[ldap username]",
      "ldap_username_field": "sAMAccountName"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <sso-strategy>
      <protocol>oauth2</protocol>
      <provider>okta</provider>
      <label>My Corporate SSO Provider</label>
      <logo_url>https://mysite.files.com/.../logo.png</logo_url>
      <id type="integer">1</id>
      <user_count type="integer">1</user_count>
      <saml_provider_cert_fingerprint>example</saml_provider_cert_fingerprint>
      <saml_provider_issuer_url>example</saml_provider_issuer_url>
      <saml_provider_metadata_content>example</saml_provider_metadata_content>
      <saml_provider_metadata_url>example</saml_provider_metadata_url>
      <saml_provider_slo_target_url>example</saml_provider_slo_target_url>
      <saml_provider_sso_target_url>example</saml_provider_sso_target_url>
      <scim_authentication_method>example</scim_authentication_method>
      <scim_username>example</scim_username>
      <scim_oauth_access_token>example</scim_oauth_access_token>
      <scim_oauth_access_token_expires_at>example</scim_oauth_access_token_expires_at>
      <subdomain>my-site</subdomain>
      <provision_users type="boolean">true</provision_users>
      <provision_groups type="boolean">true</provision_groups>
      <deprovision_users type="boolean">true</deprovision_users>
      <deprovision_groups type="boolean">true</deprovision_groups>
      <deprovision_behavior>disable</deprovision_behavior>
      <provision_group_default>Employees</provision_group_default>
      <provision_group_exclusion>Employees</provision_group_exclusion>
      <provision_group_inclusion>Employees</provision_group_inclusion>
      <provision_group_required>example</provision_group_required>
      <provision_email_signup_groups>Employees</provision_email_signup_groups>
      <provision_site_admin_groups>Employees</provision_site_admin_groups>
      <provision_group_admin_groups>Employees</provision_group_admin_groups>
      <provision_attachments_permission type="boolean">true</provision_attachments_permission>
      <provision_dav_permission type="boolean">true</provision_dav_permission>
      <provision_ftp_permission type="boolean">true</provision_ftp_permission>
      <provision_sftp_permission type="boolean">true</provision_sftp_permission>
      <provision_time_zone>Eastern Time (US &amp; Canada)</provision_time_zone>
      <provision_company>ACME Corp.</provision_company>
      <ldap_base_dn>example</ldap_base_dn>
      <ldap_domain>mysite.com</ldap_domain>
      <enabled type="boolean">true</enabled>
      <ldap_host>ldap.site.com</ldap_host>
      <ldap_host_2>ldap2.site.com</ldap_host_2>
      <ldap_host_3>ldap3.site.com</ldap_host_3>
      <ldap_port type="integer">1</ldap_port>
      <ldap_secure type="boolean">true</ldap_secure>
      <ldap_username>[ldap username]</ldap_username>
      <ldap_username_field>sAMAccountName</ldap_username_field>
    </sso-strategy>
    
    

    HTTPS Request

    GET /sso_strategies/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Sso Strategy ID.

    Synchronize provisioning data with the SSO remote server

    Example Request

    curl https://app.files.com/api/rest/v1/sso_strategies/{id}/sync.json \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/sso_strategies/{id}/sync.xml \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    sso_strategy = Files::SsoStrategy.list.first
    sso_strategy.sync
    
    $sso_strategy = \Files\Model\SsoStrategy::list()[0];
    $sso_strategy->sync();
    
    SsoStrategy ssoStrategy = SsoStrategy.list()[0];
    
    ssoStrategy.sync();
    
    const ssoStrategy = (await SsoStrategy.list())[0]
    await ssoStrategy.sync()
    
    var ssoStrategy = (await SsoStrategy.List())[0];
    
    await ssoStrategy.Sync();
    
    files_sdk.set_api_key("my-key")
    
    sso_strategy = files_sdk.sso_strategy.find(id)
    sso_strategy.sync()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    ssostrategy.Sync(context.Background(), files_sdk.SsoStrategySyncParams{
      Id: 1,
    })
    
    files-cli sso-strategies sync \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    POST /sso_strategies/{id}/sync

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Sso Strategy ID.

    Styles

    Styles are custom sets of branding that can be applied on a per-folder basis. Currently these only support Logos per folder, but in the future we may extend these to also support colors. If you want to see that, please let us know so we can add your vote to the list.

    The Style object

    Example Style Object

    {
      "id": 1,
      "path": "example",
      "logo": "https://mysite.files.com/...",
      "thumbnail": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <style>
      <id type="integer">1</id>
      <path>example</path>
      <logo>https://mysite.files.com/...</logo>
      <thumbnail>example</thumbnail>
    </style>
    
    
    Attribute Description
    id int64 Style ID
    path string Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    logo Image Logo
    thumbnail Image Logo thumbnail
    file file Logo for custom branding.

    Show Style

    Example Request

    curl https://app.files.com/api/rest/v1/styles/{path} \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/styles/{path} \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Style.find(path)
    
    \Files\Model\Style::find($path);
    
    
    Style.find(, parameters
    
    await Style.find(path)
    
    
    await Style.Find(path);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.style.find(path)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    style.Find(context.Background(), files_sdk.StyleFindParams{
      Path: "path",
    })
    
    
    files-cli styles find \
      --path="path" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "path": "example",
      "logo": "https://mysite.files.com/...",
      "thumbnail": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <style>
      <id type="integer">1</id>
      <path>example</path>
      <logo>https://mysite.files.com/...</logo>
      <thumbnail>example</thumbnail>
    </style>
    
    

    HTTPS Request

    GET /styles/{path}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    path string Required Style path.

    Update Style

    Example Request

    curl https://app.files.com/api/rest/v1/styles/{path} \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"file":"file"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/styles/{path} \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<style>
           <file>file</file>
         </style>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    style = Files::Style.new
    style.update(
      file: "file"
    )
    
    $style = new \Files\Model\Style();
    $style->update(array(
      'file' => "file"
    ));
    
    HashMap<Object, String> attributes = new HashMap<>();
    Style style = new Style(attributes);
    style.setFile(file);
    style.update();
    
    const style = new Style()
    await style.update({ 
      file: "file",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("file", (System.Net.Http.ByteArrayContent), shorthand: true) "file");
    
    await style.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    style = files_sdk.style.find(path)
    style.update({
      "file": "file"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    style.Update(context.Background(), files_sdk.StyleUpdateParams{
      Path: "path",
      File: "file",
    })
    
    files-cli styles update \
      --path="path" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "path": "example",
      "logo": "https://mysite.files.com/...",
      "thumbnail": "example"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <style>
      <id type="integer">1</id>
      <path>example</path>
      <logo>https://mysite.files.com/...</logo>
      <thumbnail>example</thumbnail>
    </style>
    
    

    HTTPS Request

    PATCH /styles/{path}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    path string Required Style path.
    file file Required Logo for custom branding. See Attaching Files to API Requests.

    Delete Style

    Example Request

    curl https://app.files.com/api/rest/v1/styles/{path} \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/styles/{path} \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    style = Files::Style.new
    style.delete
    
    $style = new \Files\Model\Style();
    $style->delete();
    
    HashMap<Object, String> attributes = new HashMap<>();
    Style style = new Style(attributes);
    
    style.delete();
    
    const style = new Style()
    await style.delete()
    
    
    await style.Delete();
    
    files_sdk.set_api_key("my-key")
    
    style = files_sdk.style.find(path)
    style.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    style.Delete(context.Background(), files_sdk.StyleDeleteParams{
      Path: "path",
    })
    
    files-cli styles delete \
      --path="path" \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /styles/{path}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    path string Required Style path.

    Usage Daily Snapshots

    The UsageDailySnapshots resource in the REST API allows you to operate on UsageDailySnapshots.

    The UsageDailySnapshot object

    Example UsageDailySnapshot Object

    {
      "id": 1,
      "date": "2000-01-01T01:00:00Z",
      "api_usage_available": true,
      "read_api_usage": 1,
      "write_api_usage": 1,
      "user_count": 1,
      "current_storage": 1,
      "deleted_files_storage": 1,
      "deleted_files_counted_in_minimum": 1,
      "root_storage": 1,
      "usage_by_top_level_dir": {
        "key": "example value"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <usage-daily-snapshot>
      <id type="integer">1</id>
      <date>2000-01-01T01:00:00Z</date>
      <api_usage_available type="boolean">true</api_usage_available>
      <read_api_usage type="integer">1</read_api_usage>
      <write_api_usage type="integer">1</write_api_usage>
      <user_count type="integer">1</user_count>
      <current_storage type="integer">1</current_storage>
      <deleted_files_storage type="integer">1</deleted_files_storage>
      <deleted_files_counted_in_minimum type="integer">1</deleted_files_counted_in_minimum>
      <root_storage type="integer">1</root_storage>
      <usage_by_top_level_dir>
        <key>example value</key>
      </usage_by_top_level_dir>
    </usage-daily-snapshot>
    
    
    Attribute Description
    id int64 ID of the usage record
    date date The date of this usage record
    api_usage_available boolean True if the API usage fields read_api_usage and write_api_usage can be relied upon. If this is false, we suggest hiding that value from any UI.
    read_api_usage int64 Read API Calls used on this day. Note: only updated for days before the current day.
    write_api_usage int64 Write API Calls used on this day. Note: only updated for days before the current day.
    user_count int64 Number of billable users as of this day.
    current_storage int64 GB of Files Native Storage used on this day.
    deleted_files_storage int64 GB of Files Native Storage used on this day for files that have been deleted and are stored as backups.
    deleted_files_counted_in_minimum int64 GB of Files Native Storage used on this day for files that have been permanently deleted but were uploaded less than 30 days ago, and are still billable.
    root_storage int64 GB of Files Native Storage used for the root folder. Included here because this value will not be part of usage_by_top_level_dir
    usage_by_top_level_dir object Usage broken down by each top-level folder

    List Usage Daily Snapshots

    Example Request

    curl "https://app.files.com/api/rest/v1/usage_daily_snapshots.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/usage_daily_snapshots.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::UsageDailySnapshot.list(
      per_page: 1
    )
    
    \Files\Model\UsageDailySnapshot::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    UsageDailySnapshot.list(parameters).all()
    
    await UsageDailySnapshot.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await UsageDailySnapshot.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.usage_daily_snapshot.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    usagedailysnapshot.List(context.Background(), files_sdk.UsageDailySnapshotListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterGt: "",
      FilterGteq: "",
      FilterLt: "",
      FilterLteq: "",
    })
    
    
    files-cli usage-daily-snapshots list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "date": "2000-01-01T01:00:00Z",
        "api_usage_available": true,
        "read_api_usage": 1,
        "write_api_usage": 1,
        "user_count": 1,
        "current_storage": 1,
        "deleted_files_storage": 1,
        "deleted_files_counted_in_minimum": 1,
        "root_storage": 1,
        "usage_by_top_level_dir": {
          "key": "example value"
        }
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <usage-daily-snapshots type="array">
      <usage-daily-snapshot>
        <id type="integer">1</id>
        <date>2000-01-01T01:00:00Z</date>
        <api_usage_available type="boolean">true</api_usage_available>
        <read_api_usage type="integer">1</read_api_usage>
        <write_api_usage type="integer">1</write_api_usage>
        <user_count type="integer">1</user_count>
        <current_storage type="integer">1</current_storage>
        <deleted_files_storage type="integer">1</deleted_files_storage>
        <deleted_files_counted_in_minimum type="integer">1</deleted_files_counted_in_minimum>
        <root_storage type="integer">1</root_storage>
        <usage_by_top_level_dir>
          <key>example value</key>
        </usage_by_top_level_dir>
      </usage-daily-snapshot>
    </usage-daily-snapshots>
    
    

    HTTPS Request

    GET /usage_daily_snapshots

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[date]=desc). Valid fields are date and usage_snapshot_id.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are date and usage_snapshot_id. Valid field combinations are [ usage_snapshot_id, date ].
    filter_gt object If set, return records where the specified field is greater than the supplied value. Valid fields are date.
    filter_gteq object If set, return records where the specified field is greater than or equal the supplied value. Valid fields are date.
    filter_lt object If set, return records where the specified field is less than the supplied value. Valid fields are date.
    filter_lteq object If set, return records where the specified field is less than or equal the supplied value. Valid fields are date.

    Usage Snapshots

    The UsageSnapshots resource in the REST API allows you to operate on UsageSnapshots.

    The UsageSnapshot object

    Example UsageSnapshot Object

    {
      "id": 1,
      "start_at": "2000-01-01T01:00:00Z",
      "end_at": "2000-01-01T01:00:00Z",
      "high_water_user_count": 1.0,
      "current_storage": 1.0,
      "high_water_storage": 1.0,
      "usage_by_top_level_dir": {
        "key": "example value"
      },
      "root_storage": 1.0,
      "deleted_files_counted_in_minimum": 1.0,
      "deleted_files_storage": 1.0,
      "total_billable_usage": 1.0,
      "total_billable_transfer_usage": 1.0,
      "bytes_sent": 1.0,
      "sync_bytes_received": 1.0,
      "sync_bytes_sent": 1.0
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <usage-snapshot>
      <id type="integer">1</id>
      <start_at>2000-01-01T01:00:00Z</start_at>
      <end_at>2000-01-01T01:00:00Z</end_at>
      <high_water_user_count type="float">1.0</high_water_user_count>
      <current_storage type="float">1.0</current_storage>
      <high_water_storage type="float">1.0</high_water_storage>
      <usage_by_top_level_dir>
        <key>example value</key>
      </usage_by_top_level_dir>
      <root_storage type="float">1.0</root_storage>
      <deleted_files_counted_in_minimum type="float">1.0</deleted_files_counted_in_minimum>
      <deleted_files_storage type="float">1.0</deleted_files_storage>
      <total_billable_usage type="float">1.0</total_billable_usage>
      <total_billable_transfer_usage type="float">1.0</total_billable_transfer_usage>
      <bytes_sent type="float">1.0</bytes_sent>
      <sync_bytes_received type="float">1.0</sync_bytes_received>
      <sync_bytes_sent type="float">1.0</sync_bytes_sent>
    </usage-snapshot>
    
    
    Attribute Description
    id int64 Usage snapshot ID
    start_at date-time Usage snapshot start date/time
    end_at date-time Usage snapshot end date/time
    high_water_user_count double Highest user count number in time period
    current_storage double Current total Storage Usage GB as of end date (not necessarily high water mark, which is used for billing)
    high_water_storage double Highest Storage Usage GB recorded in time period (used for billing)
    usage_by_top_level_dir object Storage Usage - map of root folders to their usage as of end date (not necessarily high water mark, which is used for billing)
    root_storage double Storage Usage for root folder as of end date (not necessarily high water mark, which is used for billing)
    deleted_files_counted_in_minimum double Storage Usage for files that are deleted but uploaded within last 30 days as of end date (not necessarily high water mark, which is used for billing)
    deleted_files_storage double Storage Usage for files that are deleted but retained as backups as of end date (not necessarily high water mark, which is used for billing)
    total_billable_usage double Storage + Transfer Usage - Total Billable amount
    total_billable_transfer_usage double Transfer usage for period - Total Billable amount
    bytes_sent double Transfer Usage for period - Outbound GB from Files Native Storage
    sync_bytes_received double Transfer Usage for period - Inbound GB to Remote Servers (Sync/Mount)
    sync_bytes_sent double Transfer Usage for period - Outbound GB from Remote Servers (Sync/Mount)

    List Usage Snapshots

    Example Request

    curl "https://app.files.com/api/rest/v1/usage_snapshots.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/usage_snapshots.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::UsageSnapshot.list(
      per_page: 1
    )
    
    \Files\Model\UsageSnapshot::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    UsageSnapshot.list(parameters).all()
    
    await UsageSnapshot.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await UsageSnapshot.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.usage_snapshot.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    usagesnapshot.List(context.Background(), files_sdk.UsageSnapshotListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli usage-snapshots list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "start_at": "2000-01-01T01:00:00Z",
        "end_at": "2000-01-01T01:00:00Z",
        "high_water_user_count": 1.0,
        "current_storage": 1.0,
        "high_water_storage": 1.0,
        "usage_by_top_level_dir": {
          "key": "example value"
        },
        "root_storage": 1.0,
        "deleted_files_counted_in_minimum": 1.0,
        "deleted_files_storage": 1.0,
        "total_billable_usage": 1.0,
        "total_billable_transfer_usage": 1.0,
        "bytes_sent": 1.0,
        "sync_bytes_received": 1.0,
        "sync_bytes_sent": 1.0
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <usage-snapshots type="array">
      <usage-snapshot>
        <id type="integer">1</id>
        <start_at>2000-01-01T01:00:00Z</start_at>
        <end_at>2000-01-01T01:00:00Z</end_at>
        <high_water_user_count type="float">1.0</high_water_user_count>
        <current_storage type="float">1.0</current_storage>
        <high_water_storage type="float">1.0</high_water_storage>
        <usage_by_top_level_dir>
          <key>example value</key>
        </usage_by_top_level_dir>
        <root_storage type="float">1.0</root_storage>
        <deleted_files_counted_in_minimum type="float">1.0</deleted_files_counted_in_minimum>
        <deleted_files_storage type="float">1.0</deleted_files_storage>
        <total_billable_usage type="float">1.0</total_billable_usage>
        <total_billable_transfer_usage type="float">1.0</total_billable_transfer_usage>
        <bytes_sent type="float">1.0</bytes_sent>
        <sync_bytes_received type="float">1.0</sync_bytes_received>
        <sync_bytes_sent type="float">1.0</sync_bytes_sent>
      </usage-snapshot>
    </usage-snapshots>
    
    

    HTTPS Request

    GET /usage_snapshots

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Get the most recent usage snapshot (usage data for billing purposes) for a Site

    Example Request

    curl https://app.files.com/api/rest/v1/site/usage.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/site/usage.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Site.get_usage
    
    \Files\Model\Site::getUsage();
    
    
    Site.getUsage(, parameters
    
    await Site.getUsage()
    
    
    await Site.GetUsage();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.site.get_usage()
    
    files_sdk.APIKey = "YOUR_API_KEY"
    site.GetUsage
    
    
    files-cli sites get-usage \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "start_at": "2000-01-01T01:00:00Z",
      "end_at": "2000-01-01T01:00:00Z",
      "high_water_user_count": 1.0,
      "current_storage": 1.0,
      "high_water_storage": 1.0,
      "usage_by_top_level_dir": {
        "key": "example value"
      },
      "root_storage": 1.0,
      "deleted_files_counted_in_minimum": 1.0,
      "deleted_files_storage": 1.0,
      "total_billable_usage": 1.0,
      "total_billable_transfer_usage": 1.0,
      "bytes_sent": 1.0,
      "sync_bytes_received": 1.0,
      "sync_bytes_sent": 1.0
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <usage-snapshot>
      <id type="integer">1</id>
      <start_at>2000-01-01T01:00:00Z</start_at>
      <end_at>2000-01-01T01:00:00Z</end_at>
      <high_water_user_count type="float">1.0</high_water_user_count>
      <current_storage type="float">1.0</current_storage>
      <high_water_storage type="float">1.0</high_water_storage>
      <usage_by_top_level_dir>
        <key>example value</key>
      </usage_by_top_level_dir>
      <root_storage type="float">1.0</root_storage>
      <deleted_files_counted_in_minimum type="float">1.0</deleted_files_counted_in_minimum>
      <deleted_files_storage type="float">1.0</deleted_files_storage>
      <total_billable_usage type="float">1.0</total_billable_usage>
      <total_billable_transfer_usage type="float">1.0</total_billable_transfer_usage>
      <bytes_sent type="float">1.0</bytes_sent>
      <sync_bytes_received type="float">1.0</sync_bytes_received>
      <sync_bytes_sent type="float">1.0</sync_bytes_sent>
    </usage-snapshot>
    
    

    HTTPS Request

    GET /site/usage

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Users

    The Users resource in the REST API allows you to operate on Users.

    The User object

    Example User Object

    {
      "id": 1,
      "username": "user",
      "admin_group_ids": [
        1
      ],
      "allowed_ips": "127.0.0.1",
      "attachments_permission": true,
      "api_keys_count": 1,
      "authenticate_until": "2000-01-01T01:00:00Z",
      "authentication_method": "password",
      "avatar_url": "example",
      "billing_permission": true,
      "bypass_site_allowed_ips": true,
      "bypass_inactive_disable": true,
      "created_at": "2000-01-01T01:00:00Z",
      "dav_permission": true,
      "disabled": true,
      "email": "example",
      "first_login_at": "2000-01-01T01:00:00Z",
      "ftp_permission": true,
      "group_ids": "example",
      "header_text": "User-specific message.",
      "language": "en",
      "last_login_at": "2000-01-01T01:00:00Z",
      "last_web_login_at": "2000-01-01T01:00:00Z",
      "last_ftp_login_at": "2000-01-01T01:00:00Z",
      "last_sftp_login_at": "2000-01-01T01:00:00Z",
      "last_dav_login_at": "2000-01-01T01:00:00Z",
      "last_desktop_login_at": "2000-01-01T01:00:00Z",
      "last_restapi_login_at": "2000-01-01T01:00:00Z",
      "last_api_use_at": "2000-01-01T01:00:00Z",
      "last_active_at": "2000-01-01T01:00:00Z",
      "last_protocol_cipher": "example",
      "lockout_expires": "2000-01-01T01:00:00Z",
      "name": "John Doe",
      "company": "ACME Corp.",
      "notes": "Internal notes on this user.",
      "notification_daily_send_time": 18,
      "office_integration_enabled": true,
      "password_set_at": "2000-01-01T01:00:00Z",
      "password_validity_days": 1,
      "public_keys_count": 1,
      "receive_admin_alerts": true,
      "require_2fa": "always_require",
      "require_login_by": "2000-01-01T01:00:00Z",
      "active_2fa": true,
      "require_password_change": true,
      "password_expired": true,
      "restapi_permission": true,
      "self_managed": true,
      "sftp_permission": true,
      "site_admin": true,
      "skip_welcome_screen": true,
      "ssl_required": "always_require",
      "sso_strategy_id": 1,
      "subscribe_to_newsletter": true,
      "externally_managed": true,
      "time_zone": "Pacific Time (US & Canada)",
      "type_of_2fa": "yubi",
      "user_root": "example",
      "days_remaining_until_password_expire": 1,
      "password_expire_at": "2000-01-01T01:00:00Z"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <user>
      <id type="integer">1</id>
      <username>user</username>
      <admin_group_ids type="array">
        <admin_group_id type="integer">1</admin_group_id>
      </admin_group_ids>
      <allowed_ips>127.0.0.1</allowed_ips>
      <attachments_permission type="boolean">true</attachments_permission>
      <api_keys_count type="integer">1</api_keys_count>
      <authenticate_until>2000-01-01T01:00:00Z</authenticate_until>
      <authentication_method>password</authentication_method>
      <avatar_url>example</avatar_url>
      <billing_permission type="boolean">true</billing_permission>
      <bypass_site_allowed_ips type="boolean">true</bypass_site_allowed_ips>
      <bypass_inactive_disable type="boolean">true</bypass_inactive_disable>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <dav_permission type="boolean">true</dav_permission>
      <disabled type="boolean">true</disabled>
      <email>example</email>
      <first_login_at>2000-01-01T01:00:00Z</first_login_at>
      <ftp_permission type="boolean">true</ftp_permission>
      <group_ids>example</group_ids>
      <header_text>User-specific message.</header_text>
      <language>en</language>
      <last_login_at>2000-01-01T01:00:00Z</last_login_at>
      <last_web_login_at>2000-01-01T01:00:00Z</last_web_login_at>
      <last_ftp_login_at>2000-01-01T01:00:00Z</last_ftp_login_at>
      <last_sftp_login_at>2000-01-01T01:00:00Z</last_sftp_login_at>
      <last_dav_login_at>2000-01-01T01:00:00Z</last_dav_login_at>
      <last_desktop_login_at>2000-01-01T01:00:00Z</last_desktop_login_at>
      <last_restapi_login_at>2000-01-01T01:00:00Z</last_restapi_login_at>
      <last_api_use_at>2000-01-01T01:00:00Z</last_api_use_at>
      <last_active_at>2000-01-01T01:00:00Z</last_active_at>
      <last_protocol_cipher>example</last_protocol_cipher>
      <lockout_expires>2000-01-01T01:00:00Z</lockout_expires>
      <name>John Doe</name>
      <company>ACME Corp.</company>
      <notes>Internal notes on this user.</notes>
      <notification_daily_send_time type="integer">18</notification_daily_send_time>
      <office_integration_enabled type="boolean">true</office_integration_enabled>
      <password_set_at>2000-01-01T01:00:00Z</password_set_at>
      <password_validity_days type="integer">1</password_validity_days>
      <public_keys_count type="integer">1</public_keys_count>
      <receive_admin_alerts type="boolean">true</receive_admin_alerts>
      <require_2fa>always_require</require_2fa>
      <require_login_by>2000-01-01T01:00:00Z</require_login_by>
      <active_2fa type="boolean">true</active_2fa>
      <require_password_change type="boolean">true</require_password_change>
      <password_expired type="boolean">true</password_expired>
      <restapi_permission type="boolean">true</restapi_permission>
      <self_managed type="boolean">true</self_managed>
      <sftp_permission type="boolean">true</sftp_permission>
      <site_admin type="boolean">true</site_admin>
      <skip_welcome_screen type="boolean">true</skip_welcome_screen>
      <ssl_required>always_require</ssl_required>
      <sso_strategy_id type="integer">1</sso_strategy_id>
      <subscribe_to_newsletter type="boolean">true</subscribe_to_newsletter>
      <externally_managed type="boolean">true</externally_managed>
      <time_zone>Pacific Time (US &amp; Canada)</time_zone>
      <type_of_2fa>yubi</type_of_2fa>
      <user_root>example</user_root>
      <days_remaining_until_password_expire type="integer">1</days_remaining_until_password_expire>
      <password_expire_at>2000-01-01T01:00:00Z</password_expire_at>
    </user>
    
    
    Attribute Description
    id int64 User ID
    username string User's username
    admin_group_ids array List of group IDs of which this user is an administrator
    allowed_ips string A list of allowed IPs if applicable. Newline delimited
    attachments_permission boolean DEPRECATED: Can the user create Bundles (aka Share Links)? Use the bundle permission instead.
    api_keys_count int64 Number of api keys associated with this user
    authenticate_until date-time Scheduled Date/Time at which user will be deactivated
    authentication_method string How is this user authenticated?
    Possible values: password, sso, none, email_signup, password_with_imported_hash
    avatar_url string URL holding the user's avatar
    billing_permission boolean Allow this user to perform operations on the account, payments, and invoices?
    bypass_site_allowed_ips boolean Allow this user to skip site-wide IP blacklists?
    bypass_inactive_disable boolean Exempt this user from being disabled based on inactivity?
    created_at date-time When this user was created
    dav_permission boolean Can the user connect with WebDAV?
    disabled boolean Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting.
    email email User email address
    first_login_at date-time User's first login time
    ftp_permission boolean Can the user access with FTP/FTPS?
    group_ids string Comma-separated list of group IDs of which this user is a member
    header_text string Text to display to the user in the header of the UI
    language string Preferred language
    last_login_at date-time User's most recent login time via any protocol
    last_web_login_at date-time User's most recent login time via web
    last_ftp_login_at date-time User's most recent login time via FTP
    last_sftp_login_at date-time User's most recent login time via SFTP
    last_dav_login_at date-time User's most recent login time via WebDAV
    last_desktop_login_at date-time User's most recent login time via Desktop app
    last_restapi_login_at date-time User's most recent login time via Rest API
    last_api_use_at date-time User's most recent API use time
    last_active_at date-time User's most recent activity time, which is the latest of most recent login, most recent API use, enablement, or creation
    last_protocol_cipher string The most recent protocol and cipher used
    lockout_expires date-time Time in the future that the user will no longer be locked out if applicable
    name string User's full name
    company string User's company
    notes string Any internal notes on the user
    notification_daily_send_time int64 Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
    office_integration_enabled boolean Enable integration with Office for the web?
    password_set_at date-time Last time the user's password was set
    password_validity_days int64 Number of days to allow user to use the same password
    public_keys_count int64 Number of public keys associated with this user
    receive_admin_alerts boolean Should the user receive admin alerts such a certificate expiration notifications and overages?
    require_2fa string 2FA required setting
    Possible values: use_system_setting, always_require, never_require
    require_login_by date-time Require user to login by specified date otherwise it will be disabled.
    active_2fa boolean Is 2fa active for the user?
    require_password_change boolean Is a password change required upon next user login?
    password_expired boolean Is user's password expired?
    restapi_permission boolean Can this user access the Web app, Desktop app, SDKs, or REST API? (All of these tools use the API internally, so this is one unified permission set.)
    self_managed boolean Does this user manage it's own credentials or is it a shared/bot user?
    sftp_permission boolean Can the user access with SFTP?
    site_admin boolean Is the user an administrator for this site?
    skip_welcome_screen boolean Skip Welcome page in the UI?
    ssl_required string SSL required setting
    Possible values: use_system_setting, always_require, never_require
    sso_strategy_id int64 SSO (Single Sign On) strategy ID for the user, if applicable.
    subscribe_to_newsletter boolean Is the user subscribed to the newsletter?
    externally_managed boolean Is this user managed by a SsoStrategy?
    time_zone string User time zone
    type_of_2fa string Type(s) of 2FA methods in use. Will be either sms, totp, u2f, yubi, or multiple values sorted alphabetically and joined by an underscore.
    user_root string Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set.) Note that this is not used for API, Desktop, or Web interface.
    days_remaining_until_password_expire int64 Number of days remaining until password expires
    password_expire_at date-time Password expiration datetime
    avatar_file file An image file for your user avatar.
    avatar_delete boolean If true, the avatar will be deleted.
    change_password string Used for changing a password on an existing user.
    change_password_confirmation string Optional, but if provided, we will ensure that it matches the value sent in change_password.
    grant_permission string Permission to grant on the user root. Can be blank or full, read, write, list, read+write, or list+write
    group_id int64 Group ID to associate this user with.
    imported_password_hash string Pre-calculated hash of the user's password. If supplied, this will be used to authenticate the user on first login. Supported hash menthods are MD5, SHA1, and SHA256.
    password string User password.
    password_confirmation string Optional, but if provided, we will ensure that it matches the value sent in password.
    announcements_read boolean Signifies that the user has read all the announcements in the UI.

    List Users

    Example Request

    curl "https://app.files.com/api/rest/v1/users.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/users.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::User.list(
      per_page: 1
    )
    
    \Files\Model\User::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    User.list(parameters).all()
    
    await User.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await User.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.user.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    user.List(context.Background(), files_sdk.UserListParams{
      Cursor: "",
      PerPage: 1,
      SortBy: "",
      Filter: "",
      FilterGt: "",
      FilterGteq: "",
      FilterPrefix: "",
      FilterLt: "",
      FilterLteq: "",
      Ids: "",
      Search: "",
    })
    
    
    files-cli users list \
      --cursor="" \
      --per-page=1 \
      --ids="" \
      --search="" \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "username": "user",
        "admin_group_ids": [
          1
        ],
        "allowed_ips": "127.0.0.1",
        "attachments_permission": true,
        "api_keys_count": 1,
        "authenticate_until": "2000-01-01T01:00:00Z",
        "authentication_method": "password",
        "avatar_url": "example",
        "billing_permission": true,
        "bypass_site_allowed_ips": true,
        "bypass_inactive_disable": true,
        "created_at": "2000-01-01T01:00:00Z",
        "dav_permission": true,
        "disabled": true,
        "email": "example",
        "first_login_at": "2000-01-01T01:00:00Z",
        "ftp_permission": true,
        "group_ids": "example",
        "header_text": "User-specific message.",
        "language": "en",
        "last_login_at": "2000-01-01T01:00:00Z",
        "last_web_login_at": "2000-01-01T01:00:00Z",
        "last_ftp_login_at": "2000-01-01T01:00:00Z",
        "last_sftp_login_at": "2000-01-01T01:00:00Z",
        "last_dav_login_at": "2000-01-01T01:00:00Z",
        "last_desktop_login_at": "2000-01-01T01:00:00Z",
        "last_restapi_login_at": "2000-01-01T01:00:00Z",
        "last_api_use_at": "2000-01-01T01:00:00Z",
        "last_active_at": "2000-01-01T01:00:00Z",
        "last_protocol_cipher": "example",
        "lockout_expires": "2000-01-01T01:00:00Z",
        "name": "John Doe",
        "company": "ACME Corp.",
        "notes": "Internal notes on this user.",
        "notification_daily_send_time": 18,
        "office_integration_enabled": true,
        "password_set_at": "2000-01-01T01:00:00Z",
        "password_validity_days": 1,
        "public_keys_count": 1,
        "receive_admin_alerts": true,
        "require_2fa": "always_require",
        "require_login_by": "2000-01-01T01:00:00Z",
        "active_2fa": true,
        "require_password_change": true,
        "password_expired": true,
        "restapi_permission": true,
        "self_managed": true,
        "sftp_permission": true,
        "site_admin": true,
        "skip_welcome_screen": true,
        "ssl_required": "always_require",
        "sso_strategy_id": 1,
        "subscribe_to_newsletter": true,
        "externally_managed": true,
        "time_zone": "Pacific Time (US & Canada)",
        "type_of_2fa": "yubi",
        "user_root": "example",
        "days_remaining_until_password_expire": 1,
        "password_expire_at": "2000-01-01T01:00:00Z"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <users type="array">
      <user>
        <id type="integer">1</id>
        <username>user</username>
        <admin_group_ids type="array">
          <admin_group_id type="integer">1</admin_group_id>
        </admin_group_ids>
        <allowed_ips>127.0.0.1</allowed_ips>
        <attachments_permission type="boolean">true</attachments_permission>
        <api_keys_count type="integer">1</api_keys_count>
        <authenticate_until>2000-01-01T01:00:00Z</authenticate_until>
        <authentication_method>password</authentication_method>
        <avatar_url>example</avatar_url>
        <billing_permission type="boolean">true</billing_permission>
        <bypass_site_allowed_ips type="boolean">true</bypass_site_allowed_ips>
        <bypass_inactive_disable type="boolean">true</bypass_inactive_disable>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <dav_permission type="boolean">true</dav_permission>
        <disabled type="boolean">true</disabled>
        <email>example</email>
        <first_login_at>2000-01-01T01:00:00Z</first_login_at>
        <ftp_permission type="boolean">true</ftp_permission>
        <group_ids>example</group_ids>
        <header_text>User-specific message.</header_text>
        <language>en</language>
        <last_login_at>2000-01-01T01:00:00Z</last_login_at>
        <last_web_login_at>2000-01-01T01:00:00Z</last_web_login_at>
        <last_ftp_login_at>2000-01-01T01:00:00Z</last_ftp_login_at>
        <last_sftp_login_at>2000-01-01T01:00:00Z</last_sftp_login_at>
        <last_dav_login_at>2000-01-01T01:00:00Z</last_dav_login_at>
        <last_desktop_login_at>2000-01-01T01:00:00Z</last_desktop_login_at>
        <last_restapi_login_at>2000-01-01T01:00:00Z</last_restapi_login_at>
        <last_api_use_at>2000-01-01T01:00:00Z</last_api_use_at>
        <last_active_at>2000-01-01T01:00:00Z</last_active_at>
        <last_protocol_cipher>example</last_protocol_cipher>
        <lockout_expires>2000-01-01T01:00:00Z</lockout_expires>
        <name>John Doe</name>
        <company>ACME Corp.</company>
        <notes>Internal notes on this user.</notes>
        <notification_daily_send_time type="integer">18</notification_daily_send_time>
        <office_integration_enabled type="boolean">true</office_integration_enabled>
        <password_set_at>2000-01-01T01:00:00Z</password_set_at>
        <password_validity_days type="integer">1</password_validity_days>
        <public_keys_count type="integer">1</public_keys_count>
        <receive_admin_alerts type="boolean">true</receive_admin_alerts>
        <require_2fa>always_require</require_2fa>
        <require_login_by>2000-01-01T01:00:00Z</require_login_by>
        <active_2fa type="boolean">true</active_2fa>
        <require_password_change type="boolean">true</require_password_change>
        <password_expired type="boolean">true</password_expired>
        <restapi_permission type="boolean">true</restapi_permission>
        <self_managed type="boolean">true</self_managed>
        <sftp_permission type="boolean">true</sftp_permission>
        <site_admin type="boolean">true</site_admin>
        <skip_welcome_screen type="boolean">true</skip_welcome_screen>
        <ssl_required>always_require</ssl_required>
        <sso_strategy_id type="integer">1</sso_strategy_id>
        <subscribe_to_newsletter type="boolean">true</subscribe_to_newsletter>
        <externally_managed type="boolean">true</externally_managed>
        <time_zone>Pacific Time (US &amp; Canada)</time_zone>
        <type_of_2fa>yubi</type_of_2fa>
        <user_root>example</user_root>
        <days_remaining_until_password_expire type="integer">1</days_remaining_until_password_expire>
        <password_expire_at>2000-01-01T01:00:00Z</password_expire_at>
      </user>
    </users>
    
    

    HTTPS Request

    GET /users

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    ids string comma-separated list of User IDs
    search string Searches for partial matches of name, username, or email.

    Pagination Params

    Read more about Paginating List Requests.

    Available Fields for Sorting

    Read more about Sorting List Requests
    Parameter Description
    sort_by object If set, sort records by the specified field in either asc or desc direction (e.g. sort_by[authenticate_until]=desc). Valid fields are authenticate_until, email, last_desktop_login_at, last_login_at, username, company, name, site_admin, receive_admin_alerts, password_validity_days, ssl_required or not_site_admin.

    Available Filters

    Read more about Filtering List Requests
    Parameter Description
    filter object If set, return records where the specified field is equal to the supplied value. Valid fields are username, email, company, site_admin, password_validity_days, ssl_required, last_login_at, authenticate_until or not_site_admin. Valid field combinations are [ not_site_admin, username ].
    filter_gt object If set, return records where the specified field is greater than the supplied value. Valid fields are password_validity_days, last_login_at or authenticate_until.
    filter_gteq object If set, return records where the specified field is greater than or equal the supplied value. Valid fields are password_validity_days, last_login_at or authenticate_until.
    filter_prefix object If set, return records where the specified field is prefixed by the supplied value. Valid fields are username, email or company.
    filter_lt object If set, return records where the specified field is less than the supplied value. Valid fields are password_validity_days, last_login_at or authenticate_until.
    filter_lteq object If set, return records where the specified field is less than or equal the supplied value. Valid fields are password_validity_days, last_login_at or authenticate_until.

    Show User

    Example Request

    curl https://app.files.com/api/rest/v1/users/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/users/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::User.find(id)
    
    \Files\Model\User::find($id);
    
    
    User.find(, parameters
    
    await User.find(id)
    
    
    await User.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.user.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    user.Find(context.Background(), files_sdk.UserFindParams{
      Id: 1,
    })
    
    
    files-cli users find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "username": "user",
      "admin_group_ids": [
        1
      ],
      "allowed_ips": "127.0.0.1",
      "attachments_permission": true,
      "api_keys_count": 1,
      "authenticate_until": "2000-01-01T01:00:00Z",
      "authentication_method": "password",
      "avatar_url": "example",
      "billing_permission": true,
      "bypass_site_allowed_ips": true,
      "bypass_inactive_disable": true,
      "created_at": "2000-01-01T01:00:00Z",
      "dav_permission": true,
      "disabled": true,
      "email": "example",
      "first_login_at": "2000-01-01T01:00:00Z",
      "ftp_permission": true,
      "group_ids": "example",
      "header_text": "User-specific message.",
      "language": "en",
      "last_login_at": "2000-01-01T01:00:00Z",
      "last_web_login_at": "2000-01-01T01:00:00Z",
      "last_ftp_login_at": "2000-01-01T01:00:00Z",
      "last_sftp_login_at": "2000-01-01T01:00:00Z",
      "last_dav_login_at": "2000-01-01T01:00:00Z",
      "last_desktop_login_at": "2000-01-01T01:00:00Z",
      "last_restapi_login_at": "2000-01-01T01:00:00Z",
      "last_api_use_at": "2000-01-01T01:00:00Z",
      "last_active_at": "2000-01-01T01:00:00Z",
      "last_protocol_cipher": "example",
      "lockout_expires": "2000-01-01T01:00:00Z",
      "name": "John Doe",
      "company": "ACME Corp.",
      "notes": "Internal notes on this user.",
      "notification_daily_send_time": 18,
      "office_integration_enabled": true,
      "password_set_at": "2000-01-01T01:00:00Z",
      "password_validity_days": 1,
      "public_keys_count": 1,
      "receive_admin_alerts": true,
      "require_2fa": "always_require",
      "require_login_by": "2000-01-01T01:00:00Z",
      "active_2fa": true,
      "require_password_change": true,
      "password_expired": true,
      "restapi_permission": true,
      "self_managed": true,
      "sftp_permission": true,
      "site_admin": true,
      "skip_welcome_screen": true,
      "ssl_required": "always_require",
      "sso_strategy_id": 1,
      "subscribe_to_newsletter": true,
      "externally_managed": true,
      "time_zone": "Pacific Time (US & Canada)",
      "type_of_2fa": "yubi",
      "user_root": "example",
      "days_remaining_until_password_expire": 1,
      "password_expire_at": "2000-01-01T01:00:00Z"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <user>
      <id type="integer">1</id>
      <username>user</username>
      <admin_group_ids type="array">
        <admin_group_id type="integer">1</admin_group_id>
      </admin_group_ids>
      <allowed_ips>127.0.0.1</allowed_ips>
      <attachments_permission type="boolean">true</attachments_permission>
      <api_keys_count type="integer">1</api_keys_count>
      <authenticate_until>2000-01-01T01:00:00Z</authenticate_until>
      <authentication_method>password</authentication_method>
      <avatar_url>example</avatar_url>
      <billing_permission type="boolean">true</billing_permission>
      <bypass_site_allowed_ips type="boolean">true</bypass_site_allowed_ips>
      <bypass_inactive_disable type="boolean">true</bypass_inactive_disable>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <dav_permission type="boolean">true</dav_permission>
      <disabled type="boolean">true</disabled>
      <email>example</email>
      <first_login_at>2000-01-01T01:00:00Z</first_login_at>
      <ftp_permission type="boolean">true</ftp_permission>
      <group_ids>example</group_ids>
      <header_text>User-specific message.</header_text>
      <language>en</language>
      <last_login_at>2000-01-01T01:00:00Z</last_login_at>
      <last_web_login_at>2000-01-01T01:00:00Z</last_web_login_at>
      <last_ftp_login_at>2000-01-01T01:00:00Z</last_ftp_login_at>
      <last_sftp_login_at>2000-01-01T01:00:00Z</last_sftp_login_at>
      <last_dav_login_at>2000-01-01T01:00:00Z</last_dav_login_at>
      <last_desktop_login_at>2000-01-01T01:00:00Z</last_desktop_login_at>
      <last_restapi_login_at>2000-01-01T01:00:00Z</last_restapi_login_at>
      <last_api_use_at>2000-01-01T01:00:00Z</last_api_use_at>
      <last_active_at>2000-01-01T01:00:00Z</last_active_at>
      <last_protocol_cipher>example</last_protocol_cipher>
      <lockout_expires>2000-01-01T01:00:00Z</lockout_expires>
      <name>John Doe</name>
      <company>ACME Corp.</company>
      <notes>Internal notes on this user.</notes>
      <notification_daily_send_time type="integer">18</notification_daily_send_time>
      <office_integration_enabled type="boolean">true</office_integration_enabled>
      <password_set_at>2000-01-01T01:00:00Z</password_set_at>
      <password_validity_days type="integer">1</password_validity_days>
      <public_keys_count type="integer">1</public_keys_count>
      <receive_admin_alerts type="boolean">true</receive_admin_alerts>
      <require_2fa>always_require</require_2fa>
      <require_login_by>2000-01-01T01:00:00Z</require_login_by>
      <active_2fa type="boolean">true</active_2fa>
      <require_password_change type="boolean">true</require_password_change>
      <password_expired type="boolean">true</password_expired>
      <restapi_permission type="boolean">true</restapi_permission>
      <self_managed type="boolean">true</self_managed>
      <sftp_permission type="boolean">true</sftp_permission>
      <site_admin type="boolean">true</site_admin>
      <skip_welcome_screen type="boolean">true</skip_welcome_screen>
      <ssl_required>always_require</ssl_required>
      <sso_strategy_id type="integer">1</sso_strategy_id>
      <subscribe_to_newsletter type="boolean">true</subscribe_to_newsletter>
      <externally_managed type="boolean">true</externally_managed>
      <time_zone>Pacific Time (US &amp; Canada)</time_zone>
      <type_of_2fa>yubi</type_of_2fa>
      <user_root>example</user_root>
      <days_remaining_until_password_expire type="integer">1</days_remaining_until_password_expire>
      <password_expire_at>2000-01-01T01:00:00Z</password_expire_at>
    </user>
    
    

    HTTPS Request

    GET /users/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required User ID.

    Create User

    Example Request

    curl https://app.files.com/api/rest/v1/users.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"avatar_delete":true,"email":"example","group_id":1,"group_ids":"example","announcements_read":true,"allowed_ips":"127.0.0.1","attachments_permission":true,"authenticate_until":"2000-01-01T01:00:00Z","authentication_method":"password","billing_permission":true,"bypass_inactive_disable":true,"bypass_site_allowed_ips":true,"dav_permission":true,"disabled":true,"ftp_permission":true,"header_text":"User-specific message.","language":"en","notification_daily_send_time":18,"name":"John Doe","company":"ACME Corp.","notes":"Internal notes on this user.","office_integration_enabled":true,"password_validity_days":1,"receive_admin_alerts":true,"require_login_by":"2000-01-01T01:00:00Z","require_password_change":true,"restapi_permission":true,"self_managed":true,"sftp_permission":true,"site_admin":true,"skip_welcome_screen":true,"ssl_required":"always_require","sso_strategy_id":1,"subscribe_to_newsletter":true,"require_2fa":"always_require","time_zone":"Pacific Time (US & Canada)","user_root":"example","username":"user"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/users.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<user>
           <avatar_delete type="boolean">true</avatar_delete>
           <email>example</email>
           <group_id type="integer">1</group_id>
           <group_ids>example</group_ids>
           <announcements_read type="boolean">true</announcements_read>
           <allowed_ips>127.0.0.1</allowed_ips>
           <attachments_permission type="boolean">true</attachments_permission>
           <authenticate_until>2000-01-01T01:00:00Z</authenticate_until>
           <authentication_method>password</authentication_method>
           <billing_permission type="boolean">true</billing_permission>
           <bypass_inactive_disable type="boolean">true</bypass_inactive_disable>
           <bypass_site_allowed_ips type="boolean">true</bypass_site_allowed_ips>
           <dav_permission type="boolean">true</dav_permission>
           <disabled type="boolean">true</disabled>
           <ftp_permission type="boolean">true</ftp_permission>
           <header_text>User-specific message.</header_text>
           <language>en</language>
           <notification_daily_send_time type="integer">18</notification_daily_send_time>
           <name>John Doe</name>
           <company>ACME Corp.</company>
           <notes>Internal notes on this user.</notes>
           <office_integration_enabled type="boolean">true</office_integration_enabled>
           <password_validity_days type="integer">1</password_validity_days>
           <receive_admin_alerts type="boolean">true</receive_admin_alerts>
           <require_login_by>2000-01-01T01:00:00Z</require_login_by>
           <require_password_change type="boolean">true</require_password_change>
           <restapi_permission type="boolean">true</restapi_permission>
           <self_managed type="boolean">true</self_managed>
           <sftp_permission type="boolean">true</sftp_permission>
           <site_admin type="boolean">true</site_admin>
           <skip_welcome_screen type="boolean">true</skip_welcome_screen>
           <ssl_required>always_require</ssl_required>
           <sso_strategy_id type="integer">1</sso_strategy_id>
           <subscribe_to_newsletter type="boolean">true</subscribe_to_newsletter>
           <require_2fa>always_require</require_2fa>
           <time_zone>Pacific Time (US &amp; Canada)</time_zone>
           <user_root>example</user_root>
           <username>user</username>
         </user>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::User.create(
      avatar_delete: true, 
      email: "example", 
      group_id: 1, 
      group_ids: "example", 
      announcements_read: true, 
      allowed_ips: "127.0.0.1", 
      attachments_permission: true, 
      authenticate_until: "2000-01-01T01:00:00Z", 
      authentication_method: "password", 
      billing_permission: true, 
      bypass_inactive_disable: true, 
      bypass_site_allowed_ips: true, 
      dav_permission: true, 
      disabled: true, 
      ftp_permission: true, 
      header_text: "User-specific message.", 
      language: "en", 
      notification_daily_send_time: 18, 
      name: "John Doe", 
      company: "ACME Corp.", 
      notes: "Internal notes on this user.", 
      office_integration_enabled: true, 
      password_validity_days: 1, 
      receive_admin_alerts: true, 
      require_login_by: "2000-01-01T01:00:00Z", 
      require_password_change: true, 
      restapi_permission: true, 
      self_managed: true, 
      sftp_permission: true, 
      site_admin: true, 
      skip_welcome_screen: true, 
      ssl_required: "always_require", 
      sso_strategy_id: 1, 
      subscribe_to_newsletter: true, 
      require_2fa: "always_require", 
      time_zone: "Pacific Time (US & Canada)", 
      user_root: "example", 
      username: "user"
    )
    
    \Files\Model\User::create(array(
      'avatar_delete' => true, 
      'email' => "example", 
      'group_id' => 1, 
      'group_ids' => "example", 
      'announcements_read' => true, 
      'allowed_ips' => "127.0.0.1", 
      'attachments_permission' => true, 
      'authenticate_until' => "2000-01-01T01:00:00Z", 
      'authentication_method' => "password", 
      'billing_permission' => true, 
      'bypass_inactive_disable' => true, 
      'bypass_site_allowed_ips' => true, 
      'dav_permission' => true, 
      'disabled' => true, 
      'ftp_permission' => true, 
      'header_text' => "User-specific message.", 
      'language' => "en", 
      'notification_daily_send_time' => 18, 
      'name' => "John Doe", 
      'company' => "ACME Corp.", 
      'notes' => "Internal notes on this user.", 
      'office_integration_enabled' => true, 
      'password_validity_days' => 1, 
      'receive_admin_alerts' => true, 
      'require_login_by' => "2000-01-01T01:00:00Z", 
      'require_password_change' => true, 
      'restapi_permission' => true, 
      'self_managed' => true, 
      'sftp_permission' => true, 
      'site_admin' => true, 
      'skip_welcome_screen' => true, 
      'ssl_required' => "always_require", 
      'sso_strategy_id' => 1, 
      'subscribe_to_newsletter' => true, 
      'require_2fa' => "always_require", 
      'time_zone' => "Pacific Time (US & Canada)", 
      'user_root' => "example", 
      'username' => "user"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("avatar_delete", true);
    requestParams.put("email", example);
    requestParams.put("group_id", 1);
    requestParams.put("group_ids", example);
    requestParams.put("announcements_read", true);
    requestParams.put("allowed_ips", 127.0.0.1);
    requestParams.put("attachments_permission", true);
    requestParams.put("authenticate_until", 2000-01-01T01:00:00Z);
    requestParams.put("authentication_method", password);
    requestParams.put("billing_permission", true);
    requestParams.put("bypass_inactive_disable", true);
    requestParams.put("bypass_site_allowed_ips", true);
    requestParams.put("dav_permission", true);
    requestParams.put("disabled", true);
    requestParams.put("ftp_permission", true);
    requestParams.put("header_text", User-specific message.);
    requestParams.put("language", en);
    requestParams.put("notification_daily_send_time", 18);
    requestParams.put("name", John Doe);
    requestParams.put("company", ACME Corp.);
    requestParams.put("notes", Internal notes on this user.);
    requestParams.put("office_integration_enabled", true);
    requestParams.put("password_validity_days", 1);
    requestParams.put("receive_admin_alerts", true);
    requestParams.put("require_login_by", 2000-01-01T01:00:00Z);
    requestParams.put("require_password_change", true);
    requestParams.put("restapi_permission", true);
    requestParams.put("self_managed", true);
    requestParams.put("sftp_permission", true);
    requestParams.put("site_admin", true);
    requestParams.put("skip_welcome_screen", true);
    requestParams.put("ssl_required", always_require);
    requestParams.put("sso_strategy_id", 1);
    requestParams.put("subscribe_to_newsletter", true);
    requestParams.put("require_2fa", always_require);
    requestParams.put("time_zone", Pacific Time (US & Canada));
    requestParams.put("user_root", example);
    requestParams.put("username", user);
    User.create(parameters)
    
    await User.create({
      avatar_delete: true, 
      email: "example", 
      group_id: 1, 
      group_ids: "example", 
      announcements_read: true, 
      allowed_ips: "127.0.0.1", 
      attachments_permission: true, 
      authenticate_until: "2000-01-01T01:00:00Z", 
      authentication_method: "password", 
      billing_permission: true, 
      bypass_inactive_disable: true, 
      bypass_site_allowed_ips: true, 
      dav_permission: true, 
      disabled: true, 
      ftp_permission: true, 
      header_text: "User-specific message.", 
      language: "en", 
      notification_daily_send_time: 18, 
      name: "John Doe", 
      company: "ACME Corp.", 
      notes: "Internal notes on this user.", 
      office_integration_enabled: true, 
      password_validity_days: 1, 
      receive_admin_alerts: true, 
      require_login_by: "2000-01-01T01:00:00Z", 
      require_password_change: true, 
      restapi_permission: true, 
      self_managed: true, 
      sftp_permission: true, 
      site_admin: true, 
      skip_welcome_screen: true, 
      ssl_required: "always_require", 
      sso_strategy_id: 1, 
      subscribe_to_newsletter: true, 
      require_2fa: "always_require", 
      time_zone: "Pacific Time (US & Canada)", 
      user_root: "example", 
      username: "user",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("avatar_delete", true);
    parameters.Add("email", "example");
    parameters.Add("group_id", (Int64?) 1);
    parameters.Add("group_ids", "example");
    parameters.Add("announcements_read", true);
    parameters.Add("allowed_ips", "127.0.0.1");
    parameters.Add("attachments_permission", true);
    parameters.Add("authenticate_until", "2000-01-01T01:00:00Z");
    parameters.Add("authentication_method", "password");
    parameters.Add("billing_permission", true);
    parameters.Add("bypass_inactive_disable", true);
    parameters.Add("bypass_site_allowed_ips", true);
    parameters.Add("dav_permission", true);
    parameters.Add("disabled", true);
    parameters.Add("ftp_permission", true);
    parameters.Add("header_text", "User-specific message.");
    parameters.Add("language", "en");
    parameters.Add("notification_daily_send_time", (Int64?) 18);
    parameters.Add("name", "John Doe");
    parameters.Add("company", "ACME Corp.");
    parameters.Add("notes", "Internal notes on this user.");
    parameters.Add("office_integration_enabled", true);
    parameters.Add("password_validity_days", (Int64?) 1);
    parameters.Add("receive_admin_alerts", true);
    parameters.Add("require_login_by", "2000-01-01T01:00:00Z");
    parameters.Add("require_password_change", true);
    parameters.Add("restapi_permission", true);
    parameters.Add("self_managed", true);
    parameters.Add("sftp_permission", true);
    parameters.Add("site_admin", true);
    parameters.Add("skip_welcome_screen", true);
    parameters.Add("ssl_required", "always_require");
    parameters.Add("sso_strategy_id", (Int64?) 1);
    parameters.Add("subscribe_to_newsletter", true);
    parameters.Add("require_2fa", "always_require");
    parameters.Add("time_zone", "Pacific Time (US & Canada)");
    parameters.Add("user_root", "example");
    parameters.Add("username", "user");
    
    await User.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.user.create({
      "avatar_delete": True,
      "email": "example",
      "group_id": 1,
      "group_ids": "example",
      "announcements_read": True,
      "allowed_ips": "127.0.0.1",
      "attachments_permission": True,
      "authenticate_until": "2000-01-01T01:00:00Z",
      "authentication_method": "password",
      "billing_permission": True,
      "bypass_inactive_disable": True,
      "bypass_site_allowed_ips": True,
      "dav_permission": True,
      "disabled": True,
      "ftp_permission": True,
      "header_text": "User-specific message.",
      "language": "en",
      "notification_daily_send_time": 18,
      "name": "John Doe",
      "company": "ACME Corp.",
      "notes": "Internal notes on this user.",
      "office_integration_enabled": True,
      "password_validity_days": 1,
      "receive_admin_alerts": True,
      "require_login_by": "2000-01-01T01:00:00Z",
      "require_password_change": True,
      "restapi_permission": True,
      "self_managed": True,
      "sftp_permission": True,
      "site_admin": True,
      "skip_welcome_screen": True,
      "ssl_required": "always_require",
      "sso_strategy_id": 1,
      "subscribe_to_newsletter": True,
      "require_2fa": "always_require",
      "time_zone": "Pacific Time (US & Canada)",
      "user_root": "example",
      "username": "user"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    user.Create(context.Background(), files_sdk.UserCreateParams{
      AvatarFile: "",
      AvatarDelete: lib.Bool(true),
      ChangePassword: "",
      ChangePasswordConfirmation: "",
      Email: "example",
      GrantPermission: "",
      GroupId: 1,
      GroupIds: "example",
      ImportedPasswordHash: "",
      Password: "",
      PasswordConfirmation: "",
      AnnouncementsRead: lib.Bool(true),
      AllowedIps: "127.0.0.1",
      AttachmentsPermission: lib.Bool(true),
      AuthenticateUntil: "2000-01-01T01:00:00Z",
      AuthenticationMethod: "password",
      BillingPermission: lib.Bool(true),
      BypassInactiveDisable: lib.Bool(true),
      BypassSiteAllowedIps: lib.Bool(true),
      DavPermission: lib.Bool(true),
      Disabled: lib.Bool(true),
      FtpPermission: lib.Bool(true),
      HeaderText: "User-specific message.",
      Language: "en",
      NotificationDailySendTime: 18,
      Name: "John Doe",
      Company: "ACME Corp.",
      Notes: "Internal notes on this user.",
      OfficeIntegrationEnabled: lib.Bool(true),
      PasswordValidityDays: 1,
      ReceiveAdminAlerts: lib.Bool(true),
      RequireLoginBy: "2000-01-01T01:00:00Z",
      RequirePasswordChange: lib.Bool(true),
      RestapiPermission: lib.Bool(true),
      SelfManaged: lib.Bool(true),
      SftpPermission: lib.Bool(true),
      SiteAdmin: lib.Bool(true),
      SkipWelcomeScreen: lib.Bool(true),
      SslRequired: "always_require",
      SsoStrategyId: 1,
      SubscribeToNewsletter: lib.Bool(true),
      Require2fa: "always_require",
      TimeZone: "Pacific Time (US & Canada)",
      UserRoot: "example",
      Username: "user",
    })
    
    
    files-cli users create \
      --change-password="" \
      --change-password-confirmation="" \
      --email="example" \
      --grant-permission="" \
      --group-id=1 \
      --group-ids="example" \
      --imported-password-hash="" \
      --password="" \
      --password-confirmation="" \
      --allowed-ips="127.0.0.1" \
      --authenticate-until="2000-01-01T01:00:00Z" \
      --authentication-method="password" \
      --header-text="User-specific message." \
      --language="en" \
      --notification-daily-send-time=18 \
      --name="John Doe" \
      --company="ACME Corp." \
      --notes="Internal notes on this user." \
      --password-validity-days=1 \
      --require-login-by="2000-01-01T01:00:00Z" \
      --ssl-required="always_require" \
      --sso-strategy-id=1 \
      --require-2fa="always_require" \
      --time-zone="Pacific Time (US & Canada)" \
      --user-root="example" \
      --username="user" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "username": "user",
      "admin_group_ids": [
        1
      ],
      "allowed_ips": "127.0.0.1",
      "attachments_permission": true,
      "api_keys_count": 1,
      "authenticate_until": "2000-01-01T01:00:00Z",
      "authentication_method": "password",
      "avatar_url": "example",
      "billing_permission": true,
      "bypass_site_allowed_ips": true,
      "bypass_inactive_disable": true,
      "created_at": "2000-01-01T01:00:00Z",
      "dav_permission": true,
      "disabled": true,
      "email": "example",
      "first_login_at": "2000-01-01T01:00:00Z",
      "ftp_permission": true,
      "group_ids": "example",
      "header_text": "User-specific message.",
      "language": "en",
      "last_login_at": "2000-01-01T01:00:00Z",
      "last_web_login_at": "2000-01-01T01:00:00Z",
      "last_ftp_login_at": "2000-01-01T01:00:00Z",
      "last_sftp_login_at": "2000-01-01T01:00:00Z",
      "last_dav_login_at": "2000-01-01T01:00:00Z",
      "last_desktop_login_at": "2000-01-01T01:00:00Z",
      "last_restapi_login_at": "2000-01-01T01:00:00Z",
      "last_api_use_at": "2000-01-01T01:00:00Z",
      "last_active_at": "2000-01-01T01:00:00Z",
      "last_protocol_cipher": "example",
      "lockout_expires": "2000-01-01T01:00:00Z",
      "name": "John Doe",
      "company": "ACME Corp.",
      "notes": "Internal notes on this user.",
      "notification_daily_send_time": 18,
      "office_integration_enabled": true,
      "password_set_at": "2000-01-01T01:00:00Z",
      "password_validity_days": 1,
      "public_keys_count": 1,
      "receive_admin_alerts": true,
      "require_2fa": "always_require",
      "require_login_by": "2000-01-01T01:00:00Z",
      "active_2fa": true,
      "require_password_change": true,
      "password_expired": true,
      "restapi_permission": true,
      "self_managed": true,
      "sftp_permission": true,
      "site_admin": true,
      "skip_welcome_screen": true,
      "ssl_required": "always_require",
      "sso_strategy_id": 1,
      "subscribe_to_newsletter": true,
      "externally_managed": true,
      "time_zone": "Pacific Time (US & Canada)",
      "type_of_2fa": "yubi",
      "user_root": "example",
      "days_remaining_until_password_expire": 1,
      "password_expire_at": "2000-01-01T01:00:00Z"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <user>
      <id type="integer">1</id>
      <username>user</username>
      <admin_group_ids type="array">
        <admin_group_id type="integer">1</admin_group_id>
      </admin_group_ids>
      <allowed_ips>127.0.0.1</allowed_ips>
      <attachments_permission type="boolean">true</attachments_permission>
      <api_keys_count type="integer">1</api_keys_count>
      <authenticate_until>2000-01-01T01:00:00Z</authenticate_until>
      <authentication_method>password</authentication_method>
      <avatar_url>example</avatar_url>
      <billing_permission type="boolean">true</billing_permission>
      <bypass_site_allowed_ips type="boolean">true</bypass_site_allowed_ips>
      <bypass_inactive_disable type="boolean">true</bypass_inactive_disable>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <dav_permission type="boolean">true</dav_permission>
      <disabled type="boolean">true</disabled>
      <email>example</email>
      <first_login_at>2000-01-01T01:00:00Z</first_login_at>
      <ftp_permission type="boolean">true</ftp_permission>
      <group_ids>example</group_ids>
      <header_text>User-specific message.</header_text>
      <language>en</language>
      <last_login_at>2000-01-01T01:00:00Z</last_login_at>
      <last_web_login_at>2000-01-01T01:00:00Z</last_web_login_at>
      <last_ftp_login_at>2000-01-01T01:00:00Z</last_ftp_login_at>
      <last_sftp_login_at>2000-01-01T01:00:00Z</last_sftp_login_at>
      <last_dav_login_at>2000-01-01T01:00:00Z</last_dav_login_at>
      <last_desktop_login_at>2000-01-01T01:00:00Z</last_desktop_login_at>
      <last_restapi_login_at>2000-01-01T01:00:00Z</last_restapi_login_at>
      <last_api_use_at>2000-01-01T01:00:00Z</last_api_use_at>
      <last_active_at>2000-01-01T01:00:00Z</last_active_at>
      <last_protocol_cipher>example</last_protocol_cipher>
      <lockout_expires>2000-01-01T01:00:00Z</lockout_expires>
      <name>John Doe</name>
      <company>ACME Corp.</company>
      <notes>Internal notes on this user.</notes>
      <notification_daily_send_time type="integer">18</notification_daily_send_time>
      <office_integration_enabled type="boolean">true</office_integration_enabled>
      <password_set_at>2000-01-01T01:00:00Z</password_set_at>
      <password_validity_days type="integer">1</password_validity_days>
      <public_keys_count type="integer">1</public_keys_count>
      <receive_admin_alerts type="boolean">true</receive_admin_alerts>
      <require_2fa>always_require</require_2fa>
      <require_login_by>2000-01-01T01:00:00Z</require_login_by>
      <active_2fa type="boolean">true</active_2fa>
      <require_password_change type="boolean">true</require_password_change>
      <password_expired type="boolean">true</password_expired>
      <restapi_permission type="boolean">true</restapi_permission>
      <self_managed type="boolean">true</self_managed>
      <sftp_permission type="boolean">true</sftp_permission>
      <site_admin type="boolean">true</site_admin>
      <skip_welcome_screen type="boolean">true</skip_welcome_screen>
      <ssl_required>always_require</ssl_required>
      <sso_strategy_id type="integer">1</sso_strategy_id>
      <subscribe_to_newsletter type="boolean">true</subscribe_to_newsletter>
      <externally_managed type="boolean">true</externally_managed>
      <time_zone>Pacific Time (US &amp; Canada)</time_zone>
      <type_of_2fa>yubi</type_of_2fa>
      <user_root>example</user_root>
      <days_remaining_until_password_expire type="integer">1</days_remaining_until_password_expire>
      <password_expire_at>2000-01-01T01:00:00Z</password_expire_at>
    </user>
    
    

    HTTPS Request

    POST /users

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    avatar_file file An image file for your user avatar. See Attaching Files to API Requests.
    avatar_delete boolean If true, the avatar will be deleted.
    change_password string Used for changing a password on an existing user.
    change_password_confirmation string Optional, but if provided, we will ensure that it matches the value sent in change_password.
    email string User's email.
    grant_permission string Permission to grant on the user root. Can be blank or full, read, write, list, read+write, or list+write
    group_id int64 Group ID to associate this user with.
    group_ids string A list of group ids to associate this user with. Comma delimited.
    imported_password_hash string Pre-calculated hash of the user's password. If supplied, this will be used to authenticate the user on first login. Supported hash menthods are MD5, SHA1, and SHA256.
    password string User password.
    password_confirmation string Optional, but if provided, we will ensure that it matches the value sent in password.
    announcements_read boolean Signifies that the user has read all the announcements in the UI.
    allowed_ips string A list of allowed IPs if applicable. Newline delimited
    attachments_permission boolean DEPRECATED: Can the user create Bundles (aka Share Links)? Use the bundle permission instead.
    authenticate_until string Scheduled Date/Time at which user will be deactivated
    authentication_method string How is this user authenticated?
    Possible values: password, sso, none, email_signup, password_with_imported_hash
    billing_permission boolean Allow this user to perform operations on the account, payments, and invoices?
    bypass_inactive_disable boolean Exempt this user from being disabled based on inactivity?
    bypass_site_allowed_ips boolean Allow this user to skip site-wide IP blacklists?
    dav_permission boolean Can the user connect with WebDAV?
    disabled boolean Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting.
    ftp_permission boolean Can the user access with FTP/FTPS?
    header_text string Text to display to the user in the header of the UI
    language string Preferred language
    notification_daily_send_time int64 Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
    name string User's full name
    company string User's company
    notes string Any internal notes on the user
    office_integration_enabled boolean Enable integration with Office for the web?
    password_validity_days int64 Number of days to allow user to use the same password
    receive_admin_alerts boolean Should the user receive admin alerts such a certificate expiration notifications and overages?
    require_login_by string Require user to login by specified date otherwise it will be disabled.
    require_password_change boolean Is a password change required upon next user login?
    restapi_permission boolean Can this user access the Web app, Desktop app, SDKs, or REST API? (All of these tools use the API internally, so this is one unified permission set.)
    self_managed boolean Does this user manage it's own credentials or is it a shared/bot user?
    sftp_permission boolean Can the user access with SFTP?
    site_admin boolean Is the user an administrator for this site?
    skip_welcome_screen boolean Skip Welcome page in the UI?
    ssl_required string SSL required setting
    Possible values: use_system_setting, always_require, never_require
    sso_strategy_id int64 SSO (Single Sign On) strategy ID for the user, if applicable.
    subscribe_to_newsletter boolean Is the user subscribed to the newsletter?
    require_2fa string 2FA required setting
    Possible values: use_system_setting, always_require, never_require
    time_zone string User time zone
    user_root string Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set.) Note that this is not used for API, Desktop, or Web interface.
    username string Required User's username

    Unlock user who has been locked out due to failed logins

    Example Request

    curl https://app.files.com/api/rest/v1/users/{id}/unlock.json \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/users/{id}/unlock.xml \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    user = Files::User.list.first
    user.unlock
    
    $user = \Files\Model\User::list()[0];
    $user->unlock();
    
    User user = User.list()[0];
    
    user.unlock();
    
    const user = (await User.list())[0]
    await user.unlock()
    
    var user = (await User.List())[0];
    
    await user.Unlock();
    
    files_sdk.set_api_key("my-key")
    
    user = files_sdk.user.find(id)
    user.unlock()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    user.Unlock(context.Background(), files_sdk.UserUnlockParams{
      Id: 1,
    })
    
    files-cli users unlock \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    POST /users/{id}/unlock

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required User ID.

    Resend user welcome email

    Example Request

    curl https://app.files.com/api/rest/v1/users/{id}/resend_welcome_email.json \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/users/{id}/resend_welcome_email.xml \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    user = Files::User.list.first
    user.resend_welcome_email
    
    $user = \Files\Model\User::list()[0];
    $user->resendWelcomeEmail();
    
    User user = User.list()[0];
    
    user.resendWelcomeEmail();
    
    const user = (await User.list())[0]
    await user.resendWelcomeEmail()
    
    var user = (await User.List())[0];
    
    await user.ResendWelcomeEmail();
    
    files_sdk.set_api_key("my-key")
    
    user = files_sdk.user.find(id)
    user.resend_welcome_email()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    user.ResendWelcomeEmail(context.Background(), files_sdk.UserResendWelcomeEmailParams{
      Id: 1,
    })
    
    files-cli users resend-welcome-email \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    POST /users/{id}/resend_welcome_email

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required User ID.

    Trigger 2FA Reset process for user who has lost access to their existing 2FA methods

    Example Request

    curl https://app.files.com/api/rest/v1/users/{id}/2fa/reset.json \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/users/{id}/2fa/reset.xml \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    user = Files::User.list.first
    user.user_2fa_reset
    
    $user = \Files\Model\User::list()[0];
    $user->user2faReset();
    
    User user = User.list()[0];
    
    user.user2faReset();
    
    const user = (await User.list())[0]
    await user.user2faReset()
    
    var user = (await User.List())[0];
    
    await user.User2faReset();
    
    files_sdk.set_api_key("my-key")
    
    user = files_sdk.user.find(id)
    user.user_2fa_reset()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    user.User2faReset(context.Background(), files_sdk.UserUser2faResetParams{
      Id: 1,
    })
    
    files-cli users user-2fa-reset \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    POST /users/{id}/2fa/reset

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    The X-Files-Reauthentication header is required for all requests to this endpoint.

    Request Parameters

    Parameter Description
    id int64 Required User ID.

    Update User

    Example Request

    curl https://app.files.com/api/rest/v1/users/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"avatar_delete":true,"email":"example","group_id":1,"group_ids":"example","announcements_read":true,"allowed_ips":"127.0.0.1","attachments_permission":true,"authenticate_until":"2000-01-01T01:00:00Z","authentication_method":"password","billing_permission":true,"bypass_inactive_disable":true,"bypass_site_allowed_ips":true,"dav_permission":true,"disabled":true,"ftp_permission":true,"header_text":"User-specific message.","language":"en","notification_daily_send_time":18,"name":"John Doe","company":"ACME Corp.","notes":"Internal notes on this user.","office_integration_enabled":true,"password_validity_days":1,"receive_admin_alerts":true,"require_login_by":"2000-01-01T01:00:00Z","require_password_change":true,"restapi_permission":true,"self_managed":true,"sftp_permission":true,"site_admin":true,"skip_welcome_screen":true,"ssl_required":"always_require","sso_strategy_id":1,"subscribe_to_newsletter":true,"require_2fa":"always_require","time_zone":"Pacific Time (US & Canada)","user_root":"example","username":"user"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/users/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<user>
           <avatar_delete type="boolean">true</avatar_delete>
           <email>example</email>
           <group_id type="integer">1</group_id>
           <group_ids>example</group_ids>
           <announcements_read type="boolean">true</announcements_read>
           <allowed_ips>127.0.0.1</allowed_ips>
           <attachments_permission type="boolean">true</attachments_permission>
           <authenticate_until>2000-01-01T01:00:00Z</authenticate_until>
           <authentication_method>password</authentication_method>
           <billing_permission type="boolean">true</billing_permission>
           <bypass_inactive_disable type="boolean">true</bypass_inactive_disable>
           <bypass_site_allowed_ips type="boolean">true</bypass_site_allowed_ips>
           <dav_permission type="boolean">true</dav_permission>
           <disabled type="boolean">true</disabled>
           <ftp_permission type="boolean">true</ftp_permission>
           <header_text>User-specific message.</header_text>
           <language>en</language>
           <notification_daily_send_time type="integer">18</notification_daily_send_time>
           <name>John Doe</name>
           <company>ACME Corp.</company>
           <notes>Internal notes on this user.</notes>
           <office_integration_enabled type="boolean">true</office_integration_enabled>
           <password_validity_days type="integer">1</password_validity_days>
           <receive_admin_alerts type="boolean">true</receive_admin_alerts>
           <require_login_by>2000-01-01T01:00:00Z</require_login_by>
           <require_password_change type="boolean">true</require_password_change>
           <restapi_permission type="boolean">true</restapi_permission>
           <self_managed type="boolean">true</self_managed>
           <sftp_permission type="boolean">true</sftp_permission>
           <site_admin type="boolean">true</site_admin>
           <skip_welcome_screen type="boolean">true</skip_welcome_screen>
           <ssl_required>always_require</ssl_required>
           <sso_strategy_id type="integer">1</sso_strategy_id>
           <subscribe_to_newsletter type="boolean">true</subscribe_to_newsletter>
           <require_2fa>always_require</require_2fa>
           <time_zone>Pacific Time (US &amp; Canada)</time_zone>
           <user_root>example</user_root>
           <username>user</username>
         </user>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    user = Files::User.list.first
    user.update(
      avatar_delete: true,
      email: "example",
      group_id: 1,
      group_ids: "example",
      announcements_read: true,
      allowed_ips: "127.0.0.1",
      attachments_permission: true,
      authenticate_until: "2000-01-01T01:00:00Z",
      authentication_method: "password",
      billing_permission: true,
      bypass_inactive_disable: true,
      bypass_site_allowed_ips: true,
      dav_permission: true,
      disabled: true,
      ftp_permission: true,
      header_text: "User-specific message.",
      language: "en",
      notification_daily_send_time: 18,
      name: "John Doe",
      company: "ACME Corp.",
      notes: "Internal notes on this user.",
      office_integration_enabled: true,
      password_validity_days: 1,
      receive_admin_alerts: true,
      require_login_by: "2000-01-01T01:00:00Z",
      require_password_change: true,
      restapi_permission: true,
      self_managed: true,
      sftp_permission: true,
      site_admin: true,
      skip_welcome_screen: true,
      ssl_required: "always_require",
      sso_strategy_id: 1,
      subscribe_to_newsletter: true,
      require_2fa: "always_require",
      time_zone: "Pacific Time (US & Canada)",
      user_root: "example",
      username: "user"
    )
    
    $user = \Files\Model\User::list()[0];
    $user->update(array(
      'avatar_delete' => true, 
      'email' => "example", 
      'group_id' => 1, 
      'group_ids' => "example", 
      'announcements_read' => true, 
      'allowed_ips' => "127.0.0.1", 
      'attachments_permission' => true, 
      'authenticate_until' => "2000-01-01T01:00:00Z", 
      'authentication_method' => "password", 
      'billing_permission' => true, 
      'bypass_inactive_disable' => true, 
      'bypass_site_allowed_ips' => true, 
      'dav_permission' => true, 
      'disabled' => true, 
      'ftp_permission' => true, 
      'header_text' => "User-specific message.", 
      'language' => "en", 
      'notification_daily_send_time' => 18, 
      'name' => "John Doe", 
      'company' => "ACME Corp.", 
      'notes' => "Internal notes on this user.", 
      'office_integration_enabled' => true, 
      'password_validity_days' => 1, 
      'receive_admin_alerts' => true, 
      'require_login_by' => "2000-01-01T01:00:00Z", 
      'require_password_change' => true, 
      'restapi_permission' => true, 
      'self_managed' => true, 
      'sftp_permission' => true, 
      'site_admin' => true, 
      'skip_welcome_screen' => true, 
      'ssl_required' => "always_require", 
      'sso_strategy_id' => 1, 
      'subscribe_to_newsletter' => true, 
      'require_2fa' => "always_require", 
      'time_zone' => "Pacific Time (US & Canada)", 
      'user_root' => "example", 
      'username' => "user"
    ));
    
    User user = User.list()[0];
    user.setAvatarDelete(true);
    user.setEmail("example");
    user.setGroupId(1);
    user.setGroupIds("example");
    user.setAnnouncementsRead(true);
    user.setAllowedIps("127.0.0.1");
    user.setAttachmentsPermission(true);
    user.setAuthenticateUntil("2000-01-01T01:00:00Z");
    user.setAuthenticationMethod("password");
    user.setBillingPermission(true);
    user.setBypassInactiveDisable(true);
    user.setBypassSiteAllowedIps(true);
    user.setDavPermission(true);
    user.setDisabled(true);
    user.setFtpPermission(true);
    user.setHeaderText("User-specific message.");
    user.setLanguage("en");
    user.setNotificationDailySendTime(18);
    user.setName("John Doe");
    user.setCompany("ACME Corp.");
    user.setNotes("Internal notes on this user.");
    user.setOfficeIntegrationEnabled(true);
    user.setPasswordValidityDays(1);
    user.setReceiveAdminAlerts(true);
    user.setRequireLoginBy("2000-01-01T01:00:00Z");
    user.setRequirePasswordChange(true);
    user.setRestapiPermission(true);
    user.setSelfManaged(true);
    user.setSftpPermission(true);
    user.setSiteAdmin(true);
    user.setSkipWelcomeScreen(true);
    user.setSslRequired("always_require");
    user.setSsoStrategyId(1);
    user.setSubscribeToNewsletter(true);
    user.setRequire2fa("always_require");
    user.setTimeZone("Pacific Time (US & Canada)");
    user.setUserRoot("example");
    user.setUsername("user");
    user.update();
    
    const user = (await User.list())[0]
    await user.update({ 
      avatar_delete: true, 
      email: "example", 
      group_id: 1, 
      group_ids: "example", 
      announcements_read: true, 
      allowed_ips: "127.0.0.1", 
      attachments_permission: true, 
      authenticate_until: "2000-01-01T01:00:00Z", 
      authentication_method: "password", 
      billing_permission: true, 
      bypass_inactive_disable: true, 
      bypass_site_allowed_ips: true, 
      dav_permission: true, 
      disabled: true, 
      ftp_permission: true, 
      header_text: "User-specific message.", 
      language: "en", 
      notification_daily_send_time: 18, 
      name: "John Doe", 
      company: "ACME Corp.", 
      notes: "Internal notes on this user.", 
      office_integration_enabled: true, 
      password_validity_days: 1, 
      receive_admin_alerts: true, 
      require_login_by: "2000-01-01T01:00:00Z", 
      require_password_change: true, 
      restapi_permission: true, 
      self_managed: true, 
      sftp_permission: true, 
      site_admin: true, 
      skip_welcome_screen: true, 
      ssl_required: "always_require", 
      sso_strategy_id: 1, 
      subscribe_to_newsletter: true, 
      require_2fa: "always_require", 
      time_zone: "Pacific Time (US & Canada)", 
      user_root: "example", 
      username: "user",
    })
    
    var user = (await User.List())[0];
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("avatar_delete", true);
    parameters.Add("email", "example");
    parameters.Add("group_id", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("group_ids", "example");
    parameters.Add("announcements_read", true);
    parameters.Add("allowed_ips", "127.0.0.1");
    parameters.Add("attachments_permission", true);
    parameters.Add("authenticate_until", "2000-01-01T01:00:00Z");
    parameters.Add("authentication_method", "password");
    parameters.Add("billing_permission", true);
    parameters.Add("bypass_inactive_disable", true);
    parameters.Add("bypass_site_allowed_ips", true);
    parameters.Add("dav_permission", true);
    parameters.Add("disabled", true);
    parameters.Add("ftp_permission", true);
    parameters.Add("header_text", "User-specific message.");
    parameters.Add("language", "en");
    parameters.Add("notification_daily_send_time", (Nullable<Int64>), shorthand: true) 18);
    parameters.Add("name", "John Doe");
    parameters.Add("company", "ACME Corp.");
    parameters.Add("notes", "Internal notes on this user.");
    parameters.Add("office_integration_enabled", true);
    parameters.Add("password_validity_days", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("receive_admin_alerts", true);
    parameters.Add("require_login_by", "2000-01-01T01:00:00Z");
    parameters.Add("require_password_change", true);
    parameters.Add("restapi_permission", true);
    parameters.Add("self_managed", true);
    parameters.Add("sftp_permission", true);
    parameters.Add("site_admin", true);
    parameters.Add("skip_welcome_screen", true);
    parameters.Add("ssl_required", "always_require");
    parameters.Add("sso_strategy_id", (Nullable<Int64>), shorthand: true) 1);
    parameters.Add("subscribe_to_newsletter", true);
    parameters.Add("require_2fa", "always_require");
    parameters.Add("time_zone", "Pacific Time (US & Canada)");
    parameters.Add("user_root", "example");
    parameters.Add("username", "user");
    
    await user.Update(parameters);
    
    files_sdk.set_api_key("my-key")
    
    user = files_sdk.user.find(id)
    user.update({
      "avatar_delete": True,
      "email": "example",
      "group_id": 1,
      "group_ids": "example",
      "announcements_read": True,
      "allowed_ips": "127.0.0.1",
      "attachments_permission": True,
      "authenticate_until": "2000-01-01T01:00:00Z",
      "authentication_method": "password",
      "billing_permission": True,
      "bypass_inactive_disable": True,
      "bypass_site_allowed_ips": True,
      "dav_permission": True,
      "disabled": True,
      "ftp_permission": True,
      "header_text": "User-specific message.",
      "language": "en",
      "notification_daily_send_time": 18,
      "name": "John Doe",
      "company": "ACME Corp.",
      "notes": "Internal notes on this user.",
      "office_integration_enabled": True,
      "password_validity_days": 1,
      "receive_admin_alerts": True,
      "require_login_by": "2000-01-01T01:00:00Z",
      "require_password_change": True,
      "restapi_permission": True,
      "self_managed": True,
      "sftp_permission": True,
      "site_admin": True,
      "skip_welcome_screen": True,
      "ssl_required": "always_require",
      "sso_strategy_id": 1,
      "subscribe_to_newsletter": True,
      "require_2fa": "always_require",
      "time_zone": "Pacific Time (US & Canada)",
      "user_root": "example",
      "username": "user"
    })
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    user.Update(context.Background(), files_sdk.UserUpdateParams{
      Id: 1,
      AvatarFile: "",
      AvatarDelete: lib.Bool(true),
      ChangePassword: "",
      ChangePasswordConfirmation: "",
      Email: "example",
      GrantPermission: "",
      GroupId: 1,
      GroupIds: "example",
      ImportedPasswordHash: "",
      Password: "",
      PasswordConfirmation: "",
      AnnouncementsRead: lib.Bool(true),
      AllowedIps: "127.0.0.1",
      AttachmentsPermission: lib.Bool(true),
      AuthenticateUntil: "2000-01-01T01:00:00Z",
      AuthenticationMethod: "password",
      BillingPermission: lib.Bool(true),
      BypassInactiveDisable: lib.Bool(true),
      BypassSiteAllowedIps: lib.Bool(true),
      DavPermission: lib.Bool(true),
      Disabled: lib.Bool(true),
      FtpPermission: lib.Bool(true),
      HeaderText: "User-specific message.",
      Language: "en",
      NotificationDailySendTime: 18,
      Name: "John Doe",
      Company: "ACME Corp.",
      Notes: "Internal notes on this user.",
      OfficeIntegrationEnabled: lib.Bool(true),
      PasswordValidityDays: 1,
      ReceiveAdminAlerts: lib.Bool(true),
      RequireLoginBy: "2000-01-01T01:00:00Z",
      RequirePasswordChange: lib.Bool(true),
      RestapiPermission: lib.Bool(true),
      SelfManaged: lib.Bool(true),
      SftpPermission: lib.Bool(true),
      SiteAdmin: lib.Bool(true),
      SkipWelcomeScreen: lib.Bool(true),
      SslRequired: "always_require",
      SsoStrategyId: 1,
      SubscribeToNewsletter: lib.Bool(true),
      Require2fa: "always_require",
      TimeZone: "Pacific Time (US & Canada)",
      UserRoot: "example",
      Username: "user",
    })
    
    files-cli users update \
      --id=1 \
      --change-password="" \
      --change-password-confirmation="" \
      --email="example" \
      --grant-permission="" \
      --group-id=1 \
      --group-ids="example" \
      --imported-password-hash="" \
      --password="" \
      --password-confirmation="" \
      --allowed-ips="127.0.0.1" \
      --authenticate-until="2000-01-01T01:00:00Z" \
      --authentication-method="password" \
      --header-text="User-specific message." \
      --language="en" \
      --notification-daily-send-time=18 \
      --name="John Doe" \
      --company="ACME Corp." \
      --notes="Internal notes on this user." \
      --password-validity-days=1 \
      --require-login-by="2000-01-01T01:00:00Z" \
      --ssl-required="always_require" \
      --sso-strategy-id=1 \
      --require-2fa="always_require" \
      --time-zone="Pacific Time (US & Canada)" \
      --user-root="example" \
      --username="user" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "username": "user",
      "admin_group_ids": [
        1
      ],
      "allowed_ips": "127.0.0.1",
      "attachments_permission": true,
      "api_keys_count": 1,
      "authenticate_until": "2000-01-01T01:00:00Z",
      "authentication_method": "password",
      "avatar_url": "example",
      "billing_permission": true,
      "bypass_site_allowed_ips": true,
      "bypass_inactive_disable": true,
      "created_at": "2000-01-01T01:00:00Z",
      "dav_permission": true,
      "disabled": true,
      "email": "example",
      "first_login_at": "2000-01-01T01:00:00Z",
      "ftp_permission": true,
      "group_ids": "example",
      "header_text": "User-specific message.",
      "language": "en",
      "last_login_at": "2000-01-01T01:00:00Z",
      "last_web_login_at": "2000-01-01T01:00:00Z",
      "last_ftp_login_at": "2000-01-01T01:00:00Z",
      "last_sftp_login_at": "2000-01-01T01:00:00Z",
      "last_dav_login_at": "2000-01-01T01:00:00Z",
      "last_desktop_login_at": "2000-01-01T01:00:00Z",
      "last_restapi_login_at": "2000-01-01T01:00:00Z",
      "last_api_use_at": "2000-01-01T01:00:00Z",
      "last_active_at": "2000-01-01T01:00:00Z",
      "last_protocol_cipher": "example",
      "lockout_expires": "2000-01-01T01:00:00Z",
      "name": "John Doe",
      "company": "ACME Corp.",
      "notes": "Internal notes on this user.",
      "notification_daily_send_time": 18,
      "office_integration_enabled": true,
      "password_set_at": "2000-01-01T01:00:00Z",
      "password_validity_days": 1,
      "public_keys_count": 1,
      "receive_admin_alerts": true,
      "require_2fa": "always_require",
      "require_login_by": "2000-01-01T01:00:00Z",
      "active_2fa": true,
      "require_password_change": true,
      "password_expired": true,
      "restapi_permission": true,
      "self_managed": true,
      "sftp_permission": true,
      "site_admin": true,
      "skip_welcome_screen": true,
      "ssl_required": "always_require",
      "sso_strategy_id": 1,
      "subscribe_to_newsletter": true,
      "externally_managed": true,
      "time_zone": "Pacific Time (US & Canada)",
      "type_of_2fa": "yubi",
      "user_root": "example",
      "days_remaining_until_password_expire": 1,
      "password_expire_at": "2000-01-01T01:00:00Z"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <user>
      <id type="integer">1</id>
      <username>user</username>
      <admin_group_ids type="array">
        <admin_group_id type="integer">1</admin_group_id>
      </admin_group_ids>
      <allowed_ips>127.0.0.1</allowed_ips>
      <attachments_permission type="boolean">true</attachments_permission>
      <api_keys_count type="integer">1</api_keys_count>
      <authenticate_until>2000-01-01T01:00:00Z</authenticate_until>
      <authentication_method>password</authentication_method>
      <avatar_url>example</avatar_url>
      <billing_permission type="boolean">true</billing_permission>
      <bypass_site_allowed_ips type="boolean">true</bypass_site_allowed_ips>
      <bypass_inactive_disable type="boolean">true</bypass_inactive_disable>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <dav_permission type="boolean">true</dav_permission>
      <disabled type="boolean">true</disabled>
      <email>example</email>
      <first_login_at>2000-01-01T01:00:00Z</first_login_at>
      <ftp_permission type="boolean">true</ftp_permission>
      <group_ids>example</group_ids>
      <header_text>User-specific message.</header_text>
      <language>en</language>
      <last_login_at>2000-01-01T01:00:00Z</last_login_at>
      <last_web_login_at>2000-01-01T01:00:00Z</last_web_login_at>
      <last_ftp_login_at>2000-01-01T01:00:00Z</last_ftp_login_at>
      <last_sftp_login_at>2000-01-01T01:00:00Z</last_sftp_login_at>
      <last_dav_login_at>2000-01-01T01:00:00Z</last_dav_login_at>
      <last_desktop_login_at>2000-01-01T01:00:00Z</last_desktop_login_at>
      <last_restapi_login_at>2000-01-01T01:00:00Z</last_restapi_login_at>
      <last_api_use_at>2000-01-01T01:00:00Z</last_api_use_at>
      <last_active_at>2000-01-01T01:00:00Z</last_active_at>
      <last_protocol_cipher>example</last_protocol_cipher>
      <lockout_expires>2000-01-01T01:00:00Z</lockout_expires>
      <name>John Doe</name>
      <company>ACME Corp.</company>
      <notes>Internal notes on this user.</notes>
      <notification_daily_send_time type="integer">18</notification_daily_send_time>
      <office_integration_enabled type="boolean">true</office_integration_enabled>
      <password_set_at>2000-01-01T01:00:00Z</password_set_at>
      <password_validity_days type="integer">1</password_validity_days>
      <public_keys_count type="integer">1</public_keys_count>
      <receive_admin_alerts type="boolean">true</receive_admin_alerts>
      <require_2fa>always_require</require_2fa>
      <require_login_by>2000-01-01T01:00:00Z</require_login_by>
      <active_2fa type="boolean">true</active_2fa>
      <require_password_change type="boolean">true</require_password_change>
      <password_expired type="boolean">true</password_expired>
      <restapi_permission type="boolean">true</restapi_permission>
      <self_managed type="boolean">true</self_managed>
      <sftp_permission type="boolean">true</sftp_permission>
      <site_admin type="boolean">true</site_admin>
      <skip_welcome_screen type="boolean">true</skip_welcome_screen>
      <ssl_required>always_require</ssl_required>
      <sso_strategy_id type="integer">1</sso_strategy_id>
      <subscribe_to_newsletter type="boolean">true</subscribe_to_newsletter>
      <externally_managed type="boolean">true</externally_managed>
      <time_zone>Pacific Time (US &amp; Canada)</time_zone>
      <type_of_2fa>yubi</type_of_2fa>
      <user_root>example</user_root>
      <days_remaining_until_password_expire type="integer">1</days_remaining_until_password_expire>
      <password_expire_at>2000-01-01T01:00:00Z</password_expire_at>
    </user>
    
    

    HTTPS Request

    PATCH /users/{id}

    Authentication Required

    Not available to user API keys or sessions from users that are marked as Shared/Bot users.

    The X-Files-Reauthentication header is required for any requests including the following parameters: password, change_password, email, site_admin.

    Request Parameters

    Parameter Description
    id int64 Required User ID.
    avatar_file file An image file for your user avatar. See Attaching Files to API Requests.
    avatar_delete boolean If true, the avatar will be deleted.
    change_password string Used for changing a password on an existing user.
    change_password_confirmation string Optional, but if provided, we will ensure that it matches the value sent in change_password.
    email string User's email.
    grant_permission string Permission to grant on the user root. Can be blank or full, read, write, list, read+write, or list+write
    group_id int64 Group ID to associate this user with.
    group_ids string A list of group ids to associate this user with. Comma delimited.
    imported_password_hash string Pre-calculated hash of the user's password. If supplied, this will be used to authenticate the user on first login. Supported hash menthods are MD5, SHA1, and SHA256.
    password string User password.
    password_confirmation string Optional, but if provided, we will ensure that it matches the value sent in password.
    announcements_read boolean Signifies that the user has read all the announcements in the UI.
    allowed_ips string A list of allowed IPs if applicable. Newline delimited
    attachments_permission boolean DEPRECATED: Can the user create Bundles (aka Share Links)? Use the bundle permission instead.
    authenticate_until string Scheduled Date/Time at which user will be deactivated
    authentication_method string How is this user authenticated?
    Possible values: password, sso, none, email_signup, password_with_imported_hash
    billing_permission boolean Allow this user to perform operations on the account, payments, and invoices?
    bypass_inactive_disable boolean Exempt this user from being disabled based on inactivity?
    bypass_site_allowed_ips boolean Allow this user to skip site-wide IP blacklists?
    dav_permission boolean Can the user connect with WebDAV?
    disabled boolean Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting.
    ftp_permission boolean Can the user access with FTP/FTPS?
    header_text string Text to display to the user in the header of the UI
    language string Preferred language
    notification_daily_send_time int64 Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
    name string User's full name
    company string User's company
    notes string Any internal notes on the user
    office_integration_enabled boolean Enable integration with Office for the web?
    password_validity_days int64 Number of days to allow user to use the same password
    receive_admin_alerts boolean Should the user receive admin alerts such a certificate expiration notifications and overages?
    require_login_by string Require user to login by specified date otherwise it will be disabled.
    require_password_change boolean Is a password change required upon next user login?
    restapi_permission boolean Can this user access the Web app, Desktop app, SDKs, or REST API? (All of these tools use the API internally, so this is one unified permission set.)
    self_managed boolean Does this user manage it's own credentials or is it a shared/bot user?
    sftp_permission boolean Can the user access with SFTP?
    site_admin boolean Is the user an administrator for this site?
    skip_welcome_screen boolean Skip Welcome page in the UI?
    ssl_required string SSL required setting
    Possible values: use_system_setting, always_require, never_require
    sso_strategy_id int64 SSO (Single Sign On) strategy ID for the user, if applicable.
    subscribe_to_newsletter boolean Is the user subscribed to the newsletter?
    require_2fa string 2FA required setting
    Possible values: use_system_setting, always_require, never_require
    time_zone string User time zone
    user_root string Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set.) Note that this is not used for API, Desktop, or Web interface.
    username string User's username

    Delete User

    Example Request

    curl https://app.files.com/api/rest/v1/users/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/users/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    user = Files::User.list.first
    user.delete
    
    $user = \Files\Model\User::list()[0];
    $user->delete();
    
    User user = User.list()[0];
    
    user.delete();
    
    const user = (await User.list())[0]
    await user.delete()
    
    var user = (await User.List())[0];
    
    await user.Delete();
    
    files_sdk.set_api_key("my-key")
    
    user = files_sdk.user.find(id)
    user.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    user.Delete(context.Background(), files_sdk.UserDeleteParams{
      Id: 1,
    })
    
    files-cli users delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /users/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    The X-Files-Reauthentication header is required for all requests to this endpoint.

    Request Parameters

    Parameter Description
    id int64 Required User ID.

    User Cipher Uses

    This object allows you to see the exact set of encryption ciphers and protocols used by a given user. This is most often used to support migrations from one TLS version to the next. You can query each user and determine who is still using legacy ciphers.

    The UserCipherUse object

    Example UserCipherUse Object

    {
      "id": 1,
      "protocol_cipher": "TLSv1.2; ECDHE-RSA-AES256-GCM-SHA384",
      "created_at": "2000-01-01T01:00:00Z",
      "interface": "restapi",
      "updated_at": "2000-01-01T01:00:00Z",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <user-cipher-use>
      <id type="integer">1</id>
      <protocol_cipher>TLSv1.2; ECDHE-RSA-AES256-GCM-SHA384</protocol_cipher>
      <created_at>2000-01-01T01:00:00Z</created_at>
      <interface>restapi</interface>
      <updated_at>2000-01-01T01:00:00Z</updated_at>
      <user_id type="integer">1</user_id>
    </user-cipher-use>
    
    
    Attribute Description
    id int64 UserCipherUse ID
    protocol_cipher string The protocol and cipher employed
    created_at date-time The earliest recorded use of this combination of interface and protocol and cipher (for this user)
    interface string The interface accessed
    Possible values: web, ftp, sftp, dav, desktop, restapi, robot, jsapi
    updated_at date-time The most recent use of this combination of interface and protocol and cipher (for this user)
    user_id int64 ID of the user who performed this access

    List User Cipher Uses

    Example Request

    curl "https://app.files.com/api/rest/v1/user_cipher_uses.json?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/user_cipher_uses.xml?user_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::UserCipherUse.list(
      user_id: 1, 
      per_page: 1
    )
    
    \Files\Model\UserCipherUse::list(array(
      'user_id' => 1, 
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("user_id", 1);
    requestParams.put("per_page", 1);
    UserCipherUse.list(parameters).all()
    
    await UserCipherUse.list({
      user_id: 1, 
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("user_id", (Int64?) 1);
    parameters.Add("per_page", (Int64?) 1);
    
    await UserCipherUse.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.user_cipher_use.list({
      "user_id": 1,
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    usercipheruse.List(context.Background(), files_sdk.UserCipherUseListParams{
      UserId: 1,
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli user-cipher-uses list \
      --user-id=1 \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "protocol_cipher": "TLSv1.2; ECDHE-RSA-AES256-GCM-SHA384",
        "created_at": "2000-01-01T01:00:00Z",
        "interface": "restapi",
        "updated_at": "2000-01-01T01:00:00Z",
        "user_id": 1
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <user-cipher-uses type="array">
      <user-cipher-use>
        <id type="integer">1</id>
        <protocol_cipher>TLSv1.2; ECDHE-RSA-AES256-GCM-SHA384</protocol_cipher>
        <created_at>2000-01-01T01:00:00Z</created_at>
        <interface>restapi</interface>
        <updated_at>2000-01-01T01:00:00Z</updated_at>
        <user_id type="integer">1</user_id>
      </user-cipher-use>
    </user-cipher-uses>
    
    

    HTTPS Request

    GET /user_cipher_uses

    Authentication Required

    Not available to user API keys or sessions from users that are marked as Shared/Bot users.

    Request Parameters

    Parameter Description
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.

    Pagination Params

    Read more about Paginating List Requests.

    User Requests

    User Requests allow anonymous users to place a request for access on the login screen to the site administrator.

    The UserRequest object

    Example UserRequest Object

    {
      "id": 1,
      "name": "John Doe",
      "email": "example",
      "details": "Changed Departments"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <user-request>
      <id type="integer">1</id>
      <name>John Doe</name>
      <email>example</email>
      <details>Changed Departments</details>
    </user-request>
    
    
    Attribute Description
    id int64 ID
    name string User's full name
    email email User email address
    details string Details of the user's request

    List User Requests

    Example Request

    curl "https://app.files.com/api/rest/v1/user_requests.json" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/user_requests.xml" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::UserRequest.list(
      per_page: 1
    )
    
    \Files\Model\UserRequest::list(array(
      'per_page' => 1
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("per_page", 1);
    UserRequest.list(parameters).all()
    
    await UserRequest.list({
      per_page: 1,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("per_page", (Int64?) 1);
    
    await UserRequest.List(parameters).All();
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.user_request.list({
      "per_page": 1
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    userrequest.List(context.Background(), files_sdk.UserRequestListParams{
      Cursor: "",
      PerPage: 1,
    })
    
    
    files-cli user-requests list \
      --cursor="" \
      --per-page=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    [
      {
        "id": 1,
        "name": "John Doe",
        "email": "example",
        "details": "Changed Departments"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <user-requests type="array">
      <user-request>
        <id type="integer">1</id>
        <name>John Doe</name>
        <email>example</email>
        <details>Changed Departments</details>
      </user-request>
    </user-requests>
    
    

    HTTPS Request

    GET /user_requests

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    No request parameters available for this endpoint.

    Pagination Params

    Read more about Paginating List Requests.

    Show User Request

    Example Request

    curl https://app.files.com/api/rest/v1/user_requests/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/user_requests/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::UserRequest.find(id)
    
    \Files\Model\UserRequest::find($id);
    
    
    UserRequest.find(, parameters
    
    await UserRequest.find(id)
    
    
    await UserRequest.Find(id);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.user_request.find(id)
    
    files_sdk.APIKey = "YOUR_API_KEY"
    userrequest.Find(context.Background(), files_sdk.UserRequestFindParams{
      Id: 1,
    })
    
    
    files-cli user-requests find \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "John Doe",
      "email": "example",
      "details": "Changed Departments"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <user-request>
      <id type="integer">1</id>
      <name>John Doe</name>
      <email>example</email>
      <details>Changed Departments</details>
    </user-request>
    
    

    HTTPS Request

    GET /user_requests/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required User Request ID.

    Create User Request

    Example Request

    curl https://app.files.com/api/rest/v1/user_requests.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"name":"name","email":"email","details":"details"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/user_requests.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<user-request>
           <name>name</name>
           <email>email</email>
           <details>details</details>
         </user-request>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::UserRequest.create(
      name: "name", 
      email: "email", 
      details: "details"
    )
    
    \Files\Model\UserRequest::create(array(
      'name' => "name", 
      'email' => "email", 
      'details' => "details"
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("name", name);
    requestParams.put("email", email);
    requestParams.put("details", details);
    UserRequest.create(parameters)
    
    await UserRequest.create({
      name: "name", 
      email: "email", 
      details: "details",
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("name", "name");
    parameters.Add("email", "email");
    parameters.Add("details", "details");
    
    await UserRequest.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.user_request.create({
      "name": "name",
      "email": "email",
      "details": "details"
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    userrequest.Create(context.Background(), files_sdk.UserRequestCreateParams{
      Name: "name",
      Email: "email",
      Details: "details",
    })
    
    
    files-cli user-requests create \
      --name="name" \
      --email="email" \
      --details="details" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "id": 1,
      "name": "John Doe",
      "email": "example",
      "details": "Changed Departments"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <user-request>
      <id type="integer">1</id>
      <name>John Doe</name>
      <email>example</email>
      <details>Changed Departments</details>
    </user-request>
    
    

    HTTPS Request

    POST /user_requests

    Authentication Required

    No authentication required; you may call this endpoint without a key or session.

    Request Parameters

    Parameter Description
    name string Required Name of user requested
    email string Required Email of user requested
    details string Required Details of the user request

    Delete User Request

    Example Request

    curl https://app.files.com/api/rest/v1/user_requests/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/user_requests/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    user_request = Files::UserRequest.list.first
    user_request.delete
    
    $user_request = \Files\Model\UserRequest::list()[0];
    $user_request->delete();
    
    UserRequest userRequest = UserRequest.list()[0];
    
    userRequest.delete();
    
    const userRequest = (await UserRequest.list())[0]
    await userRequest.delete()
    
    var userRequest = (await UserRequest.List())[0];
    
    await userRequest.Delete();
    
    files_sdk.set_api_key("my-key")
    
    user_request = files_sdk.user_request.find(id)
    user_request.delete()
    
    
    files_sdk.APIKey = "YOUR_API_KEY"
    userrequest.Delete(context.Background(), files_sdk.UserRequestDeleteParams{
      Id: 1,
    })
    
    files-cli user-requests delete \
      --id=1 \
      --api-key=YOUR_API_KEY
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /user_requests/{id}

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required User Request ID.

    Webhook Tests

    The WebhookTests resource in the REST API allows you to operate on WebhookTests.

    The WebhookTest object

    Example WebhookTest Object

    {
      "code": 200,
      "message": "",
      "status": "",
      "data": "example",
      "success": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <webhook-test>
      <code type="integer">200</code>
      <message></message>
      <status></status>
      <data>example</data>
      <success type="boolean">true</success>
    </webhook-test>
    
    
    Attribute Description
    code int64 Status HTTP code
    message string Error message
    status string Status message
    data Auto Additional data
    success boolean The success status of the webhook test
    url string URL for testing the webhook.
    method string HTTP method(GET or POST).
    encoding string HTTP encoding method. Can be JSON, XML, or RAW (form data).
    headers object Additional request headers.
    body object Additional body parameters.
    raw_body string raw body text
    file_as_body boolean Send the file data as the request body?
    file_form_field string Send the file data as a named parameter in the request POST body
    action string action for test body
    use_dedicated_ips boolean Use dedicated IPs for sending the webhook?

    Create Webhook Test

    Example Request

    curl https://app.files.com/api/rest/v1/webhook_tests.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"url":"https://www.site.com/...","method":"GET","encoding":"RAW","headers":{"x-test-header":"testvalue"},"body":{"test-param":"testvalue"},"raw_body":"test body","file_as_body":true,"file_form_field":"upload_file_data","action":"test","use_dedicated_ips":true}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/webhook_tests.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<webhook-test>
           <url>https://www.site.com/...</url>
           <method>GET</method>
           <encoding>RAW</encoding>
           <headers>
             <x-test-header>testvalue</x-test-header>
           </headers>
           <body>
             <test-param>testvalue</test-param>
           </body>
           <raw_body>test body</raw_body>
           <file_as_body type="boolean">true</file_as_body>
           <file_form_field>upload_file_data</file_form_field>
           <action>test</action>
           <use_dedicated_ips type="boolean">true</use_dedicated_ips>
         </webhook-test>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::WebhookTest.create(
      url: "https://www.site.com/...", 
      method: "GET", 
      encoding: "RAW", 
      headers: {"x-test-header":"testvalue"}, 
      body: {"test-param":"testvalue"}, 
      raw_body: "test body", 
      file_as_body: true, 
      file_form_field: "upload_file_data", 
      action: "test", 
      use_dedicated_ips: true
    )
    
    \Files\Model\WebhookTest::create(array(
      'url' => "https://www.site.com/...", 
      'method' => "GET", 
      'encoding' => "RAW", 
      'headers' => {"x-test-header":"testvalue"}, 
      'body' => {"test-param":"testvalue"}, 
      'raw_body' => "test body", 
      'file_as_body' => true, 
      'file_form_field' => "upload_file_data", 
      'action' => "test", 
      'use_dedicated_ips' => true
    ));
    
    HashMap<Object, String> requestParams = new HashMap<>();
    requestParams.put("url", https://www.site.com/...);
    requestParams.put("method", GET);
    requestParams.put("encoding", RAW);
    requestParams.put("headers", {"x-test-header"=>"testvalue"});
    requestParams.put("body", {"test-param"=>"testvalue"});
    requestParams.put("raw_body", test body);
    requestParams.put("file_as_body", true);
    requestParams.put("file_form_field", upload_file_data);
    requestParams.put("action", test);
    requestParams.put("use_dedicated_ips", true);
    WebhookTest.create(parameters)
    
    await WebhookTest.create({
      url: "https://www.site.com/...", 
      method: "GET", 
      encoding: "RAW", 
      headers: {"x-test-header":"testvalue"}, 
      body: {"test-param":"testvalue"}, 
      raw_body: "test body", 
      file_as_body: true, 
      file_form_field: "upload_file_data", 
      action: "test", 
      use_dedicated_ips: true,
    })
    
    
    var parameters = new Dictionary<string, object>();
    parameters.Add("url", "https://www.site.com/...");
    parameters.Add("method", "GET");
    parameters.Add("encoding", "RAW");
    parameters.Add("headers", (object) {"x-test-header":"testvalue"});
    parameters.Add("body", (object) {"test-param":"testvalue"});
    parameters.Add("raw_body", "test body");
    parameters.Add("file_as_body", true);
    parameters.Add("file_form_field", "upload_file_data");
    parameters.Add("action", "test");
    parameters.Add("use_dedicated_ips", true);
    
    await WebhookTest.Create(parameters);
    
    files_sdk.set_api_key("my-key")
    
    files_sdk.webhook_test.create({
      "url": "https://www.site.com/...",
      "method": "GET",
      "encoding": "RAW",
      "headers": {"x-test-header":"testvalue"},
      "body": {"test-param":"testvalue"},
      "raw_body": "test body",
      "file_as_body": True,
      "file_form_field": "upload_file_data",
      "action": "test",
      "use_dedicated_ips": True
    })
    
    files_sdk.APIKey = "YOUR_API_KEY"
    webhooktest.Create(context.Background(), files_sdk.WebhookTestCreateParams{
      Url: "https://www.site.com/...",
      Method: "GET",
      Encoding: "RAW",
      Headers: `{"x-test-header":"testvalue"}`,
      Body: `{"test-param":"testvalue"}`,
      RawBody: "test body",
      FileAsBody: lib.Bool(true),
      FileFormField: "upload_file_data",
      Action: "test",
      UseDedicatedIps: lib.Bool(true),
    })
    
    
    files-cli webhook-tests create \
      --url="https://www.site.com/..." \
      --method="GET" \
      --encoding="RAW" \
      --raw-body="test body" \
      --file-form-field="upload_file_data" \
      --action="test" \
      --api-key=YOUR_API_KEY
    

    Example Response

    {
      "code": 200,
      "message": "",
      "status": "",
      "data": "example",
      "success": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <webhook-test>
      <code type="integer">200</code>
      <message></message>
      <status></status>
      <data>example</data>
      <success type="boolean">true</success>
    </webhook-test>
    
    

    HTTPS Request

    POST /webhook_tests

    Authentication Required

    Requires either a Site-Wide API key or User API key or session from a User with Folder Admin permissions.

    Request Parameters

    Parameter Description
    url string Required URL for testing the webhook.
    method string HTTP method(GET or POST).
    encoding string HTTP encoding method. Can be JSON, XML, or RAW (form data).
    headers object Additional request headers.
    body object Additional body parameters.
    raw_body string raw body text
    file_as_body boolean Send the file data as the request body?
    file_form_field string Send the file data as a named parameter in the request POST body
    action string action for test body
    use_dedicated_ips boolean Use dedicated IPs for sending the webhook?