Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v1.0/convFile/conversations/files/send |
| HTTP Method | POST |
| Supported app type | appType-Internal app |
| Permissions required | permission-ConvFile.File.Send-Group file send permission |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential used to call this API. Obtain it by calling the Obtain the access token of an internal app API. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| unionId | String | Yes | The unionId of the operator. Obtain it by calling the Query user details API. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| spaceId | String | Yes | The space ID. Obtain the value of the id parameter by calling the Add a space API. |
| dentryId | String | Yes | The file ID. Obtain the value of the id parameter by calling the Obtain the list of files or folders API. |
| openConversationId | String | Yes | The openConversationId of the target chat. Obtain the value of the openConversationId parameter by calling the Create a group API. |
Request example
HTTPResponse
Response body
| Name | Type | Description |
|---|---|---|
| file | Object | Information about the file sent to the target chat. |
| id | String | The file ID. |
| conversationId | String | The ID of the chat that the file belongs to. |
| spaceId | String | The ID of the space that the file belongs to. |
| parentId | String | The ID of the parent folder of the file. The root folder ID is 0. |
| type | String | The file type. - FILE: file - FOLDER: folder |
| name | String | The file name. |
| size | Long | The file size, in bytes. |
| path | String | The file path. |
| version | Long | The file version number. |
| status | String | The file status. - NORMAL: normal - DELETED: deleted - EXPIRED: expired |
| extension | String | The file extension. |
| creatorId | String | The unionId of the file creator. |
| modifierId | String | The unionId of the file modifier. |
| createTime | String | The creation time of the file, in ISO 8601 format. Example: 2022-07-29T14:55Z. |
| modifiedTime | String | The last modified time of the file, in ISO 8601 format. Example: 2022-07-29T14:55Z. |
| uuid | String | The identifier field. |
Response body example
Error codes
If the API call returns an error, refer to the Global error codes document to find a solution based on the error message.| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | paramError | %s | Parameter error |
| 400 | paramError.spaceId | %s | Parameter error - spaceId |
| 400 | paramError.dentryId | %s | Parameter error - dentryId |
| 400 | paramError.conversationId | %s | Parameter error - conversationId |
| 400 | folderNotSupport | %s | Sending a folder is not supported |
| 403 | permissionDenied | %s | The user does not have permission to copy the file to be sent, or the user does not have permission to add files to the storage space of the target chat |
| 404 | conversationNotExist | %s | The target chat does not exist |
| 500 | systemError | %s | System error |
| 500 | unknownError | Unknown Error | Unknown error |