API call description
You can only recall Work Notifications messages sent within the last 24 hours.Permissions
Server API authorization is granted at the app level. When you create an app, the Message notifications permission is added by default.Basic information
HTTP method: POST Request URL:Request
| Basic information | |
|---|---|
| HTTP URL | https://oapi.dingtalk.io/topapi/message/corpconversation/recall |
| HTTP Method | POST |
| Supported app types | appType-Internal app, appType-Third-party enterprise app |
| Permissions required | permission-qyapi_base-Basic permissions required to call enterprise APIs |
Query parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | Yes | bE74xxxx | The app credential used to call this API. - For an internal app, obtain it by calling the API to get the access_token of an internal app. - For a third-party enterprise app, obtain it by calling the API to get the access_token of a third-party enterprise. |
Request body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| agent_id | Number | Yes | 836390886 | The Agent ID of the Micro app used to send the message. - For an internal app, you can find this on the app details page in the Developer Backend. - For a third-party enterprise app, obtain it by calling the API to get enterprise authorization information. |
| msg_task_id | Number | Yes | 256271667526 | The task ID returned by DingTalk when the message was sent. Call the Send a Work Notification API to obtain the value of the task_id parameter. Note Only Work Notifications messages sent within the last 24 hours can be recalled. |
Request example
Response
Response body
| Name | Type | Example | Description |
|---|---|---|---|
| errmsg | String | ok | The return code description. |
| errcode | Number | 0 | The return code. |
Response body example
Error codes
If an error occurs when calling this API, look up the solution in the global error codes document using the error message.| Error code (errorcode) | Error message description (errmsg) | Solution |
|---|---|---|
| 400002 | Invalid agentId or taskId | Verify that agentId and taskId are correct. |
| 500 | System error | An unknown system error occurred. |