Create Encrypted File#
Description
Creates an encrypted file on your account.
Encryption details is available here.
Request#
HTTP Method: POST
URI Path: /v3/encrypted_files
Header: Content-Type: multipart/form-data
URI Query Parameters:
Request Body Object Attributes:
Name |
Parameter Type |
Type |
Is Required? |
Description |
|---|---|---|---|---|
encrypted_files[encryption_fingerprint] |
|
|
Yes |
The encryption fingerprint. |
encrypted_files[items][][description] |
|
|
Optional |
The encrypted file description. |
encrypted_files[items][][file] |
|
|
Yes |
The encrypted file. |
Note
Accepted file formats:
.pdf
.jpg
.png
You may upload up to 5 files per request.
Each file must not exceed 20 MB in size.
Uploaded encrypted files will expire after 24 hours.
Examples#
http
1POST /v3/encrypted_files HTTP/1.1
2Host: api.didww.com
3Content-Type: multipart/form-data
4Accept: application/json
5Api-Key: [API token]
curl
1curl -i -X POST https://api.didww.com/v3/encrypted_files -H "Accept: application/json" -H "Api-Key: [API token]" -H "Content-Type: multipart/form-data"
response
1HTTP/1.1 200 OK
2Content-Type: application/json; charset=utf-8
3
4{
5 "ids": [
6 "377dc5cf-55b3-45b8-9fed-156600a7f151"
7 ]
8}
http
1POST /v3/encrypted_files HTTP/1.1
2Host: api.didww.com
3Content-Type: multipart/form-data
4Accept: application/json
5Api-Key: [API token]
curl
1curl -i -X POST https://api.didww.com/v3/encrypted_files -H "Accept: application/json" -H "Api-Key: [API token]" -H "Content-Type: multipart/form-data"
response
1HTTP/1.1 422 Unprocessable Entity
2Content-Type: application/json; charset=utf-8
3
4{
5 "errors": {
6 "base": [
7 "outdated fingerprint"
8 ]
9 }
10}
http
1POST /v3/encrypted_files HTTP/1.1
2Host: api.didww.com
3Content-Type: multipart/form-data
4Accept: application/json
5Api-Key: [API token]
curl
1curl -i -X POST https://api.didww.com/v3/encrypted_files -H "Accept: application/json" -H "Api-Key: [API token]" -H "Content-Type: multipart/form-data"
response
1HTTP/1.1 422 Unprocessable Entity
2Content-Type: application/json; charset=utf-8
3
4{
5 "errors": {
6 "items/0/file": [
7 "can't be blank"
8 ]
9 }
10}
http
1POST /v3/encrypted_files HTTP/1.1
2Host: api.didww.com
3Content-Type: multipart/form-data
4Accept: application/json
5Api-Key: [API token]
curl
1curl -i -X POST https://api.didww.com/v3/encrypted_files -H "Accept: application/json" -H "Api-Key: [API token]" -H "Content-Type: multipart/form-data"
response
1HTTP/1.1 422 Unprocessable Entity
2Content-Type: application/json; charset=utf-8
3
4{
5 "errors": {
6 "items/0/file": [
7 "size must be less than or equal to 20 MB"
8 ]
9 }
10}
curl example for creating encrypted file:
curl -i -X POST https://api.didww.com/v3/encrypted_files -H 'Accept: application/json' -H 'Api-Key: [API token]' -H 'Content-Type: multipart/form-data' -F 'encrypted_files[encryption_fingerprint]: c24c8711fed0fb9df377d4dad6090038063eec27:::d8919eb961da809e4d597f5c072e04383055e219' -F 'encrypted_files[items][][description]: my file' -F 'encrypted_files[items][][file]=@"/path_to_file"'
For every additional file repeat the following:
-F 'encrypted_files[items][][file]=@"/path_to_file"'
Other Responses#
Code |
Success |
Description |
|---|---|---|
401 |
No |
|
422 |
No |
Validation Error |