Convert Documents With Web URL

Purpose

To convert any document's existing file format (say HTML) to another file format (say DOCX or TXT) with web URL.

Quick Reference

PropertyValue
MethodPOST
Request URLhttps://{zohoapis_domain}/writer/api/v1/documents/convert
ScopesZohoWriter.documentEditor.ALL
Rate LimitSee Writer API throttle limits

Parameters

Body Parameters

ParameterData TypeMandatory/OptionalDescription
urlStringMandatorySpecify the web URL, through which the document will be converted.
formatStringMandatorySpecify the format of the document to be converted.
Supported file formats
docx, odt, rtf, txt, html, pdf
filenameStringMandatorySpecify a name to the document to be converted.
PasswordStringMandatorySpecify a unique password for the document to be converted.

Notes

  • Note: This API is subject to throttle limits. For details on the applicable rate limits, please refer to this help link.
  • For possible errors, refer to error codes.

Curl Snippet

Copiedcurl --location --request POST "https://www.zohoapis.com/writer/api/v1/documents/convert" \
  --header "Authorization: Zoho-oauthtoken xxx.yyy.zzz" \
  --form "url=https://calibre-ebook.com/downloads/demos/demo.docx" \
  --form "format=docx" \
  --form "filename=Output filename"

Deluge Snippet

Copiedurl = "https://example.com/download/publicdocument";
filedata = invokeurl
[
url : url
type :GET
];
filesList = List();
filesList.add({"paramName":"content", "content":filedata});
filesList.add({"paramName":"format", "content":"pdf","stringPart":"true"});
filesList.add({"paramName":"filename", "content":"Converted_doc","stringPart":"true"});
response = invokeurl
[
url: "https://zohoapis.com/writer/api/v1/documents/convert"
type: POST
files: filesList
connection:""
];
return response;

Sample Response

Converted document will be downloaded.