https://retellai.com/?utm_source=discord&utm_medium=seo logo
is there a way to filter by time on the chat endpo...
# ❓・ai-evy-support
n
@AI Evy is there a way to filter by time on the chat endpoint? https://api.retellai.com/list-chat
a
Thanks for tagging me @nicolas_46952. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available documentation, the List Chat endpoint does not appear to support time-based filtering parameters [(1) ]() . The endpoint documentation does not list any query parameters for filtering by timestamp or date range . The endpoint returns all chats without built-in time filtering options . Each chat response does include
start_timestamp
and
end_timestamp
fields (in milliseconds since epoch) , so you would need to filter the results client-side based on these timestamp fields after retrieving the chat list.
​ To learn more, see the sources I considered: [[1] List Chat](https://docs.retellai.com/api-references/list-chat) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy how can i make sure to get all chats in history? any kind of pagination?
a
Thanks for the follow-up, @nicolas_46952. I'll get back to you soon.
### Answer Based on the available documentation, the List Chat Agents endpoint supports pagination through the
pagination_key
and
pagination_key_version
parameters [(1) ]() . To retrieve all chats in history using pagination: 1. Make an initial request without pagination parameters to get the first page 2. Use the
limit
parameter to control how many agents are returned per request (ranges between 1 and 1000, default is 1000) 3. The pagination key is represented by an agent id, and the pagination key and version pair is exclusive (not included in the fetched page) 4. Use the last agent's
agent_id
and
version
from the response as your
pagination_key
and
pagination_key_version
for the next request 5. Continue fetching pages until no more results are returned The endpoint accepts these pagination query parameters: - `limit`: A limit on the number of objects to be returned (1-1000, default 1000) - `pagination_key`: The agent id to continue fetching from - `pagination_key_version`: The version of the agent associated with the pagination_key When paginating, both the
pagination_key
and its
version
must be provided to ensure consistent ordering and to fetch the next page correctly .
​ To learn more, see the sources I considered: [[1] List Chat Agents](https://docs.retellai.com/api-references/list-chat-agents) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.