This rest api will enable you to create and modify CallFire XML Campaigns.
Methods
Creating a CallFire XML Campaign
Creates an inbound or outbound CallFire XML Campaign
URL
https://www.callfire.com/cloud/1/callfirexml/campaign
HTTP Method
POST
Content Type
application/x-www-form-urlencoded
Parameters
Parameter name | Required | Description |
---|---|---|
apikey | Y | The API key that is registered with your account |
campaignName | Y | A name for your campaign |
isInbound | N | Set to "true" if you are setting up an inbound campaign |
inboundPhoneNumber | Y (if isInbound) | For all inbound campaigns a number you own is required so we can point it to your XML |
isOutbound | N | Set to "true" if you are setting up an outbound campaign |
outboundCallerid | Y (if isOutbound) | Provide a valid caller id for your outbound calls |
Required is one of the following: | ||
xmlUrl | A URL to your CallFire XML that you host | |
callfireXml | The full CallFire XML String | |
callFireIvrFilename | The IVR filename of your CallFire IVR |
Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes">
898085
Campaign Created
Sample PHP Code
<?
$CF_URL = "https://www.callfire.com/cloud/1/callfirexml/campaign";
$CF_XML = 'Mr. Watson, Come Here, I Want You! ';
// Setup your Parameters for an outbound campaign
$params = array (
"apikey" => "XxxxxxxxxxxxxxxxxxxxxxxX",
"campaignName" => "Campaign Name",
"isOutbound" => "true",
"outboundCallerid" => "2132212289",
"callfireXml" => $CF_XML
);
print $CF_URL;
$http = curl_init($CF_URL);
curl_setopt($http, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($http, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($http, CURLOPT_RETURNTRANSFER, true);
curl_setopt($http, CURLOPT_URL, $CF_URL);
curl_setopt($http, CURLOPT_POST, true);
curl_setopt($http, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($http, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
$resp = curl_exec($http);
print "
Response: ";
var_dump($resp);
print "
Errors: ";
var_dump( curl_error($http) );
print "
";
?>
Modify a CallFire XML Campaign
Modify the XML for an existing campaign.
URL
https://www.callfire.com/cloud/1/callfirexml/campaign/{campaignid}
HTTP Method
PUT
Content Type
application/x-www-form-urlencoded
Parameters
Parameter name | Required | Description |
---|---|---|
apikey | Y | The API key that is registered with your account |
Required is one of the following: | ||
xmlUrl | A URL to your CallFire XML that you host | |
callfireXml | The full CallFire XML String | |
callFireIvrFilename | The IVR filename of your CallFire IVR |
Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes">
898085
Campaign Created