📂Files

Upload files and documents into your client vaults.

Programmatically uploading documents and files to your clients vault on their behalf is one of the best ways to help your clients.

The File Object

The file object has the following attributes

The File Object
{
    "id": "file_8f8174a5-49ee-46d4-bb08-00e635f16c44",
    "extension": "png",
    "alwaysAvailable": false,
    "fileSize": "104662",
    "fileName": "gh_white",
    "createdAt": "2022-08-11T03:35:51.328Z",
    "updatedAt": "2022-08-11T03:35:51.328Z"
}

id string

Unique identifier of the object

fileName string

The name of the uploaded file.

extension string

The extension of the uploaded file.

fileSize string

The size of the file in bytes.

alwaysAvailable boolean

Indicates whether the file is available before death (true) or only after death (false). Default = false.

createdAt timestamp

A timestamp of when the file was created as UTC time.

updatedAt timestamp

A timestamp of when this file object was last updated as UTC time.

Upload a File

This route will encrypt and upload a file into your clients vault on their behalf. Your client does not need to have activated their vault yet in order for you to begin uploading files.

Note: This endpoint only accepts the content type of “multipart/form-data”

Code Example

import axios from 'axios'

axios.post('YOUR_API_URL/v1/clients/:clientId/files',
    headers: {
      'Authorization': 'Bearer API_KEY'
    }, file)
  .then(res => {
    console.log(res);
  }).catch(err => {
    console.log(err);
  });

Request Details

Uploads a file into a client’s vault

POST YOUR_API_URL/v1/clients/:clientId/files

This endpoint only accepts the content type of “multipart/form-data”

Headers

Request Body

{
    "file": {
        "id": "file_8f8174a5-49ee-46d4-bb08-00e635f16c44",
        "extension": "png",
        "alwaysAvailable": false,
        "fileSize": "104662",
        "fileName": "gh_white",
        "createdAt": "2022-08-11T03:35:51.328Z",
        "updatedAt": "2022-08-11T03:35:51.328Z"
    }
}

Last updated