List all Calls on a contact

I’m trying to get a list of all Outbound calls made to a specific client.
I have tried this endpoint:
crm/v3/objects/calls/search

With a POST request and this body
{
“filterGroups”:[
{
“filters”:[
{
“propertyName”:“hs_call_callee_object_id”,
“operator”:“EQ”,
“value”:“ID_OF_CONTACT_HERE”
},
{
“propertyName”:“hs_call_direction”,
“operator”:“EQ”,
“value”:“OUTBOUND”
}
]
}
],
“sorts”:[
],
“properties”:[
“hs_call_status”
],
“limit”:100,
“after”:0
}
However it’s not returning the correct count. For example - it returns 7 call objects in the response when it should be 14. If it hit this endpoint with a GET request
/crm/v4/objects/contact/ID_OF_CLIENT_HERE/associations/call?limit=100
It returns 14 calls which is correct. The reason i want to use the first endpoint mentioned is that i can pass the created_at date in the body to only get calls made after a specific date.
Any advice or suggestions on why these two endpoints dont match?

Hi @NTohill

The discrepancy you’re experiencing between the two endpoints might be due to differences in their behavior and underlying data structures. The /crm/v3/objects/calls/search endpoint uses the search API, which provides more advanced filtering and querying capabilities. On the other hand, the /crm/v4/objects/contact/{contactId}/associations/call endpoint retrieves associations between a contact and its calls.

In your case, it seems like the search API endpoint is not returning the expected count. One possible reason could be the use of the hs_call_callee_object_id property in the filter, which might not be capturing all the relevant calls.

To troubleshoot this issue, you can try modifying your search API request as follows:

Remove the hs_call_callee_object_id filter and use the hs_call_to property instead. The hs_call_to property represents the phone number or email associated with the callee.
Adjust the value field in the filter to match the callee’s phone number or email exactly.
This modification ensures that the search API filters based on the callee’s contact information accurately.

If the issue persists, you can consider reaching out to the CRM platform’s support team for further assistance. They will have more in-depth knowledge about the platform’s API behavior and can provide guidance specific to your implementation.

Hope this will helps you out. Please mark it as Solution Accepted to help other Community member. Thanks!

Thanks for your suggestion.
I changed it to hs_call_to_number to match the field here Accounts Dashboard | HubSpot
So now it’s returning 8 - not sure how its returned one more but still not the correct 14.
I’ll try to reach out and get more information on this