Opentact
  • Opentact Introduction
  • KEY CONCEPTS
    • Basic Concept
      • Voice Capability
        • Managing Inbound Calls
      • SMS Capability
      • Number Capability
    • Phone Number
      • Voice Enablement
      • SMS Enablement
      • TN Profile
        • Blacklist Caller ID
        • Whitelist Caller ID
    • SIP Control APP
      • Specify Remote Call Control URL
      • Specify Dialplan XML
    • SIP Trunking
    • Messaging
      • Quick Start Guide
      • Prepare Phone Numbers for SMS
    • SIP Connection
      • Associate SIP Connection with Phone Number
    • SIP Domain
      • Send Outbound Call with SIP Domain
      • Receive Inbound Call to SIP User
        • Web Call
        • Zoiper SIP Client
    • SIP Users
      • Create a SIPUser
      • Create a SIPUserInvite
    • Telecom Data
  • Opentact API Documentation
    • Opentact API Integration
      • API Environment
      • Opentact API keys
      • Passing Authentication
      • Authentication API
        • Example API Call
        • Authentiction with Gmail
    • TN Profile
      • Add and Remove Blacklist to TN Profile
        • Example API Call
      • Add and Remove Whitelist to TN Profile
        • Example API Call
    • Phone Number
      • Order Phone Number
        • Example API Usage
      • Release a Number
        • Example API Usage
      • Get all Purchased Numbers
      • Number Search
        • Example API Usage
    • SIP Connection
      • Remove Number from SIP Connection
      • Get Number for a SIP Connection
      • Update SIP Connections
      • Create SIP Conenctions
      • Delete SIP Connections
      • List SIP Connections
      • Assign Number to a SIP Connection
    • Messaging
      • Enable SMS on Numbers
      • Disable SMS on Number
      • Send SMS with Pool
      • Send SMS with Number
      • Receiving SMS
      • Retrieve Message Detail Records
      • Receiving Messaging Events
    • Log Retrieval
      • Retrieve Call Log
      • Retrieve SMS Log
    • Calling
      • Bridge two calls
      • Make Single Call
      • Make Bulk Call
        • Example API Call
    • SIP Domain
      • Create SIP Domain
      • Create SIP User
      • Deleting SIP User
      • Modify SIP User
    • Websocket Event Subscription
      • Create Subscription
      • Remove Subscription
      • Get Subscribed Events
        • Example API Call
  • Websocket Events
    • Event Websocket
    • Websocket Authentication
      • How to Authenticate to WSS
      • Authentication Response
      • Explanation of JSON response
    • Event Definition
      • Call Initiated
        • Example Event
      • Call Ringing
        • Example Event
      • Call Live
        • Example Event
      • Callflow
        • Example Event
      • Call Hangup
        • Example Event
      • Call Destroyed
        • Example Event
      • Call Bridged
        • Example Event
      • Call Answered
        • Example Event
      • Account events
        • Example Event
      • SMS events
        • Example Event
      • TN events
        • Example Event
      • Record Events
        • Example Event
      • Transcript
        • Example Event
      • General Event Fields
      • Example Event
  • Opentact XML
    • Overview
    • <Call/>
    • <Callback/>
    • <Geo/>
    • <Scheduler/>
    • <Play/>
    • <Say/>
    • <Hangup/>
    • <Pause/>
    • <Record/>
    • </Dial>
    • </Gather>
    • <Answer/>
    • <Hold/>
    • <Tone/>
    • <Error/>
    • <Default/>
    • <Meta/>
    • <Curl/>
  • How to build your Opentact Application
    • Introduction
    • Inbound Call Control
    • Opentact Events
    • Call Flow Control
      • Specify CallFlow for TN
        • Dynamic Call Flow XML
        • Basic Workflow
      • Handle Inbound Call
    • Send and Receive SMS
      • Life Cycle of SMS Delivery
      • Real-time SMS over Websocket
      • Send SMS via Restful API
    • Send and Receive SIP Calls
      • Create SIP User
      • Make Calls Between SIP User
      • Receive Calls as SIP User
  • Regulatory Compliance
    • 10DLC FAQs
    • Stir Shaken
  • SIP Trunking
    • Use Opentact for SIP Trunking
  • Webhook Event
    • Introduction
    • Test Webhook with Opentact
    • Event Definition
Powered by GitBook
On this page
  • Requirements For Enabling SMS Notifications
  • SMS Delivery Status Updates

Was this helpful?

  1. Opentact API Documentation
  2. Messaging

Receiving Messaging Events

PreviousRetrieve Message Detail RecordsNextLog Retrieval

Last updated 1 year ago

Was this helpful?

You can choose to be notified about events on your SMS-capable long code or toll-free phone number by configuring webhooks.

Opentact supports notifications for the following event types:

  • Delivery status updates

  • New inbound messages for both SMS and MMS

Requirements For Enabling SMS Notifications

For this mechanism to work, you’ll need a publicly accessible HTTP server that can receive our webhook requests at one or more specified URLs. We highly recommend using HTTPS (instead of HTTP). This tutorial walks through setting up a basic application for receiving webhooks.

Hierarchy of URLs

If webhooks are provided in the request body, we will use those, otherwise if the profile has webhooks, we’ll use those. If neither has webhooks, we won’t attempt a webhook delivery.

SMS Delivery Status Updates

The Opentact Messaging Services will attempt to notify you about each status update based on the hierarchy of URLs above.

Delivery Status Payload

Here is an example of a webhook event where a delivery receipt is returned to the sender after sending a message through a Opentact long code to a T-Mobile long code:

{
  "data": {
    "event_type": "message.finalized",
    "id": "4ee8c3a6-4995-4309-a3c6-38e3db9ea4be",
    "occurred_at": "2019-12-09T21:32:14.148+00:00",
    "payload": {
      "completed_at": "2019-12-09T21:32:14.148+00:00",
      "cost": null,
      "direction": "outbound",
      "encoding": "GSM-7",
      "errors": [],
      "from": {
        "carrier": "T-Mobile USA",
        "line_type": "Wireless",
        "phone_number": "+13125000000",
        "status": "webhook_delivered"
      },
      "id": "ac012cbf-5e09-46af-a69a-7c0e2d90993c",
      "media": [],
      "messaging_profile_id": "83d2343b-553f-4c5f-b8c8-fd27004f94bf",
      "organization_id": "9d76d591-1b7d-405d-8c64-1320ee070245",
      "parts": 1,
      "received_at": "2019-12-09T21:32:13.552+00:00",
      "record_type": "message",
      "sent_at": "2019-12-09T21:32:13.596+00:00",
      "tags": [],
      "text": "Hello there!",
      "to": [
        {
          "carrier": "T-MOBILE USA, INC.",
          "line_type": "Wireless",
          "phone_number": "+13125000000",
          "status": "delivered"
        }
      ],
      "type": "SMS",
      "valid_until": "2019-12-09T22:32:13.552+00:00",
      "webhook_failover_url": "",
      "webhook_url": "http://webhook.site/af3a92e7-e150-442c-9fe6-61658ce26b1a"
    },
    "record_type": "event"
  },
  "meta": {
    "attempt": 1,
    "delivered_to": "http://webhook.site/af3a92e7-e150-442c-9fe6-61658ce26b1a"
  }
}
Telnyx Developers
requirements-for-enabling-sms-notifications
sms-delivery-status-updates