https://retellai.com/?utm_source=discord&utm_medium=seo logo
Unable to get call logs from API
# ❓・bug-report
d
I have recently switched to retell from vapi, currently doing 10k calls a week for a large healthcare client. I have been using the list calls endpoint but it seems it won't return more than ~1000 calls no matter what the limit is set to. Some help with this would be amazing as we can't even pull the calls from a single day since we do more than 1k every day.
e
cc @Florian - support @ Retell AI Can you check this one?
f
@deephealth I ran into the same issue. It’s doing paging but it’s not very clear from the documentation
I can send you a code how to do it later I’m not at my computer
Basically do a do while loop
Give the last call id
Let me know if this makes sense
The Retell AI API's List Calls endpoint supports pagination to efficiently manage large sets of call data. This is achieved through the pagination_key parameter, which allows you to retrieve data in sequential pages. Pagination Parameters: pagination_key: A unique identifier representing the starting point for the next set of results. This key corresponds to a specific call ID and is exclusive, meaning the call associated with this ID is not included in the fetched results. Typically, you use the last call ID from the current list as the pagination_key for the subsequent request. If not set, the retrieval starts from the beginning. limit: Defines the maximum number of calls to return in a single response. The default value is 100. Example Workflow: Initial Request: Make a request without the pagination_key to retrieve the first set of calls. Subsequent Requests: Use the last call ID from the previous response as the pagination_key in the next request to fetch the following set of calls.
Did it work @deephealth ?
d
yeah that's what I was trying to use (pagination_key). I just didn't know I needed to for loop the request. do you have a snippet of this? I would love to see your implementation. It would help a lot. We're using the note SDK to try to build this into a dashboard, but this is been a roadblock alongside the cost format, not aligning with what we see in the billing or call logs in the retail dashboard.