Webhooks Documentation

Mx2 Group's allows you to receive status updates on sent messages. To enable webhooks, please add your URL in your account settings to receive our webhook posts.

Request Payload:

{
  "subscriberId": "",
  "cguid": "",
  "status": "",
  "statusMessage": "",
  "textMessage": "",
  "messageType": "",
  "datetime": ""
}

Property Description Example Value
subscriberId The subscriberId you originally received on the send API request. xct7jy
cguid Campaign Guid you originally sent on the send API request. 71349011-E13D-43FC-ADB4-DAE215EA5438
status The status of your request. See table below for possible values. sent
statusMessage If status = failed then statusMessage will contain the fail reason. See table below for possible values The destination number is either a landline or a non-routable wireless number.
textMessage If status = received then textMessage will contain the message received Yes
messageType The type of message sent to the subscriber. See below for possible values. Initial
datetime Date and Time the webhook was generated. Format is YYYY-MM-DD HH:MM:SS in 24 hour format. 2024-03-25 20:01:58

Status Property Possible Values:

Value Description
sent Your message was successfully sent to the carrier network.
delivered The carrier has confirmed message delivery.
failed There was a problem sending your message. See the statusMessage for details.
received The subscriber responded. See textMessage for subscribers message.
optout The subscriber opted out.
yes The subscriber responded "yes".
click The subscriber has been redirected to your landing page url.

StatusMessage Property Possible Values:

Value Description
Blocked as spam - temporary The carrier has temporarily marked your message as spam. Try again later.
Not routable This is a landline or a phone that does not accept text messages.
Undeliverable The cell phone was not reachable. This cell phone may be available in the future.
Invalid messaging destination number The cell phone number was not a valid (i.e. 555 number or not 10 digits, etc...)
Message expired during transmission Message was not delivered. Try again.

MessageType Property Possible Values:

Value Description
Initial The initial message sent requiring subscriber to respond with "Yes" to continue.
Response The follow up message containing a link for the subscriber to continue.
If the status is yes, failed, received or optout the messageType will be blank.

Example Sent Request Payload:

{
  "subscriberId": "xct7jy",
  "cguid": "71349011-E13D-43FC-ADB4-DAE215EA5438",
  "status": "sent",
  "statusmessage": "",
  "textMessage": "",  
  "messageType": "Initial",
  "datetime": "2024-03-25 20:01:58"
}

Example Delivered Request Payload:

{
  "subscriberId": "xct7jy",
  "cguid": "71349011-E13D-43FC-ADB4-DAE215EA5438",
  "status": "delivered",
  "statusmessage": "",
  "textMessage": "",
  "messageType": "Response",                                        
  "datetime": "2024-03-25 20:01:58"
}

Example Failed Request Payload:

{
  "subscriberId": "xct7jy",
  "cguid": "71349011-E13D-43FC-ADB4-DAE215EA5438",
  "status": "failed",
  "statusmessage": "Not routable",
  "textMessage": "",
  "messageType": "",                                        
  "datetime": "2024-03-25 20:01:58"
}

Example Received Request Payload:

{
  "subscriberId": "xct7jy",
  "cguid": "71349011-E13D-43FC-ADB4-DAE215EA5438",
  "status": "received",
  "statusmessage": "",
  "textMessage": "Please call me",
  "messageType": "",                                        
  "datetime": "2024-03-25 20:01:58"
}

Example OptOut Request Payload:

{
  "subscriberId": "xct7jy",
  "cguid": "71349011-E13D-43FC-ADB4-DAE215EA5438",
  "status": "optout",
  "statusmessage": "",
  "textMessage": "",
  "messageType": "",                                        
  "datetime": "2024-03-25 20:01:58"
}