SMS Message Sent Postback

From CDYNE Wiki
Jump to navigation Jump to search

SMS Sent POST

If you assign a PostbackURL to your account DIDs, the PostBack will allow you to capture the data in the fields listed below. Please note that data is posted to the headers.

PostBackURL data is posted behind the scenes, and is not visible on your webpage. Code samples are provided below on how to grab this data to store in a database. CDYNE recommends that the data returned to be stored within your systems for reporting and reference information.

Fields

SMSSent

SMSSent=1 is posted when a message is sent from SMS Notify! to be delivered. In some cases SMSSent will have a value of “0” when attempting to send an SMS to a landline. When this occurs, SMS Notify! will mark the message as cancelled. Please note that SMS Notify! does not flag all messages sent to landlines in this way, and some upstream paths will allow text messages to go to a landline.

MessageID

A unique identifier that matches the initial MessageID from your Outgoing SMS.

ReferenceID

This is populated if you set a reference id in your outgoing request.

FromPhoneNumber

This is the number that sent your outgoing message.

ToPhoneNumber

This is the number you sent the SMS to.

SentTime

UTC Date when the message got sent out. Usually within a few seconds of the current time.

Example Packet

POST /cdynepostback.aspx HTTP/1.1
User-Agent: CDYNE SMSv2
Content-Type: application/x-www-form-urlencoded
Host: cdyne.com
Content-Length: 242
Expect: 100-continue
Connection: Keep-Alive

SMSSent=1&MessageID=9a35e913-ded0-7574-4642-5f60c550c706&ReferenceID=12345&FromPhoneNumber=17575449510&ToPhoneNumber=17575449511&SentTime=5%2f8%2f2010+2%3a42%3a36+AM