Jump to content
Welcome to our new Citrix community!
  • 0

Encrypted Email API - Upload raw message body

AJ Morehead


I'm needing to send Encrypted Emails via calling ShareFile API endpoints. 

Here are the things I am able to do successfully. All the following return a status code of 200 and info body (where applicable).
1) Create an EncrypedEmail Object (https://account.sf-api.com/sf/v3/EncryptedEmails)
"ToRecipients": [
"Email": "myEmail"
"CcRecipients": [],
"Subject": "Test",
"NotifyOnUse": true,
"ExpirationDays": 180,
"RequireUserInfo": false,
"RequireLogin": true

2) Get the EncryptedEmail Object I created (doing this for verification) (https://account.sf-api.com/sf/v3/EncryptedEmails(id))

3) Create an UploadSpecification Object (https://account.sf-api.com/sf/v3/EncryptedEmails(id)/Upload2)
"Method": "Standard",
"Raw": true,
"FileName": "message.txt",
"FileSize": 2048
*Since I'm needing to upload raw text, I supplied arbitrary values for FileName and FileSize. 

4) Send the EncryptedEmail (https://account.sf-api.com/sf/v3/EncryptedEmails(id)/Send)
"Message": {
"Id": "chunkURIUploadID"
"Attachments": []
* For the message id parameter, I've tried supplying the EncryptedEmail object id and the upload id within the chunkURI. The email sends. However, when I open the email it gets stuck on "Decrypting message...". 

My main issue is that I'm having trouble uploading the email body as raw text. The endpoint I'm using is Upload EncryptedEmail Message. I supply the UploadSpecification ojbect chunkURI as the url, along with raw text such as "test test test" for the post body. The returned response is "OK:message.txt". So based on that I can assume my raw text has been uploaded successfully. I've tried supplying the post body as raw text and in json format. 

I then run the endpoint Download EncryptedEmail Message (https://account.sf-api.com/sf/v3/EncryptedEmails(id)/Messageto verify. I don't supply the aliasID parameter because I've set EncryptedEmail.RequireUserInfo = false.  When I run this endpoint I receive an status code 500 = InternalServerError, see attached image. The reason provided is "Unspecified". So that confirms that my email message body wasn't uploaded successfully. 




I've tried using the endpoints in my development environment and using Postman. The result is the same. 

Can a ShareFile developer or anyone else help with this? 


Here is the documentation I've been referring to for proper implementation: ShareFile Encrypted Email Documentation


Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...