SMS Service helps you create and manage your text message campaigns.
- Jump to Method
- sendSMSCampaign
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"?>
string
213221XXXX,Hi bob
213221XXXX,Hi Julie!
Hi campaign
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";
//LOG.Error(msg);
throw new SmsServiceException(msg, e);
}
finally
{
//LOG.Info("Exited Send SMS Function");
}
}