TextMessages APIs
-
Send SMS to Array of Contacts
Description: Launches an alertUsage:
POST api/Messages/Text/Send/{TaskName}/{SMSCode}
Parameter Type Source Description TaskName String FromUri The name of the alert. SMSCode Int32 FromUri The unique numerical code identifying the SMS message to send. Contacts Contact[] FromBody Array of Contact to send the SMS message to. Returns:
Returns a positive 32-bit integer value that uniquely identifies the alert job.
Examples:
<!-- Intent: send the sms message with smscode of 100000 to an array of contacts posted in the body of the request and name the alert "My Test Alert" POST to the following url http://api.v4.swiftreach.com/api/Messages/Text/Send/MY%20Test%20Alert/100000 --> <ArrayOfContact> <Contact> <EntityName>Sample One</EntityName> <EntityGuid>a44667cf-e4e5-4f28-b4e2-948ba2065c09</EntityGuid> <SMSNetwork>0</SMSNetwork> <PagerNetwork>0</PagerNetwork> <Phones> <PhoneProfile> <Phone>5551234567</Phone> <Extension/> <OptInSMS>true</OptInSMS> <PhoneType>phonetype_voice</PhoneType> <PhoneLabel>Mobile</PhoneLabel> </PhoneProfile> </Phones> </Contact> <Contact> <EntityName>Sample Two</EntityName> <EntityGuid>a44667cf-e4e5-4f28-b4e2-948ba2065c09</EntityGuid> <SMSNetwork>0</SMSNetwork> <PagerNetwork>0</PagerNetwork> <Phones> <PhoneProfile> <Phone>5551234568</Phone> <Extension/> <OptInSMS>true</OptInSMS> <PhoneType>phonetype_voice</PhoneType> <PhoneLabel>Mobile</PhoneLabel> </PhoneProfile> </Phones> </Contact> </ArrayOfContact> <!-- example return value --> <int>123456</int>