https://retellai.com/?utm_source=discord&utm_medium=seo logo
Could you send me the most up-to-date API document...
# ❓・ai-evy-support
b
@AI Evy Could you send me the most up-to-date API documentation?
a
Thanks for tagging me @boroca.guy. I'll look through relevant sources and get back to you shortly.
### Answer You can access the Retell AI API documentation at [) . [(1) ]() [(2) ]() [(3) ]() Here are some key sections: - **API Key Overview**: [API Key Overview]() - covers authentication and webhook API keys [(1) ]() - **API Reference**: Includes endpoints like [List Chat]() and [Update Voice Agent]() [(2) ]() [(3) ]() - **Create Phone Call**: [Create Phone Call API]() for outbound calls [(4) ]() To authenticate API requests, include your API key in the header: [(1) ]()
Copy code
Authorization: Bearer YOUR_API_KEY
You can find your API key in the Retell dashboard under the API Keys section. [(5) ](

▾

)
​ To learn more, see the sources I considered: [[1] API Key Overview](https://docs.retellai.com/accounts/api-keys-overview) [[2] List Chat](https://docs.retellai.com/api-references/list-chat) [[3] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) [[4] How can I create an outbound call](https://retell.discourse.group/t/how-can-i-create-an-outbound-call/132) [[5] Make x Retell Tutorial | How to trigger a call from google sheet](

https://www.youtube.com/watch?v=pjm8y3uILg4▾

) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
Does the List Calls return the total number of calls?
@AI Evy Does the List Calls return the total number of calls?
a
Thanks for the follow-up, @boroca.guy. I'll get back to you soon.
### Answer The List Calls endpoint does not return a total count of calls in its response. [(1) ]() The endpoint returns an array of call objects with details like
call_id
,
call_status
,
transcript
,
recording_url
, etc., but there is no field for the total number of calls matching your filter criteria. To retrieve more than the default limit of 50 calls (max 1000 per request) , you can use the
pagination_key
parameter to continue fetching the next page of calls. If you need to count the total number of calls, you would need to paginate through all results and count them on your end.
​ To learn more, see the sources I considered: [[1] List Calls](https://docs.retellai.com/api-references/list-calls) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy But fetching all pages will be slow. What parameters can I pass in the request to receive the call list as quickly as possible? I only need the pagination keys and the total number. Then, I will fetch all pages to get the call details.
a
Thanks for the follow-up, @boroca.guy. I'll get back to you soon.
### Answer Unfortunately, the List Calls endpoint does not provide a way to retrieve just pagination keys or a total count without fetching the full call data. [(1) ]() The available parameters to control the request are: - **`limit`**: Set this to the maximum value of 1000 to reduce the number of requests needed - **`sort_order`**: Choose
ascending
or
descending
(default) based on
start_timestamp
- **`pagination_key`**: Use the last
call_id
from each response to fetch the next page - **`filter_criteria`**: Use timestamp filters like
start_timestamp
ranges to narrow down results There is no parameter to return a lightweight response with only pagination metadata or total counts. Each request returns the full call objects. The recommended approach is to use a loop with `pagination_key`: [(2) ]() [(3) ]() 1. Call
list-calls
with
limit: 1000
2. Store the last
call_id
from the returned list 3. Call
list-calls
again with
pagination_key
set to that last
call_id
4. Repeat until an empty array is returned If you need faster performance, consider filtering by timestamp ranges to reduce the dataset size per request. [(1) ]()
​ To learn more, see the sources I considered: [[1] List Calls](https://docs.retellai.com/api-references/list-calls) [[2] Unable to get call logs from API](https://discord.com/channels/1186424376300679209/1308107545453264896) [[3] List calls endpoint broken](https://discord.com/channels/1186424376300679209/1313240095549296802) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.