CREATE BROADCAST

Creates a new Broadcast

This operation creates a new 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 configuration 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 Data Type Demo Value Description
CreateBroadcast object Create Broadcast using attached info
RequestId anyURI MyUUIDForDeDupping Unique ID of web request to de-dup on
Broadcast object A TEXT, IVR, or VOICE Broadcast
Id long 1 Unique ID of Broadcast
Name string My Test Broadcast Name of Broadcast
Status BroadcastStatus FINISHED Status of Broadcast (response only)[START_PENDING, RUNNING, STOPPED, FINISHED, ARCHIVED]
LastModified dateTime 2012-10-26T21:32:52Z Last Modified 'CCYY-MM-DDThh:mm:ss[Z(+/-)hh:mm]'
Type BroadcastType TEXT Type of Broadcast[VOICE, IVR, TEXT]
VoiceBroadcastConfig * object Configuration needed for a Voice Broadcast
Id long 1 Unique ID of BroadcastConfig
Created dateTime 2012-10-26T21:32:52Z DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z(+/-)hh:mm]'
From PhoneNumber 13105551212 E.164 11 digit number or short code
LocalTimeZoneRestriction object Restrict the times your compaign can run
BeginTime time 09:00:00 Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX
EndTime time 17:00:00 Latest time a client can be contacted in the timezone associated with the number's NPA/NXX
RetryConfig object Retry logic for broadcast
MaxAttempts int 1 Max attempts to retry broadcast (default: 1)
MinutesBetweenAttempts int 60 Minutes between broadcast attempts (default: 60)
RetryResults List[Result] BUSY NO_ANS 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] FIRST_NUMBER HOME_PHONE Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE]
AnsweringMachineConfig AnsweringMachineConfig LIVE_IMMEDIATE Action to take if machine answers[AM_ONLY, AM_AND_LIVE, LIVE_WITH_AMD, LIVE_IMMEDIATE]
LiveSoundText * string
LiveSoundId * long 123 ID of Sound to play if call answered by live person
LiveSoundTextVoice Voice
MachineSoundText * string
MachineSoundId * long 124 ID of Sound to play if call answered by machine
MachineSoundTextVoice Voice
TransferSoundText * string
TransferSoundId * long 125 ID of Sound to play if call transfered
TransferSoundTextVoice Voice
TransferDigit PhoneDigit 1 Phone digit call transfers on if pressed
TransferNumber PhoneNumber 18185551212 Number to transfer call to
DncSoundText * string
DncSoundId * long 12345 Do Not Call unique ID of sound
DncSoundTextVoice Voice
DncDigit PhoneDigit 9 Do Not Call Digit
MaxActiveTransfers int 1 Max Transfers
TextBroadcastConfig * object Configuration needed for a Text Broadcast
Id long 1 Unique ID of BroadcastConfig
Created dateTime 2012-10-26T21:32:52Z DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z(+/-)hh:mm]'
From PhoneNumber 13105551212 E.164 11 digit number or short code
LocalTimeZoneRestriction object Restrict the times your compaign can run
BeginTime time 09:00:00 Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX
EndTime time 17:00:00 Latest time a client can be contacted in the timezone associated with the number's NPA/NXX
RetryConfig object Retry logic for broadcast
MaxAttempts int 1 Max attempts to retry broadcast (default: 1)
MinutesBetweenAttempts int 60 Minutes between broadcast attempts (default: 60)
RetryResults List[Result] BUSY NO_ANS 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] FIRST_NUMBER HOME_PHONE Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE]
Message string use your phone to text YOUR_KEYWORD to 67076, and we'll send you special coupons that you can use in our store. 160 char or less message to be sent in text broadcast. Use rented 'keyword' in message if need response
BigMessageStrategy BigMessageStrategy SEND_MULTIPLE Set strategy if message is over 160 chars (default: SEND_MULTIPLE)[SEND_MULTIPLE, DO_NOT_SEND, TRIM]
IvrBroadcastConfig * object Configuration needed for an IVR Broadcast
Id long 1 Unique ID of BroadcastConfig
Created dateTime 2012-10-26T21:32:52Z DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z(+/-)hh:mm]'
From PhoneNumber 13105551212 E.164 11 digit number or short code
LocalTimeZoneRestriction object Restrict the times your compaign can run
BeginTime time 09:00:00 Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX
EndTime time 17:00:00 Latest time a client can be contacted in the timezone associated with the number's NPA/NXX
RetryConfig object Retry logic for broadcast
MaxAttempts int 1 Max attempts to retry broadcast (default: 1)
MinutesBetweenAttempts int 60 Minutes between broadcast attempts (default: 60)
RetryResults List[Result] BUSY NO_ANS 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] FIRST_NUMBER HOME_PHONE Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE]
DialplanXml string IVR xml document describing dialplan
CccBroadcastConfig * object Configuration needed for a CCC Broadcast
Id long 1 Unique ID of BroadcastConfig
Created dateTime 2012-10-26T21:32:52Z DateTime Broadcast was created 'CCYY-MM-DDThh:mm:ss[Z(+/-)hh:mm]'
From PhoneNumber 13105551212 E.164 11 digit number or short code
LocalTimeZoneRestriction object Restrict the times your compaign can run
BeginTime time 09:00:00 Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX
EndTime time 17:00:00 Latest time a client can be contacted in the timezone associated with the number's NPA/NXX
RetryConfig object Retry logic for broadcast
MaxAttempts int 1 Max attempts to retry broadcast (default: 1)
MinutesBetweenAttempts int 60 Minutes between broadcast attempts (default: 60)
RetryResults List[Result] BUSY NO_ANS 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] FIRST_NUMBER HOME_PHONE Phone types to call in retry[FIRST_NUMBER, HOME_PHONE, WORK_PHONE, MOBILE_PHONE]
AgentGroupId long 222 Unique ID of AgentGroup
SmartDropSoundId long 222 Unique ID of SmartDropSound
ScriptId long true Unique ID of Script
TransferNumberIdList List[long] 2 5 8 ID List of TransferNumbers
PowerDialingRatio decimal 1.0 Power Dialing Ratio (default: 1)
AllowAnyTransfer boolean true Allow any transfer

Response Parameters

Parameter Data Type Description
CreatedId long Unique ID of resource

Example

using RestSharp;

namespace [your-namespace]
{
    public class [your-class]
    {

        // Simple example
        public string CreateBroadcast1()
        {
            var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
            client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");

            var request = new RestRequest("broadcast", Method.POST);
            request.AddParameter("Name", "Example simple TextBroadcast");
            request.AddParameter("Type", "TEXT");
            request.AddParameter("Message", "Hello, just testing broadcast");
            request.AddParameter("ScrubBroadcastDuplicates", "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:ResourceReference xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource">

    <r:Id>2826971003</r:Id>

<r:Location>https://www.callfire.com/api/1.1/rest/broadcast/2826971001</r:Location>

</r:ResourceReference>

Example

using RestSharp;

namespace [your-namespace]
{
    public class [your-class]
    {
        // A little more complicated example with text to speech
        public string CreateBroadcast2()
        {
            var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
            client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");

            var request = new RestRequest("broadcast", Method.POST);
            request.AddParameter("Name", "Test Broadcast Service (text to speech)");
            request.AddParameter("Type", "VOICE");
            request.AddParameter("From ", "9206596476");
            request.AddParameter("MaxAttempts ", "5");
            request.AddParameter("MinutesBetweenAttempts", "10");
            request.AddParameter("RetryResults", "BUSY");
            request.AddParameter("AnsweringMachineConfig", "LIVE_IMMEDIATE");
            request.AddParameter("LiveSoundText", "Hello, just testing broadcast for a person answer");
            request.AddParameter("MachineSoundText", "Hello, just testing broadcast for an machine answer");
            request.AddParameter("MachineSoundTextVoice", "FEMALE2");
            request.AddParameter("TransferSoundText", "Hello, just testing broadcast for transfer");
            request.AddParameter("TransferSoundTextVoice ", "FEMALE2");
            request.AddParameter("TransferDigit", "8");
            request.AddParameter("TransferNumber", "2135551212");
            request.AddParameter("ScrubBroadcastDuplicates", "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:ResourceReference xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource">

    <r:Id>2826971003</r:Id>

<r:Location>https://www.callfire.com/api/1.1/rest/broadcast/2826971003</r:Location>

</r:ResourceReference>