# User vault

## Endpoints

### PATCH /users/{fp_id}/vault
**Update a user's vault**

Updates data in a user's vault.

### POST /users/{fp_id}/vault/validate
**Validate a vault data update**

Check if the provided data is valid before adding it to the vault. Returns an HTTP 200 if there are no validation errors, or HTTP 400 with context describing validation errors if any.

### POST /users/{fp_id}/vault/decrypt
**Decrypt data from a user's vault**

Decrypts the specified list of Data Identifiers from the provided user's vault.

### POST /users/{fp_id}/vault/redact
**Redact the user vault**

Redact all documents and data from the user vault.

### GET /users/{fp_id}/vault
**Check presence of data in a user's vault**

Retrieve information on which Data Identifiers are present in the user's vault.

### DELETE /users/{fp_id}/vault
**Delete data from a user's vault**

Delete the provided Data Identifiers from the user's vault.

### POST /users/{fp_id}/vault/{identifier}/upload
**Upload a large file to a user's vault**

Upload a large file to the user's vault. The contents of the provided Data Identifier will be set to the contents of the provided HTTP request body.

### POST /users/{fp_id}/vault/integrity
**Compute hash of data in a user's vault**

Verify the hash of data in the vault without decrypting entirely. This API is being phased out. You should use the `transforms` in POST /users/{fp_id}/vault/decrypt API instead.

# User vault

The Footprint user vault is structured as a key-value store. The keys may only be a set of pre-defined "Data Identifiers," though there are many wildcard Data Identifiers.

Using predefined Data Identifiers allows Footprint to automatically validate and clean certain strongly-typed data. For example, Footprint will always validate and guarantee that `id.ssn9` is a nine-digit number representing a social security number.

If you would like to vault information under your own application-defined keys, you may use the `custom.*` Data Identifiers. These have no validation and can be any JSON value: string, number, list, or object.

You can find more information on the set of supported Data Identifiers and their validators [here](/articles/vault/fields).