> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the delivery progress of work notifications

> Call this API to get the delivery progress of Work Notifications, suitable for monitoring message push status and troubleshooting delivery issues.

Call this API to get the delivery progress of work notifications. This is useful when your organization needs to monitor message push status or troubleshoot message delivery errors.

## API call description

This API only returns the delivery progress of work notifications sent within the past 7 days.

## Request

| **Basic information** |                                                                                                                                                    |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP URL              | [https://api.dingtalk.io/topapi/message/corpconversation/getsendprogress](https://api.dingtalk.io/topapi/message/corpconversation/getsendprogress) |
| HTTP Method           | POST                                                                                                                                               |
| Supported app types   | appType-Internal app, appType-Third-party enterprise app                                                                                           |
| Required permissions  | permission-qyapi\_base-Basic permissions required for calling enterprise APIs                                                                      |

### Query parameter

| 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 for getting the [access\_token of an internal app](/open/development/obtain-orgapp-token). - For a third-party enterprise app, obtain it by calling the API for getting 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, view it on the app details page of the [Developer Backend](https://open-dev.dingtalk.io/#/appMgr/inner/h5/836390886/1). - For a third-party enterprise app, obtain it by calling the API for getting the enterprise authorization information. |
| task\_id  | Number | Yes      | 256271667526 | The task ID returned by DingTalk when the message was sent. Call the [Send work notifications](/open/development/asynchronous-sending-of-enterprise-session-messages) API to get the value of task\_id.  **Note**  Only tasks created within the past 24 hours can be queried.                                                  |

### Request example

```curl theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://api.dingtalk.io/topapi/message/corpconversation/getsendprogress" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=a0a25xxxxed3ff' \
-d 'agent_id=123' \
-d 'task_id=456'
```

Java

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
DingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/message/corpconversation/getsendprogress");
OapiMessageCorpconversationGetsendprogressRequest req = new OapiMessageCorpconversationGetsendprogressRequest();
req.setAgentId(123L);
req.setTaskId(456L);
OapiMessageCorpconversationGetsendprogressResponse rsp = client.execute(req, accessToken);
System.out.println(rsp.getBody());
```

Python

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import dingtalk.api

req=dingtalk.api.OapiMessageCorpconversationGetsendprogressRequest("https://api.dingtalk.io/topapi/message/corpconversation/getsendprogress")

req.agent_id=123
req.task_id=456
try:
  resp= req.getResponse(access_token)
  print(resp)
except Exception,e:
  print(e)
```

PHP

```php theme={"theme":{"light":"github-light","dark":"github-dark"}}
include "TopSdk.php";
date_default_timezone_set('Asia/Shanghai');

$c = new DingTalkClient(DingTalkConstant::$CALL_TYPE_OAPI, DingTalkConstant::$METHOD_POST , DingTalkConstant::$FORMAT_JSON);
$req = new OapiMessageCorpconversationGetsendprogressRequest;
$req->setAgentId("123");
$req->setTaskId("456");
$resp = $c->execute($req, $access_token, "https://api.dingtalk.io/topapi/message/corpconversation/getsendprogress");
```

C#

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
IDingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/message/corpconversation/getsendprogress");
OapiMessageCorpconversationGetsendprogressRequest req = new OapiMessageCorpconversationGetsendprogressRequest();
req.AgentId = 123L;
req.TaskId = 456L;
OapiMessageCorpconversationGetsendprogressResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
```

## Response

### Response body

| Name                  | Type              | Example      | Description                                                                               |
| --------------------- | ----------------- | ------------ | ----------------------------------------------------------------------------------------- |
| request\_id           | String            | 5y2znla8tw3d | The request ID.                                                                           |
| errcode               | Number            | 0            | The return code.                                                                          |
| errmsg                | String            | ok           | The description of the return code.                                                       |
| progress              | AsyncSendProgress |              | The returned result.                                                                      |
| progress\_in\_percent | Number            | 100          | The processing percentage. Value range: 0 to 100.                                         |
| status                | Number            | 2            | The task execution status:   - **0**: Not started - **1**: In progress - **2**: Completed |

### Response example

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "errcode": 0,
  "errmsg":"ok",
  "progress": {
    "progress_in_percent": 100,
    "status": 2
  },
  "request_id": "5y2znla8tw3d"
}
```

### Error codes

If an error is returned when you call this API, refer to the [Global error codes](/open/development/server-api-error-codes-1) document for solutions based on the error message.

| Error code (errorcode) | Error message (errmsg) | Solution                                      |
| ---------------------- | ---------------------- | --------------------------------------------- |
| 40035                  | Invalid parameter      | Verify that task\_id or agent\_id is correct. |
| 500                    | System error           | An unknown system error occurred.             |
