The FaceVault API provides programmatic access to file management and user authentication features. Note that most endpoints require authentication.
Register a new user.
Body: JSON
{
"username": "user123",
"password": "securePassword"
}
Authenticate a user.
Body: JSON
{
"username": "user123",
"password": "securePassword"
}
Update user's public and wrapped private keys.
headers: Cookie: connect.sid=... (Auth required)
Body: JSON
{
"publicKey": "base64_string",
"wrappedPrivateKey": "base64_string",
"faceEnrolled": true
}
Upload an encrypted file. Requires multipart/form-data.
| Field | Type | Description |
|---|---|---|
| file | File | The encrypted file blob. |
| originalName | String | Original filename. |
| encryptedAESKey | String | AES key encrypted with user's public key. |
| fileIv | String | Initialization Vector for the file. |
| autoDelete | Boolean | Whether to auto-delete after access. |
Retrieve a list of all files uploaded by the authenticated user.
Download a specific file. Returns the encrypted file blob.
Parameters: id (File ID)
Permanently delete a file.
Parameters: id (File ID)
Get usage statistics for the user (total files, total size).