Skip to main content

Create with Text

Purpose

To create a document with specified content through simple text (string) param.

HTTP Request URL

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

Body Parameters

ParameterData TypeDescription
Mandatory Parameters
textStringProvide the entire text which you would like to add in the document as a content.
Optional Parameters
filenameStringSpecify a unique name for the document.
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 'text=This is the sample document content <b>Bolded Text' \
  -F filename=text_import

Sample Response

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