How do I create a new document in Zoho Writer? Any sample codes?

How do I create a new document in Zoho Writer? Any sample codes?

To create a new document from scratch, you need to make use of Zoho Writer's Create Document API.

HTML Sample Code:


<form method="POST" action="https://writer.zoho.com/writer/officeapi/v1/document" enctype="multipart/form-data" target="_self" 
accept-charset="UTF-8">

<input type="hidden" name="apikey" value="423s*****">
<input type="hidden" name="permissions" value='{"document.export":true,"document.print":true,"document.edit":true,"review.comment":true,"collab.chat":true}'>
<input type="hidden" name="document_defaults" value='{"orientation":"portrait","paper_size":"Letter","font_name":"Lato","font_size":12,"track_changes":"disabled","margin": {"left":"1.5in","right":"1.5in","top":"0.25in","bottom":"0.25in"}}'>
<input type="hidden" name="editor_settings" value='{"unit":"in", "language":"en","view":"pageview"}'>
<input type="hidden" name="callback_settings" value='{"save_format":"docx","save_url":"https://zylker.com/save.php","context_info":"Doc Info"}'>
<input type="hidden" name="document_info" value='{"document_name":"New Document", "document_id":"130003"}'>
<input type="hidden" name="user_info" value='{"user_id":"1000", "display_name":"Jack"}'>
<input type="submit" name="submit" value="Create New Document">
</form> 


Curl Sample Code:


curl -X POST \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F 'apikey=423s*****' \
  -F 'document_defaults={"font_size":"12","font_name":"Roboto","orientation":"portrait","paper_size":"A4","track_changes":"disabled","margin": 
       {"left":"1.5in","right":"1.5in","top":"0.25in","bottom":"0.25in"}}' \
  -F 'editor_settings={"unit":"in","language":"en","view":"pageview"}' \
  -F 'permissions={"document.export":true,"document.print":true,"document.edit":true,"review.changes.resolve":false,"review.comment":true,"collab.chat":true }' \
  -F 'callback_settings={"save_format":"docx","save_url":"https://zylker.com/save.php%22,%22context_info%22:%22Value can be used during save callback" }' \
  -F 'document_info={"document_name":"New Document","document_id":130003}' \
  -F 'user_info={"user_id":"3001083","display_name":"Jack"}'


You can also build and test Create Document requests right from your browser with Office Integrator Postman Collection.


    Access your files securely from anywhere

      Zoho CRM Training Programs

      Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

      Zoho CRM Training
        Redefine the way you work
        with Zoho Workplace

          Zoho DataPrep Personalized Demo

          If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

          Zoho CRM Training

            Create, share, and deliver

            beautiful slides from anywhere.

            Get Started Now


              Zoho Sign now offers specialized one-on-one training for both administrators and developers.

              BOOK A SESSION









                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                Manage your brands on social media

                                                  Zoho Desk Resources

                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                    Zoho Marketing Automation

                                                      Zoho Sheet Resources

                                                       

                                                          Zoho Forms Resources


                                                            Secure your business
                                                            communication with Zoho Mail


                                                            Mail on the move with
                                                            Zoho Mail mobile application

                                                              Stay on top of your schedule
                                                              at all times


                                                              Carry your calendar with you
                                                              Anytime, anywhere




                                                                    Zoho Sign Resources

                                                                      Sign, Paperless!

                                                                      Sign and send business documents on the go!

                                                                      Get Started Now




                                                                              Zoho TeamInbox Resources



                                                                                      Zoho DataPrep Resources



                                                                                        Zoho DataPrep Demo

                                                                                        Get a personalized demo or POC

                                                                                        REGISTER NOW


                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now









                                                                                                              • Related Articles

                                                                                                              • How do I create a new presentation in Zoho Show? Any sample codes?

                                                                                                                To create a new presentation, please leave the "document" or "url" parameter in the  Edit API request  as blank. Zoho Show will create a new presentation by default if no content is provided in the Edit request. HTML Sample Code: <form method="POST" ...
                                                                                                              • How do I create a new spreadsheet in Zoho Sheet? Any sample codes?

                                                                                                                To create a new spreadsheet, please leave the "content" or "url" parameter in the Edit API request as blank. Zoho Sheet will create a new spreadsheet by default if no content is provided in the Edit request. HTML Sample Code: <form method="POST" ...
                                                                                                              • How do I preview a document in Zoho Writer? Any sample codes?

                                                                                                                To preview a document or open it in read-only mode, you need to make use of Zoho Writer's Preview Document API. HTML Sample Code: <form method="POST" action="https://writer.zoho.com/writer/officeapi/v1/document/preview" enctype="multipart/form-data" ...
                                                                                                              • How do I compare two documents in Zoho Writer? Any sample codes?

                                                                                                                To compare two versions of a document, you need to make use of Zoho Writer's Comparison API. HTML Sample Code: <form method="POST" action="https://writer.zoho.com/writer/officeapi/v1/document/compare" enctype="multipart/form-data" ...
                                                                                                              • How do I edit documents in Zoho Writer? Any sample codes?

                                                                                                                To edit an existing document from your web application, you need to make use of Zoho Writer's Edit Document API. HTML Sample Code: <form method="POST" action=" https://writer.zoho.com/writer/officeapi/v1/document" enctype="multipart/form-data" ...
                                                                                                                Wherever you are is as good as
                                                                                                                your workplace

                                                                                                                  Resources

                                                                                                                  Videos

                                                                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                  eBooks

                                                                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                  Webinars

                                                                                                                  Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                  CRM Tips

                                                                                                                  Make the most of Zoho CRM with these useful tips.



                                                                                                                    Zoho Show Resources