Skip to content
Get started

Get phone number history across the organization

call.phone_history() -> CallPhoneHistoryResponse
GET/calls/phone-history

Returns a map of phone numbers to the number of calls and associated campaigns across the entire organization. Useful for detecting contacts that have already been reached.

ReturnsExpand Collapse
class CallPhoneHistoryResponse:
phone_history: Dict[str, PhoneHistory]
campaigns: List[PhoneHistoryCampaign]
id: str
name: str
count: float
do_not_contact: bool
hot: bool
last_called_at: Optional[str]
last_outcome: Optional[Literal["not_interested", "interested", "completed", "requested_callback_later"]]
One of the following:
"not_interested"
"interested"
"completed"
"requested_callback_later"
reached_human: bool

Get phone number history across the organization

import os
from revox import Revox

client = Revox(
    api_key=os.environ.get("REVOX_API_KEY"),  # This is the default and can be omitted
)
response = client.call.phone_history()
print(response.phone_history)
{
  "phone_history": {
    "foo": {
      "campaigns": [
        {
          "id": "id",
          "name": "name"
        }
      ],
      "count": 0,
      "do_not_contact": true,
      "hot": true,
      "last_called_at": "last_called_at",
      "last_outcome": "not_interested",
      "reached_human": true
    }
  }
}
Returns Examples
{
  "phone_history": {
    "foo": {
      "campaigns": [
        {
          "id": "id",
          "name": "name"
        }
      ],
      "count": 0,
      "do_not_contact": true,
      "hot": true,
      "last_called_at": "last_called_at",
      "last_outcome": "not_interested",
      "reached_human": true
    }
  }
}