Create with Content

Purpose

To create document with content parameter. The document will be created along with the content that you provided in the request body.

HTTP Request URL

https://{zohoapis_domain}/writer/api/v1/documents

Body Parameters

ParameterData TypeDescription
Mandatory Parameters
contentFileProvide the required content in your API request body.
Optional Parameters
filenameStringSpecify a unique name for the document
passwordStringIf the provide input content is password protected, then you can specify that password via this parameter.
folder_idStringSpecify a folder name, if you would like the document to be created in a particular folder or location.
resource_typeString

Specify the type of document which needs to be created.

Possible values: fillable/merge/sign

Sample Request

Copiedcurl -X POST \ https://www.zohoapis.com/writer/api/v1/documents \ 
-H 'Authorization: Zoho-oauthtoken xxx.yyy.zzz'\ 
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ 
-F content=@/Users/zylker/Downloads/invitation.doc

Sample Response

Copied{
  "created_time": "2018-05-08T14:04:31Z",
  "role": "OWNER",
  "owner_id": "4579020",
  "parent_folder_id": "ponaz1ba3eac63b1242848a24c7561c5ed9fe",
  "open_url": "http://writer.zoho.com/writer/open/ponazaad72ae3cb0143aca0763ecd5acb87e1",
  "is_favourite": false,
  "document_id": "ponazaad72ae3cb0143aca0763ecd5acb87e1",
  "created_by": “Amelia”,
  "version": "1.0",
  "document_name": "one",
  "modified_time": "2018-05-08T14:04:32Z",
  "preview_url": "http://writer.zoho.com/writer/preview/ponazaad72ae3cb0143aca0763ecd5acb87e1",
  "creator_id": "4579020",
  "download_url": "http://writer.zoho.com/api/v1/download/ponazaad72ae3cb0143aca0763ecd5acb87e1",
  "document_properties": "http://writer.zoho.com/api/v1/documents/ponazaad72ae3cb0143aca0763ecd5acb87e1",
  "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”
    }
  ]
}