SMS Service helps you create and manage your text message campaigns.
WSDL
https://www.callfire.com/service/SMSService?wsdl
Methods
sendSMSCampaign
This function sends a group of text messages out immediately.
Parameters
Parameter name | minOccurs | maxOccurs | nillable | type | Description |
---|
key | 1 | 1 | true | xsd:string | The API key that is registered with your account |
numbers | 1 | 1 | true | xsd:ArrayOfString | 10 digit phone numbers to call |
campaignName | 1 | 1 | true | xsd:string | Name of the campaign |
Return value
Parameter name | minOccurs | maxOccurs | nillable | type | Description |
---|
out | 1 | 1 | false | xsd:long | campaignId |
Example Request
| <?xml version="1.0" encoding="utf-8"?> |
| <soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| <soap-env:body> |
| <tnsa:sendsmscampaign xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tnsa="http://api.campaign.dialer.skyyconsulting.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| <tnsa:key>string</tnsa:key> |
| <tnsa:numbers> |
| <tnsa:string>213221XXXX,Hi bob</tnsa:string> |
| <tnsa:string>213221XXXX,Hi Julie!</tnsa:string> |
| </tnsa:numbers> |
| <tnsa:campaignname>Hi campaign</tnsa:campaignname> |
| </tnsa:sendsmscampaign> |
| </soap-env:body> |
| </soap-env:envelope> |
Sample PHP Code
| public function sendSMSCampaign($api_key,$numbers,$name,$debug) |
| { |
| $createOtboundcampaignWsdl = 'https://www.callfire.com/service/SMSService?wsdl'; |
| |
| $campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true)); |
| |
| $params = array( |
| 'key' => $api_key, |
| 'numbers' => $numbers, |
| 'campaignName' => $name |
| ); |
| try |
| { |
| $response = $campaignOutboundClient->sendSMSCampaign($params); |
| $campaignId = $response->out; |
| if($debug) |
| { |
| echo "CampaignID : ".$campaignId.""; |
| } |
| } |
| catch(SoapFault $error) |
| { |
| if($debug) |
| { |
| echo $error.""; |
| } |
| } |
Sample C# Code
| public long sendSMSCampaign(string key, string[] numbers, string campaignName) |
| { |
| try |
| { |
| long campaignId = this.SmsService.sendSMSCampaign(key, numbers, campaignName); |
| return campaignId; |
| } |
| catch (Exception e) |
| { |
| string msg = "Error sending the SMS"; |
| |
| throw new SmsServiceException(msg, e); |
| } |
| finally |
| { |
| |
| } |
| } |
| |