# Zoho Writer

> Online word processor. Create, copy, publish and organise documents and templates, and merge data into documents to download, save or email.

App · Documents · 20 actions. Web page: https://docs.lodol.com/docs/integrations/zoho-writer

## Actions

### Copy document

Make a copy of a document, optionally in another format or folder.

**Inputs**

- Document (`document_id`, text, required): The document. Pick one of your recent documents, or type its id (from 'List documents') or paste its address, such as https://writer.zoho.com/writer/open/<id>.
- Name (`document_name`, text): Optional. The copy's name.
- Format (`output_format`, text): Optional. The copy's format; a Zoho Writer document by default. One of: `zdoc` (Zoho Writer document), `docx` (Word (docx)), `odt` (OpenDocument (odt)), `html`, `pdf`, `epub`, `rtf` (Rich text (rtf)), `txt` (Plain text).
- Folder ID (`folder_id`, text): Optional. The Zoho WorkDrive folder to put it in: a document's parent_folder_id from 'Get document', or the folder's id from its WorkDrive address. Default: My Folders.
- Type (`resource_type`, text): Optional. Make the copy this kind of document. One of: `fillable` (Fillable form), `merge` (Merge template), `sign` (Sign template).
- Tracked changes (`include_changes`, text): Optional. What to do with tracked changes. One of: `as_markups` (Keep as markup), `all` (Accept all), `none` (Drop them).
- Comments (`include_comments`, text): Optional. Whether to copy the comments. One of: `all` (Copy all), `none` (Leave out).
- Include template settings (`include_template_settings`, true/false): Optional. Also copy merge and template settings.

**Outputs**: A Zoho Writer document.

- `created_by` (text): Who created it.
- `created_time` (text): An ISO 8601 UTC timestamp.
- `created_time_ms` (number): The same moment in Unix milliseconds.
- `creator_id` (text): The creator's Zoho id.
- `document_id` (text): The document's id; pass it to the other document actions.
- `document_name` (text): The document's name.
- `document_type` (text): The kind of document.
- `download_url` (text): The API download link.
- `final_info` (object): Final state.
- `id` (text): The document's id (same as document_id).
- `is_favourite` (true/false): Whether it is a favourite.
- `is_published` (true/false): Whether it is published.
- `is_shared` (true/false): Whether it is shared.
- `last_opened_time` (text): An ISO 8601 UTC timestamp.
- `lastmodified_by` (list): Who changed it last.
- `lock_info` (object): Lock state.
- `modified_time` (text): An ISO 8601 UTC timestamp.
- `modified_time_ms` (number): The same moment in Unix milliseconds.
- `name` (text): The document's file name.
- `open_url` (text): Opens the document in Zoho Writer.
- `owner_id` (text): The owner's Zoho id.
- `parent_folder_id` (text): The WorkDrive folder it is in; usable as a Folder ID.
- `parent_info` (object): The folder it is in.
- `permalink` (text): The document's permanent link.
- `permissions` (object): What the connected account may do with it.
- `preview_url` (text): A read-only preview.
- `published_url` (text): The public link, when published.
- `resource_type` (text): native, fillable, merge, sign or label.
- `role` (text): The connected account's role on it, such as OWNER.
- `status` (text): active, or trashed.
- `thumbnail_url` (text): A thumbnail image.
- `type` (text): Always 'document'.
- `version` (text): The current version.

**Example output**

```json
{
  "created_time": "2026-08-01T10:38:56Z",
  "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "document_name": "Quarterly report",
  "id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "is_favourite": false,
  "is_published": false,
  "modified_time": "2026-08-02T12:37:28Z",
  "name": "Quarterly report",
  "open_url": "https://writer.zoho.com/writer/open/6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "parent_folder_id": "qpz9g646b2ddd954247b3988165bc17c156fe",
  "resource_type": "native",
  "role": "OWNER",
  "status": "active",
  "type": "document"
}
```

### Copy template

Copy a template, as another template or as a new document.

**Inputs**

- Template (`template_id`, text, required): The template. Pick one of your recent templates, or type its id (from 'List templates').
- Name (`name`, text): Optional. The copy's name; 'Copy of …' by default.
- Save as (`save_as`, text): Optional. A template (default) or a document. One of: `template`, `document`.

**Outputs**: The copy: a template, or a document when saved as one.

- `created_by` (text): Who created it.
- `created_time` (text): An ISO 8601 UTC timestamp.
- `created_time_ms` (number): The same moment in Unix milliseconds.
- `creator_id` (text): The creator's Zoho id.
- `document_id` (text): The new document's id, when saved as a document.
- `document_name` (text): The new document's name, when saved as a document.
- `id` (text): The copy's id; a template id, or a document id when saved as one.
- `last_opened_time` (text): An ISO 8601 UTC timestamp.
- `modified_time` (text): An ISO 8601 UTC timestamp.
- `modified_time_ms` (number): The same moment in Unix milliseconds.
- `name` (text): The template's name.
- `open_url` (text): Opens the template in Zoho Writer.
- `owner_id` (text): The owner's Zoho id.
- `parent_folder_id` (text): The new document's folder, when saved as a document.
- `permalink` (text): The template's permanent link.
- `permissions` (object): What the connected account may do with it.
- `preview_url` (text): A read-only preview.
- `saved_as` (text): template or document.
- `status` (text): The template's status.
- `thumbnail_url` (text): A thumbnail image.
- `type` (text): template or document.

**Example output**

```json
{
  "created_time": "2026-08-01T16:30:33Z",
  "id": "a7iyybadbb8b74e1147638bad04abc161e79e",
  "modified_time": "2026-08-01T16:30:34Z",
  "name": "Invoice template",
  "open_url": "https://writer.zoho.com/writer/template/a7iyybadbb8b74e1147638bad04abc161e79e",
  "saved_as": "template",
  "status": "active",
  "type": "template"
}
```

### Create document

Create a document: blank, from text, from a template, or imported from a public file link.

**Inputs**

- Name (`filename`, text): Optional. The document's name.
- Text (`text`, text): Optional. Text to start the document with.
- Template (`template_id`, text): Optional. Start from this template instead.
- Import from URL (`url`, text): Optional. A public link to a file (such as a .docx) to import instead. Give at most one of Text, Template and this.
- Folder ID (`folder_id`, text): Optional. The Zoho WorkDrive folder to put it in: a document's parent_folder_id from 'Get document', or the folder's id from its WorkDrive address. Default: My Folders.
- Type (`resource_type`, text): Optional. A special kind of document; a normal one by default. One of: `fillable` (Fillable form), `merge` (Merge template), `sign` (Sign template), `label`.

**Outputs**: A Zoho Writer document.

- `created_by` (text): Who created it.
- `created_time` (text): An ISO 8601 UTC timestamp.
- `created_time_ms` (number): The same moment in Unix milliseconds.
- `creator_id` (text): The creator's Zoho id.
- `document_id` (text): The document's id; pass it to the other document actions.
- `document_name` (text): The document's name.
- `document_type` (text): The kind of document.
- `download_url` (text): The API download link.
- `final_info` (object): Final state.
- `id` (text): The document's id (same as document_id).
- `is_favourite` (true/false): Whether it is a favourite.
- `is_published` (true/false): Whether it is published.
- `is_shared` (true/false): Whether it is shared.
- `last_opened_time` (text): An ISO 8601 UTC timestamp.
- `lastmodified_by` (list): Who changed it last.
- `lock_info` (object): Lock state.
- `modified_time` (text): An ISO 8601 UTC timestamp.
- `modified_time_ms` (number): The same moment in Unix milliseconds.
- `name` (text): The document's file name.
- `open_url` (text): Opens the document in Zoho Writer.
- `owner_id` (text): The owner's Zoho id.
- `parent_folder_id` (text): The WorkDrive folder it is in; usable as a Folder ID.
- `parent_info` (object): The folder it is in.
- `permalink` (text): The document's permanent link.
- `permissions` (object): What the connected account may do with it.
- `preview_url` (text): A read-only preview.
- `published_url` (text): The public link, when published.
- `resource_type` (text): native, fillable, merge, sign or label.
- `role` (text): The connected account's role on it, such as OWNER.
- `status` (text): active, or trashed.
- `thumbnail_url` (text): A thumbnail image.
- `type` (text): Always 'document'.
- `version` (text): The current version.

**Example output**

```json
{
  "created_time": "2026-08-01T10:38:56Z",
  "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "document_name": "Quarterly report",
  "id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "is_favourite": false,
  "is_published": false,
  "modified_time": "2026-08-02T12:37:28Z",
  "name": "Quarterly report",
  "open_url": "https://writer.zoho.com/writer/open/6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "parent_folder_id": "qpz9g646b2ddd954247b3988165bc17c156fe",
  "resource_type": "native",
  "role": "OWNER",
  "status": "active",
  "type": "document"
}
```

### Create template

Create a personal template: blank, from text, from a document, or imported from a public file link.

**Inputs**

- Name (`name`, text): Optional. The template's name.
- Text (`text`, text): Optional. Text to start the template with.
- From document (`document_id`, text): Optional. Make the template from this document or template.
- Import from URL (`url`, text): Optional. A public link to a file to import instead. Give at most one of Text, From document and this.

**Outputs**: A Zoho Writer template.

- `created_by` (text): Who created it.
- `created_time` (text): An ISO 8601 UTC timestamp.
- `created_time_ms` (number): The same moment in Unix milliseconds.
- `creator_id` (text): The creator's Zoho id.
- `id` (text): The template's id; pass it to the other template actions.
- `last_opened_time` (text): An ISO 8601 UTC timestamp.
- `modified_time` (text): An ISO 8601 UTC timestamp.
- `modified_time_ms` (number): The same moment in Unix milliseconds.
- `name` (text): The template's name.
- `open_url` (text): Opens the template in Zoho Writer.
- `owner_id` (text): The owner's Zoho id.
- `permalink` (text): The template's permanent link.
- `permissions` (object): What the connected account may do with it.
- `preview_url` (text): A read-only preview.
- `status` (text): The template's status.
- `thumbnail_url` (text): A thumbnail image.
- `type` (text): Always 'template'.

**Example output**

```json
{
  "created_time": "2026-08-01T16:30:33Z",
  "id": "a7iyybadbb8b74e1147638bad04abc161e79e",
  "modified_time": "2026-08-01T16:30:34Z",
  "name": "Invoice template",
  "open_url": "https://writer.zoho.com/writer/template/a7iyybadbb8b74e1147638bad04abc161e79e",
  "status": "active",
  "type": "template"
}
```

### Delete template

Permanently delete a template. Templates have no Trash, so this cannot be undone.

**Inputs**

- Template (`template_id`, text, required): The template. Pick one of your recent templates, or type its id (from 'List templates').

**Outputs**: The permanently deleted template.

- `deleted` (true/false): Always true.
- `deleted_by` (object): A Zoho user.
- `message` (text): Zoho's confirmation.
- `template_id` (text): The template's id.

**Example output**

```json
{
  "deleted": true,
  "message": "Template deleted successfully.",
  "template_id": "a7iyybadbb8b74e1147638bad04abc161e79e"
}
```

### Get document

Get a document's details: name, links, folder, status and permissions.

**Inputs**

- Document (`document_id`, text, required): The document. Pick one of your recent documents, or type its id (from 'List documents') or paste its address, such as https://writer.zoho.com/writer/open/<id>.

**Outputs**: A Zoho Writer document.

- `created_by` (text): Who created it.
- `created_time` (text): An ISO 8601 UTC timestamp.
- `created_time_ms` (number): The same moment in Unix milliseconds.
- `creator_id` (text): The creator's Zoho id.
- `document_id` (text): The document's id; pass it to the other document actions.
- `document_name` (text): The document's name.
- `document_type` (text): The kind of document.
- `download_url` (text): The API download link.
- `final_info` (object): Final state.
- `id` (text): The document's id (same as document_id).
- `is_favourite` (true/false): Whether it is a favourite.
- `is_published` (true/false): Whether it is published.
- `is_shared` (true/false): Whether it is shared.
- `last_opened_time` (text): An ISO 8601 UTC timestamp.
- `lastmodified_by` (list): Who changed it last.
- `lock_info` (object): Lock state.
- `modified_time` (text): An ISO 8601 UTC timestamp.
- `modified_time_ms` (number): The same moment in Unix milliseconds.
- `name` (text): The document's file name.
- `open_url` (text): Opens the document in Zoho Writer.
- `owner_id` (text): The owner's Zoho id.
- `parent_folder_id` (text): The WorkDrive folder it is in; usable as a Folder ID.
- `parent_info` (object): The folder it is in.
- `permalink` (text): The document's permanent link.
- `permissions` (object): What the connected account may do with it.
- `preview_url` (text): A read-only preview.
- `published_url` (text): The public link, when published.
- `resource_type` (text): native, fillable, merge, sign or label.
- `role` (text): The connected account's role on it, such as OWNER.
- `status` (text): active, or trashed.
- `thumbnail_url` (text): A thumbnail image.
- `type` (text): Always 'document'.
- `version` (text): The current version.

**Example output**

```json
{
  "created_time": "2026-08-01T10:38:56Z",
  "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "document_name": "Quarterly report",
  "id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "is_favourite": false,
  "is_published": false,
  "modified_time": "2026-08-02T12:37:28Z",
  "name": "Quarterly report",
  "open_url": "https://writer.zoho.com/writer/open/6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "parent_folder_id": "qpz9g646b2ddd954247b3988165bc17c156fe",
  "resource_type": "native",
  "role": "OWNER",
  "status": "active",
  "type": "document"
}
```

### Get document fields

List a document's merge fields (the keys 'Merge data' uses), fillable fields and sign fields.

**Inputs**

- Document (`document_id`, text, required): The document. Pick one of your recent documents, or type its id (from 'List documents') or paste its address, such as https://writer.zoho.com/writer/open/<id>.

**Outputs**: The document's merge, fillable and sign fields.

- `document_id` (text): The document's id.
- `fill` (list): The fillable fields.
- `merge` (list): The merge fields.
- `merge_field_ids` (list): The merge fields' ids: use them as the keys of 'Merge data'.
- `sign` (object): Sign fields, by recipient.

**Example output**

```json
{
  "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "fill": [],
  "merge": [
    {
      "display_name": "Name",
      "id": "name",
      "type": "text"
    }
  ],
  "merge_field_ids": [
    "name"
  ],
  "sign": {}
}
```

### Get document statistics

Count a document's words, characters, comments and tracked changes.

**Inputs**

- Document (`document_id`, text, required): The document. Pick one of your recent documents, or type its id (from 'List documents') or paste its address, such as https://writer.zoho.com/writer/open/<id>.

**Outputs**: Statistics about the document's content, comments and tracked changes.

- `comments_metrics` (object): Comment counts.
- `content_metrics` (object): Counts of the text.
- `document_id` (text): The document's id.
- `tracked_changes_metrics` (object): Tracked-change counts.

**Example output**

```json
{
  "comments_metrics": {
    "all": 2,
    "resolved": 1,
    "unresolved": 1
  },
  "content_metrics": {
    "number_of_characters": 700,
    "number_of_characters_without_whitespaces": 590,
    "number_of_sentences": 9,
    "number_of_words": 120
  },
  "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6"
}
```

### Get template

Get a template's details.

**Inputs**

- Template (`template_id`, text, required): The template. Pick one of your recent templates, or type its id (from 'List templates').

**Outputs**: A Zoho Writer template.

- `created_by` (text): Who created it.
- `created_time` (text): An ISO 8601 UTC timestamp.
- `created_time_ms` (number): The same moment in Unix milliseconds.
- `creator_id` (text): The creator's Zoho id.
- `id` (text): The template's id; pass it to the other template actions.
- `last_opened_time` (text): An ISO 8601 UTC timestamp.
- `modified_time` (text): An ISO 8601 UTC timestamp.
- `modified_time_ms` (number): The same moment in Unix milliseconds.
- `name` (text): The template's name.
- `open_url` (text): Opens the template in Zoho Writer.
- `owner_id` (text): The owner's Zoho id.
- `permalink` (text): The template's permanent link.
- `permissions` (object): What the connected account may do with it.
- `preview_url` (text): A read-only preview.
- `status` (text): The template's status.
- `thumbnail_url` (text): A thumbnail image.
- `type` (text): Always 'template'.

**Example output**

```json
{
  "created_time": "2026-08-01T16:30:33Z",
  "id": "a7iyybadbb8b74e1147638bad04abc161e79e",
  "modified_time": "2026-08-01T16:30:34Z",
  "name": "Invoice template",
  "open_url": "https://writer.zoho.com/writer/template/a7iyybadbb8b74e1147638bad04abc161e79e",
  "status": "active",
  "type": "template"
}
```

### List documents

List the documents the connected account can open, most recently changed first.

**Inputs**

- Category (`category`, text): Optional. Which documents; all of them by default. One of: `all`, `owned_by_me` (Owned by me), `shared_to_me` (Shared with me), `favourite` (Favourites), `trashed` (In the Trash), `recent`.
- Document types (`resource_types`, text): Optional. Only these kinds of document. One or more of: `fillable` (Fillable form), `merge` (Merge template), `sign` (Sign template), `label`.
- Sort by (`sort_by`, text): Optional. What to sort by. One of: `modified_time` (Last changed), `created_time` (Created), `shared_time` (Shared), `name`.
- Sort order (`sort_order`, text): Optional. Newest or largest first by default. One of: `descending`, `ascending`.
- Page size (`limit`, number): Optional. How many to return, 1 to 100. Default 10. From 1 to 100.
- Offset (`offset`, number): Optional. How many to skip: the next_offset of the previous page. At least 0.

**Outputs**

- `count` (number): How many documents are on this page.
- `documents` (list): The documents.
- `has_more` (true/false): Whether another page is available.
- `next_offset` (number): Pass as 'Offset' to fetch the next page; empty on the last.
- `total_count` (number): How many documents there are in all, when Zoho says.

**Example output**

```json
{
  "count": 1,
  "documents": [
    {
      "created_time": "2026-08-01T10:38:56Z",
      "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
      "document_name": "Quarterly report",
      "id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
      "is_favourite": false,
      "is_published": false,
      "modified_time": "2026-08-02T12:37:28Z",
      "name": "Quarterly report",
      "open_url": "https://writer.zoho.com/writer/open/6yc4z4f557db79e9f446ca37f5702c8b901f6",
      "parent_folder_id": "qpz9g646b2ddd954247b3988165bc17c156fe",
      "resource_type": "native",
      "role": "OWNER",
      "status": "active",
      "type": "document"
    }
  ],
  "has_more": false,
  "next_offset": null,
  "total_count": 1
}
```

### List templates

List your personal templates.

**Inputs**

- Sort by (`sort_by`, text): Optional. What to sort by. One of: `name`, `created_time` (Created), `modified_time` (Last changed).
- Page size (`limit`, number): Optional. How many to return, 1 to 100. Default 50. From 1 to 100.
- Offset (`offset`, number): Optional. How many to skip: the next_offset of the previous page. At least 0.

**Outputs**

- `count` (number): How many templates are on this page.
- `has_more` (true/false): Whether another page is available.
- `next_offset` (number): Pass as 'Offset' to fetch the next page; empty on the last.
- `templates` (list): The templates.
- `total_count` (number): How many templates there are in all, when Zoho says.

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_offset": null,
  "templates": [
    {
      "created_time": "2026-08-01T16:30:33Z",
      "id": "a7iyybadbb8b74e1147638bad04abc161e79e",
      "modified_time": "2026-08-01T16:30:34Z",
      "name": "Invoice template",
      "open_url": "https://writer.zoho.com/writer/template/a7iyybadbb8b74e1147638bad04abc161e79e",
      "status": "active",
      "type": "template"
    }
  ],
  "total_count": 1
}
```

### Merge and email

Fill a document's merge fields with data and email the result, attached or as the message. The free plan sends 10 a day.

**Inputs**

- Document (`document_id`, text, required): The document with the merge fields. Pick one of your recent documents, or type its id or paste its address.
- To (`recipient_email`, text, required): Up to 10 email addresses, separated by commas.
- Subject (`subject`, text, required): The email's subject.
- Send as (`output_format`, text, required): Attach the merged document in this format, or put it in the email body. One of: `pdf`, `docx` (Word (docx)), `inline` (In the email body), `pdfform` (Fillable PDF (5 credits a record)).
- Message (`message_body`, text): Optional. The email's text, when the document is attached.
- CC (`cc_email`, text): Optional. Up to 10 addresses, separated by commas.
- BCC (`bcc_email`, text): Optional. Up to 10 addresses, separated by commas.
- From name (`from_name`, text): Optional. The sender name shown.
- Reply-to (`replyto_email`, text): Optional. Where replies go.
- Attachment name (`attachment_name`, text): Optional. The attached file's name.
- Merge data (`merge_data`, object): The values to merge: an object of merge-field id to value, such as {"name": "Amelia", "email": "amelia@example.com"}, or a list of such objects for one merge per record. 'Get document fields' lists the ids. Give this or one of the data URLs.
- Merge data JSON URL (`merge_data_json_url`, text): Optional. A public https link to a JSON file of the records, instead of 'Merge data'.
- Merge data CSV URL (`merge_data_csv_url`, text): Optional. A public https link to a CSV file of the records, instead of 'Merge data'.
- Test mode (`test_mode`, true/false): Optional. Run without using merge credits; the result is watermarked and Zoho allows 50 test merges a day. Default: `false`.

**Outputs**: The merge job. It runs in the background; the report links show progress.

- `document_id` (text): The merged document's id.
- `merge_report_data_url` (text): The merge report as data.
- `merge_report_url` (text): The merge report page.
- `records` (list): One entry per record.
- `status` (text): inprogress, or the outcome.

**Example output**

```json
{
  "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "merge_report_url": "https://writer.zoho.com/writer/v1/mailmerge/job/0tq5n4",
  "records": [
    {
      "data": {
        "name": "Amelia"
      },
      "download_link": "https://writer.zoho.com/writer/api/v1/documents/6yc4z4f557db79e9f446ca37f5702c8b901f6/merge/download/gas3hfnkju456mndhjku987b",
      "status": "inprogress"
    }
  ],
  "status": "inprogress"
}
```

### Merge and save

Fill a document's merge fields with data and save the result as new documents in a Zoho WorkDrive folder. Runs in the background.

**Inputs**

- Document (`document_id`, text, required): The document with the merge fields. Pick one of your recent documents, or type its id or paste its address.
- New document name (`doc_name`, text, required): The name of the saved document(s).
- Folder ID (`folder_id`, text, required): The Zoho WorkDrive folder to save into: a document's parent_folder_id from 'Get document', or the folder's id from its WorkDrive address.
- Format (`output_format`, text): Optional. Save as this format; a Zoho Writer document by default. One of: `pdf`, `docx` (Word (docx)), `pdfform` (Fillable PDF (5 credits a record)).
- Merge into (`merge_to`, text): Optional. One document per record (default) or one for all. One of: `separatedoc` (One document per record), `singledoc` (One document for all records).
- Overwrite existing file (`overwrite_existing_file`, true/false): Optional. Replace a file of the same name in the folder.
- Merge data (`merge_data`, object): The values to merge: an object of merge-field id to value, such as {"name": "Amelia", "email": "amelia@example.com"}, or a list of such objects for one merge per record. 'Get document fields' lists the ids. Give this or one of the data URLs.
- Merge data JSON URL (`merge_data_json_url`, text): Optional. A public https link to a JSON file of the records, instead of 'Merge data'.
- Merge data CSV URL (`merge_data_csv_url`, text): Optional. A public https link to a CSV file of the records, instead of 'Merge data'.
- Test mode (`test_mode`, true/false): Optional. Run without using merge credits; the result is watermarked and Zoho allows 50 test merges a day. Default: `false`.

**Outputs**: The merge job. It runs in the background; the report links show progress.

- `document_id` (text): The merged document's id.
- `merge_report_data_url` (text): The merge report as data.
- `merge_report_url` (text): The merge report page.
- `records` (list): One entry per record.
- `status` (text): inprogress, or the outcome.

**Example output**

```json
{
  "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "merge_report_url": "https://writer.zoho.com/writer/v1/mailmerge/job/0tq5n4",
  "records": [
    {
      "data": {
        "name": "Amelia"
      },
      "download_link": "https://writer.zoho.com/writer/api/v1/documents/6yc4z4f557db79e9f446ca37f5702c8b901f6/merge/download/gas3hfnkju456mndhjku987b",
      "status": "inprogress"
    }
  ],
  "status": "inprogress"
}
```

### Merge document

Fill a document's merge fields with data and get a download link to the result (valid for two days). Uses merge credits unless 'Test mode' is on.

**Inputs**

- Document (`document_id`, text, required): The document with the merge fields. Pick one of your recent documents, or type its id or paste its address.
- Output format (`output_format`, text, required): The merged file's format. One of: `pdf`, `docx` (Word (docx)), `html`, `zdoc` (Zoho Writer document), `pdfform` (Fillable PDF (5 credits a record)).
- File name (`filename`, text): Optional. The merged file's name, without an extension.
- Merge data (`merge_data`, object): The values to merge: an object of merge-field id to value, such as {"name": "Amelia", "email": "amelia@example.com"}, or a list of such objects for one merge per record. 'Get document fields' lists the ids. Give this or one of the data URLs.
- Merge data JSON URL (`merge_data_json_url`, text): Optional. A public https link to a JSON file of the records, instead of 'Merge data'.
- Merge data CSV URL (`merge_data_csv_url`, text): Optional. A public https link to a CSV file of the records, instead of 'Merge data'.
- Test mode (`test_mode`, true/false): Optional. Run without using merge credits; the result is watermarked and Zoho allows 50 test merges a day. Default: `false`.

**Outputs**: The merged file.

- `document_id` (text): The merged document's id.
- `download_url` (text): Downloads the merged file; it expires after two days.
- `format` (text): The file format.

**Example output**

```json
{
  "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "download_url": "https://writer.zoho.com/writer/api/v1/documents/6yc4z4f557db79e9f446ca37f5702c8b901f6/merge/download/gas3hfnkju456mndhjku987b",
  "format": "pdf"
}
```

### Move document to Trash

Move a document to the Trash. 'Restore document' brings it back.

**Inputs**

- Document (`document_id`, text, required): The document. Pick one of your recent documents, or type its id (from 'List documents') or paste its address, such as https://writer.zoho.com/writer/open/<id>.

**Outputs**: The document moved to the Trash.

- `document_id` (text): The document's id.
- `message` (text): Zoho's confirmation.
- `result` (text): 'success'.
- `retention_data` (object): How long a WorkDrive team keeps it.
- `trashed` (true/false): Always true.

**Example output**

```json
{
  "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "message": "Document moved to trash.",
  "result": "success",
  "trashed": true
}
```

### Publish document

Publish a document to a public web page (or to the organization).

**Inputs**

- Document (`document_id`, text, required): The document. Pick one of your recent documents, or type its id (from 'List documents') or paste its address, such as https://writer.zoho.com/writer/open/<id>.
- Publish to (`scope`, text): Optional. Anyone with the link (default), or only your Zoho WorkDrive team. One of: `external` (Anyone (public)), `organization` (My organization).
- Republish on save (`auto_republish`, true/false): Optional. Update the published page whenever the document is saved. On by default.
- Title (`title`, text): Optional. The published page's title.
- Description (`description`, text): Optional. The published page's description.
- Keywords (`keywords`, text): Optional. Search keywords (public pages only).
- Allow download (`allow_download`, true/false): Optional. Let readers download it.
- Allow embedding (`allow_embed`, true/false): Optional. Let other sites embed it.
- Show author (`show_author`, true/false): Optional. Show who wrote it.
- Show reading time (`show_reading_time`, true/false): Optional. Show an estimated reading time.
- Show view count (`show_view_count`, true/false): Optional. Show how many times it was viewed.
- Show navigation (`show_navigation`, true/false): Optional. Show a table of contents.
- Allow search engines (`search_indexing`, true/false): Optional. Let search engines index it (public pages only).
- Show social media buttons (`social_media`, true/false): Optional. Show share buttons (public pages only).

**Outputs**: The published document.

- `auto_republish` (true/false): Whether saving republishes it.
- `document_id` (text): The document's id.
- `message` (text): Zoho's confirmation.
- `published_settings` (object): The settings in effect.
- `published_url` (text): The public link.
- `result` (text): 'success'.
- `scope` (text): external or organization.

**Example output**

```json
{
  "auto_republish": true,
  "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "published_url": "https://writer.zoho.com/writer/published/abc123",
  "result": "success",
  "scope": "external"
}
```

### Restore document

Bring a document back from the Trash.

**Inputs**

- Document (`document_id`, text, required): The document. Pick one of your recent documents, or type its id (from 'List documents') or paste its address, such as https://writer.zoho.com/writer/open/<id>.

**Outputs**: The document restored from the Trash.

- `document_id` (text): The document's id.
- `message` (text): Zoho's confirmation.
- `restored` (true/false): Always true.
- `result` (text): 'success'.

**Example output**

```json
{
  "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "message": "Document restored.",
  "restored": true,
  "result": "success"
}
```

### Search documents

Find documents by words in their name or content.

**Inputs**

- Search text (`query`, text, required): The words to search for.
- Date range (`date_range`, text): Optional. Only documents from this period. Applies to WorkDrive team accounts; 'Custom dates' needs From and To. One of: `today`, `yesterday`, `last_week` (Last week), `last_month` (Last month), `last_year` (Last year), `custom_date` (Custom dates).
- From (`start_time`, date and time): Optional. With 'To': only documents from this moment on.
- To (`end_time`, date and time): Optional. With 'From': only documents up to this moment.
- Sort by (`sort_by`, text): Optional. What to sort by; relevance by default. One of: `name`, `created_time` (Created), `modified_time` (Last changed).
- Sort order (`sort_order`, text): Optional. Newest or largest first by default. One of: `descending`, `ascending`.
- Page size (`limit`, number): Optional. How many to return. Default 50. At least 1.
- Offset (`offset`, number): Optional. How many to skip: the next_offset of the previous page. At least 0.

**Outputs**

- `count` (number): How many documents are on this page.
- `documents` (list): The documents.
- `has_more` (true/false): Whether another page is available.
- `next_offset` (number): Pass as 'Offset' to fetch the next page; empty on the last.
- `total_count` (number): How many documents there are in all, when Zoho says.

**Example output**

```json
{
  "count": 1,
  "documents": [
    {
      "created_time": "2026-08-01T10:38:56Z",
      "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
      "document_name": "Quarterly report",
      "id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
      "is_favourite": false,
      "is_published": false,
      "modified_time": "2026-08-02T12:37:28Z",
      "name": "Quarterly report",
      "open_url": "https://writer.zoho.com/writer/open/6yc4z4f557db79e9f446ca37f5702c8b901f6",
      "parent_folder_id": "qpz9g646b2ddd954247b3988165bc17c156fe",
      "resource_type": "native",
      "role": "OWNER",
      "status": "active",
      "type": "document"
    }
  ],
  "has_more": false,
  "next_offset": null,
  "total_count": 1
}
```

### Unpublish document

Take a published document off the web.

**Inputs**

- Document (`document_id`, text, required): The document. Pick one of your recent documents, or type its id (from 'List documents') or paste its address, such as https://writer.zoho.com/writer/open/<id>.

**Outputs**: The unpublished document.

- `document_id` (text): The document's id.
- `message` (text): Zoho's confirmation.
- `result` (text): 'success'.
- `scope` (text): The scope it was removed from.
- `unpublished` (true/false): Always true.

**Example output**

```json
{
  "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "result": "success",
  "scope": "external",
  "unpublished": true
}
```

### Update document

Rename a document or change its description, favourite, lock, final, track-changes or ready state. Only the fields you fill in change.

**Inputs**

- Document (`document_id`, text, required): The document. Pick one of your recent documents, or type its id (from 'List documents') or paste its address, such as https://writer.zoho.com/writer/open/<id>.
- New name (`name`, text): Optional. Rename the document.
- Description (`description`, text): Optional. A new description, up to 200 characters.
- Favourite (`favourite`, text): Optional. Add to or remove from favourites. One of: `add` (Add to favourites), `remove` (Remove from favourites).
- Track changes (`track_changes`, text): Optional. Turn change tracking on or off. One of: `enable` (On), `disable` (Off).
- Final (`final`, text): Optional. Mark the document final (read-only) or not. One of: `mark_final` (Mark as final), `unmark_final` (Unmark final).
- Mark as ready (`mark_ready`, true/false): Optional. Mark a draft document ready (complete).
- Lock (`lock`, text): Optional. Lock or unlock the document; applied last. One of: `lock`, `unlock`.

**Outputs**: What changed. Each change is its own call to Zoho; their answers are merged.

- `description` (text): The new description, when changed.
- `document_id` (text): The document's id.
- `final_info` (object): Final state, when changed.
- `is_favourite` (true/false): Whether it is a favourite, when changed.
- `locked_by` (object): Who locked it, when locked.
- `message` (text): Zoho's confirmation of the last change.
- `modified_by` (object): A Zoho user.
- `name` (text): The new name, when renamed.
- `result` (text): 'success'.
- `state` (text): The new state, when marked ready.
- `unlocked_by` (object): Who unlocked it, when unlocked.
- `updated_fields` (list): The details changed, in order.

**Example output**

```json
{
  "document_id": "6yc4z4f557db79e9f446ca37f5702c8b901f6",
  "message": "Document renamed successfully.",
  "name": "Quarterly report (final)",
  "result": "success",
  "updated_fields": [
    "name"
  ]
}
```
