Skip to main content

Webhooks

Webhooks are web application URLs (such as https://www.example.org/my-hook) that you specify in your Settings profile for FileSpin service to provide automatic callback notification of events such as asset uploads, updates, etc.

You can save multiple webhooks in your settings profile to receive these callback notifications.

Asset Events

Webhook callbacks are issued for the following asset events. See the Tools API for full event descriptions and payload formats.

EventDescription
file-savedWhen a file is stored in your storage after user uploads a file through File Picker or through Upload API
file-processedWhen image and video conversions are processed for a file as part of upload workflow or via Image or Video Conversion API
file-data-updatedWhen custom data is attached to a file using FileSpin.update method of File Picker or using Update File Data API
file-deletedWhen image conversions, video transcodes or the original file is deleted using Delete API
file-undeletedWhen the original file is undeleted using Undelete API
addon-processedAn addon has completed processing

Retry behavior: Webhook callback will be attempted up to 8 times if the webhook does not respond with a HTTP 20x code (200, 201 or 202). If callback fails, re-attempts will follow a back-off algorithm that spreads calls out over an 8 hour period.

Webhook Data Format

For file-saved, file-processed, file-data-updated, and addon-processed — the payload is Asset Data Format.

On-demand image (ODI) is available for assets after they are processed the first time. Availability of ODI for an asset is indicated with the ON_DEMAND_IMAGE key in addons_info of Asset Data JSON:

"addons_info": {
"ON_DEMAND_IMAGE": {
"available": true
}
}

For file-deleted and file-undeleted — the payload format differs. See the Tools API Webhooks tag for the full payload structure and examples.