(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_Info objects. 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.
Sender_Info
Parameter Type Description
user_id Integer The ID of the internal extension user in the session.
user_no String The identifier of the user in the session.
  • For internal extension user, this parameter returns the extension number.
  • For Third-party message analytics platform, this parameter returns a fixed value api.
  • For external customer, this parameter returns the ID or phone number of the customer.
user_type Integer User type.
  • 1: Extension user.
  • 2: SMS user.
  • 3: WhatsApp user.
  • 4: Facebook user.
  • 5: Live Chat user.
  • 8: Message campaign recipient.
  • 9: Third-party message analytics platform (transmitted via API)
avatar String The ID of the user's avatar.
username String User name.
File_Info
Parameter Type Description
id String The ID of the file.
name String The name of the file.
uri String The URI for accessing the file.
type String File type.
size Integer File size (Unit: Byte).

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
       }
}