Zoho - Trademark
Blogs
  Forums  Writer Home
  Toll Free : 888 900 9646

API Home >> Writer >> API Reference >> POST Method APIs




To create a new document in your Zoho Writer account.



Request URL POST Method

                             XML :  http://export.writer.zoho.com/api/private/xml/newDocument/[documentName]?apikey=[API Key]&ticket=[Ticket]

                            JSON : http://export.writer.zoho.com/api/private/json/newDocument/[documentName]?apikey=[API Key]&ticket=[Ticket]


Request parameters :

To create a new document in Zoho Writer account we need to submit a form data to Writer with the following fields:

Field
Description
Document Name
New document name to be created.
content
Specify the content of the document.


Sample Form (POST Method)


<form method="POST"    action="http://export.writer.zoho.com/api/private/xml/newDocument/[DocName]?apikey=[APIKEY]&ticket=[Ticket]">

<input type="hidden" name="content" value="[Specify Doc content here]">

<input type="submit" value="CreateNewDoc" class="divbutton" name="submit">

</form>



* It is mandatory to pass the apikey and ticket parameters to access the newDocument api.

Response fields

The schema document for the API response is located at: http://export.writer.zoho.com/schema/restapi/save.xsd

Field
Description
documentId
Unique ID associated with the newly created document.
documentName
Name of the created document.


Sample Response

The following is the sample XML response for the above method:


<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/private/xml/newDocument/CreateNew">
  <result>

     <documentId>
8892000000068007</documentId>
        <documentName>CreateNew</documentName> 

  </result>
</response>


Equivalent JSON response


{
  "response":
   {
        "uri": "/api/private/json/newDocument/CreateNew",
        "result":
        {
   
            "
documentId":"8892000000068007",
            "documentName":"CreateNew"
        }
    }
}  



Errors


Creating a new document method may return general errors. Other HTTP error code may be 1404.