Skip to main content
The DingTalk Docs OpenAPI provides a set of RESTful interfaces that allow developers to operate DingTalk Docs programmatically. Use these APIs to automate document reading and writing, manage block elements (create, read, update, delete), perform batch content operations, and more. They apply to scenarios such as automated document generation, content synchronization, and intelligent writing.

What is DingTalk Docs

DingTalk Docs is an enterprise collaborative office suite developed in-house by DingTalk, part of Alibaba Group. It includes online authoring tools such as documents, spreadsheets, and mind maps. In daily use, edit and view document content directly from a computer, mobile phone, or tablet without downloading anything. All changes are saved in real time automatically. DingTalk Docs is also deeply integrated with DingTalk, enabling efficient collaboration with colleagues based on organizational relationships. Use DingTalk Docs for everyday work scenarios such as information collection, project management, meetings, business reporting, and new hire onboarding. For more details, see DingTalk User Guide - DingTalk Docs.

Open capabilities overview

API list

DingTalk Docs provides a rich set of open APIs that allow developers to perform basic document operations.
APIDescriptionVersion
Overwrite a document (user authorization)Overwrite the entire document content in Markdown format. Note This method requires user authorization before calling.New
Overwrite a document (app authorization)Overwrite the entire document content in Markdown format. Note This method can be called after obtaining the access token using the app credentials appKey and appSecret.New
Get resource upload informationGet the upload URL for a specified resource in a document.New
Insert contentInsert a piece of Markdown content at a specified position in a document.New
Query block elementsQuery the first-level block elements under the root node of a document.New
Insert a block elementInsert one block element at a specified position in a document.New
Update a block elementUpdate the content or attributes of any block element in a document.New
Delete a block elementDelete a specific block element in a document.New
Append text to the end of a paragraphAppend a piece of text to the end of a specified paragraph.New
Append an inline element to the end of a paragraphAppend an inline element to the end of a specified paragraph.New

Callback event list

  • Document export task completed event

Glossary

Before using the DingTalk Docs OpenAPI, you should understand the following core concepts:

dentryUuid

The unique identifier of a document. For example, in https://alidocs.dingtalk.io/i/nodes/Z90D4da-id, the dentryUuid is Z90D4da-id.

blockId

The unique identifier of a block element. Get it through the “Query block elements” API.

operatorId

The unionId of the operator, used to identify the user performing the operation and to verify permissions.

BlockElement

A block element is the basic unit that makes up document content, such as paragraphs, headings, highlight blocks, and tables.

InlineElement

An inline element is nested inside a block element, such as stickers, images, links, and slots.