API call description
- This API is designed for OA work notifications and updates approval statuses in real time.
- This API can only update the status bar of work notifications sent within the past 7 days.
Request
| Basic information | |
|---|---|
| HTTP URL | https://oapi.dingtalk.io/topapi/message/corpconversation/status_bar/update |
| HTTP Method | POST |
| Supported app types | appType-Internal appappType-Third-party enterprise app |
| Required permissions | 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 for getting the access_token of an internal app. - 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 | 123 | The AgentId of the micro app used to send the message. - For an internal app, view it on the app details page in the Developer Backend. - For a third-party enterprise app, obtain it by calling the API for getting enterprise authorization information. |
| task_id | Number | Yes | 11 | The ID of the work notification task. Obtain the task_id value by calling the Send work notifications API. |
| status_value | String | Yes | Accepted | The status bar value. |
| status_bg | String | No | 0xFF78C06E | The background color of the status bar. We recommend the format 0xFF followed by a six-digit color value. |
Request example
Response
Response body
| Name | Type | Example | Description |
|---|---|---|---|
| request_id | String | 4jzllmte0wau | The request ID. |
| errmsg | String | ok | The description of the return code. |
| errcode | Number | 0 | The return code. |
Response body example
Error codes
If an error occurs when you call this API, look up the error message in the Global error codes document to find a solution.| Error code (errorcode) | Error message (errmsg) | Solution |
|---|---|---|
| 40056 | Invalid agentid | Verify that the agentId is correct. |
| 40035 | Invalid parameter | Verify that the taskId is correct. |
| 41052 | Too many recipients in this delivery; sending results will no longer be returned. | - Reduce the number of recipients for the work notification. - Check whether the work notification has finished sending. This error occurs if sending is still in progress. |
| 500 | System error | An unknown system error occurred. |