Hi everyone,
I'm following this Qualtrics guide in order to use API in order to send a survey as an SMS message. However, I realized that my organization does not have access to the "Mailing List" feature, only "Contacts." I also do not have access to the directory ID/pool ID. The API works in that I do see that surveys are sent in the "Distribution History" ("Distributions" tab of website), but no actual SMS messages are being sent to my phone.
Is there a way for me to use the API to send SMS messages without this "Mailing List"? Such as using the Recipient IDs? Or is it possible to manually enter the Contact's phone numbers I wish to send messages to in the API?
Of note, I am able to send SMS messages directly using the "Distributions" tab on the Qualtrics website, and that works fine. So I am wondering what I am missing in order to use the API to do the same thing.
I would really appreciate any advice. Thank you so much for your help!
Python code I am using:
def sms(apiToken, dataCenter, method):
headers = {
"x-api-token": apiToken,
"Content-Type": "application/json"
}
url = "https://{0}.qualtrics.com/API/v3/distributions/sms".format(dataCenter)
recipients = {}
recipients['mailingListId'] = mailingListId
message = {}
message['messageId']= messageId
message['libraryId']=libraryId
data = {}
data['sendDate'] = strftime('%Y-%m-%dT%H:%M:%SZ', gmtime())
data['method'] = method
data['surveyId'] = surveyId
data['name'] = "Customer Satisfaction Survey"
data['recipients'] = recipients
data['message'] = message
print(data)
response = requests.post(url, json=data, headers=headers)
print(response.text)
Using API for SMS Distribution without Mailing List Feature
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
