> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.konfidant.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.konfidant.app/_mcp/server.

# Sharing an Encrypted File

> Sharing an encrypted file using pre-signed URLs

## Sharing an Encrypted File

The `api/v1/files` (*Share and Encrypt File*) endpoint returns you a short-lived pre-signed URL that you can use
to upload your files. The file you upload using this pre-signed URL will only be stored during the encryption phase
and will be deleted permanently after. The encryption phase typically takes a few seconds, until the file is
permanently deleted.

In order to upload a file using the returned pre-signed URL, send a request as follows:

```sh
curl --request PUT \
  --upload-file 'FILENAME.EXTENSION' \
  --url 'https://THE_PRE_SIGNED_URL' \
  --header 'Content-Type: YOUR_CONTENT_TYPE' \
  --header 'x-amz-meta-organization-id: ORG_ID' \
  --header 'x-amz-meta-ttl-hours: 48' \
  --header 'x-amz-meta-user-id: USER_ID'
```

You can obtain your organization ID and user ID details from the `api/v1/files` endpoint.