Upload a new encrypted file to the organization’s secure file storage with client-side encryption
Send your access token as header Authorization: Bearer {accessToken}
Your API key that starts with sk_live or sk_test. You can create yours at go.prem.io/api-keys.
Request body for uploading an encrypted file
The encrypted file content as hexadecimal string
"0123456789abcdef..."
The encrypted original filename
255"encrypted_filename"
Client-side hash for duplicate detection
"04b9e2ec43133ae7287f97764c0beda19f304374e1d6bfe4fcc36ad54502e5dc"
Key identifier used for encryption
"key_01234567-89ab-cdef-0123-456789abcdef"
Wrapped data encryption key
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
MIME type of the original file (encrypted on client side before sending)
"encrypted_mime_type_data"
Whether the file is incognito (optional)
true
Encryption version (optional)
1
Encrypted RAG data encryption key
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
Nonce used for RAG DEK encryption
"0123456789abcdef0123456789abcdef"
Cipher text for RAG encryption context
"cipher_text_data"
Encrypted file data encryption key
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
Nonce used for file encryption
"0123456789abcdef0123456789abcdef"
Encrypted file uploaded successfully
Response containing the uploaded encrypted file information
Status code of the response
200, 201, 202 Response data containing the requested object
Message of the response, human readable
"Resource created successfully"
API environment
development, production Error message of the response, human readable
"Invalid email address"
Useful informaiton, not always present, to debug the response
{ "request_id": "req_1234567890" }"Some pertinent log message"
Validator response object, each key is the field name and value is the error message
{
"email": "Invalid email address",
"password": "Password is required"
}Support ID linked to the response, used to identify it when talking with our team
"support_uuidv7-something-else"