Need automated alerting when something happens on your Files.com site? Our Webhooks may be for you.

Our Webhooks send an HTTP GET or POST request to the URL you specify whenever a file is uploaded, downloaded, modified, renamed, copied, or deleted.

Information about the operation is included in the request, either as query string or body parameters. Webhooks are very easy to use and can be integrated by anyone with server-side programming knowledge. Our Webhooks have also been designed to integrate well with 3rd party webhook handlers, such as Zapier.

Setting up a Webhook

To set up a webhook, go to the folder that represents the root folder you are concerned with receiving notifications about. This can be the site root.

Open the Folder Settings and then click Webhooks > Add new webhook. You'll enter your webhook handler URL and any backup URL(s).

The first webhook URL is the primary URL where you would like us to send our HTTP request, and any backup URLs are redundant webhook URLs that will also be attempted.

Webhook URL requirements

  • URLs must resolve to public IP addresses. They cannot be internal IP addresses like 192.168.x.x, 10.x.x.x, etc.
  • Ports other than 80, 443, 8080, or 8443 are not allowed.
  • If port 443 is used (SSL), the site must have a valid SSL certificate.
  • When we send a request to your Webhook URL, it must return an HTTP response code of 200.

Customizing webhook triggers

By default, webhooks will trigger for any file or folder action (create, read, update, delete, move, or copy) within the configured folder.

You can limit which actions will trigger webhooks by choosing the Only trigger on specific actions option, and selecting the specific actions that you want to trigger webhooks.

Customizing the HTTP method

By default, webhooks will be sent as HTTP GET requests.

You can customize whether webhooks are sent as an HTTP GET or POST request by clicking Expand advanced settings and selecting the method you want to use.

Adding custom headers

You can add custom HTTP headers to be included with each webhook by clicking Expand advanced settings and adding the header key and value under Headers. Click +Add another header to add additional headers.

Customizing the webhook body

If you customize the HTTP method of a webhook to use the POST method, you can optionally add custom elements to be included in the body of webhook requests, as well as customize the encoding of the webhook body.

To add custom body elements, after clicking Expand advanced settings and selecting the POST method, add the element key and value under Body. Click +Add another body element to add additional body elements.

To customize the encoding of the webhook body, under Encoding select between Standard HTTP POST body, XML, and JSON encodings.

Explanation of the Webhook request

Whenever any file or folder action occurs within a webhook-enabled folder, an HTTP GET or POST request will be sent to your corresponding webhook URL within a few minutes of the operation happening and will include several URL parameters.

Make sure to reply with an HTTP 200 response code.

Request URL Parameter Reference

actionType of action that occurred. Will be one of the following: create, read, update, destroy, move, copy. Renames are treated the same as a move action.
interfaceInterface where the action occurred. Will be one of the following: web, ftp, robot, restapi, sftp, or dav. The robot interface is referenced when a file is acted on by an automated process that occurs on our side. For example, if you had a behavior rule to delete files in a specific folder after 3 days, and the rule was triggered, this would result in a webhook triggering with the action destroy and the interface robot.
pathPath of the file that was operated on.
destinationIf a move or copy action, the new filename.
atTimestamp of the action, format: Y-m-dTH:M:S+00:00.
usernameUsername that performed the action.
typeIndicates whether the action occurred on a file or a directory, when applicable.
sizeSize of the file that was operated on (in bytes).

Expected response code

We expect an HTTP 200 response code, so if we don't receive one we will try the webhooks again a few times over the next 3 days. We will notify you by email if a failure persists beyond that period.

Troubleshooting webhook issues

The two most common problems with webhook deliverability are providing the wrong webhook URL, and the webhook endpoint not returning an HTTP 200 response.

A third potential problem you could encounter is your webhook script timing out before Files.com receives the HTTP 200 response. Therefore, if your webhook script performs complex logic or other actions that take time to complete, you may want to have your webhook endpoint immediately return the HTTP 200 status code, and then perform the rest of its actions.

External resources

These third-party sites offer troubleshooting tools should you run into issues setting up your Webhooks:

  • RequestBin.com gives you a URL that collects requests you send it so you can inspect them in a human-friendly way. Their service can be used to see what your HTTP client is sending or to inspect and debug webhook requests. RequestBin.com provides you with a webhook endpoint (URL) that you can assign to your Files.com folder path. Once there is some activity on your Files.com folder, Files.com sends data about that activity to the RequestBin.com endpoint where you can view the JSON data that would normally be sent to your webhook script.

  • The Qualys SSL Server Test is a free online service that performs a deep analysis of the configuration of any SSL web server on the public Internet.

  • Many customers will use the Webhooks by Zapier trigger. This allows the ability to create custom webhook handlers and actions without requiring extensive programming knowledge. In addition, this webhook handler will allow you to filter incoming webhooks to specific actions (ie: only send a special notification email when a file is deleted/destoyed).

Expansion of Webhook capabilities

Are there additional things you would like to see webhooks for?

We already have the capability to expose webhooks on request for creation/updates/deletes of users, groups, and permissions. We are willing to add more webhooks if there's anything that would be useful for you.

Please feel free to contact us with any feature requests for Webhooks.

Get Instant Access to Files.com and Start Collaborating and Automating

The button below will take you to our Free Trial signup page. Click on the white "Start My Free Trial" button, fill out the short form on the next page, get your account activated instantly, and start setting up your Files and Workflows immediately.

Start My Free Trial