Filestack Webhooks

Filestack Webhooks serve the purpose of notifying users about events that occur in relation to their Filestack account. In your developer portal, you can set one or many urls whose purpose is to receive the messages triggered by specific Filestack events.

There are six event (2 upload varieties) types that will send messages to your webhook url(s):

Dialog Opens

File Uploads

File Exports

File Conversions

File Overwrites

File Deletions

Video Conversions

Configuring Filestack Webhooks

Filestack Webhooks are configured in the developer portal under Credentials > Webhooks. On this page you will find a blank field with url example and a dropdown menu. You enter the webhook url where you will receive messages in the blank field, and then select what type of event message should be sent to that url. The final step is to click the add button. If you enter your url and select "All", then one entry will be made for each type of Filestack Webhook Event. If you have multiple applications in your account, you can set a different webhook URL for each API Key. After you have added your webhook urls, it can take up to 10 minutes for them to become active.

Receiving a Webhook Notification

Configuring your server to receive a new webhook is the same as creating any page on your website. If you are using Sinatra, add a new route with the desired URL. In PHP you could create a new .php file on your server. It doesn't need to be complicated. With webhooks, your server is the server receiving the request. You can even use an external service such as RequestBin as shown in the screenshot above.

When you receive a webhook, we request that your server return a 200 or 201 response.

Webhook data is sent as JSON in the request's body. The full event details are included and can be used directly. The "action" in the JSON is the type of Filestack event that happened, be it a file being uploaded, or simply the Filestack dialog opening.

We request that if you set up webhooks for testing, that you please remove the webhook urls from your portal when you are finished.

Note that for file uploads, both symlinks and files copied with pickAndStore, the "client" field shows the service used.

For conversions, the "provider" shows where the file resides. If the file was stored to Filestack's storage, the provider will be "internal", otherwise it could be "amazon" if the original was stored to S3, or if the link to the file was a symlink, the provider could be one of the cloud drives Filestack connects to, e.g. "Dropbox".

The following are examples of what the webhook messages include and look like: