API call description
For information about the data structures related to document content, see Document data structures.Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v1.0/doc/suites/documents/{docKey}/blocks/{blockId}/paragraph/appendText |
| HTTP Method | POST |
| Supported app type | appType-Internal app |
| Required permissions | permission-Storage.File.Write-Write permission on organization storage files |
Request header
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential for calling 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 you create a document by calling the Create a Knowledge Base document API, obtain the docKey parameter from the response. To get the dentryUuid from the document URL, take https://alidocs.dingtalk.io/i/nodes/Zxxxxa-id as an example; the dentryUuid is Zxxxxa-id. |
| blockId | String | Yes | The unique identifier of the target paragraph. Obtain the blockId of the paragraph by calling the Query block elements API. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| operatorId | String | Yes | The unionId of the user. Obtain the unionid value by calling the Query user details API. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| text | String | Yes | The text to insert. |
Request example
HTTPResponse
Response body
| Name | Type | Description |
|---|---|---|
| success | Boolean | Whether the request succeeded. |
| result | Object | The result of the request. |
| data | Map<String, Any> | The content of the element after the text is appended. |
| Any | The returned result. |
Response body example
Error codes
If an error is returned when you call this API, find the solution in the Global error codes document based on the error message.| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | paramError | %s | Parameter error. |
| 400 | invalidRequest.inputArgs.invalid | %s | Parameter error. See the error message for details. |
| 403 | forbidden.accessDenied | %s | No permissions. |
| 403 | forbidden.acrossOrg | %s | Invalid request. Check whether the target document belongs to the organization specified by the access token. |
| 404 | docNotExist | %s | The document does not exist. |
| 404 | invalidRequest.resource.notFound | %s | The requested resource cannot be found. |
| 500 | forbidden.operationIllegal | %s | The requested operation is illegal. |
| 500 | systemError | %s | The service is busy. Try again later. |
| 500 | unknownError | Unknown Error | Unknown error. |
| 503 | operationTimeout | %s | The request timed out. |