Send calls post
Use the /calls API to send individual calls quickly. A verified Caller ID and sufficient credits are required to make a call. CallRecipient represents a single recipient identified by phone number or contact id in CallFire system. You can attach user-defined attributes to a Call action via CallRecipient.attributes property, attributes are available in Call action response
path
-
https://api.callfire.com/v2/calls POST
parameters
-
fields string
Limit fields received in response. E.g. fields: id, name or fields items (id, name), see more at [partial response](https://developers.callfire.com/docs.html#partial-response) page.
-
campaignId integer
Specifies a campaignId to send calls quickly on a previously created campaign
-
defaultLiveMessage string
Text to be turned into a sound, this text will be played when the phone is answered. Parameter can be overridden for any particular CallRecipient
-
defaultMachineMessage string
Text to be turned into a sound, this text will be played when answering machine is detected. Parameter can be overridden for any particular CallRecipient
-
defaultLiveMessageSoundId integer
Id of sound file to play if phone is answered. Parameter can be overridden for any particular CallRecipient
-
defaultMachineMessageSoundId integer
An id of a sound file to play if answering machine is detected. Parameter can be overridden for any particular CallRecipient
-
defaultVoice string
The voice set by default for all text-to-speech messages defined in CallRecipient objects or as default *Message properties
-
strictValidation boolean
Turns on strict validation for recipients. System will reply with BAD_REQUEST(400) if strictValidation = true and one of numbers didn't pass validation
-
body {...} list of ref
List of CallRecipient
-
attributes object
Map of user-defined string attributes associated with recipient
-
contactId integer
An id of existing contact used as recipient
-
dialplanXml string
An IVR xml document describing dialplan to setup an IVR broadcast. If dialplan is set there is no need to set live, machine and transfer sounds (or vice versa)
-
fromNumber string
~
-
liveMessage string
Text to be turned into a sound, this text will be played when the phone is answered
-
liveMessageSoundId integer
An id of a sound file to play if phone is answered
-
machineMessage string
Text to be used to turn into sound, this text will be played when answering machine is detected
-
machineMessageSoundId integer
An id of a sound file to play if answering machine is detected
-
phoneNumber string
Recipient's phone number in E.164 format (11-digit) or short code. Example: 12132000384
-
transferDigit string
A digit pressed to initiate the transfer
-
transferMessage string
Text to be turned into sound, this text will be played when the transfer digit is played
-
transferMessageSoundId integer
An id of a sound file to play if call is transferred
-
transferNumber string
Phone number in E.164 format (11-digit) to transfer the call to. Example: 12132000384
-
voice string
The voice to be used (MALE1, FEMALE1, FEMALE2, SPANISH1, FRENCHCANADIAN1)
Example Request
!/usr/bin/env bash
curl -u username:password -H "Content-Type:application/json" -X POST -d '
[
{
"phoneNumber": "12135551100",
"liveMessage": "Hello, Alice, this is message for live answer",
"machineMessage": "Hello, Alice, this is message for answering machine"
},
{
"phoneNumber": "12135551101",
"liveMessage": "Hello, Bob, this is message for live answer",
"machineMessage": "Hello, Bob, this is message for answering machine"
}
]' "https://api.callfire.com/v2/calls?campaignId=4050600003&defaultVoice=MALE1&fields=items(id,state,toNumber)"
Example Response
{
"items": [
{
"id": 13394,
"fromNumber": "12135551189",
"toNumber": "12135551100",
"state": "READY",
"campaignId": 10,
"batchId": 6,
"contact": {
"id": 4096,
"homePhone": "12135551100"
},
"inbound": false,
"created": 1443373382000,
"modified": 1443373382000,
"agentCall": false
},
{
"id": 13395,
"fromNumber": "12135551189",
"toNumber": "12135551101",
"state": "READY",
"campaignId": 10,
"batchId": 6,
"contact": {
"id": 4097,
"homePhone": "12135551101"
},
"inbound": false,
"created": 1443373386000,
"modified": 1443373386000,
"agentCall": false
}
]
}