Call

Calls endpoint

API path: https://www.callfire.com/api/1.1/rest/call

All api endpoints return response in XML format by default, to get response in JSON put .json at the end of API path.

Send a call

Start sending calls using VoiceBroadcastConfig or by setting up an IVR using IvrBroadcastConfig. Sending a call requires at least a ToNumber and sound id or an IVR. The returned broadcastId can be passed to QueryCalls to get state of call actions in campaign and get list of individual callIds for use in GetCall request.

Operation parameters

Note: SoundText or SoundId is required

Example request

$ curl https://www.callfire.com/api/1.1/rest/call.json \
    -X POST \
    -u login:password \
    -d Type=VOICE \
    -d BroadcastName=Api broadcast \
    -d To=12132212384,12132212384 \
    -d From=12132212384 \
    -d RetryResults=BUSY \
    -d RetryPhoneTypes=HOME_PHONE \
    -d LocalRestrictBegin=10:00:00 \
    -d LocalRestrictEnd=14:00:00 \
    -d LiveSoundText=live text example \
    -d LiveSoundTextVoice=MALE1 \
    -d AnsweringMachineConfig=LIVE_WITH_AMD \
    -d MachineSoundText=AM text \
    -d MaxActiveTransfers=2 \
    -d Label=label1 \
    -d Label=label2

Example response

response code - 201 Created

{
    "ResourceReference": {
        "Id":609951003,
        "Location":"https://www.callfire.com/api/1.1/rest/broadcast/609951003"
    }
}

Query calls

Query for calls using standard ActionQuery which filters on batchId, broadcastId, toNumber, etc.

Operation parameters

Example request

$ curl https://www.callfire.com/api/1.1/rest/call.json \
    -u login:password \
    -X GET \
    -d MaxResults=2 \
    -d BroadcastId=6117655003 \
    -d Result=LA \
    -d IntervalBegin=2016-02-01'T'23:00:00 \
    -d IntervalEnd=2016-03-01'T'23:00:00

Example response

response code - 200 OK

{
  "ResourceList": {
    "@totalResults": 1,
    "Call": [
      {
        "@id": 961660416003,
        "FromNumber": "12132555384",
        "ToNumber": {
          "value": "12132212384"
        },
        "State": "FINISHED",
        "BatchId": 10519301003,
        "BroadcastId": 11865457003,
        "ContactId": 733653129003,
        "Inbound": false,
        "Created": "2016-06-24T11:08:55Z",
        "Modified": "2016-06-24T11:10:08Z",
        "FinalResult": "LA",
        "CallRecord": [
          {
            "@id": 534795672003,
            "Result": "LA",
            "FinishTime": "2016-06-24T11:10:08Z",
            "BilledAmount": 1.0,
            "SwitchId": "bf915058-9394-4001-a53b-ca2266c4aad2",
            "OriginateTime": "2016-06-24T11:09:33Z",
            "AnswerTime": "2016-06-24T11:09:58Z",
            "Duration": 10
          }
        ],
        "AgentCall": false
      }
    ]
  }
}

Get single call

Return individual call action. See QueryCalls to return a list of call actions and determine individual callIds.

Operation parameters

Example request

$ curl https://www.callfire.com/api/1.1/rest/call/6090706003.json \
    -u login:password

Example response

response code - 200 OK

{
  "Resource": {
    "Call": {
      "@id": 959189031003,
      "FromNumber": "12677745100",
      "ToNumber": {
        "value": "17172224889"
      },
      "State": "FINISHED",
      "BatchId": 10478715003,
      "BroadcastId": 12400358003,
      "ContactId": 659475129003,
      "Inbound": false,
      "Created": "2016-06-22T18:31:28Z",
      "Modified": "2016-06-22T18:31:49Z",
      "FinalResult": "LA",
      "CallRecord": [
        {
          "@id": 532611322003,
          "Result": "LA",
          "FinishTime": "2016-06-22T18:31:49Z",
          "BilledAmount": 0.015,
          "SwitchId": "0a697e29-e2ad-4055-b11c-9f39abb96d10",
          "OriginateTime": "2016-06-22T18:31:30Z",
          "AnswerTime": "2016-06-22T18:31:44Z",
          "Duration": 5
        }
      ],
      "AgentCall": false
    }
  }
}