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.
Property | Details |
---|---|
accountname | The subdomain of your site. |
username | The username of the person who performed the triggering action that sent the webhook |
operation | What the user did; will be one of Upload , Download , Move , Copy , or Delete |
protocol | How the user was connected; will be one of web , ftp , robot , jsapi , sftp , dav , desktop , scim , office , mobile , as2 , inbound_email , or remote |
path | The full path to the file |
sourcepath | Full path to the original file; will be blank unless the operation is Move or Copy |
attempt | Number of times the system attempted to send this particular message |
attemptId | Unique 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.
Property | Details |
---|---|
attemptId | Unique identifier for this particular message, followed by the attempt number |
accountName | Subdomain of your Files.com site |
eventTimestamp | ISO 8601 formatted timestamp indicating when the event that triggered this message happened |
ipAddress | IP Address of the user who triggered this message |
protocol | How the user was connected; will be one of web , ftp , robot , jsapi , sftp , dav , desktop , scim , office , mobile , as2 , inbound_email , or remote |
username | Username of the person who performed the triggering action that sent the message |
event | What activity is being reported, will be one of resources.download , resources.upload , resources.delete , resources.move , or resources.copy |
eventData | Object 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
Property | Details |
---|---|
id | ID number of the file |
hash | "11111111111111111111111111111111"; a placeholder value included for backwards compatibility with old webhook listener code. |
name | Name of the resource |
extension | File extension; only included when the resource is a file whose name contains a period followed by some characters. |
type | file or dir |
createdBy | Username who uploaded a file; always null unless the event is resources.upload |
uploadDate | ISO 8601 formatted timestamp indicating when the file was uploaded; always null unless the event is resources.upload or resources.download |
createdAt | ISO 8601 formatted timestamp indicating when the file was uploaded; will be null unless the event is resources.upload or resources.download |
updatedAt | ISO 8601 formatted timestamp indicating when the file was changed; always null unless the event is resources.upload |
accessedAt | null ; placeholder included for backwards compatibility with old webhook listener code |
path | Full path to the file that triggered the message |
size | Size in bytes of the file transfer; always null unless the event is resources.upload or resources.download |
fileCount | null ; placeholder included for backwards compatibility with old webhook listener code |
previewable | Whether 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.
Property | Details |
---|---|
id | ID number of the folder that the file was copied or moved to |
hash | 11111111111111111111111111111111 ; a placeholder value included for backwards compatibility with old webhook listener code |
name | Name of the new parent folder |
extension | Empty string |
type | dir |
createdBy | null ; a placeholder value included for backwards compatibility with old webhook listener code |
uploadDate | null ; a placeholder value included for backwards compatibility with old webhook listener code |
createdAt | null ; a placeholder value included for backwards compatibility with old webhook listener code |
updatedAt | null ; a placeholder value included for backwards compatibility with old webhook listener code |
accessedAt | null ; a placeholder value included for backwards compatibility with old webhook listener code |
path | full path to the folder that the the exentData.resources object was copied to |
size | null ; a placeholder value included for backwards compatibility with old webhook listener code |
fileCount | null ; a placeholder value included for backwards compatibility with old webhook listener code |
previewable | false |
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
}
}
}