0

I am trying to send SMS from postman using REST API, and I am getting successful reponse but I am not getting actual SMS. Following are the request and responses:

Request:

{
    "Subscribers": [
        {
        "MobileNumber": "15107098219",
        "SubscriberKey": "0033C0000077kPDQAY"
        },
        {
        "MobileNumber": "15107098218",
        "SubscriberKey": "0013C00000CL7jnQAD"
        }
    ],
    "Override": "false",
    "SendTime": "2012-10-05 20:01"
}

Response:

{
    "tokenId": "NVpNYzFMVG9ORS1yR3BlVHhqbEFaZzo3Njox"
}

However, If I create contacts for these subscriberIDs in MobileConnect, then I am able to get the SMS.

Is this addition of contacts a standard prerequisite? I could not find it anywhere in documentation. If no, how can we bypass this? If yes, I want to populate contacts using a data extension that contains records synchronised from SFDC. How can this be achieved?

2

You don't need to create the New contacts manually, if you set the "Subscribe" parameter to "True".

Sends without "Subscribe" get delivered if the contact does exist and are not delivered when this parameter is skipped. If you add "Subscribe": "true", then you also need to define a keyword to which this customer should be subscribed.

In the end your code should look like this:

{
"Subscribers": [
    {
    "MobileNumber": "15107098219",
    "SubscriberKey": "0033C0000077kPDQAY"
    },
    {
    "MobileNumber": "15107098218",
    "SubscriberKey": "0013C00000CL7jnQAD"
    }
],
"Subscribe": "true",
"Keyword": "YOUR KEYWORD"
"Override": "false",
"SendTime": "2012-10-05 20:01"
}

The keyword needs to exist on the sender phone number you have assigned to the SMS template you are targetting.

  • Thanks, I will set the Subscribe attribute to true.For Keyword Are you saying that I should select value in the "next keyword" dropdown? – Sarang Feb 8 at 10:18
  • No, the "next keyword" is for two way SMS communication. When you create a new Outbound message you define a "Short/ Long Code" from a dropdown menu in the very first screen called "Select Template". Those codes have keywords that serve as sort of subsciptions (you set them up in the Administration tab when you click on a specific number). In the API call you are making, you need to define a keyword that belongs to the long code that you define in the dropdown. – Rafał Wolsztyniak Feb 8 at 10:38
  • Ok, so I went to Adminstration, clicked on that short/long code, created a new keyword and added that to "Next Keyword" in my outbound -API SMS template. I that correct? Apart from "Next Keyword" I don't find anywhere else to add the new keyword for Outbound - API type of template. – Sarang Feb 8 at 11:01
  • You don't need to add the keyword to the next keyword field - you just need to specify that keyword in your API Call. If you will have "Subscribe" set to True and keyword specified as the same as in your long code, your message should be delivered. – Rafał Wolsztyniak Feb 8 at 11:08
  • Oh, now I get your point. I did as per your instructions, and I am getting new record logged in Contacts in mobileConnect. Though for actual SMS delivered or not I need to confirm from my colleague in his timezone.Thanks @Rufenstein that was great help ! – Sarang Feb 8 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.