Create with Template

Purpose

To create a document using a template with the provided Template ID.

HTTP Request URL

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

Body Parameters

ParameterData TypeDescription
Mandatory Parameters
template_idStringProvide the template id of the template using which you would like to create a document.
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 --location --request POST 'https://www.zohoapis.com/writer/api/v1/documents' \
--header 'Authorization: Zoho-oauthtoken xxx.yyy.zzz' \
--form 'filename="Copy of Amelia document"' \
--form 'template_id="7ww36******"'

Sample Response

Copied{
  "role": "OWNER",
  "modified_time_ms": 1594121748565,
  "owner_id": "667009621",
  "open_url": "https://writer.zoho.com/writer/open/kzbnud65a05bd014b4e2bb162dca3d4e34671",
  "is_favourite": false,
  "last_opened_time_ms": 1594121748435,
  "thumbnail_url": "https://writer.zoho.com/writer/thumbnail/kzbnud65a05bd014b4e2bb162dca3d4e34671",
  "document_id": "kzbnud65a05bd014b4e2bb162dca3d4e34671",
  "type": "document",
  "title": "Copy of Amelia document",
  "lock_info": {
    "status": false
  },
  "document_name": "Copy of Amelia document",
  "modified_time": "2020-07-07T11:35:48Z",
  "library_id": 20,
  "permissions": {
    "can_read_fill": true,
    "can_trash": true,
    "can_share": true,
    "can_edit": true,
    "can_lock": true,
    "can_copy": true,
    "can_org_publish": true,
    "can_read": true,
    "is_admin": true,
    "can_discard_lock": false,
    "can_remove_share": false,
    "can_publish": true,
    "can_delete": false,
    "can_restore": false,
    "can_rename": true,
    "can_favourite": true,
    "can_leave": false,
    "can_download": true,
    "can_unlock": false
  },
  "download_url": "https://writer.zoho.com/api/v1/download/kzbnud65a05bd014b4e2bb162dca3d4e34671",
  "lastmodified_by": [
    {
      "email_id": "amelia@zylker.com",
      "profile_photo": "https://contacts.zoho.com/file?t=user&ID=12473393&fs=thumb",
      "user_id": "12437393",
      "timezone": "Asia/Calcutta",
      "language": "en",
      "display_name": "Amelia"
    }
  ],
  "final_info": {
    "status": false
  },
  "parent_info": {
    "folder_name": "My Folders",
    "folder_link": "https://workdrive.zoho.com/home/ep/6oq3d00e1e07d58c64077b4f1c1f28da4a777/privatespace/folders/files"
  },
  "created_time": "2020-07-07T11:35:48Z",
  "parent_folder_id": "folder",
  "collaboration_id": "2243174569006117111",
  "last_opened_time": "2020-07-07T11:35:48Z",
  "version_id": "5719899001066318940",
  "created_by": "Amelia",
  "version": "1.0",
  "created_time_ms": 1594121748435,
  "product_type": 1,
  "preview_url": "https://writer.zoho.com/writer/zwpreview/kzbnud65a05bd014b4e2bb162dca3d4e34671",
  "creator_id": "1247393",
  "permalink": "https://docs.zoho.com/file/kzbnud65a05bd014b4e2bb162dca3d4e34671",
  "status": "active"
}