Skip to main content

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 nameRequiredDescription
apikeyYThe API key that is registered with your account
campaignNameYA name for your campaign
isInboundNSet to "true" if you are setting up an inbound campaign
inboundPhoneNumberY (if isInbound)For all inbound campaigns a number you own is required so we can point it to your XML
isOutboundNSet to "true" if you are setting up an outbound campaign
outboundCalleridY (if isOutbound)Provide a valid caller id for your outbound calls
Required is one of the following:
xmlUrlA URL to your CallFire XML that you host
callfireXmlThe full CallFire XML String
callFireIvrFilenameThe 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 nameRequiredDescription
apikeyYThe API key that is registered with your account
Required is one of the following:
xmlUrlA URL to your CallFire XML that you host
callfireXmlThe full CallFire XML String
callFireIvrFilenameThe IVR filename of your CallFire IVR

Example Response

<?xml version="1.0" encoding="UTF-8" standalone="yes">

    898085
    Campaign Created