Upload Documents

Purpose

This API allows you to upload a PDF to Zoho PDF Editor.

Quick Reference

PropertyValue
MethodPOST
Request URLhttps://{zohoapis_domain}/pdfeditor/api/v1/upload

Body Parameters

ParameterValueMandatory/OptionalDescription
fileFile or StringMandatoryUpload the PDF file from your local drive or desktop. If the PDF is available via a publicly accessible web URL, you can provide the URL using the same parameter.
filenameStringOptionalSpecify the name for the uploaded document.
folder_idStringOptionalSpecify the WorkDrive folder ID where the document should be uploaded.
passwordStringOptionalPassword to open the uploaded PDF. Required only if the PDF is password-protected.

Notes and Limits

  • The maximum file size allowed for the input PDF is 50 MB, and the PDF cannot exceed 400 pages.
  • The default value for filename is the original filename of the uploaded PDF.
  • The default value for folder_id is My Folder.
  • To use this API, an OAuth token should be generated with the following scopes: ZohoWriter.pdfEditor.ALL, WorkDrive.files.ALL, WorkDrive.organization.ALL

Possible Errors

Refer to the following pages for the list of possible errors for this API:

Sample Request

Copiedurl --request POST \
  --url https://www.zohoapis.com/pdfeditor/api/v1/upload
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: multipart/form-data' \
  -F 'file=@file_path' \
  -F 'password=string' \
  -F 'filename=Invoice details.' \
  -F 'folder_id=t04apjk9p7d6ba94f4cbf9c56e1b1ed9bac89'

Sample Response

Copied {
	  "created_time": "2018-05-08T13:54:41Z",
	  "role": "OWNER",
	  "owner_id": "4579020",
	  "parent_folder_id": "40dgcFOLDER4579020",
	  "open_url": "https://pdf.zoho.com/pdfeditor/open/ponaz526afbc307254800b4308c163f376769",
	  "is_favourite": false,
	  "document_id": "ponaz526afbc307254800b4308c163f376769",
	  "created_by": “Amelia”,
	  "version": "1.0",
	  "document_name": “New PDF”,
	  "modified_time": "2018-05-08T13:54:41Z",
	  "preview_url": "https://workdrive.zoho.com/folder/xteb325bd4ff92ce2423caf22c7180b5e41ae"
	  "download_url": "https://pdf.zoho.com/api/v1/pdf/download/ponaz526afbc307254800b4308c163f376769",
	  "lastmodified_by": [
	    {
	      "email_id": “amelia@zylker.com”,
	      "profile_photo": "https://contacts.zoho.com/file?t=user&ID=4579020&fs=thumb",
	      "user_id": "4579020",
	      "display_name": “Amelia”
     }
    ]
   }