Skip to main content

Legacy Format Webhooks

Sites which have been upgraded from a legacy ExaVault account prior to 2025 may prefer to use webhook requests formatted like those sent by the legacy platform. Files.com provides two request encoding formats that produce requests designed to be compatible with legacy webhook listeners.

Creating New ExaVault Format Webhooks

Create a new webhook for a folder, either within the Folder Settings, or from the Webhooks page, and change the Method setting for your webhook to POST, then change the Encoding to ExaVault legacy format (v1) or ExaVault legacy format (v2)

Webhook Signature Verification

A webhook that uses an EV1 or EV2 legacy format encoding will also include a Verification Token. You may use this token in combination with the x-exavault-signature header to verify that Files.com is the sender of the webhook request. You will use a same 3-step procedure to validate that an individual webhook request was sent by Files.com.

First, locate the verification token in your webhook settings. Every webhook request sent to your endpoint URL will use the same verification token for that webhook. You can use the Regenerate token button to change the token.

Concatenate that token along with the raw string representing the request body that was received. The resulting string will be the verification token followed by the contents of the request body.

Do not convert the request body to any other type of object; if the library you're using automatically converts the request body to an object, look for a method to obtain the raw request body as text.

After concatenating the verification token with the request body, calculate the MD5 hash of that concatenation. The resulting hash should match the contents of your x-exavault-signature header.

EV1 Legacy Format Request Structure

Messages for webhooks using EV1 legacy format contain a JSON-formatted string (not including extra whitespace or line breaks) with the following properties.

PropertyDetails
accountnameThe subdomain of your site.
usernameThe username of the person who performed the triggering action that sent the webhook
operationWhat the user did; will be one of Upload, Download, Move, Copy, or Delete
protocolHow the user was connected; will be one of web, ftp, robot, jsapi, sftp, dav, desktop, scim, office, mobile, as2, inbound_email, or remote
pathThe full path to the file
sourcepathFull path to the original file; will be blank unless the operation is Move or Copy
attemptNumber of times the system attempted to send this particular message
attemptIdUnique identifier for this particular message, followed by the attempt

Here is a prettified version of a sample EV1 legacy format request, with added line breaks and whitespace for readability. The actual request body will not contain extra whitespace.

{
  "accountname": "testsite",
  "username": "bob.johnson@example.com",
  "operation": "Download",
  "protocol": "web",
  "path": "/Aboodabha/Pics_2.png",
  "sourcepath": null,
  "attempt": 1,
  "attemptId": "1df19v0v-1"
}

EV2 Legacy Format Request Structure

Messages for webhooks using EV2 legacy format contain a JSON-formatted string (not including extra whitespace or line breaks) with the following properties.

PropertyDetails
attemptIdUnique identifier for this particular message, followed by the attempt number
accountNameSubdomain of your Files.com site
eventTimestampISO 8601 formatted timestamp indicating when the event that triggered this message happened
ipAddressIP Address of the user who triggered this message
protocolHow the user was connected; will be one of web, ftp, robot, jsapi, sftp, dav, desktop, scim, office, mobile, as2, inbound_email, or remote
usernameUsername of the person who performed the triggering action that sent the message
eventWhat activity is being reported, will be one of resources.download, resources.upload, resources.delete, resources.move, or resources.copy
eventDataObject containing a resources object, which has the affected resource and a destinationResource object, which has the folder that the resource was copied or moved to.

The eventData.resources object contains the following properties

PropertyDetails
idID number of the file
hash"11111111111111111111111111111111"; a placeholder value included for backwards compatibility with old webhook listener code.
nameName of the resource
extensionFile extension; only included when the resource is a file whose name contains a period followed by some characters.
typefile or dir
createdByUsername who uploaded a file; always null unless the event is resources.upload
uploadDateISO 8601 formatted timestamp indicating when the file was uploaded; always null unless the event is resources.upload or resources.download
createdAtISO 8601 formatted timestamp indicating when the file was uploaded; will be null unless the event is resources.upload or resources.download
updatedAtISO 8601 formatted timestamp indicating when the file was changed; always null unless the event is resources.upload
accessedAtnull; placeholder included for backwards compatibility with old webhook listener code
pathFull path to the file that triggered the message
sizeSize in bytes of the file transfer; always null unless the event is resources.upload or resources.download
fileCountnull; placeholder included for backwards compatibility with old webhook listener code
previewableWhether the resource can be previewed; true or false

The eventData.destinationResource object, which is only included for the resources.copy or resources.move event, contains the following properties.

PropertyDetails
idID number of the folder that the file was copied or moved to
hash11111111111111111111111111111111; a placeholder value included for backwards compatibility with old webhook listener code
nameName of the new parent folder
extensionEmpty string
typedir
createdBynull; a placeholder value included for backwards compatibility with old webhook listener code
uploadDatenull; a placeholder value included for backwards compatibility with old webhook listener code
createdAtnull; a placeholder value included for backwards compatibility with old webhook listener code
updatedAtnull; a placeholder value included for backwards compatibility with old webhook listener code
accessedAtnull; a placeholder value included for backwards compatibility with old webhook listener code
pathfull path to the folder that the the exentData.resources object was copied to
sizenull; a placeholder value included for backwards compatibility with old webhook listener code
fileCountnull; a placeholder value included for backwards compatibility with old webhook listener code
previewablefalse

Here is a prettified version of a sample EV2 legacy format request, with added line breaks and whitespace for readability. The request you receive will not contain any extra whitespace.

{
  "attemptId": "1dfj1pgm-1",
  "accountName": "testsite",
  "eventTimestamp": "2023-04-17T15:41:52-04:00",
  "ipAddress": "34.211.45.99",
  "protocol": "web",
  "username": "bob.johnson@example.com",
  "event": "resources.upload",
  "eventData": {
    "resources": {
      "id": 6541587968,
      "hash": "11111111111111111111111111111111",
      "name": "Files.docx",
      "extension": "docx",
      "type": "file",
      "createdBy": "bob.johnson@example.com",
      "uploadDate": "2023-04-17T15:41:52-04:00",
      "createdAt": "2023-04-17T15:41:52-04:00",
      "updatedAt": "2023-04-17T15:41:52-04:00",
      "accessedAt": null,
      "path": "/Uploads/Files.docx",
      "size": 14252,
      "fileCount": null,
      "previewable": true
    }
  }
}

Get Instant Access to Files.com

The button below will take you to our Free Trial signup page. Click on the white "Start My Free Trial" button, then fill out the short form on the next page. Your account will be activated instantly. You can dive in and start yourself or let us help. The choice is yours.