CallFire has a new API!
We are proud to announce the launch of our API 2.0! Learn more about our streamlined, transactional and broadcast APIs. This version of the API documentation will remain available for reference only. There will be no new development, only bug fixes. We highly recommend upgrading to our newer and more sophisticated documentation.
Contact Batch is a list of contacts to associate with a broadcast. Use this operation to attach
a list of contacts to an existing Campaign. A list of ToNumbers or an existing Contact List ID is
required to create and attach the Contact List. Returned is the unique contactListId that can
be used in ControlContactBatch
to enable or disable this batch.
Request Parameters
Parameter | Demo Value | Description | Data Type |
---|---|---|---|
CreateContactBatch | Create ContactBatch using attached info | object | |
RequestId | anyURI | ||
BroadcastId | Id of Broadcast | long | |
Name | string | ||
ToNumber * | List of E.164 11 digit numbers space or comma separated | List[PhoneNumber] | |
ContactListId * | long | ||
ScrubBroadcastDuplicates | boolean | ||
Start | boolean |
* indicates choice value, bolded parameters are required
Response Parameters
Parameter | Description | Data Type |
---|---|---|
CreatedId | Unique ID of resource | long |
<?php
/**
* You'll need your login/password pair when you create the SOAP client.
* Don't use the fake login/password provided here; it's just for show and
* won't work.
*/
$wsdl = "http://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl";
$client = new SoapClient($wsdl, array(
'soap_version' => SOAP_1_2,
'login' => 'YourLoginId',
'password' => 'YourPassword'));
/**
* CreateContactBatch. Add list of numbers or ContactList to Broadcast.
*/
//
// Add a list of 2 numbers to campaign.
//
$request = new stdclass();
$request->BroadcastId = 3; // required
$request->Name = 'My Test API ContactBatch Numbers List';
$request->ToNumber = array('13105551216', '13105551217'); // required choice
$request->ContactListId = 2; // required choice
$request->ScrubBroadcastDuplicates = true;
$contactBatchId = $client->CreateContactBatch($request);
echo "contactBatchId: " . $contactBatchId;
// Sample response:
// contactBatchId: 332
//
// Add existing contact list by id to campaign.
// Currently unavailable, coming soon.
//
$request = new stdclass();
$request->BroadcastId = 3; // required
$request->Name = 'My Test API ContactBatch Contact List';
$request->ContactListId = 79; // required choice
$request->ScrubBroadcastDuplicates = true;
$contactBatchId = $client->CreateContactBatch($request);
echo "contactBatchId: " . $contactBatchId;
// Sample response: Currently unavailble, coming soon.
?>