SMS Service

Contents

SMS Service

Description

SMS Service help you to create and manage your text message campaigns.

WSDL

https://www.callfire.com/service/SMSService?wsdl

The WSDL is called SMS Service. It encompasses methods used for SMS campaign creation

Methods

SEND

sendSMSCampaign

This function sends a group of text messages out immediately.

Parameters

  • key - This is the key that you got when you registered with CallFire.com
  • numbers - These are the numbers that you wish to send the text to and the text message you wish to send
  • campaignName - The name of the campaign

Input: sendSMSCampaign

Name maxOccurs minOccurs nillable type description
key 1 1 TRUE xsd:string your api key from the account page
numbers 1 1 TRUE tns:ArrayOfString
campaignName 1 1 TRUE xsd:string

Output: sendSMSCampaign

Name maxOccurs minOccurs nillable type description
out 1 1 xsd:long campaignid
Example Request
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <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

Please download the sample client from the Downloads section

        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";
                //LOG.Error(msg);
                throw new SmsServiceException(msg, e);
            }
            finally
            {
                //LOG.Info("Exited Send SMS Function");
            }
        }