Send Notification
This interface is used for external system notification push interface
Request Method
post /agent_notices
Request Parameters (Request String)
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| agent_notice | Object | Yes | Notification object |
Notification Object
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| content | String | Yes | Notification content |
| targets | String Array | Yes | Notification target identifier (ID, email, work ID) |
| target_type | String | Yes | Notification target category (user: agent, group: agent group) |
| target_find_method | String | Yes | Notification target search method. Agent supports by_id: by ID, by_work_id: by work ID, by_email: by email; Agent group supports by_id: by agent group ID |
| external_source | String | No | Channel name, default is administrator |
Response Data
| Attribute Name | Type | Description |
|---|---|---|
| code | Integer | Execution result code, 1000 means success |
| message | String | Execution result description |
| id | Integer | Notification ID |
Example
curl --location -g --request POST 'https://{{subdomain}}.udesk.cn/open_api_v1/agent_notices?email={{email}}&sign_version=v2&nonce={{nonce}}×tamp={{timestamp}}&sign={{sign}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"agent_notice": {
"target_type": "user",
"target_find_method": "by_id",
"targets": [1],
"content": "OpenApi test",
"external_source": "OpenApi"
}
}'