Webhooks

Mobiniti offers the following webhooks: inbound messages, bounced messages, unsubscribes, delivery reports, and contact status.

Support and Success at Mobiniti avatar
Written by Support and Success at Mobiniti
Updated over a week ago

What are webhooks?

Webhooks are a way for apps to communicate between them automatically. Webhooks are web-based meaning that they must communicate over a web protocol—HTTP in almost every cases. You can register a webhook by registering the URL to notify once given events occur. 

What webhooks does Mobiniti support?

  • Inbound Messages

  • Unsubscribes

  • Bounced Messages

  • Delivery Report

  • Contact Status

Where do I place my webhooks in Mobiniti?

Step 1: Navigate to Settings and then Message Settings.

Step 2: Scroll about half way down the page until you see Webhook URL for Unsusbcribe Messages, Delivery Report, and Contact Status. Fill in the URL and than click Update Message Settings. 

Step 3: Navigate to the Notifications sub tab underneath Settings to find the Bounces and Inbound Messages webhooks. Place in your URLs and then click Submit to save each.

What are Bounce webhook URL thresholds?
You can set the amount of bounces required on a per contact basis before this webhook is triggered. So for example, if set to 3, once a contact bounces 3 times, it would trigger the bounced webhook to be sent.

What is Unknown messages only under the Inbound webhook URLs?
You can filter the type of inbound messages sent via webhook to you with this setting. If checked on, you will only receive webhooks for actual responses to your outgoing messages. If left un-checked, you will receive ALL inbound messages including help and stop replies and keyword opt-ins.

Below is additional information on each webhook that is also accessible via our API documentation at the very bottom. 

Webhook Requests

Each webhook is sent with a HTTP POST request with the body of the request containing a JSON object.

Inbound Messages

Sends data about an inbound message from a particular contact.


{
  "id": "f82e541a-a4b1-11e8-a85f-127fd0971098",
  "first_name": null,
  "last_name": null,
  "email": null,
  "short_code": "64600",
  "phone_number": "+19999999999",
  "message": "This is an example message",
  "unsubscribed_at": null,
  "created_at": "2016-07-01T15:11:09.553Z",
  "updated_at": "2016-07-01T15:11:09.553Z",
  "received_at": "2016-07-01T15:11:09.553Z"
}

Unsubscribe Messages

Sends data about a contact that was unsubscribed.


{
  "id": "f82e541a-a4b1-11e8-a85f-127fd0971098",
  "first_name": null,
  "last_name": null,
  "email": null,
  "phone_number": "+19999999999",
  "to": "64600",
  "unsubscribed_at": "2016-07-01T15:11:09.553Z",
  "created_at": "2016-07-01T15:11:09.553Z",
  "updated_at": "2016-07-01T15:11:09.553Z",
}

Delivery Reports

Sends delivery report data for each message that is sent to a contact.

List of possible status codes and messages.

{
  "total_messages": 1,
  "statuses": [
    {
      "code": "100",
      "status": "The message delivered successfully.",
      "count": 1,
      "recipients": ["19999999999"],
      "success": true,
      "bounce": false
    }
  ],
  "messages": [
    {
      "id": "a8a2b40a-86ae-4a91-a61d-7b7ccfc4b148",
      "from": "+15555555555",
      "message": "This is an example message",
      "phone_number": "9999999999",
      "metadata": []
    }
  ]
}

Contact Status

Sends contact information when the status of a contact changes based on data received from carriers. The status field can have one of the following: suspended, deactivated, resumed, transferred

{
  "id": "f82e541a-a4b1-11e8-a85f-127fd0971098",
  "first_name": null,
  "last_name": null,
  "email": null,
  "phone_number": "+19999999999",
  "status": "deactivated",
  "created_at": "2016-07-01T15:11:09.553Z",
  "updated_at": "2016-07-01T15:11:09.553Z",
}

Bounced Message

Sends contact information when an outgoing message is detected as being a bounce based on data received from the carriers.

{
  "id": "f82e541a-a4b1-11e8-a85f-127fd0971098",
  "first_name": null,
  "last_name": null,
  "email": null,
  "phone_number": "+19999999999",
  "unsubscribed_at": "2016-07-01T15:11:09.553Z",
  "bounces": 2,
  "created_at": "2016-07-01T15:11:09.553Z",
  "updated_at": "2016-07-01T15:11:09.553Z",
}

Rejection Message

The ability to see if there was an error, validation, provider error or DLR if a message comes back as "failed".

It will "POST" the url saved on your settings page. It will include this information:

{ "code": "", "message": "", "description": "" }

To set up, navigate to Settings -> Notifications.

Scroll down to "Rejected Message" paste your webhook into the URL box, and hit submit.


Did this answer your question?