QUERY BROADCASTS
Lists existing Broadcasts
Use this operation to see the status of Broadcasts in the account. You can filter by type of campaign that is currently running. It returns a list of Broadcast information such as campaign name, type, status, total results and more. See the Response Parameters table below for a complete list of data that the QueryBroadcast operation returns.
REQUEST PARAMETERS
Parameter | Data Type | Demo Value | Description |
---|---|---|---|
QueryBroadcasts | object | Broadcasts request by query | |
MaxResults | long | 1000 | Max number of results to return limited to 1000 (default: 1000) |
FirstResult | long | 0 | Start of next result set (default: 0) |
Type | TEXT | List[BroadcastType] | [VOICE, IVR, TEXT] |
Running | boolean | false | Filter on running Broadcasts |
LabelName | string | MyLabel | Label that result must have to be included |
Response Parameters
Parameter | Data Type | Description |
---|---|---|
BroadcastQueryResult | List of Broadcasts returned from query | |
TotalResults | long | Results count |
Broadcast | A TEXT, IVR, or VOICE Broadcast | |
Id | long | Unique ID of Broadcast |
Name | string | Name of Broadcast |
Status | BroadcastStatus | Status of Broadcast (response only)[START_PENDING, RUNNING, STOPPED, FINISHED, ARCHIVED] |
LastModified | dateTime | Last Modified 'CCYY-MM-DDThh:mm:ss[Z(+/-)hh:mm]' |
Type | BroadcastType | Type of Broadcast[VOICE, IVR, TEXT] |
VoiceBroadcastConfig | Configuration needed for a Voice Broadcast | |
Id | long | Unique ID of BroadcastConfig |
Created | dateTime | DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z(+/-)hh:mm]' |
FromNumber | PhoneNumber | E.164 11 digit number or short code |
LocalTimeZoneRestriction | Restrict the times your compaign can run | |
BeginTime | time | Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX |
EndTime | time | Latest time a client can be contacted in the timezone associated with the number's NPA/NXX |
RetryConfig | Retry logic for broadcast | |
MaxAttempts | int | Max attempts to retry broadcast (default: 1) |
MinutesBetweenAttempts | int | Minutes between broadcast attempts (default: 60) |
RetryResults | List[Result] | Conditions to retry on[LA, AM, BUSY, DNC, XFER, XFER_LEG, NO_ANS, UNDIALED, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, SD, POSTPONED] |
RetryPhoneTypes | List[RetryPhoneType] | Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE] |
AnsweringMachineConfig | AnsweringMachineConfig | Action to take if machine answers[AM_ONLY, AM_AND_LIVE, LIVE_WITH_AMD, LIVE_IMMEDIATE] |
LiveSoundText | string | |
LiveSoundId | long | ID of Sound to play if call answered by live person |
LiveSoundTextVoice | Voice | |
MachineSoundText | string | |
MachineSoundId | long | ID of Sound to play if call answered by machine |
MachineSoundTextVoice | Voice | |
TransferSoundText | string | |
TransferSoundId | long | ID of Sound to play if call transfered |
TransferSoundTextVoice | Voice | |
TransferDigit | PhoneDigit | Phone digit call transfers on if pressed |
TransferNumber | PhoneNumber | Number to transfer call to |
DncSoundText | string | |
DncSoundId | long | Do Not Call unique ID of sound |
DncSoundTextVoice | Voice | |
DncDigit | PhoneDigit | Do Not Call Digit |
MaxActiveTransfers | int | Max Transfers |
TextBroadcastConfig | Configuration needed for a Text Broadcast | |
Id | long | Unique ID of BroadcastConfig |
Created | dateTime | DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z(+/-)hh:mm]' |
FromNumber | PhoneNumber | E.164 11 digit number or short code |
LocalTimeZoneRestriction | Restrict the times your compaign can run | |
BeginTime | time | Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX |
EndTime | time | Latest time a client can be contacted in the timezone associated with the number's NPA/NXX |
RetryConfig | Retry logic for broadcast | |
MaxAttempts | int | Max attempts to retry broadcast (default: 1) |
MinutesBetweenAttempts | int | Minutes between broadcast attempts (default: 60) |
RetryResults | List[Result] | Conditions to retry on[LA, AM, BUSY, DNC, XFER, XFER_LEG, NO_ANS, UNDIALED, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, SD, POSTPONED] |
RetryPhoneTypes | List[RetryPhoneType] | Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE] |
Message | string | 160 char or less message to be sent in text broadcast. Use rented 'keyword' in message if need response |
BigMessageStrategy | BigMessageStrategy | Set strategy if message is over 160 chars (default: SEND_MULTIPLE)[SEND_MULTIPLE, DO_NOT_SEND, TRIM] |
IvrBroadcastConfig | Configuration needed for an IVR Broadcast | |
Id | long | Unique ID of BroadcastConfig |
Created | dateTime | DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z(+/-)hh:mm]' |
FromNumber | PhoneNumber | E.164 11 digit number or short code |
LocalTimeZoneRestriction | Restrict the times your compaign can run | |
BeginTime | time | Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX |
EndTime | time | Latest time a client can be contacted in the timezone associated with the number's NPA/NXX |
RetryConfig | Retry logic for broadcast | |
MaxAttempts | int | Max attempts to retry broadcast (default: 1) |
MinutesBetweenAttempts | int | Minutes between broadcast attempts (default: 60) |
RetryResults | List[Result] | Conditions to retry on[LA, AM, BUSY, DNC, XFER, XFER_LEG, NO_ANS, UNDIALED, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, SD, POSTPONED] |
RetryPhoneTypes | List[RetryPhoneType] | Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE] |
DialplanXml | string | IVR xml document describing dialplan |
CccBroadcastConfig | Configuration needed for a CCC Broadcast | |
Id | long | Unique ID of BroadcastConfig |
Created | dateTime | DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z(+/-)hh:mm]' |
FromNumber | PhoneNumber | E.164 11 digit number or short code |
LocalTimeZoneRestriction | Restrict the times your compaign can run | |
BeginTime | time | Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX |
EndTime | time | Latest time a client can be contacted in the timezone associated with the number's NPA/NXX |
RetryConfig | Retry logic for broadcast | |
MaxAttempts | int | Max attempts to retry broadcast (default: 1) |
MinutesBetweenAttempts | int | Minutes between broadcast attempts (default: 60) |
RetryResults | List[Result] | Conditions to retry on[LA, AM, BUSY, DNC, XFER, XFER_LEG, NO_ANS, UNDIALED, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, SD, POSTPONED] |
RetryPhoneTypes | List[RetryPhoneType] | Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE] |
AgentGroupId | long | Unique ID of AgentGroup |
SmartDropSoundId | long | Unique ID of SmartDropSound |
ScriptId | long | Unique ID of Script |
TransferNumberIdList | List[long] | ID List of TransferNumbers |
PowerDialingRatio | decimal | Power Dialing Ratio (default: 1) |
AllowAnyTransfer | boolean | Allow any transfer |
Recorded | boolean | Recorded |
EXAMPLE
using RestSharp;
namespace [your-namespace]
{
public class [your-class]
{
public string QueryBroadcast()
{
var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");
var request = new RestRequest("broadcast", Method.GET);
request.AddParameter("MaxResults", "100");
request.AddParameter("FirstResult", "21");
request.AddParameter("Type", "VOICE");
request.AddParameter("Running", "true");
var response = client.Execute(request);
string content = response.Content;
return content;
}
}
}
The XML returned is:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<r:ResourceList xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource" totalResults="309">
<Broadcast id="1903346001">
<Name>broadcastSoap</Name>
<Status>STOPPED</Status>
<LastModified>2014-06-05T16:51:32Z</LastModified>
<Type>TEXT</Type>
<TextBroadcastConfig>
<FromNumber>67076</FromNumber>
<LocalTimeZoneRestriction>
<BeginTime>16:51:32Z</BeginTime>
<EndTime>16:51:32Z</EndTime>
</LocalTimeZoneRestriction>
<Message>Test</Message>
</TextBroadcastConfig>
</Broadcast>
</r:ResourceList>