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.
This operation creates a Broadcast campaign and returns a broadcastId. To see the status
of this campaign call GetBroadcast
with the returned broadcastId.
There are 3 types of Broadcast: TEXT, IVR, or VOICE. Select the appropriate config
to match the broadcast type, TextBroadcastConfig, IvrBroadcastConfig, or VoiceBroadcastConfig.
Prefer the Text Service operations (ex: SendText
) and Call Service operations
(ex: SendCall
) over this operation when managing simple text and call campaigns
since those operations are simpler and more concise.
Request Parameters
Parameter | Demo Value | Description | Data Type |
---|---|---|---|
CreateBroadcast | Create Broadcast using attached info | object | |
RequestId | Unique ID of web request to de-dup on | anyURI | |
Broadcast | A TEXT, IVR, or VOICE Broadcast | object | |
id | Unique ID of Broadcast | long | |
Name | Name of Broadcast | string | |
Status | Status of Broadcast (response only)[START_PENDING, RUNNING, STOPPED, FINISHED, ARCHIVED, TEST, SETUP, SCHEDULED, SUSPENDED, VALIDATING_EMAIL, VALIDATING_START, BLOCKED_SUSPICIOUS, APPROVED, DECLINED, PAUSED, CANCELED] | BroadcastStatus | |
LastModified | Last Modified 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' | dateTime | |
Type | Type of Broadcast[VOICE, IVR, TEXT, CCC] | BroadcastType | |
Label | Labels on Broadcast | string | |
ResumeNextDay | If 'true' resumes the unfinished campaign to the next day | boolean | |
VoiceBroadcastConfig * | Configuration needed for a Voice Broadcast | object | |
id | Unique ID of BroadcastConfig | long | |
Created | DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' | dateTime | |
FromNumber | E.164 11 digit number or short code | PhoneNumber | |
LocalTimeZoneRestriction | Restrict the times your compaign can run | object | |
BeginTime | Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX | time | |
EndTime | Latest time a client can be contacted in the timezone associated with the number's NPA/NXX | time | |
RetryConfig | Retry logic for broadcast | object | |
MaxAttempts | Max attempts to retry broadcast (default: 1) | int | |
MinutesBetweenAttempts | Minutes between broadcast attempts (default: 60) | int | |
RetryResults | Conditions to retry on[LA, AM, BUSY, DNC, XFER, NO_ANS, XFER_LEG, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED, SD, POSTPONED, ABANDONED, SKIPPED, INVALID_NUMBER] | List[Result] | |
RetryPhoneTypes | Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE] | List[RetryPhoneType] | |
AnsweringMachineConfig | Action to take if machine answers[AM_ONLY, AM_AND_LIVE, LIVE_WITH_AMD, LIVE_IMMEDIATE] | AnsweringMachineConfig | |
LiveSoundText * | string | ||
LiveSoundId * | ID of Sound to play if call answered by live person | long | |
LiveSoundTextVoice | Voice | ||
MachineSoundText * | string | ||
MachineSoundId * | ID of Sound to play if call answered by machine | long | |
MachineSoundTextVoice | Voice | ||
TransferSoundText * | string | ||
TransferSoundId * | ID of Sound to play if call transfered | long | |
TransferSoundTextVoice | Voice | ||
TransferDigit | Phone digit call transfers on if pressed | PhoneDigit | |
TransferNumber | Number to transfer call to | PhoneNumber | |
DncSoundText * | string | ||
DncSoundId * | Do Not Call unique ID of sound | long | |
DncSoundTextVoice | Voice | ||
DncDigit | Do Not Call Digit | PhoneDigit | |
MaxActiveTransfers | Max Transfers | int | |
TextBroadcastConfig * | Configuration needed for a Text Broadcast | object | |
id | Unique ID of BroadcastConfig | long | |
Created | DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' | dateTime | |
FromNumber | E.164 11 digit number or short code | PhoneNumber | |
LocalTimeZoneRestriction | Restrict the times your compaign can run | object | |
BeginTime | Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX | time | |
EndTime | Latest time a client can be contacted in the timezone associated with the number's NPA/NXX | time | |
RetryConfig | Retry logic for broadcast | object | |
MaxAttempts | Max attempts to retry broadcast (default: 1) | int | |
MinutesBetweenAttempts | Minutes between broadcast attempts (default: 60) | int | |
RetryResults | Conditions to retry on[LA, AM, BUSY, DNC, XFER, NO_ANS, XFER_LEG, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED, SD, POSTPONED, ABANDONED, SKIPPED, INVALID_NUMBER] | List[Result] | |
RetryPhoneTypes | Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE] | List[RetryPhoneType] | |
Message | 160 char or less message to be sent in text broadcast. Use rented 'keyword' in message if need response | string | |
BigMessageStrategy | Set strategy if message is over 160 chars (default: SEND_MULTIPLE)[SEND_MULTIPLE, DO_NOT_SEND, TRIM, MMS, RCS] | BigMessageStrategy | |
IvrBroadcastConfig * | Configuration needed for an IVR Broadcast | object | |
id | Unique ID of BroadcastConfig | long | |
Created | DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' | dateTime | |
FromNumber | E.164 11 digit number or short code | PhoneNumber | |
LocalTimeZoneRestriction | Restrict the times your compaign can run | object | |
BeginTime | Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX | time | |
EndTime | Latest time a client can be contacted in the timezone associated with the number's NPA/NXX | time | |
RetryConfig | Retry logic for broadcast | object | |
MaxAttempts | Max attempts to retry broadcast (default: 1) | int | |
MinutesBetweenAttempts | Minutes between broadcast attempts (default: 60) | int | |
RetryResults | Conditions to retry on[LA, AM, BUSY, DNC, XFER, NO_ANS, XFER_LEG, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED, SD, POSTPONED, ABANDONED, SKIPPED, INVALID_NUMBER] | List[Result] | |
RetryPhoneTypes | Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE] | List[RetryPhoneType] | |
DialplanXml | IVR xml document describing dialplan | string | |
CccBroadcastConfig * | Configuration needed for a CCC Broadcast | object | |
id | Unique ID of BroadcastConfig | long | |
Created | DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' | dateTime | |
FromNumber | E.164 11 digit number or short code | PhoneNumber | |
LocalTimeZoneRestriction | Restrict the times your compaign can run | object | |
BeginTime | Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX | time | |
EndTime | Latest time a client can be contacted in the timezone associated with the number's NPA/NXX | time | |
RetryConfig | Retry logic for broadcast | object | |
MaxAttempts | Max attempts to retry broadcast (default: 1) | int | |
MinutesBetweenAttempts | Minutes between broadcast attempts (default: 60) | int | |
RetryResults | Conditions to retry on[LA, AM, BUSY, DNC, XFER, NO_ANS, XFER_LEG, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED, SD, POSTPONED, ABANDONED, SKIPPED, INVALID_NUMBER] | List[Result] | |
RetryPhoneTypes | Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE] | List[RetryPhoneType] | |
AgentGroupId | Unique ID of AgentGroup | long | |
SmartDropSoundId | Unique ID of SmartDropSound | long | |
ScriptId | Unique ID of Script | long | |
TransferNumberIdList | ID List of TransferNumbers | List[long] | |
AllowAnyTransfer | Allow any transfer | boolean | |
TransferCallerId | Transfer caller Id | string | |
Recorded | Recorded | 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'));
/**
* CreateBroadcast.
*/
$request = new stdclass();
$request->Broadcast = new stdclass(); // required
$request->Broadcast->Name = 'Test Broadcast Service'; // required
$request->Broadcast->Type = 'TEXT'; // required
$request->Broadcast->TextBroadcastConfig = new stdclass(); // required choice
$request->Broadcast->TextBroadcastConfig->Message = 'Hello, just testing broadcast'; // required
$broadcastId = $client->CreateBroadcast($request);
echo "broadcastId: " . $broadcastId;
// Sample response:
// broadcastId: 333
/**
* A little more complicated example with text to speech.
*/
$request = new stdclass();
$request->Broadcast = new stdclass();
$request->Broadcast->Name = 'Test Broadcast Service (text to speech)';
$request->Broadcast->Type = 'VOICE';
$request->Broadcast->VoiceBroadcastConfig = new stdclass();
$request->Broadcast->VoiceBroadcastConfig->FromNumber = '9206596476';
$request->Broadcast->VoiceBroadcastConfig->RetryConfig = new stdclass();
$request->Broadcast->VoiceBroadcastConfig->RetryConfig->MaxAttempts = 3;
$request->Broadcast->VoiceBroadcastConfig->RetryConfig->MinutesBetweenAttempts = 5;
$request->Broadcast->VoiceBroadcastConfig->RetryConfig->RetryResults = 'BUSY NO_ANS';
$request->Broadcast->VoiceBroadcastConfig->AnsweringMachineConfig = 'LIVE_IMMEDIATE';
$request->Broadcast->VoiceBroadcastConfig->LiveSoundText = $LiveSoundText; // Defaults to FEMALE1 Voice
$request->Broadcast->VoiceBroadcastConfig->MachineSoundText = $MachineSoundText;
$request->Broadcast->VoiceBroadcastConfig->MachineSoundTextVoice = 'FEMALE2';
$request->Broadcast->VoiceBroadcastConfig->TransferSoundText = $TransferSoundText;
$request->Broadcast->VoiceBroadcastConfig->TransferSoundTextVoice = 'FEMALE2';
$request->Broadcast->VoiceBroadcastConfig->TransferDigit = '8';
$request->Broadcast->VoiceBroadcastConfig->TransferNumber = '2135551212';
$broadcastId = $client->CreateBroadcast($request);
echo "broadcastId: " . $broadcastId;
// Upon success, the $broadcastId variable should contain the broadcast ID,
// which you can use to grab information about the broadcast ...
$broadcastInfo = $client->getBroadcast(array('Id'=>$broadcastId));
print_r($broadcastInfo);
?>