(30032) Message Sending Result
When the third-party application sends a message through the PBX API and the delivery status changes, this event notification will be triggered.
Report parameters
| Parameter | Type | Description |
|---|---|---|
| type | Integer | Event ID. |
| sn | String | PBX's serial number. |
| msg | Object <Msg_Info> | The detailed information. |
- Msg_Info
-
Parameter Type Description session_id Integer The unique ID of the message session. msg_id Integer The unique ID of the message. delivery_status Integer Message delivery status. 0: Sending.1: Sent successfully.2: Failed to send.
sender Object<Sender_Info> The information of the sender. msg_type Integer The type of the message content. 0: User message.4: Unsupported message type notification.
msg_body String Message content. msg_files String The information of attached files, which is returned as a JSON-formatted string. The string represents an array of
File_Infoobjects. For more details, see the File_Info table.send_time Integer The Unix timestamp (in seconds) when the message was sent. param String Additional message-related parameters, which is returned as a JSON-formatted string. send_error String The type of error that occurred when sending a message. invalid_webhook_request: Invalid request.unsupported_callback_type: Unsupported callback type.resource_not_found: Resource not found.invalid_did_number: Invalid DID number.auth_fail: Authentication failed.auth_not_exit: Authentication information does not exist.request_fail: Request failed.send_fail: Sending failed.exceeds_size_limit: Message exceeded size limit.too_many_request: Too many requests.unsupport_media_type: Unsupported media type.invalid_param: Invalid parameter.invalid_phone_number: Invalid phone number.exceeds_time_limit: Exceeded time limit.service_unavailable: Third-party service unavailable.service_error: Third-party service error.unknown_error: Unknown error.template_not_exist: WhatsApp template does not exist.msg_exceed: WhatsApp message text exceeds the allowed limit.
send_error_msg String The error message returned by third-party services when message sending fails. tag String The tag assigned to the Facebook message, indicating its category or purpose. ACCOUNT_UPDATE: Account-related updates.CONFIRMED_EVENT_UPDATE: Confirm event updates.
HUMAN_AGENT: Message sent by a human agent.POST_PURCHASE_UPDATE: Updates after a purchase.
receive_time Integer The Unix timestamp (in seconds) when the message was received. whatsapp_msg_param String Parameters to be inserted into the WhatsApp message template, provided as a JSON-formatted string. msg_kind Integer The category of the message. 0: Normal message.1: WhatsApp template message.
Report example
{
"type": 30032,
"sn": "3631A2124788",
"msg": {
"session_id": 3089,
"msg_id": 10325,
"delivery_status": 1,
"sender": {
"user_id": 0,
"user_no": "api",
"user_type": 9,
"avatar": "",
"username": "Third-Party Message Analytics Platform (Transmitted via API)"
},
"msg_type": 0,
"msg_body": "Your verification code is 846392. Please do not share this code with anyone.",
"msg_files": "",
"send_time": 1758594826,
"param": "",
"send_error": "",
"send_error_msg": "",
"tag": "",
"receive_time": 1758594826,
"whatsapp_msg_param": "",
"msg_kind": 0
}
}