Skip to main content
Call this API to query the delivery result of a Work Notification message.

API call description

This API is suitable for scenarios where you need to confirm whether a Work Notification message has been successfully delivered to specific users. For example, after the HR department of an organization sends an important notification, you may need to confirm whether employees have received it.

Notes

  • This API only returns the delivery result of Work Notification messages sent within the last 24 hours.
  • This API does not support recipient lists that exceed 100 users. Otherwise, the system returns Call timeout.

Request

Basic information
HTTP URLhttps://oapi.dingtalk.io/topapi/message/corpconversation/getsendresult
HTTP MethodPOST
Supported app typesappType-Internal app appType-Third-party enterprise app
Required permissionspermission-qyapi_base-Basic permission required to call enterprise APIs

Query parameters

NameTypeRequiredExampleDescription
access_tokenStringYesbE74xxxxThe app credential for calling this API. - For an internal app, obtain it through the API for getting the access_token of an internal app. - For a third-party enterprise app, obtain it through the API for getting the access_token of a third-party enterprise.

Request body

NameTypeRequiredExampleDescription
agent_idNumberYes836390886The Agent ID of the micro app used to send the message. - For an internal app, view it on the app details page in the developer backend. image - For a third-party enterprise app, obtain it by calling the API for getting enterprise authorization information.
task_idNumberYes256271667526The task ID returned by DingTalk when the message was sent. Call the Send Work Notification API to obtain the value of task_id. Note Only tasks created within the last 24 hours can be queried.

Request example

curl -X POST "https://oapi.dingtalk.io/topapi/message/corpconversation/getsendresult" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=cfe36xxxxd8dbce' \
-d 'agent_id=123' \
-d 'task_id=456'
Java
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.io/topapi/message/corpconversation/getsendresult");
OapiMessageCorpconversationGetsendresultRequest req = new OapiMessageCorpconversationGetsendresultRequest();
req.setAgentId(123L);
req.setTaskId(456L);
OapiMessageCorpconversationGetsendresultResponse rsp = client.execute(req, accessToken);
System.out.println(rsp.getBody());
Python
import dingtalk.api

req=dingtalk.api.OapiMessageCorpconversationGetsendresultRequest("https://oapi.dingtalk.io/topapi/message/corpconversation/getsendresult")

req.agent_id=123
req.task_id=456
try:
  resp= req.getResponse(access_token)
  print(resp)
except Exception,e:
  print(e)
PHP
include "TopSdk.php";
date_default_timezone_set('Asia/Shanghai');

$c = new DingTalkClient(DingTalkConstant::$CALL_TYPE_OAPI, DingTalkConstant::$METHOD_POST , DingTalkConstant::$FORMAT_JSON);
$req = new OapiMessageCorpconversationGetsendresultRequest;
$req->setAgentId("123");
$req->setTaskId("456");
$resp = $c->execute($req, $access_token, "https://oapi.dingtalk.io/topapi/message/corpconversation/getsendresult");
C#
IDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.io/topapi/message/corpconversation/getsendresult");
OapiMessageCorpconversationGetsendresultRequest req = new OapiMessageCorpconversationGetsendresultRequest();
req.AgentId = 123L;
req.TaskId = 456L;
OapiMessageCorpconversationGetsendresultResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);

Response

Response body

NameTypeExampleDescription
send_resultAsyncSendResultThe returned result.
invalid_user_id_listString[][“manager4220”,user123”]Invalid user IDs.
forbidden_user_id_listString[][“manager4220”,user123”]The user IDs that were not actually sent due to rate limiting caused by sending messages too frequently or in excessive volume. Recipients not affected by the rate limit are still sent successfully. Rate limit rules include: - Sending the same content to the same user is allowed only once per day. - For the same app sending messages to the same user: - For third-party enterprise apps, the daily limit is 100 messages per user. - For internal apps, the daily limit is 500 messages per user.
failed_user_id_listString[][“manager4220”,user123”]The user IDs that failed to receive the message.
read_user_id_listString[][“manager4220”,user123”]The user IDs that have read the message.
unread_user_id_listString[][“manager4220”,user123”]The user IDs that have not read the message.
invalid_dept_id_listNumber[][1,2,3]Invalid department IDs.
forbidden_listSendForbiddenModel[]The specific reasons why the push was forbidden.
codeString143105The rate limit code. - 143105 indicates that the daily limit of messages pushed to a user by an internal app has been exceeded. - 143106 indicates that an internal app has sent duplicate messages to a user.
countNumber1The rate limit threshold.
useridStringuser123The user ID of the employee affected by the rate limit.
errcodeNumber0The return code.
errmsgStringokThe description of the return code.
request_idString6pcvwp6jcowsThe request ID.

Response example

{
  "errcode": 0,
  "send_result": {
    "failed_user_id_list": [],
    "forbidden_list": [],
    "invalid_dept_id_list": [],
    "invalid_user_id_list": [],
    "read_user_id_list": [
      "manager4220"
    ],
    "unread_user_id_list": []
  },
  "request_id": "6pcvwp6jcows"
}

Error codes

If an error occurs when calling this API, refer to the Global error codes document and find the solution based on the error message.
Error codeDescriptionSolution
143103The QPM limit for the number of message recipients per app within the organization has been exceeded.The API is being called too frequently. Try again later.
143104The QPM limit for the number of message recipients per minute within the organization has been exceeded.The API is being called too frequently. Try again later.
143105The daily push limit per user per app has been exceeded.An organization can send up to 500 message notifications per employee per day, while an ISV can send up to 50.
143106The limit for duplicate messages pushed by a single app to a single user has been exceeded.Only one message notification with the same content can be sent to the same employee per day.
143203The QPM limit for an ISV app sending to a single organization has been exceeded.The API is being called too frequently. Try again later.
143204The QPM limit for an ISV app sending to all organizations has been exceeded.The API is being called too frequently. Try again later.
143205The daily push limit per user per app has been exceeded.An organization can send up to 500 message notifications per employee per day, while an ISV can send up to 50.
143206The limit for duplicate messages pushed by a single app to a single user has been exceeded.Only one message notification with the same content can be sent to the same employee per day.
1430000The recipient is empty.The recipient cannot be empty. Check whether the message recipient is empty.
1430001Unrecognized grantType.None.
1430002The message contains prohibited content.Check whether the message text contains pornographic, reactionary, or other prohibited words.
1430003OAPI system protection triggered.None.
1430004Senior executive protection.Disable senior executive protection.