Text messages sent to your phone numbers will be sent as JSON data to your web server. You have two methods to set that up - via the UI, or via the API with a subscription. We'll cover the User Interface method here:
Step 1: Login to SMSified.
Step 2: Go to Phone Numbers.
Step 3: Click the pencil icon to edit your existing phone number (or click the Add a New Number button on the right side of the screen to add a new one).
Step 4: Give your application a name and include a URL that tells SMSified where to send the content of the text message.
Step 5: Text your phone number and SMSified will redirect the content to the URL you defined.
Here's an example of the message content sent to your URL:
{
"inboundSMSMessageNotification": {
"inboundSMSMessage": {
"dateTime": "2011-05-11T18:05:54.546Z",
"destinationAddress": "16575550100",
"message": "Inbound test",
"messageId": "ef795d3dac56a62fef3ff1852b0c123a",
"senderAddress": "14075550100"
}
}
}
Step 6: Use the data however you want - since that's all you need to do in SMSified, what you do with the text message is completely up to you now. Save it in a database, tally results of a survey, record someone's vote - the possibilities are wide open.
https://api.smsified.com/v1/smsmessaging/inbound/subscriptions
With an inbound subscription, every time a text message is sent to the phone number associated with the subscription, the message will be sent to your URL. This is the same thing you can achieve through the User Interface (outlined in the Receiving a Text Message Quickstart), but using the API you can attach multiple URLs though multiple subscriptions.
POST
destinationAddress=16575550100¬ifyURL=http://www.example.com/inbound{
"resourceReference":{
"resourceURL":
"https://api.smsified.com/v1/smsmessaging/inbound/subscriptions/a597..."
}
}Here's an example of the message content sent to your URL:
{
"inboundSMSMessageNotification": {
"inboundSMSMessage": {
"dateTime": "2011-05-11T18:05:54.546Z",
"destinationAddress": "16575550100",
"message": "Inbound test",
"messageId": "ef795d3dac56a62fef3ff1852b0c123a",
"senderAddress": "14075550100"
}
}
}
There are a few other optional parameters as well; check out the API Reference for more details.
It's likely if you're setting subscriptions, at some point you'll want to check out which ones are tied to a particular number. A simple GET on the proper URL gets you what you need.
https://api.smsified.com/v1/smsmessaging/inbound/subscriptions?destinationAddress={destinationAddress}
GET
{
"inboundSubscriptionList":{
"numberOfSubscriptions":"3",
"inboundSubscription":[
{
"subscriptionId":"2069badd85e625b9099f95f3579891234",
"destinationAddress":"16575550100",
"notifyURL":"http://www.example.com/inbound",
"notificationFormat":"JSON",
"resourceURL":"https://api.smsified.com/v1/smsmessaging/inbound/subscriptions/2069..."
},
{
"subscriptionId":"a597fd9edd536f70d4d4987973a41235",
"destinationAddress":"16575550100",
"notifyURL":"http://www.example.com/inbound2",
"notificationFormat":"JSON",
"resourceURL":"https://api.smsified.com/v1/smsmessaging/inbound/subscriptions/a597..."
}
],
"resourceURL":"https://api.smsified.com/v1/smsmessaging/inbound/subscriptions"
}
}If you omit the destinationAddress, you'll see a list of all your inbound subscriptions.
If you can create a subscription, you'll obviously need the ability to remove one as well. A DELETE with the right URL handles this for you.
https://api.smsified.com/v1/smsmessaging/inbound/subscriptions/{subscriptionId}
DELETE