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.

Notes and Limits

  • The maximum file size allowed for the input PDF is 50 MB.
  • 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

Copiedcurl --location --request POST "https://www.zohoapis.com/pdfeditor/api/v1/upload" \
  --header "Authorization: Zoho-oauthtoken xxx.yyy.zzz" \
  --form 'file=@"/Users/username/Documents/Original.pdf"' 

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”
     }
    ]
   }