Permissions
To call this API, one of the following permissions is required.| App type | Supported | Permissions | API Explorer debugging |
|---|---|---|---|
| Internal app | Supported | Write permission for organization storage files | API Explorer |
| Third-party enterprise app | Not supported | Not supported | Not supported |
| Third-party personal app | Not supported | Not supported | Not supported |
HTTP method
Header parameters
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential used to call this API. Obtain it by calling the Get the access token of an internal app API. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| docKey | String | Yes | The document ID (the docKey or dentryUuid of the document). After creating a document by calling the Create a Knowledge Base document API, obtain the docKey parameter from the response. Note Obtain the dentryUuid from the document URL. For example, in https://alidocs.dingtalk.io/i/nodes/Z9xxxxa-id, the dentryUuid is Z9xxxxa-id. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| operatorId | String | Yes | The unionId of the user. Obtain the unionid parameter value by calling the Query user details API. |
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| dataType | String | No | The data format of the content to be overwritten. Valid values: - markdown: The content to be overwritten is in markdown format. This is the default value. |
| content | String | Yes | The content string to write. Note: - If dataType is markdown, this must be a markdown-formatted string. - The maximum length is 50,000 characters. |
Response parameters
| Name | Type | Description |
|---|---|---|
| success | Boolean | Whether the request was successful. |
| result | Object | The request result. |
| data | Map<String, Any> | The request result. |
| Any | The request result. |
Examples
Request example
HTTPResponse example
Error codes
| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | paramError | %s | Parameter error. |
| 400 | invalidRequest.inputArgs.invalid | %s | Parameter error. Refer to the error message for details. |
| 403 | forbidden.accessDenied | %s | No permission. |
| 403 | forbidden.acrossOrg | %s | Invalid request. Check whether the document being accessed belongs to the organization specified by the access token. |
| 404 | docNotExist | %s | Document does not exist. |
| 404 | invalidRequest.resource.notFound | %s | Unable to find the requested resource. |
| 500 | forbidden.operationIllegal | %s | Invalid request action. |
| 500 | systemError | %s | Service is busy. Try again later. |
| 500 | unknownError | Unknown Error | Unknown error. |
| 503 | operationTimeout | %s | Request timed out. |