How do I get all calls done by an assistant?
# support
r
Hi team, I am having issues fetching all calls from an assistant, there is 1000 limit but is there some constraint with how long ago the call can be retrieved? I would like to just fetch all call ever done by an assistant, with pagination
v
Based on the information I found, you can retrieve calls associated with an assistant using the "GET List Calls" API endpoint (
/api-reference/calls/list
). This endpoint has a limit parameter that defaults to 100 and can be set between 0-1000. For pagination, parameters like
limit
and
createdAtLt
might be useful, similar to how they work when listing assistants. To help you better, could you clarify which specific filtering parameter you're using to retrieve calls by assistant ID? This would help me provide more targeted guidance on implementing pagination for all calls associated with your assistant. Sources: - [Vapi API Reference](https://docs.vapi.ai/api-reference/calls/list) - [Discord conversation](https://discord.com/channels/1211482211119796234/1334868141280329850)
k
Use API with pagination (page and limit 1000) to fetch all calls for an assistant, looping through pages until no results are returned, there’s no time limit, so all historical calls can be retrieved this way..
r
Hi thanks for the reply, I don't see page property documented in the [API docs](https://docs.vapi.ai/api-reference/calls/list) or in the js vapi library Could you please help me understanding how to use it?
k
To paginate through the call records, use the limit (up to 1000) and page parameters, incrementing the page number until no more results are returned while the JavaScript SDK, loop through the pages, collecting and combining results until all records are fetched.
r
thanks for the details, it was confusing to me not seeing this option in the API docs
k
Nice
4 Views