Create a New Version
Purpose
This API allows to update the content of an existing document and create a new version of it.
HTTP Request URL
https://{zohoapis_domain}/writer/api/v1/documents/<document_id>
Path Parameters
Parameter | Data Type | Description |
Mandatory Parameters | ||
document_id | String | Specify the unique id of the document in which the content needs to be updated. |
Body Parameters
Parameter | Data Type | Description |
Mandatory Parameters | ||
content | File | Provide the required content that needs to be updated in the given document. Supported file formats: docx, odt, rtf, txt and html |
Optional Parameters | ||
password | String | If the provided input content is password protected, then you can specify that password via this parameter. |
Sample Request
Copiedcurl -X POST \ https://www.zohoapis.com/writer/api/v1/documents/ponazfea04477109f4681a831e7177d96bc40 \
-H 'Authorization: Zoho-oauthtoken xxx.yyy.zzz'\
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F content=@/Users/zylker/Downloads/invitation.docx
Sample Response
Copied{
"extension": "zwriter",
"role": "OWNER",
"modified_time_ms": 1736426248822,
"owner_id": "667009621",
"writer_home_url": "https://writer.zoho.com/documents",
"is_published": false,
"shared_time_ms": 1736426248822,
"open_url": "https://writer.zoho.com/writer/open/6yc4z4f557db79e9f446ca37f5702c8b901f6",
"is_favourite": false,
"last_opened_time_ms": 1736332736838,
"thumbnail_url": "https://writer.zoho.com/writer/thumbnail/6yc4z4f557db79e9f446ca37f5702c8b901f6?t_id=4504799000121824571",
"document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
"type": "document",
"title": "New Document"
"lock_info": {
"status": false
},
"is_orgpublished": false,
"document_name": "Versioned document",
"isWorkflowCompleted": false,
"modified_time": "2025-01-09T12:37:28Z",
"library_id": 14,
"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": false,
"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
},
"is_shared": false,
"download_url": "https://writer.zoho.com/writer/api/v1/download/6yc4z4f557db79e9f446ca37f5702c8b901f6",
"id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
"lastmodified_by": [
{
"email_id": "amelia@zylker.com",
"profile_photo": "https://contacts.zoho.com/file?t=user&ID=950162&fs=thumb",
"user_id": "950162",
"timezone": "Asia/Kolkata",
"language": "en",
"display_name": "Amelia"
}
],
"final_info": {
"status": false
},
"parent_info": {
"folder_name": "New Version",
"folder_link": "https://workdrive.zoho.com/home/ep/6oq3d00e1e07d58c64077b4f1c1f28da4a777/teams/76zgi4de33eb1a21d49988f4bf51afb88de6a/ws/7o0g38ce38b13f7504359a405491ca70add50/folders/qpz9g646b2ddd954247b3988165bc17c156fe"
},
"created_time": "2025-01-08T10:38:56Z",
"parent_folder_id": "qpz9g646b2ddd954247b3988165bc17c156fe",
"isWorkflowStarted": false,
"collaboration_id": "2242265600293904878",
"resource_type": "native",
"last_opened_time": "2025-01-08T10:38:56Z",
"version_id": "5719899008834658125",
"created_by": "John",
"version": "4.0",
"created_time_ms": 1736332736838,
"product_type": 1,
"preview_url": "https://writer.zoho.com/writer/zwpreview/6yc4z4f557db79e9f446ca37f5702c8b901f6",
"creator_id": "33017047",
"name": " Sample Document",
"publish_info": {
"is_published": false,
"type": "none",
"version": "-1"
},
"status": "active"
}
Show full
Show less