Incoming Calls

An ‘Incoming Call’ is a request made by multiple subscribers to receive a call or SMS from with associated content: a message and/or survey. (The content will be accessed through voice in each subscriber’s language, and/or through SMS, depending on their settings.

List Incoming Calls

Method: GET

URL: https://go.votomobile.org/api/v1/incoming_calls

Parameters:

  • api_key

Returns:

{
  "status": 200,
  "code": 1000,
  "data": {
      "incoming_calls": [
          {
              "id": "9",
              "title": "Test Survey",
              "message_id": null,
              "survey_id": "1",
              "tree_id": null,
              "poll_id": "6",
              "has_voice": "1",
              "has_sms": "0",
              "should_call_back": "1",
              "override_callback_content_type": "1",
              "override_callback_sender_id": null,
              "confirm_answer_before_callback": "1",
              "resume_survey_positions_in_same_poll": "0",
              "handle_incoming_sms_as_first_response": "0",
              "retry_attempts_short": "3",
              "retry_delay_short": "1",
              "retry_attempts_long": "1",
              "retry_delay_long": "60",
              "created_at": "2015-04-01 22:15:17",
              "updated_at": "2015-09-29 04:48:33",
              "webhook": {
                  "url": "http://test.com",
                  "method": "POST",
                  "secret": "test_secret"
              }
          },
          {
              "id": "10",
              "title": "Test Survey 2",
              "message_id": null,
              "survey_id": "3",
              "tree_id": null,
              "poll_id": "47",
              "has_voice": "1",
              "has_sms": "1",
              "should_call_back": "1",
              "override_callback_content_type": "0",
              "override_callback_sender_id": null,
              "confirm_answer_before_callback": "1",
              "resume_survey_positions_in_same_poll": "0",
              "handle_incoming_sms_as_first_response": "0",
              "retry_attempts_short": "3",
              "retry_delay_short": "1",
              "retry_attempts_long": "1",
              "retry_delay_long": "60",
              "created_at": "2015-09-06 07:36:49",
              "updated_at": "2015-09-09 03:53:08",
              "webhook": null
          }
      ]
  },
  "message": "Fetched All Incoming Calls Successfully.",
  "more_info": ""
}

List Details Of An Incoming Call

Retrieve details of an incoming call, including updated statistics for last_accessed and number_of_times_accessed.

Method: GET

URL: https://go.votomobile.org/api/v1/incoming_calls/[incoming_call_id]

Parameters:

  • api_key

Returns:

{
  "status": 200,
  "code": 1000,
  "data": {
      "incoming_call": {
          "id": "9",
          "title": "Test Survey",
          "message_id": null,
          "survey_id": "1",
          "tree_id": null,
          "poll_id": "6",
          "has_voice": "1",
          "has_sms": "0",
          "should_call_back": "1",
          "override_callback_content_type": "1",
          "override_callback_sender_id": null,
          "confirm_answer_before_callback": "1",
          "resume_survey_positions_in_same_poll": "0",
          "handle_incoming_sms_as_first_response": "0",
          "retry_attempts_short": "3",
          "retry_delay_short": "1",
          "retry_attempts_long": "1",
          "retry_delay_long": "60",
          "created_at": "2015-04-01 22:15:17",
          "updated_at": "2015-09-29 04:48:33",
          "last_accessed": "2015-09-14 06:22:34",
          "webhook": {
              "url": "http://test.com",
              "method": "POST",
              "secret": "test_secret"
          },
          "number_of_times_accessed": 9
      }
  },
  "message": "Fetched Incoming Call Details Successfully.",
  "more_info": ""
}

Count Interactions (Delivery Logs) for an Incoming Call

Count the number of delivery logs (individual subscriber interactions) associated with an Incoming Call. You can optionally filter by delivery status and by date/time range.

Method: GET

URL: https://go.votomobile.org/api/v1/incoming_calls/[incoming_call_id]/counts

Parameters:

  • api_key
  • filter_delivery_status (optional): Include only interactions with this delivery_status (e.g.: ‘6’ for Finished (Completed); ‘5’ for Failed (No Answer), etc.)
  • filter_after_date (optional): Include only interactions that ended after this date/time. Allowed format: ‘2015-09-23’ or ‘2015-09-23 14:02:37’, in UTC.
  • filter_before_date (optional): Include only interactions that ended before this date/time. Allowed format: ‘2015-09-23’ or ‘2015-09-23 14:02:37’, in UTC.

Returns:

{
  "status": 200,
  "code": 1000,
  "data": {
      "incoming_call_id": "200147",
      "filter_delivery_status": "6",
      "filter_after_date": "2014-02-15",
      "count": 8
  },
  "message": "Fetched Incoming Call Counts: times accessed.",
  "more_info": "",
  "pagination": null,
  "url": "https://go.votomobile.org/api/v1/incoming_calls/200147/counts?filter_delivery_status=6&filter_after_date=2014-02-15"
}