{"info":{"_postman_id":"a414b971-4285-4e7a-863e-495be75f7b56","name":"SecureDoc API documentation","description":"<html><head></head><body><h1 id=\"get-started-here\">📄 Get started here</h1>\n<p>This document is contain the SecureDoc APIs groups</p>\n<hr>\n<p>The SecureDoc provides APIs products, tools, and resources that enable you to secure digital document such as MS Word, MS Excel, MS Powerpoint, PDF and Video (mp4).</p>\n<h2 id=\"getting-started-guide\"><strong>Getting started guide</strong></h2>\n<p>To start using the you need to:</p>\n<ul>\n<li><p>You must use a valid API Key and App ID to send requests to the API endpoints. You can get it from the SecureDoc Console</p>\n</li>\n<li><p>The API returns request responses in JSON format. When an API request returns an error, it is sent in the JSON response as an error key.</p>\n</li>\n</ul>\n<h2 id=\"authentication\">Authentication</h2>\n<p>The SecureDoc API uses API keys and App Id for authentication.</p>\n<p>You can get API key and App id in the SecureDoc app settings.</p>\n<p>You must include an API key and app id in each request to the Postman API with the X-Api-Key and X-App-Id request headers.</p>\n<h3 id=\"authentication-error-response\">Authentication error response</h3>\n<p>If an API key or app id is missing, malformed, or invalid, you will receive an HTTP 401 Unauthorized response code.</p>\n<h2 id=\"rate-and-usage-limits\">Rate and usage limits</h2>\n<p>TBD</p>\n<h3 id=\"503-response\">503 response</h3>\n<p>An HTTP <code>503</code> response from our servers indicates there is an unexpected spike in API access traffic. The server is usually operational within the next five minutes. If the outage persists or you receive any other form of an HTTP <code>5XX</code> error.</p>\n<h3 id=\"http-status-code-summary\">HTTP Status Code Summary</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Status Code</strong></th>\n<th></th>\n<th></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>Ok</td>\n<td>Everything worked as expected.</td>\n</tr>\n<tr>\n<td>400</td>\n<td>Bad Request</td>\n<td>The request was unacceptable, often due to missing a required parameter.</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>No valid App Id or API key provided.</td>\n</tr>\n<tr>\n<td>402</td>\n<td>Request Failed</td>\n<td>The parameters were valid but the request failed.</td>\n</tr>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n<td>The App Id or API key doesn’t have permissions to perform the request.</td>\n</tr>\n<tr>\n<td>404</td>\n<td>Not Found</td>\n<td>The requested resource doesn’t exist.</td>\n</tr>\n<tr>\n<td>500,502,503,504</td>\n<td>Server Errors</td>\n<td>Something went wrong on SecureDoc's end.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"need-some-help\"><strong>Need some help?</strong></h3>\n<p><a href=\"https://mailto:dev@689cloud.com\">dev@689cloud.com</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"📄 Get started here","slug":"get-started-here"}],"owner":"36214019","collectionId":"a414b971-4285-4e7a-863e-495be75f7b56","publishedId":"2sA3XQfgRn","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-06-14T08:18:39.000Z"},"item":[{"name":"File","item":[{"name":"Upload file","id":"ecb2cad2-60b8-4335-91c1-7a9678142cb3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-App-Id","value":"{{app_id}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"file","description":"<p>Required</p>\n","type":"file","value":null},{"key":"thumbnail","type":"file","uuid":"7d5aa180-e59c-4502-ac73-3c83412318d8","value":null}]},"url":"https://secdocs-api.689cloud.com/api/file","description":"<p>Upload a file to encrypt</p>\n","urlObject":{"protocol":"https","path":["api","file"],"host":["secdocs-api","689cloud","com"],"query":[],"variable":[]}},"response":[{"id":"3bd07ffc-24db-4aeb-b5dc-dd12b1b76ce3","name":"Success","originalRequest":{"method":"POST","header":[{"key":"X-App-Id","value":"{{app_id}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","value":null}]},"url":"https://secdocs-api.689cloud.com/api/file"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"file_id\": \"{{file_id}}\",\n        \"title\": \"{{file_title}}\",\n        \"size\": \"{{file_size}}\",\n        \"encrypt_status\": \"{{encrypted_status}}\"\n    }\n}"},{"id":"58480efb-ccf3-4d08-a828-1bb7bacb1470","name":"Invalid file format","originalRequest":{"method":"POST","header":[{"key":"X-App-Id","value":"{{app_id}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"file","description":"Required","type":"file","value":null}]},"url":"https://secdocs-api.689cloud.com/api/file"},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"invalid_file_format\",\n    \"error_msg\": \"Invalid file format. Only support Word (docx), Powerpoint (pptx), Excel (xlsx) and PDF\"\n}"}],"_postman_id":"ecb2cad2-60b8-4335-91c1-7a9678142cb3"},{"name":"Check encrypt status","id":"08d1b608-e010-4420-ab14-655bf863f72f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/file/{id}/encrypt-status","description":"<p>Checking encrypt status of the file</p>\n","urlObject":{"protocol":"https","path":["api","file","{id}","encrypt-status"],"host":["secdocs-api","689cloud","com"],"query":[],"variable":[]}},"response":[{"id":"39f30e8c-34eb-4f82-a818-e5474ca0a257","name":"Success","originalRequest":{"method":"GET","header":[{"key":"X-App-Id","value":"{{app_id}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/file/{file_id}/encrypt-status"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": \"{{encrypt_status}}\"\n}"},{"id":"ff2e829f-36bb-48c5-96ec-7290540e00c4","name":"File not found","originalRequest":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/file/{file_id}/encrypt-status"},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"file_not_found\",\n    \"error_msg\": \"File not found\"\n}"}],"_postman_id":"08d1b608-e010-4420-ab14-655bf863f72f"},{"name":"Download file","id":"982eba06-0b5d-4418-8788-869bd5ede257","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/file/{file_id}/download?print={{print}}","description":"<p>Download encrypted file. Print specify is apply for pdf file only.</p>\n","urlObject":{"protocol":"https","path":["api","file","{file_id}","download"],"host":["secdocs-api","689cloud","com"],"query":[{"description":{"content":"<p>Boolean (default false). Apply for PDF only</p>\n","type":"text/plain"},"key":"print","value":"{{print}}"}],"variable":[]}},"response":[{"id":"01772e80-bc97-46a6-a908-a13b0ee2702e","name":"Success","originalRequest":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":{"raw":"https://secdocs-api.689cloud.comsecure-doc/api/file/{file_id}/download?print={{print}}","protocol":"https","host":["secdocs-api","689cloud","comsecure-doc"],"path":["api","file","{file_id}","download"],"query":[{"key":"print","value":"{{print}}","description":"Boolean (default false). Apply for PDF only\n"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    // file data binary data\n}"},{"id":"e68002ae-4b4b-4f1d-84fa-2f779720155a","name":"File not found","originalRequest":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":{"raw":"https://secdocs-api.689cloud.com/api/file/{file_id}/download?print={{print}}","protocol":"https","host":["secdocs-api","689cloud","com"],"path":["api","file","{file_id}","download"],"query":[{"key":"print","value":"{{print}}","description":"Boolean (default false). Apply for PDF only\n"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"file_not_found\",\n    \"error_msg\": \"File not found\"\n}"},{"id":"6aa03968-2abe-48dd-8a44-67665ffa72f9","name":"File not available","originalRequest":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":{"raw":"https://secdocs-api.689cloud.com/api/file/{file_id}/download?print={{print}}","protocol":"https","host":["secdocs-api","689cloud","com"],"path":["api","file","{file_id}","download"],"query":[{"key":"print","value":"{{print}}","description":"Boolean (default false). Apply for PDF only\n"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"file_not_available\",\n    \"error_msg\": \"File not ready. It is processing or encryption had been fail.\"\n}"},{"id":"2b7f2380-42f0-4ca1-8a81-0bd57ebec8b2","name":"File download fail","originalRequest":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":{"raw":"https://secdocs-api.689cloud.com/api/file/{file_id}/download?print={{print}}","protocol":"https","host":["secdocs-api","689cloud","com"],"path":["api","file","{file_id}","download"],"query":[{"key":"print","value":"{{print}}","description":"Boolean (default false). Apply for PDF only\n"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"file_not_available\",\n    \"error_msg\": \"There are some error during download file process. Please contact system admin to get more information.\"\n}"}],"_postman_id":"982eba06-0b5d-4418-8788-869bd5ede257"},{"name":"Delete file","id":"884bb826-2523-4b5c-8bdb-06738668f4a6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/file/{file_id}","description":"<p>Delete file (db and storage). All licenses also will be revoked.</p>\n","urlObject":{"protocol":"https","path":["api","file","{file_id}"],"host":["secdocs-api","689cloud","com"],"query":[],"variable":[]}},"response":[{"id":"08ab9217-4433-4a33-b4ff-7c8ae0464712","name":"Success","originalRequest":{"method":"DELETE","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/file/{file_id}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": \"ok\"\n}"},{"id":"cc6db6c8-ed35-4faa-aee8-62e4b4263c9f","name":"File not found","originalRequest":{"method":"DELETE","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/file/{file_id}"},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"file_not_found\",\n    \"error_msg\": \"File not found\"\n}"}],"_postman_id":"884bb826-2523-4b5c-8bdb-06738668f4a6"},{"name":"Decrypt file","id":"7e06c050-d094-46cf-b6fd-68fc602b98f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/file/{file_id}/decrypt","description":"<p>Decrypt encrypted file back to normal file. After decrypt, all licenses will be revoked.</p>\n","urlObject":{"protocol":"https","path":["api","file","{file_id}","decrypt"],"host":["secdocs-api","689cloud","com"],"query":[],"variable":[]}},"response":[{"id":"8760bbb4-36fd-46a3-9e0d-0254a9ab5b9f","name":"Success","originalRequest":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/file/{file_id}decrypt"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    // decrypted file binary data\n}"},{"id":"7f21e47f-6438-4094-9682-1d8e706046e7","name":"File not found","originalRequest":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/file/{file_id}/decrypt"},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"file_not_found\",\n    \"error_msg\": \"File not found\"\n}"},{"id":"6b508aa7-d088-48a2-af4a-7f866028fbc3","name":"File not available","originalRequest":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/file/{file_id}/decrypt"},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"file_not_available\",\n    \"error_msg\": \"File not ready. It is processing or encryption had been fail.\"\n}"},{"id":"440c49d8-0563-4428-96a1-5c325c67d77a","name":"File decrypt fail","originalRequest":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/file/{file_id}/decrypt"},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"decrypt_file_fail\",\n    \"error_msg\": \"Decrypt file fail. Please contact system admin to get more information.\"\n}"}],"_postman_id":"7e06c050-d094-46cf-b6fd-68fc602b98f5"},{"name":"Generate view online link","id":"29e77f7d-b6df-4319-892a-4f3d924b17de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/file/{file_id}/view?ra=false","description":"<p>Generate view online link url. Client can embed or redirect to the viewer.</p>\n","urlObject":{"protocol":"https","path":["api","file","{file_id}","view"],"host":["secdocs-api","689cloud","com"],"query":[{"key":"ra","value":"false"}],"variable":[]}},"response":[{"id":"60f3a759-75f2-45da-a5ae-e591bf3a1bda","name":"Success","originalRequest":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/file/{file_id}/view"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": \"https://doc.689cloud.com/viewer/{file_id}\"\n}"},{"id":"f7791aa0-a453-41f1-aae8-79609a163a1e","name":"File not found","originalRequest":{"method":"GET","header":[{"key":"x-api-key","value":"{{api_key}}","type":"text"},{"key":"x-app-id","value":"{{app_id}}","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/file/{file_id}/view"},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"file_not_found\",\n    \"error_msg\": \"File not found\"\n}"},{"id":"7a4b0b92-e62d-4b6a-9ef0-b70520312920","name":"File not available","originalRequest":{"method":"GET","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/file/{file_id}/decrypt"},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"file_not_available\",\n    \"error_msg\": \"File not ready. It is processing or encryption had been fail.\"\n}"}],"_postman_id":"29e77f7d-b6df-4319-892a-4f3d924b17de"}],"id":"522b9926-d3cc-404d-ae67-31119f78c6cc","description":"<p>The <code>/file</code> enpoint let you upload files to encrypt, check encrypt status, register or revoke file access. As well as download, decrypt, delete and generate the view online link.</p>\n","_postman_id":"522b9926-d3cc-404d-ae67-31119f78c6cc"},{"name":"License","item":[{"name":"Register license by email","id":"efe4b62d-87e2-4495-b1ef-b530081b8678","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"local_view\": \"{{local_view}}\", // Boolean. (default true)\n    \"online_view\": \"{{online_view}}\", // Boolean (default true)\n    \"emails\": [\"{{emails}}\"], // Emails that need to resiter license. It will overide the old license.\n    \"print\": {{print}}, // Boolean (default false)\n    \"edit\": \"{{edit}}\", // Boolean (default false)\n    \"expiry_time\": \"{{expiry_time}}\", // Time format MM-dd-YYYY hh:mm:ss (in UTC)\n    \"wm_setting\": {\n        \"wm_content\": \"{{wm_content}}\", // String (255)\n        \"wm_position\": \"{{wm_position}}\", // diagonal,center,top-left,top-right,top-center,bottom-left,bottom-right,bottom-center\n        \"wm_color\": \"{{wm_color}}\", // color in RPG format\n        \"wm_font_size\": \"{{wm_font_size}}\" // Number\n    }\n\n}","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/license/{file_id}","description":"<p>Register a license for recipients by their email address. This will overide the old license if the recipient already registered before.</p>\n","urlObject":{"protocol":"https","path":["api","license","{file_id}"],"host":["secdocs-api","689cloud","com"],"query":[],"variable":[]}},"response":[{"id":"0e9c2ed9-f9c3-40da-a69b-75864ce27c9d","name":"Success","originalRequest":{"method":"POST","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"local_view\": true,\n    \"online_view\": true,\n    \"emails\": [\"dev@689cloud.asia\"],\n    \"print\": false, \n    \"edit\": false,\n    \"expiry_time\": \"12-31-2024 23:59:59\",\n    \"wm_setting\": {\n        \"wm_content\": \"689Cloud copyright\",\n        \"wm_position\": \"diagonal\",\n        \"wm_color\": \"RGB(192,192,192)\",\n        \"wm_font_size\": \"50\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/license/{file_id}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": \"ok\"\n}"},{"id":"d3947a1b-14d6-41e4-a906-f8bcec25870e","name":"File not found","originalRequest":{"method":"POST","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"local_view\": \"{{local_view}}\", // Boolean. (default true)\n    \"online_view\": \"{{online_view}}\", // Boolean (default true)\n    \"emails\": [\"{{emails}}\"], // Emails that need to resiter license. It will overide the old license.\n    \"print\": {{print}}, // Boolean (default false)\n    \"edit\": \"{{edit}}\", // Boolean (default false)\n    \"expiry_time\": \"{{expiry_time}}\", // Time format MM-dd-YYYY hh:mm:ss (in UTC)\n    \"wm_setting\": {\n        \"wm_content\": \"{{wm_content}}\", // String (255)\n        \"wm_position\": \"{{wm_position}}\", // diagonal,center,top left,top-right,top-center,bottom-left,bottom-right,bottom-center\n        \"wm_color\": \"{{wm_color}}\", // color in RPG format\n        \"wm_font_size\": \"{{wm_font_size}}\" // Number\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/license/{file_id}"},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"file_not_found\",\n    \"error_msg\": \"File not found\"\n}"},{"id":"7875d4fb-0fee-4c56-bc0e-af31b349caed","name":"File not available","originalRequest":{"method":"POST","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app_id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"local_view\": \"{{local_view}}\", // Boolean. (default true)\n    \"online_view\": \"{{online_view}}\", // Boolean (default true)\n    \"emails\": [\"{{emails}}\"], // Emails that need to resiter license. It will overide the old license.\n    \"print\": {{print}}, // Boolean (default false)\n    \"edit\": \"{{edit}}\", // Boolean (default false)\n    \"expiry_time\": \"{{expiry_time}}\", // Time format MM-dd-YYYY hh:mm:ss (in UTC)\n    \"wm_setting\": {\n        \"wm_content\": \"{{wm_content}}\", // String (255)\n        \"wm_position\": \"{{wm_position}}\", // diagonal,center,top left,top-right,top-center,bottom-left,bottom-right,bottom-center\n        \"wm_color\": \"{{wm_color}}\", // color in RPG format\n        \"wm_font_size\": \"{{wm_font_size}}\" // Number\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/license/{file_id}"},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"file_not_available\",\n    \"error_msg\": \"File not ready. It is processing or encryption had been fail.\"\n}"}],"_postman_id":"efe4b62d-87e2-4495-b1ef-b530081b8678"},{"name":"Revoke license by email","id":"34da188e-7404-4b7a-a99c-ddf922cf48a3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app-id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"emails\": [{{emails}}] // List email user that want to revoke the access\n}","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/license/{file_id}","description":"<p>Revoke recipients access from the file. If recipients does not have license yet, it will be ignored.</p>\n","urlObject":{"protocol":"https","path":["api","license","{file_id}"],"host":["secdocs-api","689cloud","com"],"query":[],"variable":[]}},"response":[{"id":"2aaebe27-aa40-4746-bd21-0e6eb9a0e423","name":"Success","originalRequest":{"method":"DELETE","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app-id}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"emails\": [\"dev@689cloud.asia\"] \n}","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/license/{file_id}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": \"ok\"\n}"},{"id":"e84e7575-9d1e-4876-bbfe-7b31534a69a2","name":"File not found","originalRequest":{"method":"DELETE","header":[{"key":"X-Api-Key","value":"{{api_key}}","type":"text"},{"key":"X-App-Id","value":"{{app-id}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"emails\": [{{emails}}] // List email user that want to revoke the access\n}","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/license/{file_id}"},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"file_not_found\",\n    \"error_msg\": \"File not found\"\n}"}],"_postman_id":"34da188e-7404-4b7a-a99c-ddf922cf48a3"},{"name":"Get license by file","id":"8087ab1a-83ed-4fcb-be1e-467dd66f6f5d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{app_id}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/license/{file_id}","description":"<p>Get all licenses had been registered for file.</p>\n","urlObject":{"protocol":"https","path":["api","license","{file_id}"],"host":["secdocs-api","689cloud","com"],"query":[],"variable":[]}},"response":[{"id":"7b8cc45e-6ad2-4d3b-abd0-7fbfe034d1c2","name":"Success","originalRequest":{"method":"GET","header":[{"key":"X-App-Id","value":"{{app_id}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/license/{file_id}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": [\n        {\n            \"file_id\": \"{{file_id}}\",\n            \"title\": \"{{title}}\",\n            \"email\": \"{{email}}\"\n            \"local_view\": \"{{local_view}}\",\n            \"online_view\": \"{{online_view}}\",\n            \"print\": {{print}},\n            \"edit\": \"{{edit}}\",\n            \"expiry_time\": \"{{expiry_time}}\",\n            \"wm_setting\": {\n                \"wm_content\": \"{{wm_content}}\",\n                \"wm_position\": \"{{wm_position}}\",\n                \"wm_color\": \"{{wm_color}}\",\n                \"wm_font_size\": \"{{wm_font_size}}\"\n            }\n        }\n    ]\n}"},{"id":"21dd7523-a608-4f79-a227-492afd28bde6","name":"File not found","originalRequest":{"method":"GET","header":[{"key":"X-App-Id","value":"{{app_id}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/license/{file_id}"},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"file_not_found\",\n    \"error_msg\": \"File not found\"\n}"}],"_postman_id":"8087ab1a-83ed-4fcb-be1e-467dd66f6f5d"},{"name":"Get license by recipient email","id":"c8ce17fd-0869-48ed-8a3c-3dcbbe04bc57","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-id","value":"{{app_id}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/license/recipient?email={{email}}","description":"<p>Get all license for recipient by email address.</p>\n","urlObject":{"protocol":"https","path":["api","license","recipient"],"host":["secdocs-api","689cloud","com"],"query":[{"key":"email","value":"{{email}}"}],"variable":[]}},"response":[{"id":"20ba716e-74e4-48df-8575-53cfeab7c828","name":"Success","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://secdocs-api.689cloud.com/api/license/recipient?={{email}}","protocol":"https","host":["secdocs-api","689cloud","com"],"path":["api","license","recipient"],"query":[{"key":"","value":"{{email}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": [\n        {\n            \"file_id\": \"{{file_id}}\",\n            \"title\": \"{{title}}\",\n            \"email\": \"{{email}}\"\n            \"local_view\": \"{{local_view}}\",\n            \"online_view\": \"{{online_view}}\",\n            \"print\": {{print}},\n            \"edit\": \"{{edit}}\",\n            \"expiry_time\": \"{{expiry_time}}\",\n            \"wm_setting\": {\n                \"wm_content\": \"{{wm_content}}\",\n                \"wm_position\": \"{{wm_position}}\",\n                \"wm_color\": \"{{wm_color}}\",\n                \"wm_font_size\": \"{{wm_font_size}}\"\n            }\n        }\n    ]\n}"},{"id":"7ca4eeb1-c86d-4851-b164-4161587f113c","name":"License not found","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://secdocs-api.689cloud.com/api/license/recipient?email={{email}}","protocol":"https","host":["secdocs-api","689cloud","com"],"path":["api","license","recipient"],"query":[{"key":"email","value":"{{email}}"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"license_not_found\",\n    \"error_msg\": \"License not found\"\n}"}],"_postman_id":"c8ce17fd-0869-48ed-8a3c-3dcbbe04bc57"},{"name":"Get license by file and recipient","id":"23857314-81e0-431a-b5a2-eefac1a13d1a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-App-Id","value":"{{app_id}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":"https://secdocs-api.689cloud.com/api/license/{file_id}/recipient?email={{email}}","description":"<p>Get a license of a file by a recipient</p>\n","urlObject":{"protocol":"https","path":["api","license","{file_id}","recipient"],"host":["secdocs-api","689cloud","com"],"query":[{"key":"email","value":"{{email}}"}],"variable":[]}},"response":[{"id":"18841bce-24e4-45f1-97c2-2208a72e1f4a","name":"Success","originalRequest":{"method":"GET","header":[{"key":"X-App-Id","value":"{{app_id}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":{"raw":"https://secdocs-api.689cloud.com/api/license/{file_id}/recipient?email={{email}}","protocol":"https","host":["secdocs-api","689cloud","com"],"path":["api","license","{file_id}","recipient"],"query":[{"key":"email","value":"{{email}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"\n{\n    \"status\": \"success\",\n    \"data\":{\n        \"file_id\": \"{{file_id}}\",\n        \"title\": \"{{title}}\",\n        \"email\": \"{{email}}\"\n        \"local_view\": \"{{local_view}}\",\n        \"online_view\": \"{{online_view}}\",\n        \"print\": {{print}},\n        \"edit\": \"{{edit}}\",\n        \"expiry_time\": \"{{expiry_time}}\",\n        \"wm_setting\": {\n            \"wm_content\": \"{{wm_content}}\",\n            \"wm_position\": \"{{wm_position}}\",\n            \"wm_color\": \"{{wm_color}}\",\n            \"wm_font_size\": \"{{wm_font_size}}\"\n        }\n    }\n}"},{"id":"76091a94-43ac-4f2c-a2fc-47e9aeb89434","name":"License not found","originalRequest":{"method":"GET","header":[{"key":"X-App-Id","value":"{{app_id}}","type":"text"},{"key":"X-Api-Key","value":"{{api_key}}","type":"text"}],"url":{"raw":"https://secdocs-api.689cloud.com/api/license/{file_id}/recipient?email={{email}}","protocol":"https","host":["secdocs-api","689cloud","com"],"path":["api","license","{file_id}","recipient"],"query":[{"key":"email","value":"{{email}}"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"license_not_found\",\n    \"error_msg\": \"License not found\"\n}"}],"_postman_id":"23857314-81e0-431a-b5a2-eefac1a13d1a"}],"id":"9a2be49b-a092-4cac-a9d3-c3bc5dc7a92f","_postman_id":"9a2be49b-a092-4cac-a9d3-c3bc5dc7a92f","description":""},{"name":"Webhook","item":[{"name":"webhook","id":"c616d713-13e2-4994-a05e-79964ac09bde","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"event_type\": \"{{event_type}}\", // ENCRYPT_STATUS,PIN_CODE,FILE_OPENED,FILE_VIEWED,FILE_DOWNLOADED,\n    \"data\": {{json_data_object}}\n}","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/webhook/test-received","urlObject":{"protocol":"https","path":["api","webhook","test-received"],"host":["secdocs-api","689cloud","com"],"query":[],"variable":[]}},"response":[{"id":"d02f7248-5ec9-464a-993e-aa91c1e1dc1c","name":"Encrypt status","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"event_type\": \"ENCRYPT_STATUS\",\n    \"data\": {\n        \"file_id\": \"{{file_id}}\",\n        \"encrypt_status\": \"{{encrypt_status}}\" // QUEUED,PROCESSING,DONE,FAILED\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/webhook/test-received"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"be584005-7fed-4a98-a984-f8b09f8a078b","name":"PIN code","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"event_type\": \"PIN_CODE\",\n    \"data\": {\n        \"file_id\": \"{{file_id}}\",\n        \"email\": \"{{email}}\",\n        \"pin_code\": \"{{pin_code}}\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/webhook/test-received"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"79abefba-bace-456b-8294-79d4f56e04d0","name":"File open","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"event_type\": \"FILE_OPENED\",\n    \"data\": {\n        \"file_id\": \"{{file_id}}\",\n        \"email\": \"{{email}}\",\n        \"open_time\": \"{{open_time}}\", // MM-dd-yyyy hh:mm:ss (UTC)\n        \"os\": \"{{os}}\",\n        \"ip\": \"{{ip}}\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/webhook/test-received"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"df19eecb-0a64-4121-943c-250f4ab18d50","name":"File view","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"event_type\": \"FILE_VIEWED\",\n    \"data\": {\n        \"file_id\": \"{{file_id}}\",\n        \"email\": \"{{email}}\",\n        \"view_time\": \"{{view_time}}\", // MM-dd-yyyy hh:mm:ss (UTC)\n        \"ip\": \"{{ip}}\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/webhook/test-received"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"d7f8b11a-7ebc-41b8-8486-0f576a4895a3","name":"File downloaded","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"event_type\": \"FILE_DOWNLOADED\",\n    \"data\": {\n        \"file_id\": \"{{file_id}}\",\n        \"email\": \"{{email}}\",\n        \"downloaded_time\": \"{{downloaded_time}}\", // MM-dd-yyyy hh:mm:ss (UTC)\n        \"ip\": \"{{ip}}\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://secdocs-api.689cloud.com/api/webhook/test-received"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"c616d713-13e2-4994-a05e-79964ac09bde"}],"id":"754a0ca1-8038-4774-a3b4-70d940bcc409","description":"<p>Example Webhook events that notifi from SecureDoc.</p>\n<ol>\n<li><p>Encrypt Status event</p>\n</li>\n<li><p>PIN code to view a file</p>\n</li>\n<li><p>File is opened in local</p>\n</li>\n<li><p>File is Viewed online</p>\n</li>\n<li><p>File is downloaded</p>\n</li>\n</ol>\n","_postman_id":"754a0ca1-8038-4774-a3b4-70d940bcc409"}],"event":[{"listen":"prerequest","script":{"id":"125431d3-e578-4b96-8a37-9c7aba10ebc9","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5e46530c-17b8-4aeb-8a71-c2c0ae1822dc","type":"text/javascript","exec":[""]}}],"variable":[{"key":"baseUrl","value":"https://farming-simulator.pstmn.io"}]}