TOC Navbar
cURL cURL Ruby PHP
  • Introduction
  • Authentication with API Key
  • Authentication with a Session
  • Errors
  • Account Line Items
  • Actions
  • Announcements
  • Api Keys
  • Automations
  • Behaviors
  • Blog Posts
  • Bundles
  • Certificates
  • Dns Records
  • Files/Folders
  • File Uploading
  • File Comments
  • File Comment Reactions
  • File Part Uploads
  • Groups
  • Group Users
  • Ip Addresses
  • Locks
  • Messages
  • Message Comments
  • Message Comment Reactions
  • Message Reactions
  • Notifications
  • Oauth Redirects
  • Paired Api Keys
  • Paypal Express Infos
  • Paypal Express Urls
  • Permissions
  • Plans
  • Previews
  • Projects
  • Public Keys
  • Remote Servers
  • Requests
  • Sessions
  • Sites
  • Site
  • Sso Strategies
  • Styles
  • Support Requests
  • Two Factor Authentication Methods
  • Two Factor Authentication Methods
  • U2f Sign Requests
  • Usage Snapshots
  • Users
  • User Cipher Uses
  • Zip Downloads
  • 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.

    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.

    Per-Language SDKs

    SDKs in Ruby and PHP are available for download using the typical package manager for each language.

    It is our goal to create new language SDKs. Please reach out to us and let us know your language of choice, so we can prioritize getting you an SDK in your language.

    We already have plans to release SDKs in DotNet (C#), Elixir, Go, Java, Javascript/Node, and Python.

    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.

    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::configure(array('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.
    new \Files\User($params, array('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.

    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>'
    

    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'
    

    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
    

    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)

    Errors

    Example Response: Invalid API key (401)

    {
      "error": "Unauthorized",
      "http-code": "401"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <error>
      <message>Unauthorized</message>
      <http-code>401</http-code>
    </error>
    

    Example Response: Invalid username or password (401)

    {
      "error": "invalid username or password",
      "http-code": "401",
      "errors": [
        {
          "type": "401-invalid-username-or-password",
          "message": "invalid username or password"
        }
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <error>
      <message>invalid username or password</message>
      <http-code>401</http-code>
      <errors type="array">
        <error>
          <type>401-invalid-username-or-password</type>
          <message>invalid username or password</message>
        </error>
      </errors>
    </error>
    

    Example Response: No permission to access resource (403)

    {
      "error": "Forbidden",
      "http-code": "403"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <error>
      <message>Forbidden</message>
      <http-code>403</http-code>
    </error>
    

    The Files.com API returns standard HTTP success (2xx) or error (4xx, 5xx) status codes.

    Some errors contain additional information in the response body. We have not been perfectly consistent with the formatting of these errors and will be standardizing them in the future.

    HTTP status codes

    Code Description
    200 - OK The request was successful.
    201 - Created The resource was successfully created.
    204 - No response The request was successful. The only difference between a 200 and 204 is the lack of response provided by that endpoint.
    400 - Bad request Bad request.
    401 - Unauthorized Your API key or username/password is invalid.
    403 - Forbidden You don't have permission to access this resource.
    404 - Not found The resource does not exist.
    422 - Unprocessable entity The request could not be processed. Usually this is due to validation error of a parameter, but it could also be something like a username already taken, folder already existing, etc.
    5xx - Server error An error occured with our API. Wait some time and then try again. If you get a 500 repeatedly, it may be a bug. Please report it.

    Account Line Items

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

    The AccountLineItem object

    Example AccountLineItem Object

    {
      "amount": "",
      "balance": "",
      "created_at": "2000-01-01 01:00:00 UTC",
      "currency": "USD",
      "download_uri": "https://url...",
      "id": 1,
      "invoice_line_items": [
    
      ],
      "method": "paypal",
      "payment_line_items": [
    
      ],
      "payment_reversed_at": "2000-01-01 01:00:00 UTC",
      "payment_type": "",
      "site_name": "My Site",
      "type": "invoice",
      "updated_at": "2000-01-01 01:00:00 UTC"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <account-line-item>
      <amount></amount>
      <balance></balance>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <currency>USD</currency>
      <download_uri>https://url...</download_uri>
      <id type="integer">1</id>
      <invoice_line_items type="array"/>
      <method>paypal</method>
      <payment_line_items type="array"/>
      <payment_reversed_at type="dateTime">2000-01-01T01:00:00Z</payment_reversed_at>
      <payment_type></payment_type>
      <site_name>My Site</site_name>
      <type>invoice</type>
      <updated_at type="dateTime">2000-01-01T01:00:00Z</updated_at>
    </account-line-item>
    
    
    Attribute Description
    amount float Line item amount
    balance float Line item balance
    created_at date-time Line item created at
    currency string Line item currency
    download_uri string Line item download uri
    id int64 Line item Id
    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
    updated_at date-time Line item updated at

    List Invoices

    Example Request

    curl "https://app.files.com/api/rest/v1/invoices.json?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/invoices.xml?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Invoice.list(
      page: 1, 
      per_page: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Invoice::list(array(
      'page' => 1, 
      'per_page' => 1
    ));
    

    Example Response

    [
      {
        "amount": "",
        "balance": "",
        "created_at": "2000-01-01 01:00:00 UTC",
        "currency": "USD",
        "download_uri": "https://url...",
        "id": 1,
        "invoice_line_items": [
    
        ],
        "method": "paypal",
        "payment_line_items": [
    
        ],
        "payment_reversed_at": "2000-01-01 01:00:00 UTC",
        "payment_type": "",
        "site_name": "My Site",
        "type": "invoice",
        "updated_at": "2000-01-01 01:00:00 UTC"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <account-line-items type="array">
      <account-line-item>
        <amount></amount>
        <balance></balance>
        <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
        <currency>USD</currency>
        <download_uri>https://url...</download_uri>
        <id type="integer">1</id>
        <invoice_line_items type="array"/>
        <method>paypal</method>
        <payment_line_items type="array"/>
        <payment_reversed_at type="dateTime">2000-01-01T01:00:00Z</payment_reversed_at>
        <payment_type></payment_type>
        <site_name>My Site</site_name>
        <type>invoice</type>
        <updated_at type="dateTime">2000-01-01T01:00:00Z</updated_at>
      </account-line-item>
    </account-line-items>
    
    

    HTTPS Request

    GET /invoices

    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
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Invoice::find($id);
    

    Example Response

    {
      "amount": "",
      "balance": "",
      "created_at": "2000-01-01 01:00:00 UTC",
      "currency": "USD",
      "download_uri": "https://url...",
      "id": 1,
      "invoice_line_items": [
    
      ],
      "method": "paypal",
      "payment_line_items": [
    
      ],
      "payment_reversed_at": "2000-01-01 01:00:00 UTC",
      "payment_type": "",
      "site_name": "My Site",
      "type": "invoice",
      "updated_at": "2000-01-01 01:00:00 UTC"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <account-line-item>
      <amount></amount>
      <balance></balance>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <currency>USD</currency>
      <download_uri>https://url...</download_uri>
      <id type="integer">1</id>
      <invoice_line_items type="array"/>
      <method>paypal</method>
      <payment_line_items type="array"/>
      <payment_reversed_at type="dateTime">2000-01-01T01:00:00Z</payment_reversed_at>
      <payment_type></payment_type>
      <site_name>My Site</site_name>
      <type>invoice</type>
      <updated_at type="dateTime">2000-01-01T01:00:00Z</updated_at>
    </account-line-item>
    
    

    HTTPS Request

    GET /invoices/{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 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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Payment::find($id);
    

    Example Response

    {
      "amount": "",
      "balance": "",
      "created_at": "2000-01-01 01:00:00 UTC",
      "currency": "USD",
      "download_uri": "https://url...",
      "id": 1,
      "invoice_line_items": [
    
      ],
      "method": "paypal",
      "payment_line_items": [
    
      ],
      "payment_reversed_at": "2000-01-01 01:00:00 UTC",
      "payment_type": "",
      "site_name": "My Site",
      "type": "invoice",
      "updated_at": "2000-01-01 01:00:00 UTC"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <account-line-item>
      <amount></amount>
      <balance></balance>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <currency>USD</currency>
      <download_uri>https://url...</download_uri>
      <id type="integer">1</id>
      <invoice_line_items type="array"/>
      <method>paypal</method>
      <payment_line_items type="array"/>
      <payment_reversed_at type="dateTime">2000-01-01T01:00:00Z</payment_reversed_at>
      <payment_type></payment_type>
      <site_name>My Site</site_name>
      <type>invoice</type>
      <updated_at type="dateTime">2000-01-01T01:00:00Z</updated_at>
    </account-line-item>
    
    

    HTTPS Request

    GET /payments/{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 Payment ID.

    Actions

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

    The Action object

    Example Action Object

    {
      "id": 1,
      "when": "2000-01-01 01:00:00 UTC",
      "destination": "/to_path",
      "display": "full",
      "ip": "192.283.128.182",
      "path": "path",
      "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>
      <when type="dateTime">2000-01-01T01:00:00Z</when>
      <destination>/to_path</destination>
      <display>full</display>
      <ip>192.283.128.182</ip>
      <path>path</path>
      <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
    when date-time Action occurrence date/time
    destination string The destination path for this action, if applicable
    display string Display format
    ip string IP Address that performed this action
    path string Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    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
    interface string Interface on which this action occurred.
    Possible values: web, ftp, robot, jsapi, webdesktopapi, sftp, dav, desktop, restapi, scim

    List history for specific file

    Example Request

    curl "https://app.files.com/api/rest/v1/history/files(/*path).json?display=full&page=1&per_page=1&action=create" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/history/files(/*path).xml?display=full&page=1&per_page=1&action=create" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::History.list_for_file(path, 
      display: "full", 
      page: 1, 
      per_page: 1, 
      action: "create"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\History::listForFile($path, array(
      'display' => "full", 
      'page' => 1, 
      'per_page' => 1, 
      'action' => "create"
    ));
    

    Example Response

    [
      {
        "id": 1,
        "when": "2000-01-01 01:00:00 UTC",
        "destination": "/to_path",
        "display": "full",
        "ip": "192.283.128.182",
        "path": "path",
        "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>
        <when type="dateTime">2000-01-01T01:00:00Z</when>
        <destination>/to_path</destination>
        <display>full</display>
        <ip>192.283.128.182</ip>
        <path>path</path>
        <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.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    path string Required Path to operate on.

    List history for specific folder

    Example Request

    curl "https://app.files.com/api/rest/v1/history/folders(/*path).json?display=full&page=1&per_page=1&action=create" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/history/folders(/*path).xml?display=full&page=1&per_page=1&action=create" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::History.list_for_folder(path, 
      display: "full", 
      page: 1, 
      per_page: 1, 
      action: "create"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\History::listForFolder($path, array(
      'display' => "full", 
      'page' => 1, 
      'per_page' => 1, 
      'action' => "create"
    ));
    

    Example Response

    [
      {
        "id": 1,
        "when": "2000-01-01 01:00:00 UTC",
        "destination": "/to_path",
        "display": "full",
        "ip": "192.283.128.182",
        "path": "path",
        "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>
        <when type="dateTime">2000-01-01T01:00:00Z</when>
        <destination>/to_path</destination>
        <display>full</display>
        <ip>192.283.128.182</ip>
        <path>path</path>
        <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.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    path string Required Path to operate on.

    List history for specific user

    Example Request

    curl "https://app.files.com/api/rest/v1/history/users/{user_id}.json?display=full&page=1&per_page=1&action=create" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/history/users/{user_id}.xml?display=full&page=1&per_page=1&action=create" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::History.list_for_user(user_id, 
      display: "full", 
      page: 1, 
      per_page: 1, 
      action: "create"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\History::listForUser($user_id, array(
      'display' => "full", 
      'page' => 1, 
      'per_page' => 1, 
      'action' => "create"
    ));
    

    Example Response

    [
      {
        "id": 1,
        "when": "2000-01-01 01:00:00 UTC",
        "destination": "/to_path",
        "display": "full",
        "ip": "192.283.128.182",
        "path": "path",
        "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>
        <when type="dateTime">2000-01-01T01:00:00Z</when>
        <destination>/to_path</destination>
        <display>full</display>
        <ip>192.283.128.182</ip>
        <path>path</path>
        <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.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    user_id int64 Required User ID.

    List site login history

    Example Request

    curl "https://app.files.com/api/rest/v1/history/login.json?display=full&page=1&per_page=1&action=create" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/history/login.xml?display=full&page=1&per_page=1&action=create" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::History.list_logins(
      display: "full", 
      page: 1, 
      per_page: 1, 
      action: "create"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\History::listLogins(array(
      'display' => "full", 
      'page' => 1, 
      'per_page' => 1, 
      'action' => "create"
    ));
    

    Example Response

    [
      {
        "id": 1,
        "when": "2000-01-01 01:00:00 UTC",
        "destination": "/to_path",
        "display": "full",
        "ip": "192.283.128.182",
        "path": "path",
        "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>
        <when type="dateTime">2000-01-01T01:00:00Z</when>
        <destination>/to_path</destination>
        <display>full</display>
        <ip>192.283.128.182</ip>
        <path>path</path>
        <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.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.

    List site full action history

    Example Request

    curl "https://app.files.com/api/rest/v1/history.json?display=full&page=1&per_page=1&action=create" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/history.xml?display=full&page=1&per_page=1&action=create" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::History.list(
      display: "full", 
      page: 1, 
      per_page: 1, 
      action: "create"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\History::list(array(
      'display' => "full", 
      'page' => 1, 
      'per_page' => 1, 
      'action' => "create"
    ));
    

    Example Response

    [
      {
        "id": 1,
        "when": "2000-01-01 01:00:00 UTC",
        "destination": "/to_path",
        "display": "full",
        "ip": "192.283.128.182",
        "path": "path",
        "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>
        <when type="dateTime">2000-01-01T01:00:00Z</when>
        <destination>/to_path</destination>
        <display>full</display>
        <ip>192.283.128.182</ip>
        <path>path</path>
        <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.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.

    Announcements

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

    The Announcement object

    Example Announcement Object

    {
      "body": "This is the body.",
      "button_text": "View Blog Post",
      "button_url": "https://www.files.com/blog/",
      "headline": "Files.com Now Supports In-App Announcements!",
      "html_body": "<p>This is the HTML version of the body.</p>",
      "label": "New Feature",
      "label_color": "#000000",
      "publish_at": "2000-01-01 01:00:00 UTC",
      "slug": "new-feature"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <announcement>
      <body>This is the body.</body>
      <button_text>View Blog Post</button_text>
      <button_url>https://www.files.com/blog/</button_url>
      <headline>Files.com Now Supports In-App Announcements!</headline>
      <html_body>&lt;p&gt;This is the HTML version of the body.&lt;/p&gt;</html_body>
      <label>New Feature</label>
      <label_color>#000000</label_color>
      <publish_at type="dateTime">2000-01-01T01:00:00Z</publish_at>
      <slug>new-feature</slug>
    </announcement>
    
    
    Attribute Description
    body string Announcement body
    button_text string Text to go on the CTA button
    button_url string URL to link to when CTA button is clicked
    headline string Announcement headline
    html_body string Body converted to HTML
    label string Text for a label that can be added to the announcement
    label_color string Color for label on announcement
    publish_at date-time When was this announcement published?
    slug string URL slug for announcement

    List in-app announcements that are shown in the header of the UI

    Example Request

    curl "https://app.files.com/api/rest/v1/announcements.json?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/announcements.xml?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Announcement.list(
      page: 1, 
      per_page: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Announcement::list(array(
      'page' => 1, 
      'per_page' => 1
    ));
    

    Example Response

    [
      {
        "body": "This is the body.",
        "button_text": "View Blog Post",
        "button_url": "https://www.files.com/blog/",
        "headline": "Files.com Now Supports In-App Announcements!",
        "html_body": "<p>This is the HTML version of the body.</p>",
        "label": "New Feature",
        "label_color": "#000000",
        "publish_at": "2000-01-01 01:00:00 UTC",
        "slug": "new-feature"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <announcements type="array">
      <announcement>
        <body>This is the body.</body>
        <button_text>View Blog Post</button_text>
        <button_url>https://www.files.com/blog/</button_url>
        <headline>Files.com Now Supports In-App Announcements!</headline>
        <html_body>&lt;p&gt;This is the HTML version of the body.&lt;/p&gt;</html_body>
        <label>New Feature</label>
        <label_color>#000000</label_color>
        <publish_at type="dateTime">2000-01-01T01:00:00Z</publish_at>
        <slug>new-feature</slug>
      </announcement>
    </announcements>
    
    

    HTTPS Request

    GET /announcements

    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
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.

    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,
      "created_at": "2000-01-01 01:00:00 UTC",
      "expires_at": "2000-01-01 01:00:00 UTC",
      "key": "[key]",
      "last_use_at": "2000-01-01 01:00:00 UTC",
      "name": "My Main API Key",
      "permission_set": "full",
      "platform": "win32",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <api-key>
      <id type="integer">1</id>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
      <key>[key]</key>
      <last_use_at type="dateTime">2000-01-01T01:00:00Z</last_use_at>
      <name>My Main API Key</name>
      <permission_set>full</permission_set>
      <platform>win32</platform>
      <user_id type="integer">1</user_id>
    </api-key>
    
    
    Attribute Description
    id int64 API Key ID
    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. 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.) We hope to offer additional permission sets 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
    platform string If this API key represents a Desktop app, what platform was it created on?
    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&page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/api_keys.xml?user_id=1&page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ApiKey.list(
      user_id: 1, 
      page: 1, 
      per_page: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\ApiKey::list(array(
      'user_id' => 1, 
      'page' => 1, 
      'per_page' => 1
    ));
    

    Example Response

    [
      {
        "id": 1,
        "created_at": "2000-01-01 01:00:00 UTC",
        "expires_at": "2000-01-01 01:00:00 UTC",
        "key": "[key]",
        "last_use_at": "2000-01-01 01:00:00 UTC",
        "name": "My Main API Key",
        "permission_set": "full",
        "platform": "win32",
        "user_id": 1
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <api-keys type="array">
      <api-key>
        <id type="integer">1</id>
        <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
        <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
        <key>[key]</key>
        <last_use_at type="dateTime">2000-01-01T01:00:00Z</last_use_at>
        <name>My Main API Key</name>
        <permission_set>full</permission_set>
        <platform>win32</platform>
        <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.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\ApiKey::find($id);
    

    Example Response

    {
      "id": 1,
      "created_at": "2000-01-01 01:00:00 UTC",
      "expires_at": "2000-01-01 01:00:00 UTC",
      "key": "[key]",
      "last_use_at": "2000-01-01 01:00:00 UTC",
      "name": "My Main API Key",
      "permission_set": "full",
      "platform": "win32",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <api-key>
      <id type="integer">1</id>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
      <key>[key]</key>
      <last_use_at type="dateTime">2000-01-01T01:00:00Z</last_use_at>
      <name>My Main API Key</name>
      <permission_set>full</permission_set>
      <platform>win32</platform>
      <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,"name":"My Key","permission_set":"full","expires_at":"2000-01-01 01:00:00 UTC"}' \
      -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>
           <name>My Key</name>
           <permission_set>full</permission_set>
           <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
         </api-key>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ApiKey.create(
      user_id: 1, 
      name: "My Key", 
      permission_set: "full", 
      expires_at: "2000-01-01 01:00:00 UTC"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\ApiKey::create(array(
      'user_id' => 1, 
      'name' => "My Key", 
      'permission_set' => "full", 
      'expires_at' => "2000-01-01 01:00:00 UTC"
    ));
    

    Example Response

    {
      "id": 1,
      "created_at": "2000-01-01 01:00:00 UTC",
      "expires_at": "2000-01-01 01:00:00 UTC",
      "key": "[key]",
      "last_use_at": "2000-01-01 01:00:00 UTC",
      "name": "My Main API Key",
      "permission_set": "full",
      "platform": "win32",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <api-key>
      <id type="integer">1</id>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
      <key>[key]</key>
      <last_use_at type="dateTime">2000-01-01T01:00:00Z</last_use_at>
      <name>My Main API Key</name>
      <permission_set>full</permission_set>
      <platform>win32</platform>
      <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.
    name string Internal name for key. For your reference only.
    permission_set string Leave blank, or set to 'desktop_app' to restrict the key to only desktop app functions.
    expires_at string Have the key expire at this date/time.

    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 '{"name":"My Key","permission_set":"full","expires_at":"2000-01-01 01:00:00 UTC"}' \
      -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>
           <name>My Key</name>
           <permission_set>full</permission_set>
           <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
         </api-key>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::ApiKey.update(
      name: "My Key", 
      permission_set: "full", 
      expires_at: "2000-01-01 01:00:00 UTC"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\ApiKey::update(array(
      'name' => "My Key", 
      'permission_set' => "full", 
      'expires_at' => "2000-01-01 01:00:00 UTC"
    ));
    

    Example Response

    {
      "id": 1,
      "created_at": "2000-01-01 01:00:00 UTC",
      "expires_at": "2000-01-01 01:00:00 UTC",
      "key": "[key]",
      "last_use_at": "2000-01-01 01:00:00 UTC",
      "name": "My Main API Key",
      "permission_set": "full",
      "platform": "win32",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <api-key>
      <id type="integer">1</id>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
      <key>[key]</key>
      <last_use_at type="dateTime">2000-01-01T01:00:00Z</last_use_at>
      <name>My Main API Key</name>
      <permission_set>full</permission_set>
      <platform>win32</platform>
      <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
    name string Internal name for key. For your reference only.
    permission_set string Leave blank, or set to desktop_app to restrict the key to only desktop app functions.
    expires_at string Have the key expire at this date/time.

    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 '{"name":"My Key","permission_set":"full","expires_at":"2000-01-01 01:00:00 UTC"}' \
      -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>
           <name>My Key</name>
           <permission_set>full</permission_set>
           <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
         </api-key>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    api_key = Files::ApiKey.find(1)
    api_key.update(
      name: "My Key",
      permission_set: "full",
      expires_at: "2000-01-01 01:00:00 UTC"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $api_key = \Files\ApiKey->find(1);
    $api_key->update(array(
      'name' => "My Key", 
      'permission_set' => "full", 
      'expires_at' => "2000-01-01 01:00:00 UTC"
    ));
    

    Example Response

    {
      "id": 1,
      "created_at": "2000-01-01 01:00:00 UTC",
      "expires_at": "2000-01-01 01:00:00 UTC",
      "key": "[key]",
      "last_use_at": "2000-01-01 01:00:00 UTC",
      "name": "My Main API Key",
      "permission_set": "full",
      "platform": "win32",
      "user_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <api-key>
      <id type="integer">1</id>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
      <key>[key]</key>
      <last_use_at type="dateTime">2000-01-01T01:00:00Z</last_use_at>
      <name>My Main API Key</name>
      <permission_set>full</permission_set>
      <platform>win32</platform>
      <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.
    name string Internal name for key. For your reference only.
    permission_set string Leave blank, or set to 'desktop_app' to restrict the key to only desktop app functions.
    expires_at string Have the key expire at this date/time.

    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
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\ApiKey::delete();
    

    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.find(1)
    api_key.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $api_key = \Files\ApiKey->find(1);
    $api_key->delete();
    

    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.

    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. Although Automations may have a Path specified, it can be a glob (which includes wildcards), which affects multiple folders. Additionally, paths in Automations can refer to folders which don't yet exist.

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

    Automation Types

    There are currently three types of automations: Create Folder, Request File, and Request Move.

    Create Folder Automation

    The Create Folder automation creates folders on a schedule.

    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:

    Request File Automation

    The Request File automation requests a file (optionally from a specific user) if it does not exist.

    Example Use case: Continuing our Sales Tax example from above, once the folders are created for the 11 states, our Bookkeeper needs to upload a .xlsx file containing the sales records for each state.

    We can create a Request File automation as follows:

    Note that the %p1, %p2 amd %p3 are references back into the folder hierarchy (parent 1, parent 2, etc), so that the file will be named with the state name and the quarter name in the file. Example: SalesByState-NV-2017-Quarter-ending-Dec-31.xlsx

    Now, let's say that our Tax Accountant is in charge of filing the actual state tax return once the Excel doc is completed by the Bookkeeper. We can create another Automation to let him know when it's his turn to operate:

    So the accountant will take the excel from the bookkeeper, generate the state tax return, and then upload it as a PDF, ready for the CFO to sign. How does the CFO know when to sign? You guessed it, another Automation will let him know when it's ready:

    This Automation looks in every nested subfolder of AcccountingAndTax (that's the /**/ in the path). And it looks for any filename containing the filename string -Unsigned-. That's the cue to the CFO that something needs his signature.

    Rather than specifying the exact destination filename, we can specify a Destination Replace From and To in order to generate the new filename from the old filename.

    So if StateSalesTaxReturn-Unsigned-NV-2017-q4.pdf is uploaded, this Automation will trigger and expect the file StateSalesTaxReturn-Signed-NV-2017-q4.pdf from the CFO.

    You could then put in place another rule for the Tax Accountant or Bookkeeper to go do the actual filing once a signature is in place.

    Request Move Automation

    The Request Move automation requests that a file be moved. This is an alternate way to implement approval workflows.

    A variant of the Request File automation, this Automation creates requests that a user or group move a file, presumably indicating that they've taken some action on it.

    Example Use case: Action Verb uses Files.com to collect invoices from its Contractors, who upload new invoices into their own folder structure that only they have permissions to. That structure looks like this:

    The contractor has full permissions to the New/ folder, but only read-only permissions to Paid/. This allows them to upload and update new invoices, but only view invoices that are already paid. (Cool!)

    But, as we grow to dozens of contractors, it becomes a tough task for Accounts Payable to check all the New folders daily.

    To ensure Contractors get paid timely, we might set up Request Move automation:

    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,
      "automation": "create_folder",
      "source": "",
      "destination": "",
      "destination_replace_from": "",
      "destination_replace_to": "",
      "interval": "week",
      "next_process_on": "2020-01-01",
      "path": "",
      "realtime": true,
      "user_id": 1,
      "user_ids": [
    
      ],
      "group_ids": [
    
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <automation>
      <id type="integer">1</id>
      <automation>create_folder</automation>
      <source></source>
      <destination></destination>
      <destination_replace_from></destination_replace_from>
      <destination_replace_to></destination_replace_to>
      <interval>week</interval>
      <next_process_on>2020-01-01</next_process_on>
      <path></path>
      <realtime type="boolean">true</realtime>
      <user_id type="integer">1</user_id>
      <user_ids type="array"/>
      <group_ids type="array"/>
    </automation>
    
    
    Attribute Description
    id int64 Automation ID
    automation string Automation type
    Possible values: create_folder, request_file, request_move
    source string Source Path
    destination string Destination 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
    next_process_on string Date this automation will next run.
    path string Path on which this Automation runs. Supports globs. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    realtime boolean Does this automation run in real time? This is a read-only property based on automation type.
    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)
    group_ids array IDs of Groups for the Automation (i.e. who to Request File from)

    List Automations

    Example Request

    curl "https://app.files.com/api/rest/v1/automations.json?page=1&per_page=1&automation=create_folder" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/automations.xml?page=1&per_page=1&automation=create_folder" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Automation.list(
      page: 1, 
      per_page: 1, 
      automation: "create_folder"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Automation::list(array(
      'page' => 1, 
      'per_page' => 1, 
      'automation' => "create_folder"
    ));
    

    Example Response

    [
      {
        "id": 1,
        "automation": "create_folder",
        "source": "",
        "destination": "",
        "destination_replace_from": "",
        "destination_replace_to": "",
        "interval": "week",
        "next_process_on": "2020-01-01",
        "path": "",
        "realtime": true,
        "user_id": 1,
        "user_ids": [
    
        ],
        "group_ids": [
    
        ]
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <automations type="array">
      <automation>
        <id type="integer">1</id>
        <automation>create_folder</automation>
        <source></source>
        <destination></destination>
        <destination_replace_from></destination_replace_from>
        <destination_replace_to></destination_replace_to>
        <interval>week</interval>
        <next_process_on>2020-01-01</next_process_on>
        <path></path>
        <realtime type="boolean">true</realtime>
        <user_id type="integer">1</user_id>
        <user_ids type="array"/>
        <group_ids type="array"/>
      </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 Site Admin permissions.

    Request Parameters

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    automation string Type of automation to filter by.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Automation::find($id);
    

    Example Response

    {
      "id": 1,
      "automation": "create_folder",
      "source": "",
      "destination": "",
      "destination_replace_from": "",
      "destination_replace_to": "",
      "interval": "week",
      "next_process_on": "2020-01-01",
      "path": "",
      "realtime": true,
      "user_id": 1,
      "user_ids": [
    
      ],
      "group_ids": [
    
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <automation>
      <id type="integer">1</id>
      <automation>create_folder</automation>
      <source></source>
      <destination></destination>
      <destination_replace_from></destination_replace_from>
      <destination_replace_to></destination_replace_to>
      <interval>week</interval>
      <next_process_on>2020-01-01</next_process_on>
      <path></path>
      <realtime type="boolean">true</realtime>
      <user_id type="integer">1</user_id>
      <user_ids type="array"/>
      <group_ids type="array"/>
    </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 Site 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 '{"automation":"create_folder","source":"source","destination":"destination","interval":"year"}' \
      -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>
           <automation>create_folder</automation>
           <source>source</source>
           <destination>destination</destination>
           <interval>year</interval>
         </automation>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Automation.create(
      automation: "create_folder", 
      source: "source", 
      destination: "destination", 
      interval: "year"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Automation::create(array(
      'automation' => "create_folder", 
      'source' => "source", 
      'destination' => "destination", 
      'interval' => "year"
    ));
    

    Example Response

    {
      "id": 1,
      "automation": "create_folder",
      "source": "",
      "destination": "",
      "destination_replace_from": "",
      "destination_replace_to": "",
      "interval": "week",
      "next_process_on": "2020-01-01",
      "path": "",
      "realtime": true,
      "user_id": 1,
      "user_ids": [
    
      ],
      "group_ids": [
    
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <automation>
      <id type="integer">1</id>
      <automation>create_folder</automation>
      <source></source>
      <destination></destination>
      <destination_replace_from></destination_replace_from>
      <destination_replace_to></destination_replace_to>
      <interval>week</interval>
      <next_process_on>2020-01-01</next_process_on>
      <path></path>
      <realtime type="boolean">true</realtime>
      <user_id type="integer">1</user_id>
      <user_ids type="array"/>
      <group_ids type="array"/>
    </automation>
    
    

    HTTPS Request

    POST /automations

    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
    automation string Required Type of automation. One of: create_folder, request_file, request_move
    source string Source Path
    destination string Destination 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.
    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.

    Update Automation

    Example Request

    curl https://app.files.com/api/rest/v1/automations/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"automation":"create_folder","source":"source","destination":"destination","interval":"year"}' \
      -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>
           <automation>create_folder</automation>
           <source>source</source>
           <destination>destination</destination>
           <interval>year</interval>
         </automation>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    automation = Files::Automation.find(1)
    automation.update(
      automation: "create_folder",
      source: "source",
      destination: "destination",
      interval: "year"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $automation = \Files\Automation->find(1);
    $automation->update(array(
      'automation' => "create_folder", 
      'source' => "source", 
      'destination' => "destination", 
      'interval' => "year"
    ));
    

    Example Response

    {
      "id": 1,
      "automation": "create_folder",
      "source": "",
      "destination": "",
      "destination_replace_from": "",
      "destination_replace_to": "",
      "interval": "week",
      "next_process_on": "2020-01-01",
      "path": "",
      "realtime": true,
      "user_id": 1,
      "user_ids": [
    
      ],
      "group_ids": [
    
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <automation>
      <id type="integer">1</id>
      <automation>create_folder</automation>
      <source></source>
      <destination></destination>
      <destination_replace_from></destination_replace_from>
      <destination_replace_to></destination_replace_to>
      <interval>week</interval>
      <next_process_on>2020-01-01</next_process_on>
      <path></path>
      <realtime type="boolean">true</realtime>
      <user_id type="integer">1</user_id>
      <user_ids type="array"/>
      <group_ids type="array"/>
    </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 Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Automation ID.
    automation string Required Type of automation. One of: create_folder, request_file, request_move
    source string Source Path
    destination string Destination 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.
    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.

    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.find(1)
    automation.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $automation = \Files\Automation->find(1);
    $automation->delete();
    

    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 Site Admin permissions.

    Request Parameters

    Parameter Description
    id int64 Required Automation ID.

    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.

    Behavior Types

    Webhook

    Sends an HTTP(S) request to a remote server whenever certain actions occur on a folder. Webhooks are often used to integrate Files.com with other services.

    Example Value

    {
      "urls": [
        "https://mysite.com/url..."
      ],
      "method": "POST",
      "encoding": "RAW",
      "triggers": [
        "create",
        "read",
        "update",
        "destroy",
        "move",
        "copy"
      ]
    }
    
    Value Hash Parameters  
    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.
    encoding May be JSON, XML, or RAW. 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.
    Behavior Details  
    Behavior type webhook
    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.

    File Expiration

    Files in this folder will expire (be deleted) after a certain number of days. This is most often used for compliance purposes where different types of data may need different retention settings. It's also great for managing your costs. You can retain different data for less time than others.

    Value is stored as an Integer (not a hash/array) representing the number of days.

    Example Value

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

    Auto Encrypt

    Files will be automatically encrypted after uploading using your provided GPG key.

    This Behavior is often used on our HIPAA accounts to convert data into a format unreadable by even us. GPG is an asymmetric encryption type (which means it uses public keys and private keys). Because you are only providing us your public key and keeping your private key, we won't be able to read anything once it has been GPG encrypted.

    Example Value

    {
      "algorithm": "PGP/GPG",
      "suffix": ".gpg",
      "key": "[your GPG public key]"
    }
    
    Value Hash Parameters  
    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.
    Behavior Details  
    Behavior type auto_encrypt
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect. Can be overridden by adding a behavior to the child.

    Lock Subfolders

    The subfolder structure of this folder may not be changed. This is useful in conjunction with workflows and automations to ensure your folder structure stays as you expect.

    This behavior does not require that a value be set.

    Behavior Details  
    Behavior type lock_subfolders
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect, cannot be overridden.

    Storage Region

    Files in this folder are stored in a certain geographical region. If you set this Behavior on an existing folder, we will migrate existing files to the new location automatically.

    Example Value

    "us-east-1"
    

    Value is stored as a String. Valid region values:

    Value String Region Description
    us-east-1 USA, Virginia
    ap-southeast-2 Australia, Sydney
    ca-central-1 Canada, Toronto
    eu-west-2 EU - UK, London
    eu-central-1 EU - Germany, Frankfurt
    ap-northeast-1 Japan, Tokyo
    ap-southeast-1 Singapore
    Behavior Details  
    Behavior type storage_region
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect. Can be overridden by adding a behavior to the child.

    Serve Publicly

    Files in this folder are served via a public HTTPS URL at https://SUBDOMAIN.hosted-by-files.com/...

    This feature works with common static site generators such as Jekyll and Middleman, and allows any static web assets or website to be hosted. It's a great way to get extra mileage out of your Files.com account and avoid having to pay for separate web hosting.

    Example Value

    {
      "key": "public-photos",
      "show_index": true
    }
    
    Value Hash Parameters  
    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?
    Behavior Details  
    Behavior type serve_publicly
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect, cannot be overridden.

    Create User Folders

    Create a folder here for new users when they are added. This Behavior is typically used to implement home folders for users. It's also a good building block for more advanced automations and workflows.

    Example Value

    {
      "permission": "full",
      "existing_users": true,
      "group_id": 1
    }
    
    Value Hash Parameters  
    permission What permission level to give the user on his or her new folder? 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.
    Behavior Details  
    Behavior type create_user_folders
    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.

    Remote Server Sync

    Sync this folder to a remote FTP, SFTP, or Amazon S3 Bucket. One-way and two-way sync options are supported.

    Example Value

    {
      "remote_server_id": "1",
      "direction": "two_way",
      "keep_after_copy": "keep",
      "remote_path": ""
    }
    
    Value Hash Parameters  
    direction One way or two way sync? Valid values: push_to_server, pull_from_server, two_way
    remote_server_id ID of the remote server to sync with. See the Remote Servers API resource for managing these.
    keep_after_copy If one-way syncing, should we delete or keep files after sync?
    remote_path Path on remote server to sync with
    Behavior Details  
    Behavior type remote_server_sync
    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.

    Inbox

    This folder operates as an inbox where anonymous users can upload files without logging in.

    Example Value

    {
      "key": "application-forms",
      "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."
    }
    
    Value Hash Parameters  
    key URL key used for the inbox.
    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.
    Behavior Details  
    Behavior type inbox
    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.

    Append Timestamp

    Append a timestamp to filenames of all files uploaded to this folder. This is often used in conjunction with Automations and remote server sync to ensure file organization.

    Example Value

    {
      "format": "-YYYY-MM-DDThh:mm:ssZ",
      "timezone": "Z"
    }
    
    Value Hash Parameters  
    format Format for the timestamp. You may use anything accepted by the standard UNIX date command.
    timezone Accepts any valid timezone value from the web interface. Send Z for UTC/Zulu time.
    Behavior Details  
    Behavior type append_timestamp
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect, cannot be overridden.

    Limit File Extensions

    Limit the allowed extensions of files being uploaded to this folder.

    Example Value

    [
      "xls",
      "csv"
    ]
    

    Value is stored as an Array (not a hash) of extensions.

    Behavior Details  
    Behavior type limit_file_extensions
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect, cannot be overridden.

    Limit File Regex

    Limit the filenames of files in this folder according to a regular expression.

    Example Value

    [
      "/Document-.*/"
    ]
    

    Value is stored as a single-element Array (not a hash) containing the regular expression, which must start and end with slashes.

    Behavior Details  
    Behavior type limit_file_regex
    Visible to non-admins? Yes
    Requires attachment? No
    Effect on Child Folders In effect, cannot be overridden.

    Amazon Sns

    Sends a notification via Amazon SNS whenever certain actions occur on a folder.

    Example Value

    {
      "arns": [
        "ARN..."
      ],
      "triggers": [
        "create",
        "read",
        "update",
        "destroy",
        "move",
        "copy"
      ]
    }
    
    Value Hash Parameters  
    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.
    Behavior Details  
    Behavior type amazon_sns
    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.

    Watermark

    Adds a watermark to any image preview generated for an image in this folder.

    {
      "gravity": "SouthWest",
      "offset_x": 5,
      "offset_y": 5,
      "max_width": 200,
      "max_height": 200,
      "percent_src": 10,
      "percent_dst": 10
    }
    
    Value Hash Parameters  
    gravity Where to locate the watermark? Valid values: Center, East, NorthEast, North, NorthWest, SouthEast, South, SouthWest, West
    max_width Max width in pixels
    max_height Max height in pixels
    offset_x X offset in pixels
    offset_y Y offset in in pixels
    percent_src Percentage to scale source
    percent_dst Percentage to scale destination
    Behavior Details  
    Behavior type watermark
    Visible to non-admins? Yes
    Requires attachment? Yes
    Effect on Child Folders In effect, cannot be overridden.

    The Behavior object

    Example Behavior Object

    {
      "id": 1,
      "attachment_url": "",
      "behavior": "webhook",
      "path": "",
      "value": {
        "method": "GET"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <behavior>
      <id type="integer">1</id>
      <attachment_url></attachment_url>
      <behavior>webhook</behavior>
      <path></path>
      <value>{ "method": "GET" }</value>
    </behavior>
    
    
    Attribute Description
    id int64 Folder behavior ID
    attachment_url string URL for attached file
    behavior string Behavior type.
    path string Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    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

    List Behaviors

    Example Request

    curl "https://app.files.com/api/rest/v1/behaviors.json?page=1&per_page=1&behavior=webhook" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/behaviors.xml?page=1&per_page=1&behavior=webhook" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.list(
      page: 1, 
      per_page: 1, 
      behavior: "webhook"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Behavior::list(array(
      'page' => 1, 
      'per_page' => 1, 
      'behavior' => "webhook"
    ));
    

    Example Response

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

    HTTPS Request

    GET /behaviors

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    behavior string If set, only shows folder behaviors matching this behavior type.

    List Behaviors by path

    Example Request

    curl "https://app.files.com/api/rest/v1/behaviors/folders/{path}?page=1&per_page=1&behavior=webhook" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/behaviors/folders/{path}?page=1&per_page=1&behavior=webhook" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Behavior.list_for(path, 
      page: 1, 
      per_page: 1, 
      behavior: "webhook"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Behavior::listFor($path, array(
      'page' => 1, 
      'per_page' => 1, 
      'behavior' => "webhook"
    ));
    

    Example Response

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

    HTTPS Request

    GET /behaviors/folders/?*path

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    path string Required Path to operate on.
    recursive string Show behaviors below this path?
    behavior string If set only shows folder behaviors matching this behavior type.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Behavior::find($id);
    

    Example Response

    {
      "id": 1,
      "attachment_url": "",
      "behavior": "webhook",
      "path": "",
      "value": {
        "method": "GET"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <behavior>
      <id type="integer">1</id>
      <attachment_url></attachment_url>
      <behavior>webhook</behavior>
      <path></path>
      <value>{ "method": "GET" }</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.

    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\"}","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>
           <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\"}", 
      path: "path", 
      behavior: "webhook"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Behavior::create(array(
      'value' => "{\"method\": \"GET\"}", 
      'path' => "path", 
      'behavior' => "webhook"
    ));
    

    Example Response

    {
      "id": 1,
      "attachment_url": "",
      "behavior": "webhook",
      "path": "",
      "value": {
        "method": "GET"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <behavior>
      <id type="integer">1</id>
      <attachment_url></attachment_url>
      <behavior>webhook</behavior>
      <path></path>
      <value>{ "method": "GET" }</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 a integer, array, or hash depending on the type of folder behavior.
    attachment_file file Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
    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"}' \
      -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>
         </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"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Behavior::webhookTest(array(
      'url' => "https://www.site.com/...", 
      'method' => "GET", 
      'encoding' => "RAW"
    ));
    

    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).

    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\"}"}' \
      -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>
         </behavior>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    behavior = Files::Behavior.find(1)
    behavior.update(
      value: "{\"method\": \"GET\"}"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $behavior = \Files\Behavior->find(1);
    $behavior->update(array(
      'value' => "{\"method\": \"GET\"}"
    ));
    

    Example Response

    {
      "id": 1,
      "attachment_url": "",
      "behavior": "webhook",
      "path": "",
      "value": {
        "method": "GET"
      }
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <behavior>
      <id type="integer">1</id>
      <attachment_url></attachment_url>
      <behavior>webhook</behavior>
      <path></path>
      <value>{ "method": "GET" }</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 a integer, array, or hash depending on the type of folder behavior.
    attachment_file file Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image

    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.find(1)
    behavior.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $behavior = \Files\Behavior->find(1);
    $behavior->delete();
    

    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.

    Blog Posts

    Blog Posts are literally the content of Files.com's blog at https://www.files.com/blog/

    We provide access via the API so clients can display updates to users.

    The BlogPost object

    Example BlogPost Object

    {
      "content": "",
      "link": "2000-01-01 01:00:00 UTC",
      "published_at": "2000-01-01 01:00:00 UTC",
      "title": ""
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <blog-post>
      <content></content>
      <link type="dateTime">2000-01-01T01:00:00Z</link>
      <published_at type="dateTime">2000-01-01T01:00:00Z</published_at>
      <title></title>
    </blog-post>
    
    
    Attribute Description
    content string Blog Post's Content
    link date-time Blog Post's Permanent Link
    published_at date-time Blog Post's Published Date
    title string Blog Post's Title

    Show the most recent blog posts from the Files.com blog

    Example Request

    curl "https://app.files.com/api/rest/v1/blog_posts.json?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/blog_posts.xml?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::BlogPost.list(
      page: 1, 
      per_page: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\BlogPost::list(array(
      'page' => 1, 
      'per_page' => 1
    ));
    

    Example Response

    [
      {
        "content": "",
        "link": "2000-01-01 01:00:00 UTC",
        "published_at": "2000-01-01 01:00:00 UTC",
        "title": ""
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <blog-posts type="array">
      <blog-post>
        <content></content>
        <link type="dateTime">2000-01-01T01:00:00Z</link>
        <published_at type="dateTime">2000-01-01T01:00:00Z</published_at>
        <title></title>
      </blog-post>
    </blog-posts>
    
    

    HTTPS Request

    GET /blog_posts

    Authentication Required

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

    Request Parameters

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.

    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",
      "created_at": "2000-01-01 01:00:00 UTC",
      "description": "The public description of the bundle.",
      "expires_at": "2000-01-01 01:00:00 UTC",
      "paths": [
    
      ],
      "id": 1,
      "note": "The internal note on the bundle.",
      "password_protected": true,
      "url": "https://subdomain.files.com/f/12345678",
      "user_id": 1,
      "username": "user"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle>
      <code>abc123</code>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <description>The public description of the bundle.</description>
      <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
      <paths type="array"/>
      <id type="integer">1</id>
      <note>The internal note on the bundle.</note>
      <password_protected type="boolean">true</password_protected>
      <url>https://subdomain.files.com/f/12345678</url>
      <user_id type="integer">1</user_id>
      <username>user</username>
    </bundle>
    
    
    Attribute Description
    code string Bundle code. This code forms the end part of the Public URL.
    created_at date-time Bundle created at date/time
    description string Public description
    expires_at date-time Bundle expiration date/time
    paths array A list of paths in this bundle
    id int64 Bundle ID
    note string Bundle internal note
    password_protected boolean Is this bundle password protected?
    url string Public URL of Share Link
    user_id int64 Bundle creator user ID
    username string Bundle creator username
    password string Password for this bundle.

    List Bundles

    Example Request

    curl "https://app.files.com/api/rest/v1/bundles.json?user_id=1&page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/bundles.xml?user_id=1&page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Bundle.list(
      user_id: 1, 
      page: 1, 
      per_page: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Bundle::list(array(
      'user_id' => 1, 
      'page' => 1, 
      'per_page' => 1
    ));
    

    Example Response

    [
      {
        "code": "abc123",
        "created_at": "2000-01-01 01:00:00 UTC",
        "description": "The public description of the bundle.",
        "expires_at": "2000-01-01 01:00:00 UTC",
        "paths": [
    
        ],
        "id": 1,
        "note": "The internal note on the bundle.",
        "password_protected": true,
        "url": "https://subdomain.files.com/f/12345678",
        "user_id": 1,
        "username": "user"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundles type="array">
      <bundle>
        <code>abc123</code>
        <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
        <description>The public description of the bundle.</description>
        <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
        <paths type="array"/>
        <id type="integer">1</id>
        <note>The internal note on the bundle.</note>
        <password_protected type="boolean">true</password_protected>
        <url>https://subdomain.files.com/f/12345678</url>
        <user_id type="integer">1</user_id>
        <username>user</username>
      </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.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Bundle::find($id);
    

    Example Response

    {
      "code": "abc123",
      "created_at": "2000-01-01 01:00:00 UTC",
      "description": "The public description of the bundle.",
      "expires_at": "2000-01-01 01:00:00 UTC",
      "paths": [
    
      ],
      "id": 1,
      "note": "The internal note on the bundle.",
      "password_protected": true,
      "url": "https://subdomain.files.com/f/12345678",
      "user_id": 1,
      "username": "user"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle>
      <code>abc123</code>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <description>The public description of the bundle.</description>
      <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
      <paths type="array"/>
      <id type="integer">1</id>
      <note>The internal note on the bundle.</note>
      <password_protected type="boolean">true</password_protected>
      <url>https://subdomain.files.com/f/12345678</url>
      <user_id type="integer">1</user_id>
      <username>user</username>
    </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","expires_at":"2000-01-01 01:00:00 UTC","description":"Public description","note":"Internal Note"}' \
      -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>
           <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
           <description>Public description</description>
           <note>Internal Note</note>
         </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", 
      expires_at: "2000-01-01 01:00:00 UTC", 
      description: "Public description", 
      note: "Internal Note"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Bundle::create(array(
      'user_id' => 1, 
      'paths' => ["file.txt"], 
      'password' => "Password", 
      'expires_at' => "2000-01-01 01:00:00 UTC", 
      'description' => "Public description", 
      'note' => "Internal Note"
    ));
    

    Example Response

    {
      "code": "abc123",
      "created_at": "2000-01-01 01:00:00 UTC",
      "description": "The public description of the bundle.",
      "expires_at": "2000-01-01 01:00:00 UTC",
      "paths": [
    
      ],
      "id": 1,
      "note": "The internal note on the bundle.",
      "password_protected": true,
      "url": "https://subdomain.files.com/f/12345678",
      "user_id": 1,
      "username": "user"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <bundle>
      <code>abc123</code>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <description>The public description of the bundle.</description>
      <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
      <paths type="array"/>
      <id type="integer">1</id>
      <note>The internal note on the bundle.</note>
      <password_protected type="boolean">true</password_protected>
      <url>https://subdomain.files.com/f/12345678</url>
      <user_id type="integer">1</user_id>
      <username>user</username>
    </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.
    expires_at string Bundle expiration date/time.
    description string Bundle public description
    note string Bundle internal note

    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."}' \
      -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>
         </bundle>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    bundle = Files::Bundle.find(1)
    bundle.share(
      to: ["johndoe@gmail.com"],
      note: "Just a note."
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $bundle = \Files\Bundle->find(1);
    $bundle->share(array(
      'to' => ["johndoe@gmail.com"], 
      'note' => "Just a note."
    ));
    

    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) Required A list of email addresses to share this bundle with.
    note string Note to include in email.

    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.find(1)
    bundle.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $bundle = \Files\Bundle->find(1);
    $bundle->delete();
    

    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.

    Certificates

    These API endpoints are only used for maintaining custom SSL Certificates for your Files.com site. Files.com is also capable of registering SSL certificates itself, so this is only required if you have specific security requirements to use your own certificate.

    The Certificate object

    Example Certificate Object

    {
      "id": 1,
      "certificate": "[certificate]",
      "created_at": "2000-01-01 01:00:00 UTC",
      "display_status": "Available",
      "domains": [
    
      ],
      "expires_at": "2000-01-01 01:00:00 UTC",
      "brick_managed": true,
      "intermediates": "[certificates]",
      "ip_addresses": [
    
      ],
      "issuer": "",
      "name": "My Certificate",
      "key_type": "RSA-4096",
      "request": "[CSR]",
      "status": "Available",
      "subject": "my-custom-domain.com",
      "updated_at": "2000-01-01 01:00:00 UTC"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <certificate>
      <id type="integer">1</id>
      <certificate>[certificate]</certificate>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <display_status>Available</display_status>
      <domains type="array"/>
      <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
      <brick_managed type="boolean">true</brick_managed>
      <intermediates>[certificates]</intermediates>
      <ip_addresses type="array"/>
      <issuer></issuer>
      <name>My Certificate</name>
      <key_type>RSA-4096</key_type>
      <request>[CSR]</request>
      <status>Available</status>
      <subject>my-custom-domain.com</subject>
      <updated_at type="dateTime">2000-01-01T01:00:00Z</updated_at>
    </certificate>
    
    
    Attribute Description
    id int64 Certificate ID
    certificate string Full text of SSL certificate
    created_at date-time Certificate created at
    display_status string Certificate status. (One of Request Generated, New, Active, Active/Expired, Expired, or Available)
    domains array Domains on this certificate other than files.com domains
    expires_at date-time Certificate expiration date/time
    brick_managed boolean Is this certificate automatically managed and renewed by Files.com?
    intermediates string Intermediate certificates
    ip_addresses array A list of IP addresses associated with this SSL Certificate
    issuer string X509 issuer
    name string Descriptive name of certificate
    key_type string Type of key
    request string Certificate signing request text
    status string Certificate status (Request Generated, New, Active, Active/Expired, Expired, or Available)
    subject string X509 Subject name
    updated_at date-time Certificated last updated at
    certificate_domain string Domain for certificate.
    certificate_country string Country.
    certificate_state_or_province string State or province.
    certificate_city_or_locale string City or locale.
    certificate_company_name string Company name.
    csr_ou1 string Department name or organization unit 1
    csr_ou2 string Department name or organization unit 2
    csr_ou3 string Department name or organization unit 3
    certificate_email_address string Email address for the certificate owner.
    key_type_confirm_given string Confirms the key type.
    private_key string Certificate private key.
    password string Certificate password.

    List Certificates

    Example Request

    curl "https://app.files.com/api/rest/v1/certificates.json?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/certificates.xml?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Certificate.list(
      page: 1, 
      per_page: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Certificate::list(array(
      'page' => 1, 
      'per_page' => 1
    ));
    

    Example Response

    [
      {
        "id": 1,
        "certificate": "[certificate]",
        "created_at": "2000-01-01 01:00:00 UTC",
        "display_status": "Available",
        "domains": [
    
        ],
        "expires_at": "2000-01-01 01:00:00 UTC",
        "brick_managed": true,
        "intermediates": "[certificates]",
        "ip_addresses": [
    
        ],
        "issuer": "",
        "name": "My Certificate",
        "key_type": "RSA-4096",
        "request": "[CSR]",
        "status": "Available",
        "subject": "my-custom-domain.com",
        "updated_at": "2000-01-01 01:00:00 UTC"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <certificates type="array">
      <certificate>
        <id type="integer">1</id>
        <certificate>[certificate]</certificate>
        <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
        <display_status>Available</display_status>
        <domains type="array"/>
        <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
        <brick_managed type="boolean">true</brick_managed>
        <intermediates>[certificates]</intermediates>
        <ip_addresses type="array"/>
        <issuer></issuer>
        <name>My Certificate</name>
        <key_type>RSA-4096</key_type>
        <request>[CSR]</request>
        <status>Available</status>
        <subject>my-custom-domain.com</subject>
        <updated_at type="dateTime">2000-01-01T01:00:00Z</updated_at>
      </certificate>
    </certificates>
    
    

    HTTPS Request

    GET /certificates

    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
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.

    Show Certificate

    Example Request

    curl https://app.files.com/api/rest/v1/certificates/{id}.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/certificates/{id}.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Certificate.find(id)
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Certificate::find($id);
    

    Example Response

    {
      "id": 1,
      "certificate": "[certificate]",
      "created_at": "2000-01-01 01:00:00 UTC",
      "display_status": "Available",
      "domains": [
    
      ],
      "expires_at": "2000-01-01 01:00:00 UTC",
      "brick_managed": true,
      "intermediates": "[certificates]",
      "ip_addresses": [
    
      ],
      "issuer": "",
      "name": "My Certificate",
      "key_type": "RSA-4096",
      "request": "[CSR]",
      "status": "Available",
      "subject": "my-custom-domain.com",
      "updated_at": "2000-01-01 01:00:00 UTC"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <certificate>
      <id type="integer">1</id>
      <certificate>[certificate]</certificate>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <display_status>Available</display_status>
      <domains type="array"/>
      <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
      <brick_managed type="boolean">true</brick_managed>
      <intermediates>[certificates]</intermediates>
      <ip_addresses type="array"/>
      <issuer></issuer>
      <name>My Certificate</name>
      <key_type>RSA-4096</key_type>
      <request>[CSR]</request>
      <status>Available</status>
      <subject>my-custom-domain.com</subject>
      <updated_at type="dateTime">2000-01-01T01:00:00Z</updated_at>
    </certificate>
    
    

    HTTPS Request

    GET /certificates/{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 Certificate ID.

    Create CSR or import existing SSL Certificate

    Example Request

    curl https://app.files.com/api/rest/v1/certificates.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"name":"Name","certificate_domain":"domain.com","key_type":"RSA-4096","certificate":"[certificate]","intermediates":"[certificates]"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/certificates.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<certificate>
           <name>Name</name>
           <certificate_domain>domain.com</certificate_domain>
           <key_type>RSA-4096</key_type>
           <certificate>[certificate]</certificate>
           <intermediates>[certificates]</intermediates>
         </certificate>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Certificate.create(
      name: "Name", 
      certificate_domain: "domain.com", 
      key_type: "RSA-4096", 
      certificate: "[certificate]", 
      intermediates: "[certificates]"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Certificate::create(array(
      'name' => "Name", 
      'certificate_domain' => "domain.com", 
      'key_type' => "RSA-4096", 
      'certificate' => "[certificate]", 
      'intermediates' => "[certificates]"
    ));
    

    Example Response

    {
      "id": 1,
      "certificate": "[certificate]",
      "created_at": "2000-01-01 01:00:00 UTC",
      "display_status": "Available",
      "domains": [
    
      ],
      "expires_at": "2000-01-01 01:00:00 UTC",
      "brick_managed": true,
      "intermediates": "[certificates]",
      "ip_addresses": [
    
      ],
      "issuer": "",
      "name": "My Certificate",
      "key_type": "RSA-4096",
      "request": "[CSR]",
      "status": "Available",
      "subject": "my-custom-domain.com",
      "updated_at": "2000-01-01 01:00:00 UTC"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <certificate>
      <id type="integer">1</id>
      <certificate>[certificate]</certificate>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <display_status>Available</display_status>
      <domains type="array"/>
      <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
      <brick_managed type="boolean">true</brick_managed>
      <intermediates>[certificates]</intermediates>
      <ip_addresses type="array"/>
      <issuer></issuer>
      <name>My Certificate</name>
      <key_type>RSA-4096</key_type>
      <request>[CSR]</request>
      <status>Available</status>
      <subject>my-custom-domain.com</subject>
      <updated_at type="dateTime">2000-01-01T01:00:00Z</updated_at>
    </certificate>
    
    

    HTTPS Request

    POST /certificates

    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 Internal name of the SSL certificate.
    certificate_domain string Domain for certificate.
    certificate_country string Country.
    certificate_state_or_province string State or province.
    certificate_city_or_locale string City or locale.
    certificate_company_name string Company name.
    csr_ou1 string Department name or organization unit 1
    csr_ou2 string Department name or organization unit 2
    csr_ou3 string Department name or organization unit 3
    certificate_email_address string Email address for the certificate owner.
    key_type string Any supported key type. Defaults to RSA-4096.
    key_type_confirm_given string Confirms the key type.
    certificate string The certificate. PEM or PKCS7 formats accepted.
    private_key string Certificate private key.
    password string Certificate password.
    intermediates string Intermediate certificates. PEM or PKCS7 formats accepted.

    Deactivate SSL Certificate

    Example Request

    curl https://app.files.com/api/rest/v1/certificates/{id}/deactivate.json \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/certificates/{id}/deactivate.xml \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    certificate = Files::Certificate.find(1)
    certificate.deactivate
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $certificate = \Files\Certificate->find(1);
    $certificate->deactivate();
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    POST /certificates/{id}/deactivate

    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 Certificate ID.

    Activate SSL Certificate

    Example Request

    curl https://app.files.com/api/rest/v1/certificates/{id}/activate.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"replace_cert":""}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/certificates/{id}/activate.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<certificate>
           <replace_cert></replace_cert>
         </certificate>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    certificate = Files::Certificate.find(1)
    certificate.activate(
      replace_cert: ""
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $certificate = \Files\Certificate->find(1);
    $certificate->activate(array(
      'replace_cert' => ""
    ));
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    POST /certificates/{id}/activate

    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 Certificate ID.
    replace_cert string Leave blank, set to any or new_ips.

    Update Certificate

    Example Request

    curl https://app.files.com/api/rest/v1/certificates/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"name":"My Certificate","intermediates":"[certificates]","certificate":"[certificate]"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/certificates/{id}.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<certificate>
           <name>My Certificate</name>
           <intermediates>[certificates]</intermediates>
           <certificate>[certificate]</certificate>
         </certificate>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    certificate = Files::Certificate.find(1)
    certificate.update(
      name: "My Certificate",
      intermediates: "[certificates]",
      certificate: "[certificate]"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $certificate = \Files\Certificate->find(1);
    $certificate->update(array(
      'name' => "My Certificate", 
      'intermediates' => "[certificates]", 
      'certificate' => "[certificate]"
    ));
    

    Example Response

    {
      "id": 1,
      "certificate": "[certificate]",
      "created_at": "2000-01-01 01:00:00 UTC",
      "display_status": "Available",
      "domains": [
    
      ],
      "expires_at": "2000-01-01 01:00:00 UTC",
      "brick_managed": true,
      "intermediates": "[certificates]",
      "ip_addresses": [
    
      ],
      "issuer": "",
      "name": "My Certificate",
      "key_type": "RSA-4096",
      "request": "[CSR]",
      "status": "Available",
      "subject": "my-custom-domain.com",
      "updated_at": "2000-01-01 01:00:00 UTC"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <certificate>
      <id type="integer">1</id>
      <certificate>[certificate]</certificate>
      <created_at type="dateTime">2000-01-01T01:00:00Z</created_at>
      <display_status>Available</display_status>
      <domains type="array"/>
      <expires_at type="dateTime">2000-01-01T01:00:00Z</expires_at>
      <brick_managed type="boolean">true</brick_managed>
      <intermediates>[certificates]</intermediates>
      <ip_addresses type="array"/>
      <issuer></issuer>
      <name>My Certificate</name>
      <key_type>RSA-4096</key_type>
      <request>[CSR]</request>
      <status>Available</status>
      <subject>my-custom-domain.com</subject>
      <updated_at type="dateTime">2000-01-01T01:00:00Z</updated_at>
    </certificate>
    
    

    HTTPS Request

    PATCH /certificates/{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 Certificate ID.
    name string Internal certificate name.
    intermediates string Any intermediate certificates. PEM or PKCS7 formats accepted.
    certificate string The certificate. PEM or PKCS7 formats accepted.

    Delete Certificate

    Example Request

    curl https://app.files.com/api/rest/v1/certificates/{id}.json \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/certificates/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    certificate = Files::Certificate.find(1)
    certificate.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $certificate = \Files\Certificate->find(1);
    $certificate->delete();
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /certificates/{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 Certificate 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

    {
      "domain": "my-custom-domain.com",
      "rrtype": "CNAME",
      "value": "mysite.files.com"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <dns-record>
      <domain>my-custom-domain.com</domain>
      <rrtype>CNAME</rrtype>
      <value>mysite.files.com</value>
    </dns-record>
    
    
    Attribute Description
    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?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/dns_records.xml?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::DnsRecord.list(
      page: 1, 
      per_page: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\DnsRecord::list(array(
      'page' => 1, 
      'per_page' => 1
    ));
    

    Example Response

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

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.

    Files/Folders

    The File and Folder resources in the REST API 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 REST 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. The SDKs take care of all the complexity for you.

    Specifying file path names

    When accessing the File and Folder resources in the REST API (i.e. endpoints that begin with /files or /folders), the remainder of the URL specifies the path to a file/folder being operated on. Operations on those endpoints in particular, without a file name, specify the operation applies to the Root Folder of your site.

    For example, to retrieve a file called Hello.txt, a GET request would be sent to /files/Hello.txt.

    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.

    Request and response format

    The Files.com REST API supports both JSON and XML for both request data and response data. The REST API does not assume the request and response formats are the same, and determines each independently to allow them to be different. On all requests, the request data format is determined from the Content-Type header in the request.

    For the response, the REST API normally looks at the file extension (.json or .xml) or the Accept header in the request. However, for requests sent to the /files and /folders interfaces (and other endpoints that include the path name directly, such as /history/files and /history/folders), any file extension is assumed to be part of the file name being operated on and does not affect the response format. Therefore, when using this part of the REST API, please send an Accept header to set the response format. Currently, the default format is JSON if no Accept header is sent, but is subject to change, and therefore sending the Accept header with a value of application/json is recommended.

    Valid Accept header values are as follows:

    MIME Type Description
    application/json JSON
    application/xml XML
    text/html HTML (Only valid for /history/files and /history/folders)
    application/vnd.ms-excel XLS (Only valid for /history/files and /history/folders)
    text/csv CSV (Only valid for /history/files and /history/folders)

    The File object

    Example File Object

    {
      "id": 1,
      "path": "path/file.txt",
      "display_name": "file.txt",
      "type": "file",
      "size": 1024,
      "mtime": "2000-01-01 01:00:00 UTC",
      "provided_mtime": "2000-01-01 01:00:00 UTC",
      "crc32": "70976923",
      "md5": "17c54824e9931a4688ca032d03f6663c",
      "mime_type": "application/octet-stream",
      "region": "us-east-1",
      "permissions": "rpw",
      "subfolders_locked?": true,
      "download_uri": "https://mysite.files.com/...",
      "priority_color": "red",
      "preview_id": 1,
      "preview": ""
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file>
      <id type="integer">1</id>
      <path>path/file.txt</path>
      <display_name>file.txt</display_name>
      <type>file</type>
      <size type="integer">1024</size>
      <mtime type="dateTime">2000-01-01T01:00:00Z</mtime>
      <provided_mtime type="dateTime">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>rpw</permissions>
      <subfolders_locked? type="boolean">true</subfolders_locked?>
      <download_uri>https://mysite.files.com/...</download_uri>
      <priority_color>red</priority_color>
      <preview_id type="integer">1</preview_id>
      <preview></preview>
    </file>
    
    
    Attribute Description
    id int64 File/Folder ID
    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
    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,w,p, or any combination
    subfolders_locked? boolean Are subfolders 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 File preview

    Download file

    Example Request

    curl "https://app.files.com/api/rest/v1/files/{path}?with_previews=true&with_priority_color=true" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/files/{path}?with_previews=true&with_priority_color=true" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file = Files::File.find(1)
    file.download(
      with_previews: true,
      with_priority_color: true
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $file = \Files\File->find(1);
    $file->download(array(
      'with_previews' => true, 
      'with_priority_color' => true
    ));
    

    Example Response

    {
      "id": 1,
      "path": "path/file.txt",
      "display_name": "file.txt",
      "type": "file",
      "size": 1024,
      "mtime": "2000-01-01 01:00:00 UTC",
      "provided_mtime": "2000-01-01 01:00:00 UTC",
      "crc32": "70976923",
      "md5": "17c54824e9931a4688ca032d03f6663c",
      "mime_type": "application/octet-stream",
      "region": "us-east-1",
      "permissions": "rpw",
      "subfolders_locked?": true,
      "download_uri": "https://mysite.files.com/...",
      "priority_color": "red",
      "preview_id": 1,
      "preview": ""
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file>
      <id type="integer">1</id>
      <path>path/file.txt</path>
      <display_name>file.txt</display_name>
      <type>file</type>
      <size type="integer">1024</size>
      <mtime type="dateTime">2000-01-01T01:00:00Z</mtime>
      <provided_mtime type="dateTime">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>rpw</permissions>
      <subfolders_locked? type="boolean">true</subfolders_locked?>
      <download_uri>https://mysite.files.com/...</download_uri>
      <priority_color>red</priority_color>
      <preview_id type="integer">1</preview_id>
      <preview></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.
    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}?page=1&per_page=1&search_all=true&with_priority_color=true" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/folders/{path}?page=1&per_page=1&search_all=true&with_priority_color=true" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Folder.list_for(path, 
      page: 1, 
      per_page: 1, 
      search_all: true, 
      with_priority_color: true
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Folder::listFor($path, array(
      'page' => 1, 
      'per_page' => 1, 
      'search_all' => true, 
      'with_priority_color' => true
    ));
    

    Example Response

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

    HTTPS Request

    GET /folders/?*path

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Action to take. Can be count, count_nrs (non recursive), size, permissions, or blank.
    path string Required Path to operate on.
    cursor string Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor header.
    filter string If specified, will to filter folders/files list by this string. Wildcards of * and ? are acceptable here.
    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?
    with_priority_color boolean Include file priority color information?

    Upload file

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

    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"}' \
      -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>
           <destination>destination</destination>
         </file>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file_action = Files::FileAction.find(1)
    file_action.copy(
      destination: "destination"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $file_action = \Files\FileAction->find(1);
    $file_action->copy(array(
      'destination' => "destination"
    ));
    

    Example Response

    No response.
    
    No response.
    

    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.

    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>
           <destination>destination</destination>
         </file>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file_action = Files::FileAction.find(1)
    file_action.move(
      destination: "destination"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $file_action = \Files\FileAction->find(1);
    $file_action->move(array(
      'destination' => "destination"
    ));
    

    Example Response

    No response.
    
    No response.
    

    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.

    Create folder

    Example Request

    curl https://app.files.com/api/rest/v1/folders/{path} \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/folders/{path} \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    folder = Files::Folder.find(1)
    folder.create
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $folder = \Files\Folder->find(1);
    $folder->create();
    

    Example Response

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

    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-01 01:00:00 UTC","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 type="dateTime">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.find(1)
    file.update(
      provided_mtime: "2000-01-01 01:00:00 UTC",
      priority_color: "red"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $file = \Files\File->find(1);
    $file->update(array(
      'provided_mtime' => "2000-01-01 01:00:00 UTC", 
      'priority_color' => "red"
    ));
    

    Example Response

    {
      "id": 1,
      "path": "path/file.txt",
      "display_name": "file.txt",
      "type": "file",
      "size": 1024,
      "mtime": "2000-01-01 01:00:00 UTC",
      "provided_mtime": "2000-01-01 01:00:00 UTC",
      "crc32": "70976923",
      "md5": "17c54824e9931a4688ca032d03f6663c",
      "mime_type": "application/octet-stream",
      "region": "us-east-1",
      "permissions": "rpw",
      "subfolders_locked?": true,
      "download_uri": "https://mysite.files.com/...",
      "priority_color": "red",
      "preview_id": 1,
      "preview": ""
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file>
      <id type="integer">1</id>
      <path>path/file.txt</path>
      <display_name>file.txt</display_name>
      <type>file</type>
      <size type="integer">1024</size>
      <mtime type="dateTime">2000-01-01T01:00:00Z</mtime>
      <provided_mtime type="dateTime">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>rpw</permissions>
      <subfolders_locked? type="boolean">true</subfolders_locked?>
      <download_uri>https://mysite.files.com/...</download_uri>
      <priority_color>red</priority_color>
      <preview_id type="integer">1</preview_id>
      <preview></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}?recursive=true" \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/files/{path}?recursive=true" \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file = Files::File.find(1)
    file.delete(
      recursive: true
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $file = \Files\File->find(1);
    $file->delete(array(
      'recursive' => true
    ));
    

    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. For legacy reasons, this parameter may also be provided as the HTTP header Depth: Infinity

    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>'
    

    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 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": [
    
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-comment>
      <id type="integer">1</id>
      <body>What a great file!</body>
      <reactions type="array"/>
    </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}?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/file_comments/files/{path}?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::FileComment.list_for(path, 
      page: 1, 
      per_page: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\FileComment::listFor($path, array(
      'page' => 1, 
      'per_page' => 1
    ));
    

    Example Response

    [
      {
        "id": 1,
        "body": "What a great file!",
        "reactions": [
    
        ]
      }
    ]
    
    <?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"/>
      </file-comment>
    </file-comments>
    
    

    HTTPS Request

    GET /file_comments/files/?*path

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    path string Required Path to operate on.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\FileComment::create(array(
      'body' => "body", 
      'path' => "path"
    ));
    

    Example Response

    {
      "id": 1,
      "body": "What a great file!",
      "reactions": [
    
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-comment>
      <id type="integer">1</id>
      <body>What a great file!</body>
      <reactions type="array"/>
    </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.find(1)
    file_comment.update(
      body: "body"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $file_comment = \Files\FileComment->find(1);
    $file_comment->update(array(
      'body' => "body"
    ));
    

    Example Response

    {
      "id": 1,
      "body": "What a great file!",
      "reactions": [
    
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-comment>
      <id type="integer">1</id>
      <body>What a great file!</body>
      <reactions type="array"/>
    </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.find(1)
    file_comment.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $file_comment = \Files\FileComment->find(1);
    $file_comment->delete();
    

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\FileCommentReaction::create(array(
      'user_id' => 1, 
      'file_comment_id' => 1, 
      'emoji' => "emoji"
    ));
    

    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.find(1)
    file_comment_reaction.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $file_comment_reaction = \Files\FileCommentReaction->find(1);
    $file_comment_reaction->delete();
    

    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 Part Uploads

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

    The FilePartUpload object

    Example FilePartUpload Object

    {
      "send": "",
      "action": "upload/direct",
      "ask_about_overwrites": true,
      "available_parts": "",
      "expires": "",
      "headers": "",
      "http_method": "POST",
      "next_partsize": "",
      "parameters": "",
      "part_number": "",
      "partsize": "",
      "path": "path",
      "ref": "upload-1",
      "upload_uri": ""
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-part-upload>
      <send></send>
      <action>upload/direct</action>
      <ask_about_overwrites type="boolean">true</ask_about_overwrites>
      <available_parts></available_parts>
      <expires></expires>
      <headers></headers>
      <http_method>POST</http_method>
      <next_partsize></next_partsize>
      <parameters></parameters>
      <part_number></part_number>
      <partsize></partsize>
      <path>path</path>
      <ref>upload-1</ref>
      <upload_uri></upload_uri>
    </file-part-upload>
    
    
    Attribute Description
    send object Content-Type and File to send
    action string Type of upload
    ask_about_overwrites boolean If false, rename conflicting files instead of asking for overwrite confirmation
    available_parts string Currently unused
    expires string Currently unused
    headers object Additional upload headers
    http_method string Upload method, usually POST
    next_partsize string Currently unused
    parameters string Additional upload parameters
    part_number string Currently unused
    partsize string Currently unused
    path string Upload 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,"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-part-upload>
           <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>
           <with_rename type="boolean">true</with_rename>
         </file-part-upload>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    file_action = Files::FileAction.find(1)
    file_action.begin_upload(
      mkdir_parents: true,
      part: 1,
      parts: 1,
      ref: "upload-1",
      restart: 1,
      with_rename: true
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $file_action = \Files\FileAction->find(1);
    $file_action->beginUpload(array(
      'mkdir_parents' => true, 
      'part' => 1, 
      'parts' => 1, 
      'ref' => "upload-1", 
      'restart' => 1, 
      'with_rename' => true
    ));
    

    Example Response

    {
      "send": "",
      "action": "upload/direct",
      "ask_about_overwrites": true,
      "available_parts": "",
      "expires": "",
      "headers": "",
      "http_method": "POST",
      "next_partsize": "",
      "parameters": "",
      "part_number": "",
      "partsize": "",
      "path": "path",
      "ref": "upload-1",
      "upload_uri": ""
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <file-part-upload>
      <send></send>
      <action>upload/direct</action>
      <ask_about_overwrites type="boolean">true</ask_about_overwrites>
      <available_parts></available_parts>
      <expires></expires>
      <headers></headers>
      <http_method>POST</http_method>
      <next_partsize></next_partsize>
      <parameters></parameters>
      <part_number></part_number>
      <partsize></partsize>
      <path>path</path>
      <ref>upload-1</ref>
      <upload_uri></upload_uri>
    </file-part-upload>
    
    

    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.
    with_rename boolean Allow file rename instead of overwrite?

    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,
      "admin_ids": [
    
      ],
      "name": "owners",
      "notes": "",
      "user_ids": [
    
      ],
      "usernames": [
    
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group>
      <id type="integer">1</id>
      <admin_ids type="array"/>
      <name>owners</name>
      <notes></notes>
      <user_ids type="array"/>
      <usernames type="array"/>
    </group>
    
    
    Attribute Description
    id int64 Group ID
    admin_ids array List of user IDs who are group administrators (separated by commas)
    name string Group name
    notes string Notes about this group
    user_ids array List of user IDs who belong to this group (separated by commas)
    usernames array List of usernames who belong to this group (separated by commas)

    List Groups

    Example Request

    curl "https://app.files.com/api/rest/v1/groups.json?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/groups.xml?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Group.list(
      page: 1, 
      per_page: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Group::list(array(
      'page' => 1, 
      'per_page' => 1
    ));
    

    Example Response

    [
      {
        "id": 1,
        "admin_ids": [
    
        ],
        "name": "owners",
        "notes": "",
        "user_ids": [
    
        ],
        "usernames": [
    
        ]
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <groups type="array">
      <group>
        <id type="integer">1</id>
        <admin_ids type="array"/>
        <name>owners</name>
        <notes></notes>
        <user_ids type="array"/>
        <usernames type="array"/>
      </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
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    ids string Comma-separated list of group ids to include in results.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Group::find($id);
    

    Example Response

    {
      "id": 1,
      "admin_ids": [
    
      ],
      "name": "owners",
      "notes": "",
      "user_ids": [
    
      ],
      "usernames": [
    
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group>
      <id type="integer">1</id>
      <admin_ids type="array"/>
      <name>owners</name>
      <notes></notes>
      <user_ids type="array"/>
      <usernames type="array"/>
    </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 '{"name":"owners"}' \
      -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>
           <name>owners</name>
         </group>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Group.create(
      name: "owners"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Group::create(array(
      'name' => "owners"
    ));
    

    Example Response

    {
      "id": 1,
      "admin_ids": [
    
      ],
      "name": "owners",
      "notes": "",
      "user_ids": [
    
      ],
      "usernames": [
    
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group>
      <id type="integer">1</id>
      <admin_ids type="array"/>
      <name>owners</name>
      <notes></notes>
      <user_ids type="array"/>
      <usernames type="array"/>
    </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
    name string Group name.
    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.

    Update Group

    Example Request

    curl https://app.files.com/api/rest/v1/groups/{id}.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"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>
           <name>owners</name>
         </group>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    group = Files::Group.find(1)
    group.update(
      name: "owners"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $group = \Files\Group->find(1);
    $group->update(array(
      'name' => "owners"
    ));
    

    Example Response

    {
      "id": 1,
      "admin_ids": [
    
      ],
      "name": "owners",
      "notes": "",
      "user_ids": [
    
      ],
      "usernames": [
    
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group>
      <id type="integer">1</id>
      <admin_ids type="array"/>
      <name>owners</name>
      <notes></notes>
      <user_ids type="array"/>
      <usernames type="array"/>
    </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.
    name string Group name.
    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.

    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.find(1)
    group.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $group = \Files\Group->find(1);
    $group->delete();
    

    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.

    The GroupUser object

    Example GroupUser Object

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

    List Group Users

    Example Request

    curl "https://app.files.com/api/rest/v1/group_users.json?user_id=1&page=1&per_page=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&page=1&per_page=1&group_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::GroupUser.list(
      user_id: 1, 
      page: 1, 
      per_page: 1, 
      group_id: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\GroupUser::list(array(
      'user_id' => 1, 
      'page' => 1, 
      'per_page' => 1, 
      'group_id' => 1
    ));
    

    Example Response

    [
      {
        "id": 1,
        "admin": true,
        "name": "My Group",
        "usernames": [
    
        ]
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group-users type="array">
      <group-user>
        <id type="integer">1</id>
        <admin type="boolean">true</admin>
        <name>My Group</name>
        <usernames type="array"/>
      </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 groups of which this user is a member.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    group_id int64 Group ID. If provided, will return members of this group.

    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.find(1)
    group_user.update(
      group_id: 1,
      user_id: 1,
      admin: true
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $group_user = \Files\GroupUser->find(1);
    $group_user->update(array(
      'group_id' => 1, 
      'user_id' => 1, 
      'admin' => true
    ));
    

    Example Response

    {
      "id": 1,
      "admin": true,
      "name": "My Group",
      "usernames": [
    
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <group-user>
      <id type="integer">1</id>
      <admin type="boolean">true</admin>
      <name>My Group</name>
      <usernames type="array"/>
    </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 \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/group_users/{id}.xml \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    group_user = Files::GroupUser.find(1)
    group_user.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $group_user = \Files\GroupUser->find(1);
    $group_user->delete();
    

    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.

    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

    {
      "associated_with": "Site",
      "group_id": 1,
      "ip_addresses": [
    
      ]
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <ip-address>
      <associated_with>Site</associated_with>
      <group_id type="integer">1</group_id>
      <ip_addresses type="array"/>
    </ip-address>
    
    
    Attribute Description
    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

    Example Request

    curl "https://app.files.com/api/rest/v1/ip_addresses.json?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/ip_addresses.xml?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::IpAddress.list(
      page: 1, 
      per_page: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\IpAddress::list(array(
      'page' => 1, 
      'per_page' => 1
    ));
    

    Example Response

    [
      {
        "associated_with": "Site",
        "group_id": 1,
        "ip_addresses": [
    
        ]
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <ip-addresses type="array">
      <ip-address>
        <associated_with>Site</associated_with>
        <group_id type="integer">1</group_id>
        <ip_addresses type="array"/>
      </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

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.

    Locks

    Locks are not used by Files.com's web interface, but can be used by your applications to implement locking and concurrency features.

    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

    {
      "timeout": 43200,
      "depth": "infinity",
      "owner": "user",
      "path": "locked_file",
      "scope": "shared",
      "token": "17c54824e9931a4688ca032d03f6663c",
      "type": "write",
      "user_id": 1,
      "username": "username"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <lock>
      <timeout type="integer">43200</timeout>
      <depth>infinity</depth>
      <owner>user</owner>
      <path>locked_file</path>
      <scope>shared</scope>
      <token>17c54824e9931a4688ca032d03f6663c</token>
      <type>write</type>
      <user_id type="integer">1</user_id>
      <username>username</username>
    </lock>
    
    
    Attribute Description
    timeout int64 Lock timeout
    depth string Lock depth (0 or infinity)
    owner string Owner of lock. This can be any arbitrary string.
    path string Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    scope string Lock scope(shared or exclusive)
    token string Lock token. Use to release lock.
    type string Lock type
    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}?page=1&per_page=1&include_children=true" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/locks/{path}?page=1&per_page=1&include_children=true" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Lock.list_for(path, 
      page: 1, 
      per_page: 1, 
      include_children: true
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Lock::listFor($path, array(
      'page' => 1, 
      'per_page' => 1, 
      'include_children' => true
    ));
    

    Example Response

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

    HTTPS Request

    GET /locks/?*path

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    path string Required Path to operate on.
    include_children boolean Include locks from children objects?

    Create Lock

    Example Request

    curl https://app.files.com/api/rest/v1/locks/{path} \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"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>
           <timeout type="integer">1</timeout>
         </lock>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    lock = Files::Lock.find(1)
    lock.create(
      timeout: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $lock = \Files\Lock->find(1);
    $lock->create(array(
      'timeout' => 1
    ));
    

    Example Response

    {
      "timeout": 43200,
      "depth": "infinity",
      "owner": "user",
      "path": "locked_file",
      "scope": "shared",
      "token": "17c54824e9931a4688ca032d03f6663c",
      "type": "write",
      "user_id": 1,
      "username": "username"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <lock>
      <timeout type="integer">43200</timeout>
      <depth>infinity</depth>
      <owner>user</owner>
      <path>locked_file</path>
      <scope>shared</scope>
      <token>17c54824e9931a4688ca032d03f6663c</token>
      <type>write</type>
      <user_id type="integer">1</user_id>
      <username>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
    timeout int64 Lock timeout length

    Delete Lock

    Example Request

    curl "https://app.files.com/api/rest/v1/locks/{path}?token=token" \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/locks/{path}?token=token" \
      -X DELETE \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    lock = Files::Lock.find(1)
    lock.delete(
      token: "token"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $lock = \Files\Lock->find(1);
    $lock->delete(array(
      'token' => "token"
    ));
    

    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": [
    
      ]
    }
    
    <?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"/>
    </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 attach the message to.

    List Messages

    Example Request

    curl "https://app.files.com/api/rest/v1/messages.json?user_id=1&page=1&per_page=1&project_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/messages.xml?user_id=1&page=1&per_page=1&project_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Message.list(
      user_id: 1, 
      page: 1, 
      per_page: 1, 
      project_id: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Message::list(array(
      'user_id' => 1, 
      'page' => 1, 
      'per_page' => 1, 
      'project_id' => 1
    ));
    

    Example Response

    [
      {
        "id": 1,
        "subject": "Files.com Account Upgrade",
        "body": "We should upgrade our Files.com account!",
        "comments": [
    
        ]
      }
    ]
    
    <?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"/>
      </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.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    project_id int64 Required Project to return messages for.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Message::find($id);
    

    Example Response

    {
      "id": 1,
      "subject": "Files.com Account Upgrade",
      "body": "We should upgrade our Files.com account!",
      "comments": [
    
      ]
    }
    
    <?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"/>
    </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":"subject","body":"body"}' \
      -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>subject</subject>
           <body>body</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: "subject", 
      body: "body"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Message::create(array(
      'user_id' => 1, 
      'project_id' => 1, 
      'subject' => "subject", 
      'body' => "body"
    ));
    

    Example Response

    {
      "id": 1,
      "subject": "Files.com Account Upgrade",
      "body": "We should upgrade our Files.com account!",
      "comments": [
    
      ]
    }
    
    <?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"/>
    </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 attach the message to.
    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":"subject","body":"body"}' \
      -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>subject</subject>
           <body>body</body>
         </message>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    message = Files::Message.find(1)
    message.update(
      project_id: 1,
      subject: "subject",
      body: "body"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $message = \Files\Message->find(1);
    $message->update(array(
      'project_id' => 1, 
      'subject' => "subject", 
      'body' => "body"
    ));
    

    Example Response

    {
      "id": 1,
      "subject": "Files.com Account Upgrade",
      "body": "We should upgrade our Files.com account!",
      "comments": [
    
      ]
    }
    
    <?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"/>
    </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 attach the message to.
    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.find(1)
    message.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $message = \Files\Message->find(1);
    $message->delete();
    

    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": [
    
      ]
    }
    
    <?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"/>
    </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&page=1&per_page=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&page=1&per_page=1&message_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::MessageComment.list(
      user_id: 1, 
      page: 1, 
      per_page: 1, 
      message_id: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\MessageComment::list(array(
      'user_id' => 1, 
      'page' => 1, 
      'per_page' => 1, 
      'message_id' => 1
    ));
    

    Example Response

    [
      {
        "id": 1,
        "body": "What a great idea, thank you!",
        "reactions": [
    
        ]
      }
    ]
    
    <?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"/>
      </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.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    message_id int64 Required Message comment to return comments for.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\MessageComment::find($id);
    

    Example Response

    {
      "id": 1,
      "body": "What a great idea, thank you!",
      "reactions": [
    
      ]
    }
    
    <?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"/>
    </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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\MessageComment::create(array(
      'user_id' => 1, 
      'body' => "body"
    ));
    

    Example Response

    {
      "id": 1,
      "body": "What a great idea, thank you!",
      "reactions": [
    
      ]
    }
    
    <?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"/>
    </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.find(1)
    message_comment.update(
      body: "body"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $message_comment = \Files\MessageComment->find(1);
    $message_comment->update(array(
      'body' => "body"
    ));
    

    Example Response

    {
      "id": 1,
      "body": "What a great idea, thank you!",
      "reactions": [
    
      ]
    }
    
    <?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"/>
    </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.find(1)
    message_comment.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $message_comment = \Files\MessageComment->find(1);
    $message_comment->delete();
    

    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&page=1&per_page=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&page=1&per_page=1&message_comment_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::MessageCommentReaction.list(
      user_id: 1, 
      page: 1, 
      per_page: 1, 
      message_comment_id: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\MessageCommentReaction::list(array(
      'user_id' => 1, 
      'page' => 1, 
      'per_page' => 1, 
      'message_comment_id' => 1
    ));
    

    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.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    message_comment_id int64 Required Message comment to return reactions for.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\MessageCommentReaction::find($id);
    

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\MessageCommentReaction::create(array(
      'user_id' => 1, 
      'emoji' => "emoji"
    ));
    

    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.find(1)
    message_comment_reaction.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $message_comment_reaction = \Files\MessageCommentReaction->find(1);
    $message_comment_reaction->delete();
    

    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&page=1&per_page=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&page=1&per_page=1&message_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::MessageReaction.list(
      user_id: 1, 
      page: 1, 
      per_page: 1, 
      message_id: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\MessageReaction::list(array(
      'user_id' => 1, 
      'page' => 1, 
      'per_page' => 1, 
      'message_id' => 1
    ));
    

    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.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    message_id int64 Required Message to return reactions for.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\MessageReaction::find($id);
    

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\MessageReaction::create(array(
      'user_id' => 1, 
      'emoji' => "emoji"
    ));
    

    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.find(1)
    message_reaction.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $message_reaction = \Files\MessageReaction->find(1);
    $message_reaction->delete();
    

    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,
      "group_id": 1,
      "group_name": "",
      "notify_user_actions": true,
      "notify_on_copy": true,
      "path": "path",
      "send_interval": "fifteen_minutes",
      "unsubscribed": true,
      "unsubscribed_reason": "",
      "user_id": 1,
      "username": "User"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <notification>
      <id type="integer">1</id>
      <group_id type="integer">1</group_id>
      <group_name></group_name>
      <notify_user_actions type="boolean">true</notify_user_actions>
      <notify_on_copy type="boolean">true</notify_on_copy>
      <path>path</path>
      <send_interval>fifteen_minutes</send_interval>
      <unsubscribed type="boolean">true</unsubscribed>
      <unsubscribed_reason></unsubscribed_reason>
      <user_id type="integer">1</user_id>
      <username>User</username>
    </notification>
    
    
    Attribute Description
    id int64 Notification ID
    group_id int64 Notification group id
    group_name string Group name if applicable
    notify_user_actions boolean Trigger notification on notification user actions?
    notify_on_copy boolean Triggers notification when moving or copying files to this path
    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.
    send_interval string The time interval that notifications are aggregated to
    Possible values: five_minutes, fifteen_minutes, hourly, daily
    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

    List Notifications

    Example Request

    curl "https://app.files.com/api/rest/v1/notifications.json?user_id=1&page=1&per_page=1&group_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/notifications.xml?user_id=1&page=1&per_page=1&group_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Notification.list(
      user_id: 1, 
      page: 1, 
      per_page: 1, 
      group_id: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Notification::list(array(
      'user_id' => 1, 
      'page' => 1, 
      'per_page' => 1, 
      'group_id' => 1
    ));
    

    Example Response

    [
      {
        "id": 1,
        "group_id": 1,
        "group_name": "",
        "notify_user_actions": true,
        "notify_on_copy": true,
        "path": "path",
        "send_interval": "fifteen_minutes",
        "unsubscribed": true,
        "unsubscribed_reason": "",
        "user_id": 1,
        "username": "User"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <notifications type="array">
      <notification>
        <id type="integer">1</id>
        <group_id type="integer">1</group_id>
        <group_name></group_name>
        <notify_user_actions type="boolean">true</notify_user_actions>
        <notify_on_copy type="boolean">true</notify_on_copy>
        <path>path</path>
        <send_interval>fifteen_minutes</send_interval>
        <unsubscribed type="boolean">true</unsubscribed>
        <unsubscribed_reason></unsubscribed_reason>
        <user_id type="integer">1</user_id>
        <username>User</username>
      </notification>
    </notifications>
    
    

    HTTPS Request

    GET /notifications

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    user_id int64 Show notifications for this User ID.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    group_id int64 Show notifications for this Group ID.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Notification::find($id);
    

    Example Response

    {
      "id": 1,
      "group_id": 1,
      "group_name": "",
      "notify_user_actions": true,
      "notify_on_copy": true,
      "path": "path",
      "send_interval": "fifteen_minutes",
      "unsubscribed": true,
      "unsubscribed_reason": "",
      "user_id": 1,
      "username": "User"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <notification>
      <id type="integer">1</id>
      <group_id type="integer">1</group_id>
      <group_name></group_name>
      <notify_user_actions type="boolean">true</notify_user_actions>
      <notify_on_copy type="boolean">true</notify_on_copy>
      <path>path</path>
      <send_interval>fifteen_minutes</send_interval>
      <unsubscribed type="boolean">true</unsubscribed>
      <unsubscribed_reason></unsubscribed_reason>
      <user_id type="integer">1</user_id>
      <username>User</username>
    </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_user_actions":true,"send_interval":"daily","group_id":1,"path":"path","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_user_actions type="boolean">true</notify_user_actions>
           <send_interval>daily</send_interval>
           <group_id type="integer">1</group_id>
           <path>path</path>
           <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_user_actions: true, 
      send_interval: "daily", 
      group_id: 1, 
      path: "path", 
      username: "User"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Notification::create(array(
      'user_id' => 1, 
      'notify_on_copy' => true, 
      'notify_user_actions' => true, 
      'send_interval' => "daily", 
      'group_id' => 1, 
      'path' => "path", 
      'username' => "User"
    ));
    

    Example Response

    {
      "id": 1,
      "group_id": 1,
      "group_name": "",
      "notify_user_actions": true,
      "notify_on_copy": true,
      "path": "path",
      "send_interval": "fifteen_minutes",
      "unsubscribed": true,
      "unsubscribed_reason": "",
      "user_id": 1,
      "username": "User"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <notification>
      <id type="integer">1</id>
      <group_id type="integer">1</group_id>
      <group_name></group_name>
      <notify_user_actions type="boolean">true</notify_user_actions>
      <notify_on_copy type="boolean">true</notify_on_copy>
      <path>path</path>
      <send_interval>fifteen_minutes</send_interval>
      <unsubscribed type="boolean">true</unsubscribed>
      <unsubscribed_reason></unsubscribed_reason>
      <user_id type="integer">1</user_id>
      <username>User</username>
    </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_user_actions boolean If true actions initiated by the user will still result in a notification
    send_interval string The time interval that notifications are aggregated by. Can be five_minutes, fifteen_minutes, hourly, or daily.
    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_user_actions":true,"send_interval":"daily"}' \
      -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_user_actions type="boolean">true</notify_user_actions>
           <send_interval>daily</send_interval>
         </notification>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    notification = Files::Notification.find(1)
    notification.update(
      notify_on_copy: true,
      notify_user_actions: true,
      send_interval: "daily"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $notification = \Files\Notification->find(1);
    $notification->update(array(
      'notify_on_copy' => true, 
      'notify_user_actions' => true, 
      'send_interval' => "daily"
    ));
    

    Example Response

    {
      "id": 1,
      "group_id": 1,
      "group_name": "",
      "notify_user_actions": true,
      "notify_on_copy": true,
      "path": "path",
      "send_interval": "fifteen_minutes",
      "unsubscribed": true,
      "unsubscribed_reason": "",
      "user_id": 1,
      "username": "User"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <notification>
      <id type="integer">1</id>
      <group_id type="integer">1</group_id>
      <group_name></group_name>
      <notify_user_actions type="boolean">true</notify_user_actions>
      <notify_on_copy type="boolean">true</notify_on_copy>
      <path>path</path>
      <send_interval>fifteen_minutes</send_interval>
      <unsubscribed type="boolean">true</unsubscribed>
      <unsubscribed_reason></unsubscribed_reason>
      <user_id type="integer">1</user_id>
      <username>User</username>
    </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_user_actions boolean If true actions initiated by the user will still result in a notification
    send_interval string The time interval that notifications are aggregated by. Can be five_minutes, fifteen_minutes, hourly, or daily.

    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.find(1)
    notification.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $notification = \Files\Notification->find(1);
    $notification->delete();
    

    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.

    Oauth Redirects

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

    The OauthRedirect object

    Example OauthRedirect Object

    {
      "redirect_uri": "https://provider.com/redirect..."
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <oauth-redirect>
      <redirect_uri>https://provider.com/redirect...</redirect_uri>
    </oauth-redirect>
    
    
    Attribute Description
    redirect_uri string Redirect URL

    Begin new session via Oauth

    Example Request

    curl https://app.files.com/api/rest/v1/sessions/oauth.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"provider":"okta"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/sessions/oauth.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<oauth-redirect>
           <provider>okta</provider>
         </oauth-redirect>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Session.oauth(
      provider: "okta"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Session::oauth(array(
      'provider' => "okta"
    ));
    

    Example Response

    {
      "redirect_uri": "https://provider.com/redirect..."
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <oauth-redirect>
      <redirect_uri>https://provider.com/redirect...</redirect_uri>
    </oauth-redirect>
    
    

    HTTPS Request

    POST /sessions/oauth

    Authentication Required

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

    Request Parameters

    Parameter Description
    provider string Required
    state string

    Paired Api Keys

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

    The PairedApiKey object

    Example PairedApiKey Object

    {
      "server": "mysite.files.com",
      "username": "@api-1",
      "password": "password",
      "nickname": "@api-1 @ mysite.files.com"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <paired-api-key>
      <server>mysite.files.com</server>
      <username>@api-1</username>
      <password>password</password>
      <nickname>@api-1 @ mysite.files.com</nickname>
    </paired-api-key>
    
    
    Attribute Description
    server string Site URL
    username string Paired api key username
    password string Paired api key password
    nickname string Unique nickname for this api key

    Create long lived session (API Key) from Pairing Key

    Example Request

    curl https://app.files.com/api/rest/v1/sessions/pairing_key/{key}.json \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/sessions/pairing_key/{key}.xml \
      -X POST \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Session.pairing_key(key)
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Session::pairingKey($key);
    

    Example Response

    {
      "server": "mysite.files.com",
      "username": "@api-1",
      "password": "password",
      "nickname": "@api-1 @ mysite.files.com"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <paired-api-key>
      <server>mysite.files.com</server>
      <username>@api-1</username>
      <password>password</password>
      <nickname>@api-1 @ mysite.files.com</nickname>
    </paired-api-key>
    
    

    HTTPS Request

    POST /sessions/pairing_key/{key}

    Authentication Required

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

    Request Parameters

    Parameter Description
    key string Required The pairing key to reserve for login. Cannot be reused

    Paypal Express Infos

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

    The PaypalExpressInfo object

    Example PaypalExpressInfo Object

    {
      "billing_email": "john.doe@files.com",
      "billing_company_name": "Action Verb",
      "billing_address": "123 Main St",
      "billing_address_2": "Door 1",
      "billing_city": "New York",
      "billing_state": "NY",
      "billing_country": "US",
      "billing_zip": "000000",
      "billing_name": "John Doe",
      "billing_phone": "555-555-5555",
      "paypal_payer_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <paypal-express-info>
      <billing_email>john.doe@files.com</billing_email>
      <billing_company_name>Action Verb</billing_company_name>
      <billing_address>123 Main St</billing_address>
      <billing_address_2>Door 1</billing_address_2>
      <billing_city>New York</billing_city>
      <billing_state>NY</billing_state>
      <billing_country>US</billing_country>
      <billing_zip>000000</billing_zip>
      <billing_name>John Doe</billing_name>
      <billing_phone>555-555-5555</billing_phone>
      <paypal_payer_id type="integer">1</paypal_payer_id>
    </paypal-express-info>
    
    
    Attribute Description
    billing_email email Paypal billing email
    billing_company_name string Paypal billing company name
    billing_address string Paypal billing address
    billing_address_2 string Paypal billing address 2
    billing_city string Paypal billing city
    billing_state string Paypal billing state
    billing_country string Paypal billing country
    billing_zip string Paypal billing zipcode
    billing_name string Paypal billing name
    billing_phone string Paypal billing phone
    paypal_payer_id int64 Paypal payer ID

    Complete a PayPal subscription

    Example Request

    curl "https://app.files.com/api/rest/v1/site/paypal_express_info.json?paypal_token=[token]" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/site/paypal_express_info.xml?paypal_token=[token]" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Site.get_paypal_express_info(
      paypal_token: "[token]"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Site::getPaypalExpressInfo(array(
      'paypal_token' => "[token]"
    ));
    

    Example Response

    {
      "billing_email": "john.doe@files.com",
      "billing_company_name": "Action Verb",
      "billing_address": "123 Main St",
      "billing_address_2": "Door 1",
      "billing_city": "New York",
      "billing_state": "NY",
      "billing_country": "US",
      "billing_zip": "000000",
      "billing_name": "John Doe",
      "billing_phone": "555-555-5555",
      "paypal_payer_id": 1
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <paypal-express-info>
      <billing_email>john.doe@files.com</billing_email>
      <billing_company_name>Action Verb</billing_company_name>
      <billing_address>123 Main St</billing_address>
      <billing_address_2>Door 1</billing_address_2>
      <billing_city>New York</billing_city>
      <billing_state>NY</billing_state>
      <billing_country>US</billing_country>
      <billing_zip>000000</billing_zip>
      <billing_name>John Doe</billing_name>
      <billing_phone>555-555-5555</billing_phone>
      <paypal_payer_id type="integer">1</paypal_payer_id>
    </paypal-express-info>
    
    

    HTTPS Request

    GET /site/paypal_express_info

    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
    paypal_token string Required Billing token for use with paypal.

    Paypal Express Urls

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

    The PaypalExpressUrl object

    Example PaypalExpressUrl Object

    {
      "redirect_to": "https://www.paypal.com/..."
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <paypal-express-url>
      <redirect_to>https://www.paypal.com/...</redirect_to>
    </paypal-express-url>
    
    
    Attribute Description
    redirect_to string Redirect link

    Initiate a new PayPal subscription

    Example Request

    curl "https://app.files.com/api/rest/v1/site/paypal_express.json?return_to_url=https://app.files.com/...&plan_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/site/paypal_express.xml?return_to_url=https://app.files.com/...&plan_id=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Site.get_paypal_express(
      return_to_url: "https://app.files.com/...", 
      plan_id: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Site::getPaypalExpress(array(
      'return_to_url' => "https://app.files.com/...", 
      'plan_id' => 1
    ));
    

    Example Response

    {
      "redirect_to": "https://www.paypal.com/..."
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <paypal-express-url>
      <redirect_to>https://www.paypal.com/...</redirect_to>
    </paypal-express-url>
    
    

    HTTPS Request

    GET /site/paypal_express

    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
    return_to_url string Required URL that paypal express forwards the user to.
    plan_id int64 Required Plan ID to switch to.

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

    List Permissions

    Example Request

    curl "https://app.files.com/api/rest/v1/permissions.json?page=1&per_page=1&group_id=1&user_id=1&include_groups=true" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/permissions.xml?page=1&per_page=1&group_id=1&user_id=1&include_groups=true" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Permission.list(path, 
      page: 1, 
      per_page: 1, 
      group_id: 1, 
      user_id: 1, 
      include_groups: true
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Permission::list($path, array(
      'page' => 1, 
      'per_page' => 1, 
      'group_id' => 1, 
      'user_id' => 1, 
      'include_groups' => true
    ));
    

    Example Response

    [
      {
        "id": 1,
        "user_id": 1,
        "username": "Sser",
        "group_id": 1,
        "group_name": "",
        "path": "",
        "permission": "full",
        "recursive": true
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <permissions type="array">
      <permission>
        <id type="integer">1</id>
        <user_id type="integer">1</user_id>
        <username>Sser</username>
        <group_id type="integer">1</group_id>
        <group_name></group_name>
        <path></path>
        <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
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    path string Permission path. If provided, will scope permissions to this path.
    group_id string Group ID. If provided, will scope permissions to this group.
    user_id string User ID. If provided, will scope permissions to this user.
    include_groups boolean If searching by user or group, also include user's permissions that are inherited from its groups?

    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,"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>
           <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'
    
    permission = Files::Permission.find(1)
    permission.create(
      group_id: 1,
      permission: "full",
      recursive: true,
      user_id: 1,
      username: "Sser"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $permission = \Files\Permission->find(1);
    $permission->create(array(
      'group_id' => 1, 
      'permission' => "full", 
      'recursive' => true, 
      'user_id' => 1, 
      'username' => "Sser"
    ));
    

    Example Response

    {
      "id": 1,
      "user_id": 1,
      "username": "Sser",
      "group_id": 1,
      "group_name": "",
      "path": "",
      "permission": "full",
      "recursive": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <permission>
      <id type="integer">1</id>
      <user_id type="integer">1</user_id>
      <username>Sser</username>
      <group_id type="integer">1</group_id>
      <group_name></group_name>
      <path></path>
      <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, previewonly, 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'
    
    Files::Permission.delete(id)
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Permission::delete($id);
    

    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.

    Plans

    Partners building an integration may need to know specifics about the billing plan of the site.

    The Plan endpoint allows you to retrieve details about the current plan. Even though Files.com currently advertises 3 plans, we do offer custom arrangements for select customers, and this API will always provide the exact details of which features are available.

    The Plan object

    Example Plan Object

    {
      "id": 1,
      "advanced_behaviors": true,
      "antivirus_advanced": true,
      "antivirus_basic": true,
      "audit_hours": 1,
      "auth_google": true,
      "auth_oauth": true,
      "auth_oauth_custom": true,
      "auth_user_count": 1,
      "automations": true,
      "custom_namespace": true,
      "custom_smtp": true,
      "dedicated_ip": true,
      "dedicated_ips": 1,
      "differences": "",
      "domain": true,
      "domain_count": 1,
      "email_inboxes": true,
      "extended_folder_permissions": true,
      "extended_log_retention": true,
      "free_developer_accounts": 1,
      "ftp_sftp_webdav": true,
      "full_text_search": true,
      "global_acceleration": true,
      "gpg": true,
      "group_admins_enabled": true,
      "group_notifications": true,
      "hipaa": true,
      "html_branding": true,
      "ldap": true,
      "legal_flexibility": true,
      "max_folder_size": "10000",
      "max_individual_file_size": "5 TB",
      "name": "Enterprise",
      "nested_groups": true,
      "preview_page_limit": 100,
      "regions_included": 2,
      "remote_sync_ftp": true,
      "remote_sync_interval": 1,
      "remote_sync_other": true,
      "remote_sync_s3": true,
      "require_2fa": true,
      "site_fields_requiring_upgrade": [
    
      ],
      "support_level": "standard",
      "usage_cost": "0.1",
      "usage_included": "2500",
      "users": 1,
      "watermark_documents": true,
      "watermark_images": true,
      "webhooks": true,
      "webhooks_sns": true,
      "whitelabel": true,
      "activation_cost": "10.0",
      "annually": "2988.0",
      "currency": "USD",
      "monthly": "249.0",
      "user_cost": "5.0"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <plan>
      <id type="integer">1</id>
      <advanced_behaviors type="boolean">true</advanced_behaviors>
      <antivirus_advanced type="boolean">true</antivirus_advanced>
      <antivirus_basic type="boolean">true</antivirus_basic>
      <audit_hours type="integer">1</audit_hours>
      <auth_google type="boolean">true</auth_google>
      <auth_oauth type="boolean">true</auth_oauth>
      <auth_oauth_custom type="boolean">true</auth_oauth_custom>
      <auth_user_count type="integer">1</auth_user_count>
      <automations type="boolean">true</automations>
      <custom_namespace type="boolean">true</custom_namespace>
      <custom_smtp type="boolean">true</custom_smtp>
      <dedicated_ip type="boolean">true</dedicated_ip>
      <dedicated_ips type="integer">1</dedicated_ips>
      <differences></differences>
      <domain type="boolean">true</domain>
      <domain_count type="integer">1</domain_count>
      <email_inboxes type="boolean">true</email_inboxes>
      <extended_folder_permissions type="boolean">true</extended_folder_permissions>
      <extended_log_retention type="boolean">true</extended_log_retention>
      <free_developer_accounts type="integer">1</free_developer_accounts>
      <ftp_sftp_webdav type="boolean">true</ftp_sftp_webdav>
      <full_text_search type="boolean">true</full_text_search>
      <global_acceleration type="boolean">true</global_acceleration>
      <gpg type="boolean">true</gpg>
      <group_admins_enabled type="boolean">true</group_admins_enabled>
      <group_notifications type="boolean">true</group_notifications>
      <hipaa type="boolean">true</hipaa>
      <html_branding type="boolean">true</html_branding>
      <ldap type="boolean">true</ldap>
      <legal_flexibility type="boolean">true</legal_flexibility>
      <max_folder_size>10000</max_folder_size>
      <max_individual_file_size>5 TB</max_individual_file_size>
      <name>Enterprise</name>
      <nested_groups type="boolean">true</nested_groups>
      <preview_page_limit type="integer">100</preview_page_limit>
      <regions_included type="integer">2</regions_included>
      <remote_sync_ftp type="boolean">true</remote_sync_ftp>
      <remote_sync_interval type="integer">1</remote_sync_interval>
      <remote_sync_other type="boolean">true</remote_sync_other>
      <remote_sync_s3 type="boolean">true</remote_sync_s3>
      <require_2fa type="boolean">true</require_2fa>
      <site_fields_requiring_upgrade type="array"/>
      <support_level>standard</support_level>
      <usage_cost>0.1</usage_cost>
      <usage_included>2500</usage_included>
      <users type="integer">1</users>
      <watermark_documents type="boolean">true</watermark_documents>
      <watermark_images type="boolean">true</watermark_images>
      <webhooks type="boolean">true</webhooks>
      <webhooks_sns type="boolean">true</webhooks_sns>
      <whitelabel type="boolean">true</whitelabel>
      <activation_cost>10.0</activation_cost>
      <annually>2988.0</annually>
      <currency>USD</currency>
      <monthly>249.0</monthly>
      <user_cost>5.0</user_cost>
    </plan>
    
    
    Attribute Description
    id int64 Plan ID
    advanced_behaviors boolean Are advanced behaviors included in plan?
    antivirus_advanced boolean Is advanced antivirus included in plan?
    antivirus_basic boolean Is basic antivirus included in plan?
    audit_hours int64 How many audit hours included in plan?
    auth_google boolean Is google authentication included in plan?
    auth_oauth boolean Is oauth included in plan?
    auth_oauth_custom boolean Is custom oauth included in plan?
    auth_user_count int64 Number of SSO, 2FA, Desktop users included in plan
    automations boolean Are automations included in plan?
    custom_namespace boolean If true all usernames can be used, otherwise usernames must be unique
    custom_smtp boolean Custom SMTP support?
    dedicated_ip boolean Offers dedicated ip?
    dedicated_ips int64 Number of dedicated IPs
    differences object Results of comparing with a different Plan
    domain boolean Custom domain(s)?
    domain_count int64 Number of custom domains
    email_inboxes boolean Does the plan include E-Mail inboxes?
    extended_folder_permissions boolean Supports extended folder permissions like viewing history?
    extended_log_retention boolean Can log preservation be extended?
    free_developer_accounts int64 Number of free developer accounts
    ftp_sftp_webdav boolean Supports connections via FTP, SFTP, and WebDAV?
    full_text_search boolean Full text search enabled?
    global_acceleration boolean Global acceleration enabled?
    gpg boolean Support for GPG encryption?
    group_admins_enabled boolean Group admin functionality enabled?
    group_notifications boolean Group notifications functionality enabled?
    hipaa boolean Support for HIPAA regulation?
    html_branding boolean HTML branding available?
    ldap boolean LDAP integration enabled?
    legal_flexibility boolean Does the plan offer any legal flexibility?
    max_folder_size int64 Max number of files in a folder
    max_individual_file_size int64 Maximum individual file size
    name string Plan name
    nested_groups boolean Are nested groups enabled?
    preview_page_limit int64 Number of previews available
    regions_included int64 Number of storage regions included
    remote_sync_ftp boolean Remote sync with FTP available?
    remote_sync_interval int64 Number of hours between remote sync
    remote_sync_other boolean Are other forms of remote sync available?
    remote_sync_s3 boolean Can sync to s3 bucket?
    require_2fa boolean 2FA support enabled?
    site_fields_requiring_upgrade array Site attributes which require upgrade
    support_level string Priority of customer support
    Possible values: standard, priority, high_priority
    usage_cost string Usage cost per GB of overage
    usage_included string Usage included per month, in GB
    users int64 # of users included. 0 or -1 mean unlimited.
    watermark_documents boolean Watermark enabled?
    watermark_images boolean Watermark enabled?
    webhooks boolean Webhooks enabled?
    webhooks_sns boolean Webhook SNS integration enabled?
    whitelabel boolean Whitelabel site?
    activation_cost string Activation cost (upfront)
    annually string Price annually
    currency string Currency
    monthly string Price monthly
    user_cost string Cost per additional user

    List Plans

    Example Request

    curl "https://app.files.com/api/rest/v1/plans.json?page=1&per_page=1&currency=USD" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/plans.xml?page=1&per_page=1&currency=USD" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Plan.list(
      page: 1, 
      per_page: 1, 
      currency: "USD"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Plan::list(array(
      'page' => 1, 
      'per_page' => 1, 
      'currency' => "USD"
    ));
    

    Example Response

    [
      {
        "id": 1,
        "advanced_behaviors": true,
        "antivirus_advanced": true,
        "antivirus_basic": true,
        "audit_hours": 1,
        "auth_google": true,
        "auth_oauth": true,
        "auth_oauth_custom": true,
        "auth_user_count": 1,
        "automations": true,
        "custom_namespace": true,
        "custom_smtp": true,
        "dedicated_ip": true,
        "dedicated_ips": 1,
        "differences": "",
        "domain": true,
        "domain_count": 1,
        "email_inboxes": true,
        "extended_folder_permissions": true,
        "extended_log_retention": true,
        "free_developer_accounts": 1,
        "ftp_sftp_webdav": true,
        "full_text_search": true,
        "global_acceleration": true,
        "gpg": true,
        "group_admins_enabled": true,
        "group_notifications": true,
        "hipaa": true,
        "html_branding": true,
        "ldap": true,
        "legal_flexibility": true,
        "max_folder_size": "10000",
        "max_individual_file_size": "5 TB",
        "name": "Enterprise",
        "nested_groups": true,
        "preview_page_limit": 100,
        "regions_included": 2,
        "remote_sync_ftp": true,
        "remote_sync_interval": 1,
        "remote_sync_other": true,
        "remote_sync_s3": true,
        "require_2fa": true,
        "site_fields_requiring_upgrade": [
    
        ],
        "support_level": "standard",
        "usage_cost": "0.1",
        "usage_included": "2500",
        "users": 1,
        "watermark_documents": true,
        "watermark_images": true,
        "webhooks": true,
        "webhooks_sns": true,
        "whitelabel": true,
        "activation_cost": "10.0",
        "annually": "2988.0",
        "currency": "USD",
        "monthly": "249.0",
        "user_cost": "5.0"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <plans type="array">
      <plan>
        <id type="integer">1</id>
        <advanced_behaviors type="boolean">true</advanced_behaviors>
        <antivirus_advanced type="boolean">true</antivirus_advanced>
        <antivirus_basic type="boolean">true</antivirus_basic>
        <audit_hours type="integer">1</audit_hours>
        <auth_google type="boolean">true</auth_google>
        <auth_oauth type="boolean">true</auth_oauth>
        <auth_oauth_custom type="boolean">true</auth_oauth_custom>
        <auth_user_count type="integer">1</auth_user_count>
        <automations type="boolean">true</automations>
        <custom_namespace type="boolean">true</custom_namespace>
        <custom_smtp type="boolean">true</custom_smtp>
        <dedicated_ip type="boolean">true</dedicated_ip>
        <dedicated_ips type="integer">1</dedicated_ips>
        <differences></differences>
        <domain type="boolean">true</domain>
        <domain_count type="integer">1</domain_count>
        <email_inboxes type="boolean">true</email_inboxes>
        <extended_folder_permissions type="boolean">true</extended_folder_permissions>
        <extended_log_retention type="boolean">true</extended_log_retention>
        <free_developer_accounts type="integer">1</free_developer_accounts>
        <ftp_sftp_webdav type="boolean">true</ftp_sftp_webdav>
        <full_text_search type="boolean">true</full_text_search>
        <global_acceleration type="boolean">true</global_acceleration>
        <gpg type="boolean">true</gpg>
        <group_admins_enabled type="boolean">true</group_admins_enabled>
        <group_notifications type="boolean">true</group_notifications>
        <hipaa type="boolean">true</hipaa>
        <html_branding type="boolean">true</html_branding>
        <ldap type="boolean">true</ldap>
        <legal_flexibility type="boolean">true</legal_flexibility>
        <max_folder_size>10000</max_folder_size>
        <max_individual_file_size>5 TB</max_individual_file_size>
        <name>Enterprise</name>
        <nested_groups type="boolean">true</nested_groups>
        <preview_page_limit type="integer">100</preview_page_limit>
        <regions_included type="integer">2</regions_included>
        <remote_sync_ftp type="boolean">true</remote_sync_ftp>
        <remote_sync_interval type="integer">1</remote_sync_interval>
        <remote_sync_other type="boolean">true</remote_sync_other>
        <remote_sync_s3 type="boolean">true</remote_sync_s3>
        <require_2fa type="boolean">true</require_2fa>
        <site_fields_requiring_upgrade type="array"/>
        <support_level>standard</support_level>
        <usage_cost>0.1</usage_cost>
        <usage_included>2500</usage_included>
        <users type="integer">1</users>
        <watermark_documents type="boolean">true</watermark_documents>
        <watermark_images type="boolean">true</watermark_images>
        <webhooks type="boolean">true</webhooks>
        <webhooks_sns type="boolean">true</webhooks_sns>
        <whitelabel type="boolean">true</whitelabel>
        <activation_cost>10.0</activation_cost>
        <annually>2988.0</annually>
        <currency>USD</currency>
        <monthly>249.0</monthly>
        <user_cost>5.0</user_cost>
      </plan>
    </plans>
    
    

    HTTPS Request

    GET /plans

    Authentication Required

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

    Request Parameters

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    currency string Currency.

    Show plan that will be switched to in the future. (Populated if current plan is deprecated and no longer offered beyond the current billing period.)

    Example Request

    curl https://app.files.com/api/rest/v1/site/switch_to_plan.json \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/site/switch_to_plan.xml \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Site.get_switch_to_plan
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Site::getSwitchToPlan();
    

    Example Response

    {
      "id": 1,
      "advanced_behaviors": true,
      "antivirus_advanced": true,
      "antivirus_basic": true,
      "audit_hours": 1,
      "auth_google": true,
      "auth_oauth": true,
      "auth_oauth_custom": true,
      "auth_user_count": 1,
      "automations": true,
      "custom_namespace": true,
      "custom_smtp": true,
      "dedicated_ip": true,
      "dedicated_ips": 1,
      "differences": "",
      "domain": true,
      "domain_count": 1,
      "email_inboxes": true,
      "extended_folder_permissions": true,
      "extended_log_retention": true,
      "free_developer_accounts": 1,
      "ftp_sftp_webdav": true,
      "full_text_search": true,
      "global_acceleration": true,
      "gpg": true,
      "group_admins_enabled": true,
      "group_notifications": true,
      "hipaa": true,
      "html_branding": true,
      "ldap": true,
      "legal_flexibility": true,
      "max_folder_size": "10000",
      "max_individual_file_size": "5 TB",
      "name": "Enterprise",
      "nested_groups": true,
      "preview_page_limit": 100,
      "regions_included": 2,
      "remote_sync_ftp": true,
      "remote_sync_interval": 1,
      "remote_sync_other": true,
      "remote_sync_s3": true,
      "require_2fa": true,
      "site_fields_requiring_upgrade": [
    
      ],
      "support_level": "standard",
      "usage_cost": "0.1",
      "usage_included": "2500",
      "users": 1,
      "watermark_documents": true,
      "watermark_images": true,
      "webhooks": true,
      "webhooks_sns": true,
      "whitelabel": true,
      "activation_cost": "10.0",
      "annually": "2988.0",
      "currency": "USD",
      "monthly": "249.0",
      "user_cost": "5.0"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <plan>
      <id type="integer">1</id>
      <advanced_behaviors type="boolean">true</advanced_behaviors>
      <antivirus_advanced type="boolean">true</antivirus_advanced>
      <antivirus_basic type="boolean">true</antivirus_basic>
      <audit_hours type="integer">1</audit_hours>
      <auth_google type="boolean">true</auth_google>
      <auth_oauth type="boolean">true</auth_oauth>
      <auth_oauth_custom type="boolean">true</auth_oauth_custom>
      <auth_user_count type="integer">1</auth_user_count>
      <automations type="boolean">true</automations>
      <custom_namespace type="boolean">true</custom_namespace>
      <custom_smtp type="boolean">true</custom_smtp>
      <dedicated_ip type="boolean">true</dedicated_ip>
      <dedicated_ips type="integer">1</dedicated_ips>
      <differences></differences>
      <domain type="boolean">true</domain>
      <domain_count type="integer">1</domain_count>
      <email_inboxes type="boolean">true</email_inboxes>
      <extended_folder_permissions type="boolean">true</extended_folder_permissions>
      <extended_log_retention type="boolean">true</extended_log_retention>
      <free_developer_accounts type="integer">1</free_developer_accounts>
      <ftp_sftp_webdav type="boolean">true</ftp_sftp_webdav>
      <full_text_search type="boolean">true</full_text_search>
      <global_acceleration type="boolean">true</global_acceleration>
      <gpg type="boolean">true</gpg>
      <group_admins_enabled type="boolean">true</group_admins_enabled>
      <group_notifications type="boolean">true</group_notifications>
      <hipaa type="boolean">true</hipaa>
      <html_branding type="boolean">true</html_branding>
      <ldap type="boolean">true</ldap>
      <legal_flexibility type="boolean">true</legal_flexibility>
      <max_folder_size>10000</max_folder_size>
      <max_individual_file_size>5 TB</max_individual_file_size>
      <name>Enterprise</name>
      <nested_groups type="boolean">true</nested_groups>
      <preview_page_limit type="integer">100</preview_page_limit>
      <regions_included type="integer">2</regions_included>
      <remote_sync_ftp type="boolean">true</remote_sync_ftp>
      <remote_sync_interval type="integer">1</remote_sync_interval>
      <remote_sync_other type="boolean">true</remote_sync_other>
      <remote_sync_s3 type="boolean">true</remote_sync_s3>
      <require_2fa type="boolean">true</require_2fa>
      <site_fields_requiring_upgrade type="array"/>
      <support_level>standard</support_level>
      <usage_cost>0.1</usage_cost>
      <usage_included>2500</usage_included>
      <users type="integer">1</users>
      <watermark_documents type="boolean">true</watermark_documents>
      <watermark_images type="boolean">true</watermark_images>
      <webhooks type="boolean">true</webhooks>
      <webhooks_sns type="boolean">true</webhooks_sns>
      <whitelabel type="boolean">true</whitelabel>
      <activation_cost>10.0</activation_cost>
      <annually>2988.0</annually>
      <currency>USD</currency>
      <monthly>249.0</monthly>
      <user_cost>5.0</user_cost>
    </plan>
    
    

    HTTPS Request

    GET /site/switch_to_plan

    Authentication Required

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

    Show the current billing plan of a site

    Example Request

    curl "https://app.files.com/api/rest/v1/site/plan.json?currency=USD" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/site/plan.xml?currency=USD" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Site.get_plan(
      currency: "USD"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Site::getPlan(array(
      'currency' => "USD"
    ));
    

    Example Response

    {
      "id": 1,
      "advanced_behaviors": true,
      "antivirus_advanced": true,
      "antivirus_basic": true,
      "audit_hours": 1,
      "auth_google": true,
      "auth_oauth": true,
      "auth_oauth_custom": true,
      "auth_user_count": 1,
      "automations": true,
      "custom_namespace": true,
      "custom_smtp": true,
      "dedicated_ip": true,
      "dedicated_ips": 1,
      "differences": "",
      "domain": true,
      "domain_count": 1,
      "email_inboxes": true,
      "extended_folder_permissions": true,
      "extended_log_retention": true,
      "free_developer_accounts": 1,
      "ftp_sftp_webdav": true,
      "full_text_search": true,
      "global_acceleration": true,
      "gpg": true,
      "group_admins_enabled": true,
      "group_notifications": true,
      "hipaa": true,
      "html_branding": true,
      "ldap": true,
      "legal_flexibility": true,
      "max_folder_size": "10000",
      "max_individual_file_size": "5 TB",
      "name": "Enterprise",
      "nested_groups": true,
      "preview_page_limit": 100,
      "regions_included": 2,
      "remote_sync_ftp": true,
      "remote_sync_interval": 1,
      "remote_sync_other": true,
      "remote_sync_s3": true,
      "require_2fa": true,
      "site_fields_requiring_upgrade": [
    
      ],
      "support_level": "standard",
      "usage_cost": "0.1",
      "usage_included": "2500",
      "users": 1,
      "watermark_documents": true,
      "watermark_images": true,
      "webhooks": true,
      "webhooks_sns": true,
      "whitelabel": true,
      "activation_cost": "10.0",
      "annually": "2988.0",
      "currency": "USD",
      "monthly": "249.0",
      "user_cost": "5.0"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <plan>
      <id type="integer">1</id>
      <advanced_behaviors type="boolean">true</advanced_behaviors>
      <antivirus_advanced type="boolean">true</antivirus_advanced>
      <antivirus_basic type="boolean">true</antivirus_basic>
      <audit_hours type="integer">1</audit_hours>
      <auth_google type="boolean">true</auth_google>
      <auth_oauth type="boolean">true</auth_oauth>
      <auth_oauth_custom type="boolean">true</auth_oauth_custom>
      <auth_user_count type="integer">1</auth_user_count>
      <automations type="boolean">true</automations>
      <custom_namespace type="boolean">true</custom_namespace>
      <custom_smtp type="boolean">true</custom_smtp>
      <dedicated_ip type="boolean">true</dedicated_ip>
      <dedicated_ips type="integer">1</dedicated_ips>
      <differences></differences>
      <domain type="boolean">true</domain>
      <domain_count type="integer">1</domain_count>
      <email_inboxes type="boolean">true</email_inboxes>
      <extended_folder_permissions type="boolean">true</extended_folder_permissions>
      <extended_log_retention type="boolean">true</extended_log_retention>
      <free_developer_accounts type="integer">1</free_developer_accounts>
      <ftp_sftp_webdav type="boolean">true</ftp_sftp_webdav>
      <full_text_search type="boolean">true</full_text_search>
      <global_acceleration type="boolean">true</global_acceleration>
      <gpg type="boolean">true</gpg>
      <group_admins_enabled type="boolean">true</group_admins_enabled>
      <group_notifications type="boolean">true</group_notifications>
      <hipaa type="boolean">true</hipaa>
      <html_branding type="boolean">true</html_branding>
      <ldap type="boolean">true</ldap>
      <legal_flexibility type="boolean">true</legal_flexibility>
      <max_folder_size>10000</max_folder_size>
      <max_individual_file_size>5 TB</max_individual_file_size>
      <name>Enterprise</name>
      <nested_groups type="boolean">true</nested_groups>
      <preview_page_limit type="integer">100</preview_page_limit>
      <regions_included type="integer">2</regions_included>
      <remote_sync_ftp type="boolean">true</remote_sync_ftp>
      <remote_sync_interval type="integer">1</remote_sync_interval>
      <remote_sync_other type="boolean">true</remote_sync_other>
      <remote_sync_s3 type="boolean">true</remote_sync_s3>
      <require_2fa type="boolean">true</require_2fa>
      <site_fields_requiring_upgrade type="array"/>
      <support_level>standard</support_level>
      <usage_cost>0.1</usage_cost>
      <usage_included>2500</usage_included>
      <users type="integer">1</users>
      <watermark_documents type="boolean">true</watermark_documents>
      <watermark_images type="boolean">true</watermark_images>
      <webhooks type="boolean">true</webhooks>
      <webhooks_sns type="boolean">true</webhooks_sns>
      <whitelabel type="boolean">true</whitelabel>
      <activation_cost>10.0</activation_cost>
      <annually>2988.0</annually>
      <currency>USD</currency>
      <monthly>249.0</monthly>
      <user_cost>5.0</user_cost>
    </plan>
    
    

    HTTPS Request

    GET /site/plan

    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
    currency string Currency.

    Change the current billing plan for the site

    Example Request

    curl https://app.files.com/api/rest/v1/site/plan.json \
      -X PATCH \
      -H 'Content-Type: application/json' \
      -d '{"billing_frequency":1}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/site/plan.xml \
      -X PATCH \
      -H 'Content-Type: application/xml' \
      -d '<plan>
           <billing_frequency type="integer">1</billing_frequency>
         </plan>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    site = Files::Site.find(1)
    site.update_plan(
      billing_frequency: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $site = \Files\Site->find(1);
    $site->updatePlan(array(
      'billing_frequency' => 1
    ));
    

    Example Response

    {
      "id": 1,
      "advanced_behaviors": true,
      "antivirus_advanced": true,
      "antivirus_basic": true,
      "audit_hours": 1,
      "auth_google": true,
      "auth_oauth": true,
      "auth_oauth_custom": true,
      "auth_user_count": 1,
      "automations": true,
      "custom_namespace": true,
      "custom_smtp": true,
      "dedicated_ip": true,
      "dedicated_ips": 1,
      "differences": "",
      "domain": true,
      "domain_count": 1,
      "email_inboxes": true,
      "extended_folder_permissions": true,
      "extended_log_retention": true,
      "free_developer_accounts": 1,
      "ftp_sftp_webdav": true,
      "full_text_search": true,
      "global_acceleration": true,
      "gpg": true,
      "group_admins_enabled": true,
      "group_notifications": true,
      "hipaa": true,
      "html_branding": true,
      "ldap": true,
      "legal_flexibility": true,
      "max_folder_size": "10000",
      "max_individual_file_size": "5 TB",
      "name": "Enterprise",
      "nested_groups": true,
      "preview_page_limit": 100,
      "regions_included": 2,
      "remote_sync_ftp": true,
      "remote_sync_interval": 1,
      "remote_sync_other": true,
      "remote_sync_s3": true,
      "require_2fa": true,
      "site_fields_requiring_upgrade": [
    
      ],
      "support_level": "standard",
      "usage_cost": "0.1",
      "usage_included": "2500",
      "users": 1,
      "watermark_documents": true,
      "watermark_images": true,
      "webhooks": true,
      "webhooks_sns": true,
      "whitelabel": true,
      "activation_cost": "10.0",
      "annually": "2988.0",
      "currency": "USD",
      "monthly": "249.0",
      "user_cost": "5.0"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <plan>
      <id type="integer">1</id>
      <advanced_behaviors type="boolean">true</advanced_behaviors>
      <antivirus_advanced type="boolean">true</antivirus_advanced>
      <antivirus_basic type="boolean">true</antivirus_basic>
      <audit_hours type="integer">1</audit_hours>
      <auth_google type="boolean">true</auth_google>
      <auth_oauth type="boolean">true</auth_oauth>
      <auth_oauth_custom type="boolean">true</auth_oauth_custom>
      <auth_user_count type="integer">1</auth_user_count>
      <automations type="boolean">true</automations>
      <custom_namespace type="boolean">true</custom_namespace>
      <custom_smtp type="boolean">true</custom_smtp>
      <dedicated_ip type="boolean">true</dedicated_ip>
      <dedicated_ips type="integer">1</dedicated_ips>
      <differences></differences>
      <domain type="boolean">true</domain>
      <domain_count type="integer">1</domain_count>
      <email_inboxes type="boolean">true</email_inboxes>
      <extended_folder_permissions type="boolean">true</extended_folder_permissions>
      <extended_log_retention type="boolean">true</extended_log_retention>
      <free_developer_accounts type="integer">1</free_developer_accounts>
      <ftp_sftp_webdav type="boolean">true</ftp_sftp_webdav>
      <full_text_search type="boolean">true</full_text_search>
      <global_acceleration type="boolean">true</global_acceleration>
      <gpg type="boolean">true</gpg>
      <group_admins_enabled type="boolean">true</group_admins_enabled>
      <group_notifications type="boolean">true</group_notifications>
      <hipaa type="boolean">true</hipaa>
      <html_branding type="boolean">true</html_branding>
      <ldap type="boolean">true</ldap>
      <legal_flexibility type="boolean">true</legal_flexibility>
      <max_folder_size>10000</max_folder_size>
      <max_individual_file_size>5 TB</max_individual_file_size>
      <name>Enterprise</name>
      <nested_groups type="boolean">true</nested_groups>
      <preview_page_limit type="integer">100</preview_page_limit>
      <regions_included type="integer">2</regions_included>
      <remote_sync_ftp type="boolean">true</remote_sync_ftp>
      <remote_sync_interval type="integer">1</remote_sync_interval>
      <remote_sync_other type="boolean">true</remote_sync_other>
      <remote_sync_s3 type="boolean">true</remote_sync_s3>
      <require_2fa type="boolean">true</require_2fa>
      <site_fields_requiring_upgrade type="array"/>
      <support_level>standard</support_level>
      <usage_cost>0.1</usage_cost>
      <usage_included>2500</usage_included>
      <users type="integer">1</users>
      <watermark_documents type="boolean">true</watermark_documents>
      <watermark_images type="boolean">true</watermark_images>
      <webhooks type="boolean">true</webhooks>
      <webhooks_sns type="boolean">true</webhooks_sns>
      <whitelabel type="boolean">true</whitelabel>
      <activation_cost>10.0</activation_cost>
      <annually>2988.0</annually>
      <currency>USD</currency>
      <monthly>249.0</monthly>
      <user_cost>5.0</user_cost>
    </plan>
    
    

    HTTPS Request

    PATCH /site/plan

    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 Site ID.
    billing_frequency int64 The billing frequency for the site. Must be 1(monthly) or 12(annual).

    Previews

    Previews are image or PDF previews that are meant to be viewed within the web interface.

    The Preview object

    Example Preview Object

    {
      "status": "complete",
      "download_uri": "https://mysite.files.com/...",
      "id": 1,
      "type": "complete",
      "size": 1024
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <preview>
      <status>complete</status>
      <download_uri>https://mysite.files.com/...</download_uri>
      <id type="integer">1</id>
      <type>complete</type>
      <size type="integer">1024</size>
    </preview>
    
    
    Attribute Description
    status string Preview status. Can be invalid, not_generated, generating, complete, or file_too_large
    download_uri string Link to download preview
    id int64 Preview ID
    type string Preview status. Can be invalid, not_generated, generating, complete, or file_too_large
    size int64 Preview size

    Show many previews at once

    Example Request

    curl "https://app.files.com/api/rest/v1/previews.json?page=1&per_page=1&ids=ids&size=large" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/previews.xml?page=1&per_page=1&ids=ids&size=large" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Preview.list(
      page: 1, 
      per_page: 1, 
      ids: "ids", 
      size: "large"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Preview::list(array(
      'page' => 1, 
      'per_page' => 1, 
      'ids' => "ids", 
      'size' => "large"
    ));
    

    Example Response

    [
      {
        "status": "complete",
        "download_uri": "https://mysite.files.com/...",
        "id": 1,
        "type": "complete",
        "size": 1024
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <previews type="array">
      <preview>
        <status>complete</status>
        <download_uri>https://mysite.files.com/...</download_uri>
        <id type="integer">1</id>
        <type>complete</type>
        <size type="integer">1024</size>
      </preview>
    </previews>
    
    

    HTTPS Request

    GET /previews

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    ids string Required Preview IDs. Comma delimited.
    size string Preview Size
    Possible values: small, large, xlarge, pdf

    Show Preview

    Example Request

    curl "https://app.files.com/api/rest/v1/previews/{id}.json?size=large" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/previews/{id}.xml?size=large" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Preview.find(id, 
      size: "large"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Preview::find($id, array(
      'size' => "large"
    ));
    

    Example Response

    {
      "status": "complete",
      "download_uri": "https://mysite.files.com/...",
      "id": 1,
      "type": "complete",
      "size": 1024
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <preview>
      <status>complete</status>
      <download_uri>https://mysite.files.com/...</download_uri>
      <id type="integer">1</id>
      <type>complete</type>
      <size type="integer">1024</size>
    </preview>
    
    

    HTTPS Request

    GET /previews/{id}

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    id int64 Required Preview ID.
    size string Preview Size
    Possible values: small, large, xlarge, pdf

    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 by path

    Example Request

    curl "https://app.files.com/api/rest/v1/projects/folders/{path}?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/projects/folders/{path}?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Project.list_for(path, 
      page: 1, 
      per_page: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Project::listFor($path, array(
      'page' => 1, 
      'per_page' => 1
    ));
    

    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/folders/?*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
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    path string Required Path to operate on.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Project::create(array(
      'global_access' => "global_access"
    ));
    

    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.find(1)
    project.update(
      global_access: "global_access"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $project = \Files\Project->find(1);
    $project->update(array(
      'global_access' => "global_access"
    ));
    

    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.find(1)
    project.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $project = \Files\Project->find(1);
    $project->delete();
    

    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 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,
      "created_at": "2000-01-01 01:00:00 UTC",
      "fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
      "title": "My public key"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-key>
      <id type="integer">1</id>
      <created_at type="dateTime">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>
      <title>My public key</title>
    </public-key>
    
    
    Attribute Description
    id int64 Public key ID
    created_at date-time Public key created at date/time
    fingerprint string Public key fingerprint
    title string Public key title
    user_id int64 User ID. Provide a value of 0 to operate the current session's user.
    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&page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/public_keys.xml?user_id=1&page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::PublicKey.list(
      user_id: 1, 
      page: 1, 
      per_page: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\PublicKey::list(array(
      'user_id' => 1, 
      'page' => 1, 
      'per_page' => 1
    ));
    

    Example Response

    [
      {
        "id": 1,
        "created_at": "2000-01-01 01:00:00 UTC",
        "fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
        "title": "My public key"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-keys type="array">
      <public-key>
        <id type="integer">1</id>
        <created_at type="dateTime">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>
        <title>My public key</title>
      </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.
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\PublicKey::find($id);
    

    Example Response

    {
      "id": 1,
      "created_at": "2000-01-01 01:00:00 UTC",
      "fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
      "title": "My public key"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-key>
      <id type="integer">1</id>
      <created_at type="dateTime">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>
      <title>My public key</title>
    </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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\PublicKey::create(array(
      'user_id' => 1, 
      'title' => "My Main Key", 
      'public_key' => "public_key"
    ));
    

    Example Response

    {
      "id": 1,
      "created_at": "2000-01-01 01:00:00 UTC",
      "fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
      "title": "My public key"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-key>
      <id type="integer">1</id>
      <created_at type="dateTime">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>
      <title>My public key</title>
    </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.find(1)
    public_key.update(
      title: "My Main Key"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $public_key = \Files\PublicKey->find(1);
    $public_key->update(array(
      'title' => "My Main Key"
    ));
    

    Example Response

    {
      "id": 1,
      "created_at": "2000-01-01 01:00:00 UTC",
      "fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
      "title": "My public key"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <public-key>
      <id type="integer">1</id>
      <created_at type="dateTime">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>
      <title>My public key</title>
    </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.find(1)
    public_key.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $public_key = \Files\PublicKey->find(1);
    $public_key->delete();
    

    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 Servers

    Remote servers are used with the remote_server_sync Behavior.

    Remote Servers can be either an FTP server, SFTP server, or S3 bucket. Other remote server types, such as Box, Dropbox, OneDrive, Google Drive, Rackspace Files, etc., are coming soon.

    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.

    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.

    The RemoteServer object

    Example RemoteServer Object

    {
      "id": 1,
      "hostname": "remote-server.com",
      "name": "My Remote server",
      "port": 1,
      "s3_bucket": "my-bucket",
      "s3_region": "us-east-1",
      "server_certificate": "[certificate]",
      "server_type": "s3",
      "ssl": "always",
      "username": "user"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-server>
      <id type="integer">1</id>
      <hostname>remote-server.com</hostname>
      <name>My Remote server</name>
      <port type="integer">1</port>
      <s3_bucket>my-bucket</s3_bucket>
      <s3_region>us-east-1</s3_region>
      <server_certificate>[certificate]</server_certificate>
      <server_type>s3</server_type>
      <ssl>always</ssl>
      <username>user</username>
    </remote-server>
    
    
    Attribute Description
    id int64 Remote server ID
    hostname string Hostname or IP address
    name string Internal name for your reference
    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_type string Remote server type.
    Possible values: ftp, sftp, s3
    ssl string Should we require SSL?
    Possible values: if_available, require, require_implicit, never
    username string Remote server username. Not needed for S3 buckets.
    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.

    List Remote Servers

    Example Request

    curl "https://app.files.com/api/rest/v1/remote_servers.json?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/remote_servers.xml?page=1&per_page=1" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::RemoteServer.list(
      page: 1, 
      per_page: 1
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\RemoteServer::list(array(
      'page' => 1, 
      'per_page' => 1
    ));
    

    Example Response

    [
      {
        "id": 1,
        "hostname": "remote-server.com",
        "name": "My Remote server",
        "port": 1,
        "s3_bucket": "my-bucket",
        "s3_region": "us-east-1",
        "server_certificate": "[certificate]",
        "server_type": "s3",
        "ssl": "always",
        "username": "user"
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-servers type="array">
      <remote-server>
        <id type="integer">1</id>
        <hostname>remote-server.com</hostname>
        <name>My Remote server</name>
        <port type="integer">1</port>
        <s3_bucket>my-bucket</s3_bucket>
        <s3_region>us-east-1</s3_region>
        <server_certificate>[certificate]</server_certificate>
        <server_type>s3</server_type>
        <ssl>always</ssl>
        <username>user</username>
      </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

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\RemoteServer::find($id);
    

    Example Response

    {
      "id": 1,
      "hostname": "remote-server.com",
      "name": "My Remote server",
      "port": 1,
      "s3_bucket": "my-bucket",
      "s3_region": "us-east-1",
      "server_certificate": "[certificate]",
      "server_type": "s3",
      "ssl": "always",
      "username": "user"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-server>
      <id type="integer">1</id>
      <hostname>remote-server.com</hostname>
      <name>My Remote server</name>
      <port type="integer">1</port>
      <s3_bucket>my-bucket</s3_bucket>
      <s3_region>us-east-1</s3_region>
      <server_certificate>[certificate]</server_certificate>
      <server_type>s3</server_type>
      <ssl>always</ssl>
      <username>user</username>
    </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 '{"hostname":"remote-server.com","name":"My Remote server","port":1,"s3_bucket":"my-bucket","s3_region":"us-east-1","server_certificate":"[certificate]","server_type":"s3","ssl":"always","username":"user"}' \
      -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>
           <hostname>remote-server.com</hostname>
           <name>My Remote server</name>
           <port type="integer">1</port>
           <s3_bucket>my-bucket</s3_bucket>
           <s3_region>us-east-1</s3_region>
           <server_certificate>[certificate]</server_certificate>
           <server_type>s3</server_type>
           <ssl>always</ssl>
           <username>user</username>
         </remote-server>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::RemoteServer.create(
      hostname: "remote-server.com", 
      name: "My Remote server", 
      port: 1, 
      s3_bucket: "my-bucket", 
      s3_region: "us-east-1", 
      server_certificate: "[certificate]", 
      server_type: "s3", 
      ssl: "always", 
      username: "user"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\RemoteServer::create(array(
      'hostname' => "remote-server.com", 
      'name' => "My Remote server", 
      'port' => 1, 
      's3_bucket' => "my-bucket", 
      's3_region' => "us-east-1", 
      'server_certificate' => "[certificate]", 
      'server_type' => "s3", 
      'ssl' => "always", 
      'username' => "user"
    ));
    

    Example Response

    {
      "id": 1,
      "hostname": "remote-server.com",
      "name": "My Remote server",
      "port": 1,
      "s3_bucket": "my-bucket",
      "s3_region": "us-east-1",
      "server_certificate": "[certificate]",
      "server_type": "s3",
      "ssl": "always",
      "username": "user"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-server>
      <id type="integer">1</id>
      <hostname>remote-server.com</hostname>
      <name>My Remote server</name>
      <port type="integer">1</port>
      <s3_bucket>my-bucket</s3_bucket>
      <s3_region>us-east-1</s3_region>
      <server_certificate>[certificate]</server_certificate>
      <server_type>s3</server_type>
      <ssl>always</ssl>
      <username>user</username>
    </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.
    hostname string Hostname.
    name string Internal reference name for server.
    password string Password if needed.
    port string Port.
    private_key string Private key if needed.
    s3_bucket string S3 bucket name.
    s3_region string S3 region.
    server_certificate string Certificate for this server.
    server_type string Type of server. Can be ftp, sftp, or s3.
    ssl string SSL requirements. Can be if_available, require, require_implicit, never.
    username string Server username if needed.

    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 '{"hostname":"remote-server.com","name":"My Remote server","port":1,"s3_bucket":"my-bucket","s3_region":"us-east-1","server_certificate":"[certificate]","server_type":"s3","ssl":"always","username":"user"}' \
      -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>
           <hostname>remote-server.com</hostname>
           <name>My Remote server</name>
           <port type="integer">1</port>
           <s3_bucket>my-bucket</s3_bucket>
           <s3_region>us-east-1</s3_region>
           <server_certificate>[certificate]</server_certificate>
           <server_type>s3</server_type>
           <ssl>always</ssl>
           <username>user</username>
         </remote-server>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    remote_server = Files::RemoteServer.find(1)
    remote_server.update(
      hostname: "remote-server.com",
      name: "My Remote server",
      port: 1,
      s3_bucket: "my-bucket",
      s3_region: "us-east-1",
      server_certificate: "[certificate]",
      server_type: "s3",
      ssl: "always",
      username: "user"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $remote_server = \Files\RemoteServer->find(1);
    $remote_server->update(array(
      'hostname' => "remote-server.com", 
      'name' => "My Remote server", 
      'port' => 1, 
      's3_bucket' => "my-bucket", 
      's3_region' => "us-east-1", 
      'server_certificate' => "[certificate]", 
      'server_type' => "s3", 
      'ssl' => "always", 
      'username' => "user"
    ));
    

    Example Response

    {
      "id": 1,
      "hostname": "remote-server.com",
      "name": "My Remote server",
      "port": 1,
      "s3_bucket": "my-bucket",
      "s3_region": "us-east-1",
      "server_certificate": "[certificate]",
      "server_type": "s3",
      "ssl": "always",
      "username": "user"
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <remote-server>
      <id type="integer">1</id>
      <hostname>remote-server.com</hostname>
      <name>My Remote server</name>
      <port type="integer">1</port>
      <s3_bucket>my-bucket</s3_bucket>
      <s3_region>us-east-1</s3_region>
      <server_certificate>[certificate]</server_certificate>
      <server_type>s3</server_type>
      <ssl>always</ssl>
      <username>user</username>
    </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.
    hostname string Hostname.
    name string Internal reference name for server.
    password string Password if needed.
    port string Port.
    private_key string Private key if needed.
    s3_bucket string S3 bucket name.
    s3_region string S3 region.
    server_certificate string Certificate for this server.
    server_type string Type of server. Can be ftp, sftp, or s3.
    ssl string SSL requirements. Can be if_available, require, require_implicit, never.
    username string Server username if needed.

    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.find(1)
    remote_server.delete
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $remote_server = \Files\RemoteServer->find(1);
    $remote_server->delete();
    

    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.

    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": "",
      "source": "",
      "destination": "",
      "automation_id": "",
      "user_display_name": ""
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <request>
      <id type="integer">1</id>
      <path></path>
      <source></source>
      <destination></destination>
      <automation_id></automation_id>
      <user_display_name></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?page=1&per_page=1&mine=true" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/requests.xml?page=1&per_page=1&mine=true" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Request.list(
      page: 1, 
      per_page: 1, 
      mine: true
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Request::list(array(
      'page' => 1, 
      'per_page' => 1, 
      'mine' => true
    ));
    

    Example Response

    [
      {
        "id": 1,
        "path": "",
        "source": "",
        "destination": "",
        "automation_id": "",
        "user_display_name": ""
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <requests type="array">
      <request>
        <id type="integer">1</id>
        <path></path>
        <source></source>
        <destination></destination>
        <automation_id></automation_id>
        <user_display_name></user_display_name>
      </request>
    </requests>
    
    

    HTTPS Request

    GET /requests

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    mine boolean Only show requests of the current user? (Defaults to true if current user is not a site admin.)

    List Requests by path

    Example Request

    curl "https://app.files.com/api/rest/v1/requests/folders/{path}?page=1&per_page=1&mine=true" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl "https://app.files.com/api/rest/v1/requests/folders/{path}?page=1&per_page=1&mine=true" \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Request.list_for(path, 
      page: 1, 
      per_page: 1, 
      mine: true
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Request::listFor($path, array(
      'page' => 1, 
      'per_page' => 1, 
      'mine' => true
    ));
    

    Example Response

    [
      {
        "id": 1,
        "path": "",
        "source": "",
        "destination": "",
        "automation_id": "",
        "user_display_name": ""
      }
    ]
    
    <?xml version="1.0" encoding="UTF-8"?>
    <requests type="array">
      <request>
        <id type="integer">1</id>
        <path></path>
        <source></source>
        <destination></destination>
        <automation_id></automation_id>
        <user_display_name></user_display_name>
      </request>
    </requests>
    
    

    HTTPS Request

    GET /requests/folders/?*path

    Authentication Required

    Available to all authenticated keys or sessions.

    Request Parameters

    Parameter Description
    page int64 Current page number.
    per_page int64 Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
    action string Deprecated: If set to count returns a count of matching records rather than the records themselves.
    path string Required Path to operate on.
    mine boolean Only show requests of the current user? (Defaults to true if current user is not a site admin.)

    Create Request

    Example Request

    curl https://app.files.com/api/rest/v1/requests.json \
      -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/requests.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<request>
           <destination>destination</destination>
         </request>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    request = Files::Request.find(1)
    request.create(
      destination: "destination"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    $request = \Files\Request->find(1);
    $request->create(array(
      'destination' => "destination"
    ));
    

    Example Response

    {
      "id": 1,
      "path": "",
      "source": "",
      "destination": "",
      "automation_id": "",
      "user_display_name": ""
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <request>
      <id type="integer">1</id>
      <path></path>
      <source></source>
      <destination></destination>
      <automation_id></automation_id>
      <user_display_name></user_display_name>
    </request>
    
    

    HTTPS Request

    POST /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

    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'
    
    Files::Request.delete(id)
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Request::delete($id);
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /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 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": 1,
      "language": "en",
      "login_token": "@tok-randomcode",
      "login_token_domain": "https://mysite.files.com",
      "max_dir_listing_size": 1,
      "multiple_regions": true,
      "read_only": "en",
      "root_path": "",
      "site_id": 1,
      "ssl_required": true,
      "tls_disabled": true,
      "two_factor_setup_needed": true,
      "allowed_2fa_method_sms": true,
      "allowed_2fa_method_totp": true,
      "allowed_2fa_method_u2f": true,
      "allowed_2fa_method_yubi": true,
      "use_provided_modified_at": true,
      "windows_mode_ftp": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <session>
      <id type="integer">1</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>en</read_only>
      <root_path></root_path>
      <site_id type="integer">1</site_id>
      <ssl_required type="boolean">true</ssl_required>
      <tls_disabled type="boolean">true</tls_disabled>
      <two_factor_setup_needed type="boolean">true</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_yubi type="boolean">true</allowed_2fa_method_yubi>
      <use_provided_modified_at type="boolean">true</use_provided_modified_at>
      <windows_mode_ftp type="boolean">true</windows_mode_ftp>
    </session>
    
    
    Attribute Description
    id int64 Session ID
    language string Session language
    login_token string Login token. If set, this token will allow your user to log in via browser at the domain in login_token_domain.
    login_token_domain string Domain to use with login_token.
    max_dir_listing_size int64 Maximum number of files to retrieve per folder for a directory listing. This is based on the user's plan.
    multiple_regions boolean Can access multiple regions?
    read_only boolean Is this session read only?
    root_path string Initial root path to start the user's session in.
    site_id int64 Site ID
    ssl_required boolean Is SSL required for this user? (If so, ensure all your communications with this user use SSL.)
    tls_disabled boolean Is strong TLS disabled for this user? (If this is set to true, the site administrator has signaled that it is ok to use less secure TLS versions for this user.)
    two_factor_setup_needed boolean If true, this user needs to add a Two Factor Authentication method before performing any further actions.
    allowed_2fa_method_sms boolean Sent only if 2FA setup is needed. Is SMS two factor authentication allowed?
    allowed_2fa_method_totp boolean Sent only if 2FA setup is needed. Is TOTP two factor authentication allowed?
    allowed_2fa_method_u2f boolean Sent only if 2FA setup is needed. Is U2F two factor authentication allowed?
    allowed_2fa_method_yubi boolean Sent only if 2FA setup is needed. Is Yubikey two factor authentication allowed?
    use_provided_modified_at boolean Allow the user to provide file/folder modified at dates? If false, the server will always use the current date/time.
    windows_mode_ftp boolean Does this user want to use Windows line-ending emulation? (CR vs CRLF)
    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.

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Session::create(array(
      'username' => "username", 
      'password' => "password", 
      'otp' => "123456"
    ));
    

    Example Response

    {
      "id": 1,
      "language": "en",
      "login_token": "@tok-randomcode",
      "login_token_domain": "https://mysite.files.com",
      "max_dir_listing_size": 1,
      "multiple_regions": true,
      "read_only": "en",
      "root_path": "",
      "site_id": 1,
      "ssl_required": true,
      "tls_disabled": true,
      "two_factor_setup_needed": true,
      "allowed_2fa_method_sms": true,
      "allowed_2fa_method_totp": true,
      "allowed_2fa_method_u2f": true,
      "allowed_2fa_method_yubi": true,
      "use_provided_modified_at": true,
      "windows_mode_ftp": true
    }
    
    <?xml version="1.0" encoding="UTF-8"?>
    <session>
      <id type="integer">1</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>en</read_only>
      <root_path></root_path>
      <site_id type="integer">1</site_id>
      <ssl_required type="boolean">true</ssl_required>
      <tls_disabled type="boolean">true</tls_disabled>
      <two_factor_setup_needed type="boolean">true</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_yubi type="boolean">true</allowed_2fa_method_yubi>
      <use_provided_modified_at type="boolean">true</use_provided_modified_at>
      <windows_mode_ftp type="boolean">true</windows_mode_ftp>
    </session>
    
    

    HTTPS Request

    POST /sessions

    Authentication Required

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

    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.

    Reset password given a password reset code

    Example Request

    curl https://app.files.com/api/rest/v1/sessions/forgot/reset.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"code":"abc123","password":"password","confirm_password":"password","interface":"web","locale":"en","otp":"123456"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/sessions/forgot/reset.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<session>
           <code>abc123</code>
           <password>password</password>
           <confirm_password>password</confirm_password>
           <interface>web</interface>
           <locale>en</locale>
           <otp>123456</otp>
         </session>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Session.forgot_reset(
      code: "abc123", 
      password: "password", 
      confirm_password: "password", 
      interface: "web", 
      locale: "en", 
      otp: "123456"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Session::forgotReset(array(
      'code' => "abc123", 
      'password' => "password", 
      'confirm_password' => "password", 
      'interface' => "web", 
      'locale' => "en", 
      'otp' => "123456"
    ));
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    POST /sessions/forgot/reset

    Authentication Required

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

    Request Parameters

    Parameter Description
    code string Required
    password string Required
    confirm_password string
    interface string
    locale string
    otp string

    Validate password reset code

    Example Request

    curl https://app.files.com/api/rest/v1/sessions/forgot/validate.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"code":"abc123"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/sessions/forgot/validate.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<session>
           <code>abc123</code>
         </session>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Session.forgot_validate(
      code: "abc123"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Session::forgotValidate(array(
      'code' => "abc123"
    ));
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    POST /sessions/forgot/validate

    Authentication Required

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

    Request Parameters

    Parameter Description
    code string Required

    Initiate a password reset process given an email address or username

    Example Request

    curl https://app.files.com/api/rest/v1/sessions/forgot.json \
      -X POST \
      -H 'Content-Type: application/json' \
      -d '{"email":"johndoe@gmail.com"}' \
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    curl https://app.files.com/api/rest/v1/sessions/forgot.xml \
      -X POST \
      -H 'Content-Type: application/xml' \
      -d '<session>
           <email>johndoe@gmail.com</email>
         </session>'
      -H 'X-FilesAPI-Key: YOUR_API_KEY'
    
    Files.api_key = 'YOUR_API_KEY'
    
    Files::Session.forgot(
      email: "johndoe@gmail.com"
    )
    
    \Files\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Session::forgot(array(
      'email' => "johndoe@gmail.com"
    ));
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    POST /sessions/forgot

    Authentication Required

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

    Request Parameters

    Parameter Description
    email string
    username string

    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\Files::setApiKey('YOUR_API_KEY');
    
    \Files\Session::delete();
    

    Example Response

    No response.
    
    No response.
    

    HTTPS Request

    DELETE /sessions

    Authentication Required

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

    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

    {
      "allowed_2fa_method_sms": true,
      "allowed_2fa_method_totp": true,
      "allowed_2fa_method_u2f": true,
      "allowed_2fa_method_yubi": true,
      "admin_user_id": 1,
      "allowed_file_types": "",
      "allowed_ips": "",
      "ask_about_overwrites": true,
      "bundle_expiration": 1,
      "bundle_password_required": true,
      "color2_left": "#0066a7",
      "color2_link": "#d34f5d",
      "color2_text": "#0066a7",
      "color2_top": "#000000",
      "color2_top_text": "#ffffff",
      "created_at": "2000-01-01 01:00:00 UTC",
      "currency": "USD",
      "custom_namespace": 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,
      "disable_notifications": true,
      "disable_password_reset": true,
      "domain": "my-custom-domain.com",
      "email": "john.doe@files.com",
      "folder_permissions_groups_only": true,
      "hipaa": true,
      "icon128": "",